psoft.hsphere.resource.registrar
Interface Registrar

All Known Implementing Classes:
LoggableRegistrar

public interface Registrar

Registrar interface is implemented to provide integration with domain registrars. The implementation has to be thread safe. Single instance of the class will be used to register all domains.

 Following functionality is supported:
 - domain availability lookup
 - domain registration
 - contact info change
 - domain renew
 - change user password
 billing/admin/tech info represented as a map with following fields
 address1
 city
 state
 country
 email
 first_name
 last_name
 org_name
 phone
 postal_code
 
 extra map has following fields:
 tld = us/ca
 if tld == us
 app_purpose
 nexus_category
 nexus_validator
 if tld == ca
 isa_trademark
 legal_type
 lang_pref
 domain-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
 void checkLogin()
          Verifies if login is valid for registrar.
 java.lang.String get(java.lang.String key)
          returns registrar setting associated with the key
 int getId()
          ID of the instance of registrar, internal
 java.lang.String getSignature()
          returns public signature of registrar (name), like Enom, OpenSRS - usually hard coded
 java.lang.String[] getSupportedTLDs()
          lists the TLDs supported by registrar
 boolean isTransferable(java.lang.String name, java.lang.String tld)
          returns true if domain can be transfered
 java.util.Date isTransfered(java.lang.String name, java.lang.String tld)
          check if domain is transfered to a registar
 boolean lookup(java.lang.String domain, java.lang.String tld)
          Looks up if domain is available for registration
 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
 void renew(java.lang.String domain, java.lang.String tld, java.lang.String currentExpYear, int period, java.util.Map registrant)
          Used to renew domain
 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
 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
 

Method Detail

getId

public int getId()
ID of the instance of registrar, internal

Returns:
instance of registrar.

getSupportedTLDs

public java.lang.String[] getSupportedTLDs()
                                    throws java.lang.Exception
lists the TLDs supported by registrar

Returns:
list of TLDs supported by registrar.
Throws:
java.lang.Exception

getSignature

public java.lang.String getSignature()
returns public signature of registrar (name), like Enom, OpenSRS - usually hard coded

Returns:
signature/name of the registrar

lookup

public boolean lookup(java.lang.String domain,
                      java.lang.String tld)
               throws java.lang.Exception
Looks up if domain is available for registration

Parameters:
domain - domain name
tld - TLD
Returns:
true if domain available for registration
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
Used to renew domain

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

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
Transfer domain

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

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
Register domain name

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 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
Register domain name

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

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
change contact info for the domain

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

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
Reset password associated with domain

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

get

public java.lang.String get(java.lang.String key)
returns registrar setting associated with the key

Parameters:
key - key name
Returns:
value associated with the key.

checkLogin

public void checkLogin()
                throws RegistrarException
Verifies if login is valid for registrar.

Throws:
RegistrarException

isTransfered

public java.util.Date isTransfered(java.lang.String name,
                                   java.lang.String tld)
                            throws java.lang.Exception
check if domain is transfered to a registar

Parameters:
name - domain name
tld - domain tld
Returns:
exp. date of the transfered domain. null if not transfered yet.
Throws:
java.lang.Exception

isTransferable

public boolean isTransferable(java.lang.String name,
                              java.lang.String tld)
                       throws java.lang.Exception
returns true if domain can be transfered

Parameters:
name - domain name
tld - domain TLD
Returns:
true, if can be transfered
Throws:
java.lang.Exception


Copyright © 2004 Positive Software Corporation. All Rights Reserved.