Descriptor file

H-Sphere Registrar SDK uses main.xml as the descriptor to specify components for the registrar package. The syntax of the descriptor file is described bellow. All the tags & attributes are case sensitive.

registrar tag

The descriptor file has to contain registrar tag. Following tags are be defined inside of registrar tag.

nameName of the package (usually, name of the registrar, Examples: Enom, OpenSRS or OnlineNIC)Yes
versionVersion of the package (Example: 1.2)Yes
titleTitle of the register. It should be defined in file, see template tag. (Example: admin.registrar.enom = Enom)Yes
formDefines settings for the registrar, that are later loaded through the Entity class. It also defines the html form for the admin to enter thouse settings.Yes
classesSpecifies where the classes for the registrar are. By default, it should be set to buildYes
langlanguage filesNo

form Tag

form tag defines the input form for to set the settings for the package. The input fields are defined via field tags inside of form tag. Each field tag corresponds to the input element for the admin to use to enter settings for registrar, like server, port, login & password. field tag has following attributes:

namename of the field - corresponds to input tag attribute name in htmlYes
labellabel to show in html form. The labels should be defined in the templates' language file, and identifier for the label should be used. (Example: admin.registrar.port)Yes
typetype of the field, right now only text & password types are supported. They directly correspond to type for input tag in htmlYes
defaultdefault value for the input fieldNo
defaultLangdefault value for the field, defined in lang file. This attribute is checked only if default attribute is not set. (Example: admin.registrar.opensrs)No
checkYAFV constraint for input validationNo

lang tag

lang tag defines language files. Following tags are used inside of lang to define different language files:

templateThe language file for templates. The file is defined in H-Sphere as hsphere_lang.propertiesNo
userThe language file for java classes. The file is defined in H-Sphere as messages.propertiesNo
menuThe language file for menus. The file is defined in H-Sphere as

Complete path to lang files have to be specified. Each of those tags can have an attribute encoding that defines the encoding for the given lang file. You can have multiple tags of each type, as long as encodings are different. Encodings can be like en_US or ru_RU, etc... If no encoding is specified, the file will be used as "default" encoding (no encoding will be appended to its name in the package).