Entity Identifier
JOSIF Main Page | JOSIF Guidebook | Modeling | General Patterns |Â Entity Identifier
Â
Â
Only in JOSIF R1.1
The EntityIdentifier is used to uniquely identity an object across an interface. The EntityIdentifier are assumed to be opaque and globally unique.
An EntityIdentifier contains three attributes: context, dn and type.
The dn attribute contains the DistinguishedName of the object that is assumed to be unique within a given system context.
The context attribute contains an implementation specific Context which determines the system specific context for the Entity. It disambiguates the dn of the object to make it globally unique.
For entity-centric interfaces, like Resource Alarm Management, the dn contains the unique id of the alarm within the alarm list, i.e. in this case the alarmId and the context is specific to each alarm list, i.e. each instantiation of the interface.
Note that the context, even if implementation specific should have a common scheme for all interfaces involved in a given deployment. However, the way to define the context might vary. It might be a jndi entry like in OSS/J, a security token or any other form.
The type defines the type of the referenced entity. This string is implementation technology specific. For example in XML it is filled by the implementation with an XML type reference. In java it is filled with a classpath reference.
An EntityIdentifier is equal to another EntityIdentifier if both the context and dn attributes are identical.
To simplify implementation, all attributes in an EntityIdentifier are defined as strings or name value pairs of strings.
Entity Identifiers should be used to reference objects across the interface. They can be involved as input parameters in operations, either explicit or common operations.
There are 2 ways to define an EntityIdentifier as explicit attribute or parameter:
- If the EntityIdentifier only relates to a single class, then the type of the class should be used as datatype for the attribute or parameter setting to true the attribute passedById of the corresponding tipAttribute, or tipParameter stereotype. This is true also for navigable association ends (or roles).
- If the EntityIdentifier can relate to multiple classes not known at modeling time, then the datatype ObjectName should be used. This datatype will be replaced by the generators by an EntityIdentifiers.
EntityIdentifiers should not be arbitrarily extended.
Â