psoft.hsphere.resource.registrar
Interface Registrar


public interface Registrar

Registrar interface is implemented to provide integration with domain registrars. 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


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

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

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


Copyright © 2004 Positive Software Corporation. All Rights Reserved.