com.logicboxes.foundation.sfnb.order.hosting.web.linux
Class LinuxHostingOrder

java.lang.Object
  extended by com.logicboxes.foundation.sfnb.order.hosting.web.linux.LinuxHostingOrder

public class LinuxHostingOrder
extends java.lang.Object


Constructor Summary
LinuxHostingOrder()
           
 
Method Summary
 java.util.HashMap add(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, java.lang.String productkey, java.lang.String domainName, int customerId, int noOfMonths, java.lang.String packageKey, boolean ssl, java.lang.String invoiceOption)
          Places a Web Hosting Order for the specified domain name.
 java.util.HashMap del(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int entityId)
          Deletes the Web Hosting service for a specified Order
 java.util.HashMap enableSSL(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId)
          Enables SSL for Linux Hosting Order till the expiry date of that order
 java.util.HashMap getDeletionRefundAmount(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId)
          Returns the refund details on deleting a specified order.
 java.util.HashMap getDetails(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId, java.util.Vector option)
          Returns details for a particular Linux Web Hosting Order.
 java.util.HashMap getDetailsByDomain(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, java.lang.String domainName, java.util.Vector option, java.lang.String productkey)
          Returns the complete details of a particular order from domainname.
 java.util.HashMap getModPricing(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId, int noOfMonths, java.lang.String packagekey, boolean ssl, int excessBandwidth)
          Deprecated. 
 java.util.HashMap getMonthlyCostAndValidate(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, java.lang.String productkey, java.lang.String packagekey, boolean ssl, int excessBandwidth)
          Performs and Data Validation of the add Order params and returns the monthly and prorated cost of the order
 int getOrderIdByDomain(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, java.lang.String domainName, java.lang.String productkey)
          Returns the orderid of a particular order from domainname.
 java.util.HashMap mod(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId, int noOfMonths, java.lang.String packagekey, boolean ssl, int excessBandwidth)
          Deprecated. 
 java.util.HashMap renew(java.lang.String SERVICE_USERNAME, java.lang.String SERVICE_PASSWORD, java.lang.String SERVICE_ROLE, java.lang.String SERVICE_LANGPREF, int SERVICE_PARENTID, int orderId, int renewMonths)
          Renews an existing Linux Hosting Order.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinuxHostingOrder

public LinuxHostingOrder()
Method Detail

getMonthlyCostAndValidate

public java.util.HashMap getMonthlyCostAndValidate(java.lang.String SERVICE_USERNAME,
                                                   java.lang.String SERVICE_PASSWORD,
                                                   java.lang.String SERVICE_ROLE,
                                                   java.lang.String SERVICE_LANGPREF,
                                                   int SERVICE_PARENTID,
                                                   java.lang.String productkey,
                                                   java.lang.String packagekey,
                                                   boolean ssl,
                                                   int excessBandwidth)
Performs and Data Validation of the add Order params and returns the monthly and prorated cost of the order

Parameters:
productkey - The product key identifies the type of the Web Hosting Order.
packagekey - The packagekey identifies a hosting plan. The plan has all details for adding an order.
The packagekey should be a valid value as returned by the getPricingKeyPricingParamMap method.
Returns:
HashMap returns a HashMap containing the following keys
[monthlycost] - Monthly Customer Cost for the Order Params
[proratedcost] - Prorated Cost of the params for the current Month
eg. [proratedcost] - 10.92
[monthlycost] - 12.2
Throws:
LogicBoxesException

add

public java.util.HashMap add(java.lang.String SERVICE_USERNAME,
                             java.lang.String SERVICE_PASSWORD,
                             java.lang.String SERVICE_ROLE,
                             java.lang.String SERVICE_LANGPREF,
                             int SERVICE_PARENTID,
                             java.lang.String productkey,
                             java.lang.String domainName,
                             int customerId,
                             int noOfMonths,
                             java.lang.String packageKey,
                             boolean ssl,
                             java.lang.String invoiceOption)
