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 tagThe descriptor file has to contain registrar tag. Following tags are be defined inside of registrar tag.
| Tag | Description | Required |
|---|---|---|
| name | Name of the package (usually, name of the registrar, Examples: Enom, OpenSRS or OnlineNIC) | Yes |
| version | Version of the package (Example: 1.2) | Yes |
| title | Title of the register. It should be defined in hsphere_lang.properties file, see template tag. (Example: admin.registrar.enom = Enom) | Yes |
| form | Defines 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 |
| classes | Specifies where the classes for the registrar are. By default, it should be set to build | Yes |
| lang | language files | No |
form Tagform 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:
| Attribute | Description | Required |
|---|---|---|
| name | name of the field - corresponds to input tag attribute name in html | Yes |
| label | label 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 |
| type | type of the field, right now only text & password types are supported. They directly correspond to type for input tag in html | Yes |
| default | default value for the input field | No |
| defaultLang | default value for the field, defined in lang file. This attribute is checked only if default attribute is not set. (Example: admin.registrar.opensrs) | No |
| check | YAFV constraint for input validation | No |
lang taglang tag defines language files. Following tags are used inside of lang to define different language files:
| Tag | Description | Required |
|---|---|---|
| template | The language file for templates. The file is defined in H-Sphere as hsphere_lang.properties | No |
| user | The language file for java classes. The file is defined in H-Sphere as messages.properties | No |
| menu | The language file for menus. The file is defined in H-Sphere as menu.properties. | No |
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).