|
SAP NetWeaver 7.30 Enterprise Portal (SP03) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IPcdAttributeId
The JNDI standard has defined the java.util.String class as identifier for attributes.
The PCD extends the JNDI standard by offering attribute identifiers with a richer semantic, such as identifiers
for meta-attributes or attribute identifiers which are composed by several parts. Nevertheless,
the usage of compound attribute IDs should be limited to very dedicated cases. In general, attribute identifiers
should be stable and not dynamically constructed.
A compound attribute ID is defined as
<attr-id-part-1>/.../<attr-id-part-n>A meta-attribute ID is defined as
<attr_name><meta_attribute_separator><meta-attribute-suffix>while meta_attribute_separator defines the last occurrence of the
IPcdAttribute.ATTR_META_SEPERATOR_CHAR character in the (concatenated) attribute ID.
A combination of compound attribute ID and meta-attribute ID is also possible. Note that in this case, only the
<attr_name>can be composed by several parts - the meta-attribute suffix is then a suffix for a compound attribute name. This means in particular that meta-attribute separator characters are only considers after the last component separator character.
This interface declares methods for accessing such semantically rich attribute identifiers in an efficient way. Both compound
attribute IDs and meta-attribute IDs are handled with the same interface. If the ID conforms to the syntax of compound attribute IDs, the single
parts can be accessed by the get(int) and getElements() methods. If the id conforms to the meta-attribute syntax
(i.e. contains at least one "-" character), the meta-attribute suffix is always set to the last element, i.e.
the size of such an attribute ID is at least 2.
The String based access methods for javax.naming.directory.Attributes as defined in the JNDI
standard are also supported for compound or meta-attribute IDs.
The usage of this type of attribute identifier allows to use memory efficient data structures for compound attribute IDs where the
single components are used in many attributes. This optimization of the static memory consumption has the drawback that
the dynamic memory consumption is increased when transforming PCD attribute IDs to strings. This especially applies to methods
Attribute.getID() and Attributes.getIDs(). For performance critical
use cases, it is therefore encouraged to
Attributes.get(String)
or IPcdAttributes.get(IPcdAttributeId)Attributes.getAll() when enumerating over an attribute set and
call IPcdAttribute.getPcdId() before calling Attribute.getID() to make comparisons on IDs
(unless it is known that the requested attribute has a string-typed ID).
The PCD implementation guarantees to use instances of IPcdAttributeId for compound attribute IDs (IDs which contain
component separator characters in their string representation). It is also guaranteed, that for meta-attributes of
compound attribute IDs, the PCD-specific implementation is used. This means that
if for an attribute
which was loaded from the repository, the attribute's identifier is not composed by
several parts.
But it is not guaranteed, that the PCD-specific implementation is used for meta-attributes of regular attribute IDs.
IPcdAttribute.getPcdId() == null
This interface may be extended in future releases. It is thus not intended to be implemented by
client applications. New instances of
IPcdAttributeId can be constructed using IPcdUtils.createPcdAttributeId(String[]), IPcdUtils#createPcdAttributeId(IPcdAttributeId, String)
or IPcdUtils#createPcdAttributeId(String, String).
| Field Summary | |
|---|---|
static char |
ATTR_COMPONENT_SEPARATOR_CHAR
Constant defining the character used as separator for the attribute ID components. |
| Method Summary | |
|---|---|
String |
get(int index)
Returns the element at the specified position in this compound attribute ID. |
Enumeration<String> |
getElements()
Gets an enumeration of the components of this attribute ID. |
String |
getMetaAttributeSuffix()
Gets the suffix of a meta-attribute ID. |
boolean |
isMetaAttributeId()
Checks wether this attribute ID is conform to the recommended syntax of identifiers for meta-attributes, i.e. whether the compound attribute ID contains at least one IPcdAttribute.ATTR_META_SEPERATOR_CHAR
character. |
int |
size()
Returns the number of elements in this compound attribute ID. |
String |
toString()
Gets a string representation of this attribute ID. |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
static final char ATTR_COMPONENT_SEPARATOR_CHAR
| Method Detail |
|---|
String get(int index)
index - index of element to return.
IndexOutOfBoundsException - if the index is out of range (index
< 0 || index >= size()).int size()
Enumeration<String> getElements()
String getMetaAttributeSuffix()
IPcdAttribute.ATTR_META_SEPERATOR_CHAR.
null, if this is not a meta-attribute ID.isMetaAttributeId()boolean isMetaAttributeId()
IPcdAttribute.ATTR_META_SEPERATOR_CHAR
character.
true, if this attribute ID denotes a meta-attribute IDString toString()
IPcdAttributeId#COMPONENT_SEPARATOR_CHAR. If this attribute-ID
denotes a meta-attribute-ID, the meta-attribute suffix is concatenated,
separated by the IPcdAttribute.ATTR_META_SEPERATOR_CHAR.
toString in class Object| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/pcd/gl/api
|
-
|
EP-PIN
|
[sap.com] KMC-WPC
|
[sap.com] tc/kmc/wpc/wpcfacade
|
api
|
EP-PIN-WPC-WCM
|
[sap.com] EP-BASIS
|
[sap.com]
|
api
|
BC-PIN-PCD
|
[sap.com] EP-BASIS-API
|
[sap.com] tc/epbc/pcd/gl/api
|
api
|
EP-PIN
|
|
SAP NetWeaver 7.30 Enterprise Portal (SP03) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||