Places a Web Hosting Order for the specified domain name. Since this is a billable action your reseller account must have sufficient funds to add the Web Hosting order.

Parameters:
productkey - The product key identifies the type of the Web Hosting Order. The current acceptable values for this parameter is
lhbus - Linux Web Hosting in USA
lhbin - Linux Web Hosting in India
domainName - The domain name for which the order is placed.
customerId - The customer under whom the orders should be added.
noOfMonths - The number of months for which the order is placed. The minimum period for which the order can be added is 6 months.
packageKey - The packagekey identifies a hosting plan. The plan has all details for adding an order.
The packagekey should be a valid value as returned by the getPricingKeyPricingParamMap method.
invoiceOption - This parameter will decide how the Customer Invoices will be handled.

NoInvoice - If this value is passed, then no customer invoice will be generated for the domains.

PayInvoice - If this value is passed, then a customer invoice will be generated for the domains in the first step. If there is sufficient balance in the Customer's Debit Account, then the invoices will be paid and the domains will be registered. If a customer has less balance than required, then as many domains as possible will be registered with the existing funds. All other orders will remain pending in the system.

KeepInvoice - If this value is passed, then a customer invoice will be generated for the domains. However, these invoices will not be paid. They will be kept pending, while the orders will be executed.

OnlyAdd - The order will simply be added but NOT executed in the system. A customer invoice will be generated. However, the invoice will not be paid.

Returns:
HashMap A HashMap with the result of Order addition. The HashMap will have key-values as follows:

entityid=500 (orderid)
description=webhosting.com
status=Success

Incase you have chosen "KeepInvoice" or "PayInvoice", the return HashMap will also contain the following data:

customerid=200
invoiceid=8000
sellingcurrencysymbol=INR
sellingamount=-7000.000
unutilisedsellingamount=-7000.000

invoiceid is the Id that you will need to pass to Fund.payCustomerTransaction if you wish to pay the invoice at a later date.

selllingamount is the Invoice amount in your Selling Currency

unutilisedselllingamount is the Pending Invoice amount in your Selling Currency.

In case of "KeepInvoice", the pending amount will always be equal to the invoice amount.

In case of "PayInvoice", if the Customer does not have sufficient funds to pay the entire invoice amount, unutilisedsellingamount will reflect the balance amount that is pending.

If the invoice has been completely paid, the unutilisedsellingamount will be 0.

Throws:
LogicBoxesException

mod

@Deprecated
public java.util.HashMap mod(java.lang.String SERVICE_USERNAME,
                                        java.lang.String SERVICE_PASSWORD,
                                        java.lang.String SERVICE_ROLE,
                                        java.lang.String SERVICE_LANGPREF,
                                        int SERVICE_PARENTID,
                                        int orderId,
                                        int noOfMonths,
                                        java.lang.String packagekey,
                                        boolean ssl,
                                        int excessBandwidth)
Deprecated. 

Modifies an existing Linux Web Hosting Order based to the parameters desired.

Parameters:
orderId - The OrderId of the Order which is to be modified.
noOfMonths - The no of months for which the order is to be renewed, pass 0 if you do not wish to extend the duration of the order.
packagekey - The identifier key of the plan to which the order needs to upgraded or downgraded to.
ssl - True or false depending whether the user wants to enable or disable Dedicated IP / SSL support for the order.
excessBandwidth - is the Bandwith which the user wants over and above the bandwidth of the order's current plan.
Returns:
HashMap with following keys
  • status - It will be "success" if action was successful
  • endDate - This is the value in seconds for period of validity
  • invoiceid - Invoice id for current modification
Throws:
LogicBoxesException

renew

public java.util.HashMap renew(java.lang.String SERVICE_USERNAME,
                               java.lang.String SERVICE_PASSWORD,
                               java.lang.String SERVICE_ROLE,
                               java.lang.String SERVICE_LANGPREF,
                               int SERVICE_PARENTID,
                               int orderId,
                               int renewMonths)
