Defining domain entities in the XML spec

The XML spec file contains information on the domain entities that are available to be used with an entry in a container like a catalog or hierarchy. The XML spec file is located in the location: $TOP/etc/default/domains/multi_domain_entities_${locale}.xml, where ${locale} is the locale for which the domain entities are defined. For example, the default XML spec provided is multi_domain_entities_en_US.xml, where the en_US is the United States English locale.

To add another locale (for example, French or fr_FR) specific domain entities for the domain entities specified in this file, all the domain entities defined here should be specified in another file: multi_domain_entities_fr_FR.xml with corresponding French translated labels.

Currently, the application supports the following locales and their corresponding local specific domain entity xml spec files are given below:
en_US: English (US)
multi_domain_entities_en_US.xml
de_DE: German (Germany)
multi_domain_entities_de_DE.xml
el_GR: Greek (Greece)
multi_domain_entities_el_GR.xml
es_ES: Spanish (Spain)
multi_domain_entities_es_ES.xml
fr_FR: French (France)
multi_domain_entities_fr_FR.xml
it_IT: Italian (Italy)
multi_domain_entities_it_IT.xml
ja_JP: Japanese (Japan)
multi_domain_entities_ja_JP.xml
ko_KR: Korean (Korea)
multi_domain_entities_ko_KR.xml
pl_PL: Polish (Poland)
multi_domain_entities_pl_PL.xml
pt_BR: Portuguese (Brazil)
multi_domain_entities_pt_BR.xml
ru_RU: Russian (Russia)
multi_domain_entities_ru_RU.xml
tr_TR: Turkish (Turkey)
multi_domain_entities_tr_TR.xml
zh_CN: Chinese (Simplified)
multi_domain_entities_zh_CN.xml
zh_TW: Chinese (Traditional)
multi_domain_entities_zh_TW.xml

Sample XML spec

Provided below is a sample XML specification for defining domain entities.
<domain_configurations>
	<company code="your_company_code">

	<domain id="Employee" type="item">
        <label>
            <label_for_entity>employee</label_for_entity>
            <label_for_entities>employees</label_for_entities>
            <label_for_Entity>Employee</label_for_Entity>
            <label_for_Entities>Employees</label_for_Entities>
            <label_for_ENTITY>EMPLOYEE</label_for_ENTITY>
            <label_for_ENTITIES>EMPLOYEES</label_for_ENTITIES>
        </label>
        <icon path="/images/entities/employee.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_employee.png"/>
    </domain>
    <domain id="Manager" type="item">
        <label>
            <label_for_entity>manager</label_for_entity>
            <label_for_entities>managers</label_for_entities>
        </label>
        <icon path="/images/entities/manager.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_manager.png"/>
    </domain>  
    <domain id="Geography" type="category">
        <label>
            <label_for_entity>region</label_for_entity>
            <label_for_entities>regions</label_for_entities>
        </label>
        <icon path="/images/entities/geography.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_geography.png"/>
    </domain>
    <domain id="Department"  type="category">
        <label>
            <label_for_entity>department</label_for_entity>
            <label_for_entities>departments</label_for_entities>
        </label>
        <icon path="/images/entities/department.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_department.png"/>
    </domain>    
    <domain id="Hardware" type="category">
        <label>
            <label_for_entity>machine</label_for_entity>
            <label_for_entities>machines</label_for_entities>
        </label>
        <icon path="/images/entities/machine.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_machine.png"/>
    </domain>
    <domain id="Equipment"  type="category">
        <label>
            <label_for_entity>equipment</label_for_entity>
            <label_for_entities>equipments</label_for_entities>
        </label>
        <icon path="/images/entities/equipment.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_equipment.png"/>
    </domain>        
</company>
<company code="acme">
    <domain id="Employee" type="item">
        <label>
            <label_for_entity>employee</label_for_entity>
            <label_for_entities>employees</label_for_entities>
        </label>
        <icon path="/images/entities/employee.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_employee.png"/>
    </domain>     
    <domain id="Manager" type="item">
        <label>
            <label_for_entity>manager</label_for_entity>
            <label_for_entities>managers</label_for_entities>         
        </label>
        <icon path="/images/entities/manager.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_employee.png"/>
    </domain>  
    <domain id="Geography" type="category">
        <label>
            <label_for_entity>region</label_for_entity>
            <label_for_entities>regions</label_for_entities>
        </label>
        <icon path="/images/entities/geography.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_geography.png"/>
    </domain>
    <domain id="Department"  type="category">
        <label>
            <label_for_entity>department</label_for_entity>
            <label_for_entities>departments</label_for_entities>
        </label>
        <icon path="/images/entities/department.png"/>
        <empty_display_value_icon path="/images/entities/empty_display_value_department.png"/>
    </domain>    
    <domain id="Hardware" type="category">
        <label>
            <label_for_entity>machine</label_for_entity>
            <label_for_entities>machines</label_for_entities>
        </label>
        <comment> 
            Note: Below, both icon and empty_display_value_icon have paths referring to user supplied icons in location:
                supplier_base_dir which has a default value of $TOP/public_html/suppliers/
                specified in $TOP/etc/default/common.properties.
                Another location could be: $TOP/public_html/user/domains/ directory.
        </comment>
        <icon path="/suppliers/machine.png"/>
        <empty_display_value_icon path="/suppliers/empty_display_value_machine.png"/>
    </domain>
    <domain id="Equipment"  type="category">
        <label>
            <label_for_entity>equipment</label_for_entity>
            <label_for_entities>equipments</label_for_entities>
        </label>
        <comment> 
            Note: Below, both icon and empty_display_value_icon have paths referring to user supplied icons in location:
                $TOP/public_html/user/domains/images/ directory.
                Another location could be: in supplier_base_dir which has a default value of /public_html/suppliers/ 
                specified in $TOP/etc/default/common.properties.
        </comment>
        <icon path="/user/domains/images/equipment.png"/>
        <empty_display_value_icon path="/user/domains/images/empty_display_value_equipment.png"/>
    </domain>
	</company>
</domain_configurations>

For a company, for a given container (either a catalog or a hierarchy), you can define a domain entity to be used in an application instance. This has to be done through the container attributes in the application itself.

For each domain entity, you will need to specify:
  • the id (unique identifier) should not any have characters belonging to the set: []{}:\\/\"'#@<>,*|!@$%^&()=+&.
  • the type of the domain entity (either "item" or "category")
  • the label, with different variations like:
    label_for_entity
    Singular label of a domain entity in all lower case text.
    label_for_entities
    Plural label of domain entities in all lower case text.
The rest of the labels are optional:
label_for_Entity
Singular label of a domain entity with first letter in upper case text. If not specified value is derived from the value specified for label_for_entity.
label_for_Entities
Plural label of domain entities with first letter in upper case text. If not specified value is derived from the value specified for label_for_entities.
label_for_ENTITY
Singular label of a domain entity in all upper case text. If not specified value is derived from the value specified for label_for_entity.
label_for_ENTITIES
Plural label of domain entities in all upper case text. If not specified value is derived from the value specified for label_for_entities.
icon (with a path attribute defined, /user/domains/images/icon.extension)
If not specified the default icon used by the product for the specified domain type is used.
empty_display_value_icon (with a path attribute defined, /user/domains/images/empty_display_value_icon.extension)
If not specified the default icon used by the product for the specified domain type is used.
Note: Both icon and empty_display_value_icon can have paths referring to user supplied icons in location: $TOP/public_html/user/domains/images/ directory. Another location could be: in supplier_base_dir which has a default value of /public_html/suppliers/ specified in $TOP/etc/default/common.properties.