psoft.hsphere.resource.registrar
Class LoggableRegistrar

java.lang.Object
  extended bypsoft.hsphere.manager.Entity
      extended bypsoft.hsphere.resource.registrar.LoggableRegistrar
All Implemented Interfaces:
Registrar
Direct Known Subclasses:
AsyncLoggableRegistrar

public abstract class LoggableRegistrar
extends Entity
implements Registrar

LoggableRegistrar class is implemented to provide a possibility to store transaction information (registrar requests and responses) in the hsphere database. Each registrar class which extends LoggableRegistrar should implement the following methods:

 public boolean lookup(String domain, String tld, RegistrarTransactionData dat) throws Exception
 public void renew(String domain, String tld, String currentExpYear, int period, Map registrant, RegistrarTransactionData dat) throws Exception
 public void register(String domain, String tld, String login, String password, int period, Map registrant, Map tech, Map admin, Map billing, Collection dns, RegistrarTransactionData dat) throws Exception
 public void register(String domain, String tld, String login, String password, int period, Map registrant, Map tech, Map admin, Map billing, Collection dns, Map extraInfo, RegistrarTransactionData dat) throws Exception
 public void changeContacts(String domain, String tld, String login, String password, Map registrant, Map tech, Map admin, Map billing, RegistrarTransactionData dat) throws Exception
 public void setPassword(String domain, String tld, String login, String password, String newPassword, RegistrarTransactionData dat) throws Exception
 public String[] getSupportedTLDs() throws Exception
 public String getSignature()
 public void checkLogin() throws RegistrarException
 


Field Summary
static int CHANGECONTACTS
           
static int CHANGENAMESERVERS
           
static int CHANGEPASSWD
           
static int IS_TRANSFERED
           
static int LOOKUP
           
static int REGISTER
           
static int RENEW
           
static int TRANSFER
           
static int TRANSFER_LOOKUP
           
 
Constructor Summary
LoggableRegistrar(java.lang.Integer id, java.lang.String description)
           
 
Method Summary
 void changeContacts(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, java.util.Map registrant, java.util.Map tech, java.util.Map admin, java.util.Map billing)
          change contact info for the domain
abstract  void changeContacts(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, java.util.Map registrant, java.util.Map tech, java.util.Map admin, java.util.Map billing, RegistrarTransactionData dat)
           
static java.lang.String getTtType(int type)
           
 boolean isTransferable(java.lang.String name, java.lang.String tld)
          returns true if domain can be transfered
 boolean isTransferable(java.lang.String name, java.lang.String tld, RegistrarTransactionData dat)
           
 java.util.Date isTransfered(java.lang.String domain, java.lang.String tld)
          check if domain is transfered to a registar
 java.util.Date isTransfered(java.lang.String name, java.lang.String tld, RegistrarTransactionData dat)
           
 boolean lookup(java.lang.String domain, java.lang.String tld)
          Looks up if domain is available for registration
abstract  boolean lookup(java.lang.String domain, java.lang.String tld, RegistrarTransactionData dat)
           
 void register(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, int period, java.util.Map registrant, java.util.Map tech, java.util.Map admin, java.util.Map billing, java.util.Collection dns)
          Register domain name
 void register(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, int period, java.util.Map registrant, java.util.Map tech, java.util.Map admin, java.util.Map billing, java.util.Collection dns, java.util.Map extraInfo)
          Register domain name
abstract  void register(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, int period, java.util.Map registrant, java.util.Map tech, java.util.Map admin, java.util.Map billing, java.util.Collection dns, java.util.Map extraInfo, RegistrarTransactionData dat)
           
abstract  void register(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, int period, java.util.Map registrant, java.util.Map tech, java.util.Map admin, java.util.Map billing, java.util.Collection dns, RegistrarTransactionData dat)
           
 void renew(java.lang.String domain, java.lang.String tld, java.lang.String currentExpYear, int period, java.util.Map registrant)
          Used to renew domain
abstract  void renew(java.lang.String domain, java.lang.String tld, java.lang.String currentExpYear, int period, java.util.Map registrant, RegistrarTransactionData dat)
           
 void setLog(psoft.hsphere.resource.registrar.RegistrarLog log)
           
 void setPassword(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, java.lang.String newPassword)
          Reset password associated with domain
abstract  void setPassword(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, java.lang.String newPassword, RegistrarTransactionData dat)
           
 void transfer(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, java.util.Map registrant, java.util.Map tech, java.util.Map admin, java.util.Map billing, java.util.Collection dns)
          Transfer domain
 void transfer(java.lang.String domain, java.lang.String tld, java.lang.String login, java.lang.String password, java.util.Map registrant, java.util.Map tech, java.util.Map admin, java.util.Map billing, java.util.Collection dns, RegistrarTransactionData dat)
           
 void updateLog(long id, RegistrarTransactionData data, boolean success)
           
 long writeLog(java.lang.String domain, java.lang.String tld, int period, int trtype)
           
 