Renews an existing Linux Hosting Order.

Parameters:
orderId - The OrderId which is to be renewed.
renewMonths - The no of months for which the order is to be renewed.
Returns:
HashMap with following keys
  • invoiceid - ID for invoice generated
  • customercost - Cost for customer
  • customerid - customer's ID to which renewed order belongs
  • domainname - domain for which order is renewed
Certain other information related to the action are also returned as a part of the HashMap
Throws:
LogicBoxesException

getDeletionRefundAmount

public java.util.HashMap getDeletionRefundAmount(java.lang.String SERVICE_USERNAME,
                                                 java.lang.String SERVICE_PASSWORD,
                                                 java.lang.String SERVICE_ROLE,
                                                 java.lang.String SERVICE_LANGPREF,
                                                 int SERVICE_PARENTID,
                                                 int orderId)
Returns the refund details on deleting a specified order.

Parameters:
orderId - The OrderId for which the Refund details are required.
Returns:
Returns HashMap containing refund details The Keys of the HashMap are as follows:

childtype - Could be customer or reseller. If the order being deleted belongs to a direct customer, the childtype would be customer If the order being deleted belongs to a sub reseller, the childtype would be reseller

childcompany - The company of the customer / sub reseller

childname - Name of the customer / sub reseller

childrefund - The amount that will be refunded to the customer / sub reseller

userrefund - The amount that will be refunded to the reseller

Throws:
LogicBoxesException

del

public java.util.HashMap del(java.lang.String SERVICE_USERNAME,
                             java.lang.String SERVICE_PASSWORD,
                             java.lang.String SERVICE_ROLE,
                             java.lang.String SERVICE_LANGPREF,
                             int SERVICE_PARENTID,
                             int entityId)
Deletes the Web Hosting service for a specified Order

Parameters:
entityId - The Orderid for which the service needs to be deleted.
Returns:
HashMap with key "status". If value for this key is "success" than operation was successful

Certain other information related to the action is also returned as a part of the HashMap

Throws:
LogicBoxesException - if order does not belong to reseller who has invoked this method

getDetails

public java.util.HashMap getDetails(java.lang.String SERVICE_USERNAME,
                                    java.lang.String SERVICE_PASSWORD,
                                    java.lang.String SERVICE_ROLE,
                                    java.lang.String SERVICE_LANGPREF,
                                    int SERVICE_PARENTID,
                                    int orderId,
                                    java.util.Vector option)
Returns details for a particular Linux Web Hosting Order.

Parameters:
orderId - The Orderid for which the details are required.
option - Vector of different option for details listing. Allowed Option values are All, StatusDetails, PricingDetails, ExecutionInfoParams, OrderDetails
Returns:
HashMap - key/value pair for all fields depending upon the option
Throws:
LogicBoxesException

getModPricing

@Deprecated
public java.util.HashMap getModPricing(java.lang.String SERVICE_USERNAME,
                                                  java.lang.String SERVICE_PASSWORD,
                                                  java.lang.String SERVICE_ROLE,
                                                  java.lang.String SERVICE_LANGPREF,
                                                  int SERVICE_PARENTID,
                                                  int orderId,
                                                  int noOfMonths,
                                                  java.lang.String packagekey,
                                                  boolean ssl,
                                                  int excessBandwidth)
Deprecated. 

This method is used to determine the cost of Order Modification, if a particular order param is not modified the existing pricing param needs to be passed.