Methods inherited from class psoft.hsphere.manager.Entity
get, getDescription, getId, getKeys, getValues, setDescription
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface psoft.hsphere.resource.registrar.Registrar
checkLogin, get, getId, getSignature, getSupportedTLDs
 

Field Detail

REGISTER

public static final int REGISTER
See Also:
Constant Field Values

RENEW

public static final int RENEW
See Also:
Constant Field Values

LOOKUP

public static final int LOOKUP
See Also:
Constant Field Values

CHANGECONTACTS

public static final int CHANGECONTACTS
See Also:
Constant Field Values

CHANGEPASSWD

public static final int CHANGEPASSWD
See Also:
Constant Field Values

CHANGENAMESERVERS

public static final int CHANGENAMESERVERS
See Also:
Constant Field Values

TRANSFER

public static final int TRANSFER
See Also:
Constant Field Values

IS_TRANSFERED

public static final int IS_TRANSFERED
See Also:
Constant Field Values

TRANSFER_LOOKUP

public static final int TRANSFER_LOOKUP
See Also:
Constant Field Values
Constructor Detail

LoggableRegistrar

public LoggableRegistrar(java.lang.Integer id,
                         java.lang.String description)
                  throws ManagerException,
                         java.sql.SQLException
Method Detail

setLog

public void setLog(psoft.hsphere.resource.registrar.RegistrarLog log)

writeLog

public long writeLog(java.lang.String domain,
                     java.lang.String tld,
                     int period,
                     int trtype)

updateLog

public void updateLog(long id,
                      RegistrarTransactionData data,
                      boolean success)

isTransfered

public java.util.Date isTransfered(java.lang.String domain,
                                   java.lang.String tld)
                            throws java.lang.Exception
Description copied from interface: Registrar
check if domain is transfered to a registar

Specified by:
isTransfered in interface Registrar
Parameters:
domain - domain name
tld - domain tld
Returns:
exp. date of the transfered domain. null if not transfered yet.
Throws:
java.lang.Exception

isTransfered

public java.util.Date isTransfered(java.lang.String name,
                                   java.lang.String tld,
                                   RegistrarTransactionData dat)
                            throws java.lang.Exception
Throws:
java.lang.Exception

isTransferable

public boolean isTransferable(java.lang.String name,
                              java.lang.String tld)
                       throws java.lang.Exception
Description copied from interface: Registrar
returns true if domain can be transfered

Specified by:
isTransferable in interface Registrar
Parameters:
name - domain name
tld - domain TLD
Returns:
true, if can be transfered
Throws:
java.lang.Exception

isTransferable

public boolean isTransferable(java.lang.String name,
                              java.lang.String tld,
                              RegistrarTransactionData dat)
                       throws java.lang.Exception
Throws:
java.lang.Exception

lookup

public boolean lookup(java.lang.String domain,
                      java.lang.String tld)
               throws java.lang.Exception
Description copied from interface: Registrar
Looks up if domain is available for registration

Specified by:
lookup in interface Registrar
Parameters:
domain - domain name
tld - TLD
Returns:
true if domain available for registration
Throws:
java.lang.Exception

lookup

public abstract boolean lookup(java.lang.String domain,
                               java.lang.String tld,
                               RegistrarTransactionData dat)
                        throws java.lang.Exception
Throws:
java.lang.Exception

renew

public void renew(java.lang.String domain,
                  java.lang.String tld,
                  java.lang.String currentExpYear,
                  int period,
                  java.util.Map registrant)
           throws java.lang.Exception
Description copied from interface: Registrar
Used to renew domain

Specified by:
renew in interface Registrar
Parameters:
domain - domain name
tld - top level domain name (com, net...)
currentExpYear - current exparation year, needed by opensrs
period - number of years to renew for
registrant - registrant info.
Throws:
java.lang.Exception

renew

public abstract void renew(java.lang.String domain,
                           java.lang.String tld,
                           java.lang.String currentExpYear,
                           int period,
                           java.util.Map registrant,
                           RegistrarTransactionData dat)
                    throws java.lang.Exception
Throws:
java.lang.Exception

transfer

public void transfer(java.lang.String domain,
                     java.lang.String tld,
                     java.lang.String login,
                     java.lang.String password,
                     java.util.Map registrant,
                     java.util.Map tech,
                     java.util.Map admin,
                     java.util.Map billing,
                     java.util.Collection dns)
              throws java.lang.Exception
Description copied from interface: Registrar
Transfer domain

Specified by:
transfer in interface Registrar
Parameters:
domain - domain to transfer
tld - TLD
login - login to use for registrar - alpahnumeric, h-sphere user login name
password - password to use for registrar
registrant - registrant info
tech - tech info
admin - admin info
billing - billing info
dns - list of name servers
Throws:
java.lang.Exception