Parameters:
orderId - The OrderId which is to be modified.
noOfMonths - The no of months for which the order is to be renewed, pass 0 if you do not wish to extend the duration of the order.
packagekey - Identifier key of the plan for which the order needs to be added.
ssl - True or false depending whether the user wants to enable or disable Dedicated IP / SSL support for the order.
excessBandwidth - is the Bandwith which the user wants over and above the bandwidth of the order's current plan.
Returns:
HashMap returns a HashMap contains the following keys
[endDate] - End timestamp of the order (timestamp after the modification)
[modifyCostResult] - UpGrade/DownGrade/error
if modifyCostResult contains UpGrade or DownGrade the return HashMap would contain 2 more keys
[upgradecost] - customer modification cost
[resellerupgradecost] - reseller (self) modification cost
if modifyCostResult contains DownGrade the [upgradecost] key and [resellerupgradecost] key will always be 0.00
if modifyCostResult contains error the return HashMap will contain another key called error the values of which will be the error msg
Throws:
LogicBoxesException

getDetailsByDomain

public java.util.HashMap getDetailsByDomain(java.lang.String SERVICE_USERNAME,
                                            java.lang.String SERVICE_PASSWORD,
                                            java.lang.String SERVICE_ROLE,
                                            java.lang.String SERVICE_LANGPREF,
                                            int SERVICE_PARENTID,
                                            java.lang.String domainName,
                                            java.util.Vector option,
                                            java.lang.String productkey)
Returns the complete details of a particular order from domainname.

Parameters:
domainName - The domainName for which details are required
option - The various details that are required for the order. Valid entries are:

OrderDetails StatusDetails ContactIds RegistrantContactDetails AdminContactDetails TechContactDetails BillingContactDetails NsDetails DomainStatus PricingDetails

All

Returns:
Hashtable with name-value pairs for all the details of the order

orderid=123 entityid=123 description=foundationapi.org ns2=ns3.logicboxes.com ns1=ns1.logicboxes.com entitytypeid=7 eaqid=0 currentstatus=Active customercost=10.0 parentkey=1 domainstatus=[] orderstatus=[] creationtime=1060855310 classname=com.logicboxes.foundation.sfnb.order.domorg.DomOrg classkey=domorg domsecret=JKz42pbB5H cns={}, endtime=1092457910 domainname=foundationapi.org registrantcontactid=320 admincontactid=320 techcontactid=320 billingcontactid=320

If you have requested for the contact details as well, you will get keys as registrantcontact, billingcontact, admincontact and techcontact. The value for these keys will be a Hashtable with the following keys:

contactid=320 name=Contact company=FAPI customerid=21 parentkey=1 emailaddr=contact@fapi.com address1=Somewhere address2= address3= city=Someplace state= country=SH zip=12345 telnocc=123 telno=135435456 faxnocc= faxno= contacttype=[domorg]

Throws:
LogicBoxesException - if option value is null or Invalid SqlException if any Database related Exception occurs LogicBoxesException if any internal errors occur

getOrderIdByDomain

public int getOrderIdByDomain(java.lang.String SERVICE_USERNAME,
                              java.lang.String SERVICE_PASSWORD,
                              java.lang.String SERVICE_ROLE,
                              java.lang.String SERVICE_LANGPREF,
                              int SERVICE_PARENTID,
                              java.lang.String domainName,
                              java.lang.String productkey)
Returns the orderid of a particular order from domainname.

Parameters:
domainName - The domainName for which details are required
productkey - Productkey i.e. domcno, domorg, dotin etc
Returns:
int orderid of the domain name
Throws:
LogicBoxesException - if option value is null or Invalid SqlException if any Database related Exception occurs LogicBoxesException if any internal errors occur

enableSSL

public java.util.HashMap enableSSL(java.lang.String SERVICE_USERNAME,
                                   java.lang.String SERVICE_PASSWORD,
                                   java.lang.String SERVICE_ROLE,
                                   java.lang.String SERVICE_LANGPREF,
                                   int SERVICE_PARENTID,
                                   int orderId)
Enables SSL for Linux Hosting Order till the expiry date of that order

Parameters:
orderId - The OrderId for which ssl needs to be enabled
Returns:
HashMap with following keys
  • invoiceid - ID for invoice generated
  • customercost - Cost for customer
  • customerid - customer's ID to whom the order belongs
Throws:
LogicBoxesException