transfer

public void transfer(java.lang.String domain,
                     java.lang.String tld,
                     java.lang.String login,
                     java.lang.String password,
                     java.util.Map registrant,
                     java.util.Map tech,
                     java.util.Map admin,
                     java.util.Map billing,
                     java.util.Collection dns,
                     RegistrarTransactionData dat)
              throws java.lang.Exception
Throws:
java.lang.Exception

register

public void register(java.lang.String domain,
                     java.lang.String tld,
                     java.lang.String login,
                     java.lang.String password,
                     int period,
                     java.util.Map registrant,
                     java.util.Map tech,
                     java.util.Map admin,
                     java.util.Map billing,
                     java.util.Collection dns)
              throws java.lang.Exception
Description copied from interface: Registrar
Register domain name

Specified by:
register in interface Registrar
Parameters:
domain - domain to register
tld - TLD
login - login to use for registrar - alpahnumeric, h-sphere user login name
password - password to use for registrar
period - number of years to register for
registrant - registrant info
tech - tech info
admin - admin info
billing - billing info
dns - list of name servers
Throws:
java.lang.Exception

register

public abstract void register(java.lang.String domain,
                              java.lang.String tld,
                              java.lang.String login,
                              java.lang.String password,
                              int period,
                              java.util.Map registrant,
                              java.util.Map tech,
                              java.util.Map admin,
                              java.util.Map billing,
                              java.util.Collection dns,
                              RegistrarTransactionData dat)
                       throws java.lang.Exception
Throws:
java.lang.Exception

register

public void register(java.lang.String domain,
                     java.lang.String tld,
                     java.lang.String login,
                     java.lang.String password,
                     int period,
                     java.util.Map registrant,
                     java.util.Map tech,
                     java.util.Map admin,
                     java.util.Map billing,
                     java.util.Collection dns,
                     java.util.Map extraInfo)
              throws java.lang.Exception
Description copied from interface: Registrar
Register domain name

Specified by:
register in interface Registrar
Parameters:
domain - domain to register
tld - TLD
login - login to use for registrar, alpahnumeric, h-sphere user login name
password - password to use for registrar
period - number of years to register for
registrant - registrant info
tech - tech info
admin - admin info
billing - billing info
dns - list of name servers
extraInfo - additional parameters needed to register TLDs like .info
Throws:
java.lang.Exception

register

public abstract void register(java.lang.String domain,
                              java.lang.String tld,
                              java.lang.String login,
                              java.lang.String password,
                              int period,
                              java.util.Map registrant,
                              java.util.Map tech,
                              java.util.Map admin,
                              java.util.Map billing,
                              java.util.Collection dns,
                              java.util.Map extraInfo,
                              RegistrarTransactionData dat)
                       throws java.lang.Exception
Throws:
java.lang.Exception

changeContacts

public void changeContacts(java.lang.String domain,
                           java.lang.String tld,
                           java.lang.String login,
                           java.lang.String password,
                           java.util.Map registrant,
                           java.util.Map tech,
                           java.util.Map admin,
                           java.util.Map billing)
                    throws java.lang.Exception
Description copied from interface: Registrar
change contact info for the domain

Specified by:
changeContacts in interface Registrar
Parameters:
domain - domain name
tld - TLD
login - login associated with the domain in the registrar, alpahnumeric, h-sphere user login name
password - password associated with the domain in the registrar
registrant - registrant info
tech - tech info
admin - admin info
billing - billing info
Throws:
java.lang.Exception

changeContacts

public abstract void changeContacts(java.lang.String domain,
                                    java.lang.String tld,
                                    java.lang.String login,
                                    java.lang.String password,
                                    java.util.Map registrant,
                                    java.util.Map tech,
                                    java.util.Map admin,
                                    java.util.Map billing,
                                    RegistrarTransactionData dat)
                             throws java.lang.Exception
Throws:
java.lang.Exception

setPassword

public void setPassword(java.lang.String domain,
                        java.lang.String tld,
                        java.lang.String login,
                        java.lang.String password,
                        java.lang.String newPassword)
                 throws java.lang.Exception
Description copied from interface: Registrar
Reset password associated with domain

Specified by:
setPassword in interface Registrar
Parameters:
domain - domain name
tld - TLD
login - login associated with the domain in the registrar, alpahnumeric, h-sphere user login name
password - password associated with the domain in the registrar
newPassword - new password
Throws:
java.lang.Exception

setPassword

public abstract void setPassword(java.lang.String domain,
                                 java.lang.String tld,
                                 java.lang.String login,
                                 java.lang.String password,
                                 java.lang.String newPassword,
                                 RegistrarTransactionData dat)
                          throws java.lang.Exception
Throws:
java.lang.Exception

getTtType

public static java.lang.String getTtType(int type)


Copyright © 2004 Positive Software Corporation. All Rights Reserved.