com.sapportals.portal.pcd.gl

Interface IPcdAttribute

All Superinterfaces:
Attribute, Cloneable, Serializable

public interface IPcdAttribute
extends Attribute

The Pcd specific attribute interface. It extends the standard interface javax.naming.directory.Attribute.

This interface may be extended in future releases. It is thus highly recommended not to implement this interface yourself! New instances of IPcdAttribute can be retrieved from IPcdUtils.

The attribute values can have one of the following types: String, InputStream, Integer, Long, Double, Boolean, Byte, Date and Text.

For Integer, Long, Double, Boolean and Byte values there are convenience methods using the simple types int, long, double, boolean and byte. Binaries can be stored by passing an InputStream to the add() and set() methods. It is more efficient storing binaries using the appropriate convenience methods. In contrary to the general JNDI specification Null values are not allowed. The methode get() on a BINARY_STREAM attribute returns a InputStream. There are also special methods for text values. For text-attributes, the standard methods add, set and get (as defined in javax.Nameing.Directory.Attribute) are not supported, because all text-operations require a locale to be defined. For text attributes there are special set and get methods which require a locale as a parameter.

For retrieving the value type etc. of an attribute, special methods are defined here. However, no concept of arbitrary meta-attributes (attributes of attributes) exists. Only following syntax for attribute-Id is suggested, which allows to associate attributes with their (meta-)attributes:

 
  
   
      <meta_prefix><meta_attribute_seperator><attr_name>
    
   
  
 
The meta_prefix is the attribute-id of the underlying attribute.

Example: Assume color is the id of an attribute, then color-values is an attribute of color (since "-" is the meta_attribute_seperator).

Additionally, it is suggested to use namespaces for attribute-ids. This avoids conflicts between different applications, that operate on the same objects. This interfaces defines deliminators for namespaces and methods for the retrieval of an attribute-ids namespace.

The full syntax for attribute-ids that defines "meta"-attributes and namespaces, is as follows:
 
  
   
      <attribute_id>     = [ <meta_prefix> ] <simple_id>
      <simple_id>        = [ <namespace_prefix> ] <atomic_id>
      <namespace_prefix> = <atomic_id> <namespace_seperator> |
                           <namespace_prefix> <atomic_id>  <namespace_seperator>
      <meta_prefix>      = <simple_id&  <meta_seperator> |
                           <meta_prefix> <simple_id&  <meta_seperator>
      <atomic_id>        = <i>all sequences of characters and digits that do not contain</i>
                           <namespace_seperator> <i>and/or</i> <meta_seperator>
    
   
  
 
A detailed description of text attributes and their modifications is given in the package description.

This interface is not intended to be implemented by clients.


Nested Class Summary
static class IPcdAttribute.DL_STATE
          Possible values of the attribute DELTA_LINK_STATE
static class IPcdAttribute.SEARCH
          This subclass holds search relevant constants.
 
Field Summary
static String ACTIVITY_REPRESENTATION_ASPECT
          Activity representation aspect
static String APPLICATION
          Mandatory schema attribute for object classes.
static String ASPECT_EXISTENCE
           
static String ASPECT_PERMISSION
           
static String ASPECT_PERMISSION_NAME
           
static String ATOMIC_NAME
          Virtual attribute for the atomic name of an object.
static String ATTR_INHERITANCE_FINAL
          Return values for method getInheritance
static String ATTR_INHERITANCE_NONFINAL
          Return values for method getInheritance
static String ATTR_META_SEPERATOR
           
static char ATTR_META_SEPERATOR_CHAR
          Meta-Attribute separator: For the definition of attribute-attributes, the syntax <meta_prefix><attr_meta_seperator><attr_name> is recommended.
static String ATTR_NAMESPACE_SEPERATOR
           
static char ATTR_NAMESPACE_SEPERATOR_CHAR
          Recommended namespace seperator in attribute-ids.
static String ATTR_STORAGE_GROUP
          Deprecated. will be removed with NW05
static String ATTR_STORAGE_NON_PERSONALIZABLE
          Return value for method getStorage overrides inheritance=non-final
static String ATTR_STORAGE_ORIGINAL
          Deprecated. use ATTR_STORAGE_NON_PERSONALIZABLEinstead
static String ATTR_STORAGE_PERSONALIZABLE
          Return value for method getStorage that denotes a personalizable attribute; this is overridden by inheritance=final!
static String ATTR_STORAGE_USER
          Deprecated. use ATTR_STORAGE_PERSONALIZABLEinstead
static String COLLECTION
          Deprecated. use the unit attribute IUnit.COLLECTIONinstead
static String CREATED_AT
          Deprecated. With NW 05, this attribute will be removed without full replacement; instead this information will be maintained on unit root nodes only.
static String CREATED_BY
          Deprecated. With NW 05, this attribute will be removed without full replacement; instead this information will be maintained on unit root nodes only.
static String DELTA_LINK_STATE
          Delta link state of the object.
static String DESCRIPTION
           
static String DL_MODIFIED_SORT_STRING_ATTRIBUTE
           
static String DL_MODIFROOT_NAME
           
static String DL_PLUSROOT_NAME
           
static String DL_TARGET
           
static String DL_TARGETRELATION_NAME
          Deprecated. the deltalink target must only be addressed through the specific methods in IDeltaLink
static String DOMAIN
          Deprecated. use the unit attribute IUnit.DOMAINinstead
static Locale EMPTY_LOCALE
          Empty Locale.
static String ENHANCED_PERMISSIONS
           
static String FILTER_ASSIGNMENT
          Assigned filter class
static String FILTER_FACTORY
          Schema attribute for filter factory
static String GL_NAMESPACE_PREFIX
          Namespace for all attributes used by the pcd gl itself
static int GL_NAMESPACE_PREFIX_LENGTH
           
static String HANDLED_ASPECTS
          Schema attribute: list of handled aspects for context converter classes
static String IMPLEMENTED_ASPECTS
          Schema attribute: list of implemented aspects
static String IMPLEMENTED_INTERFACES
          Optional definition of additional interfaces that are implemented by the semantic object which is created by the object factory
static String INHERITS_FROM
          As attribute of an object class, this denotes the inheritance of the object class.
static String IS_BROKEN_DELTALINK
           
static String IS_BROKEN_DELTALINK_DUE_TO_CYCLE
           
static String IS_DELTALINK
           
static String JAVA_CLASS
          Mandatory attribute for object classes.
static String JAVA_INTERFACE
          Mandatory attribute for object classes.
static String LAST_CHANGED_AT
          Deprecated. With NW 05, this attribute will be removed without full replacement; instead this information will be maintained on unit root nodes only.
static String LAST_CHANGED_BY
          Deprecated. With NW 05, this attribute will be removed without full replacement; instead this information will be maintained on unit root nodes only.
static String NO_SUBCONTEXT_CACHE
          If this attribute is set, the context does not cache the list of its subcontexts.
static String OBJECT_CLASS
          This is a mandatory attribute for every object.
static String OBJECT_CLASS_CONTEXTCONVERTER
          Predefined object class "com.sap.portal.pcd.gl.GlContextConverter".
static String OBJECT_CLASS_FILTERCLASS
          Predefined object class "com.sap.portal.pcd.gl.FilterClass".
static String OBJECT_CLASS_GL_CONTEXT
          Predefined object class "com.sap.portal.pcd.gl.GlContext".
static String OBJECT_CLASS_GL_LINKREF
          Predefined object class "com.sap.portal.pcd.gl.GlLinkRef" This is used internally only.
static String OBJECT_CLASS_GL_RELATION
          Predefined object class "com.sap.portal.pcd.gl.GlRelation".
static String OBJECT_CLASS_OBJECTCLASS
          Predefined object class "com.sap.portal.pcd.gl.ObjectClass" This object class can only be assigned to schema entries.
static String OBJECT_FACTORY
          Mandatory attribute for object classes.
static String ORIGINAL_COUNTRY
          Deprecated. use the dedicated methods for the original locale in IUnitinstead
static String ORIGINAL_LANGUAGE
          Deprecated. use the dedicated methods for the original locale in IUnitinstead
static String PERSISTENCY_ASPECT
           
static String READONLY_ASPECTS
          Schema attribute that denotes the list of aspects that the object provider declares to be "read-only" compliant.
static String RESPONSIBLE
          Deprecated. use the unit attribute IUnit.RESPONSIBLEinstead
static String SCHEMA_ATTRIBUTE_APPLICATION_TYPE
          Schema attribute: Application Type.
static String SCHEMA_ATTRIBUTE_LOCAL_MIME_PATH
          Schema attribute: Local Mime Path.
static String STATE_FACTORY
          Mandatory attribute for object classes.
static String TRANSPORT_DEPENDENCIES
          Optional attribute for transportable objects.
static String TRANSPORTABLE
          Optional attribute for transportable objects.
 
Fields inherited from interface javax.naming.directory.Attribute
serialVersionUID
 
Method Summary
 void add(int ix, Object value)
          Adds an attribute value to the ordered list of attribute values.
 boolean add(Object value)
          Adds a new value to the attribute.
 boolean addBinaries(InputStream is, int length)
          Adds a new value to the attribute.
 void addBinaries(int ix, InputStream is, int length)
          Adds an attribute value to the ordered list of attribute values.
 boolean addBoolean(boolean value)
          Adds a new value to the attribute.
 void addBoolean(int ix, boolean value)
          Adds an attribute value to the ordered list of attribute values.
 boolean addByte(byte value)
          Adds a new value to the attribute.
 void addByte(int ix, byte value)
          Adds an attribute value to the ordered list of attribute values.
 boolean addDouble(double value)
          Adds a new value to the attribute.
 void addDouble(int ix, double value)
          Adds an attribute value to the ordered list of attribute values.
 boolean addInt(int value)
          Adds a new value to the attribute.
 void addInt(int ix, int value)
          Adds an attribute value to the ordered list of attribute values.
 void addLong(int ix, long value)
          Adds an attribute value to the ordered list of attribute values.
 boolean addLong(long value)
          Adds a new value to the attribute.
 Object clone()
          Makes a copy of the attribute.
 String get(Locale locale)
          If this attribute is multi-lingual, method get(Local) returns the string-value for a given locale.
 boolean getBoolean()
          Retrieves the first of this attribute's values.
 boolean getBoolean(int ix)
          Retrieves the attribute value from the ordered list of attribute values.
 byte getByte()
          Retrieves the first of this attribute's values.
 byte getByte(int ix)
          Retrieves the attribute value from the ordered list of attribute values.
 double getDouble()
          Retrieves the first of this attribute's values.
 double getDouble(int ix)
          Retrieves the attribute value from the ordered list of attribute values.
 String getInheritance()
          Convenience method to access the meta-attribute inheritance
 int getInt()
          Retrieves the first of this attribute's values.
 int getInt(int ix)
          Retrieves the attribute value from the ordered list of attribute values.
 long getLong()
          Retrieves the first of this attribute's values.
 long getLong(int ix)
          Retrieves the attribute value from the ordered list of attribute values.
 Enumeration getMetaAttributes(Attributes attrs)
          Creates an enumeration of all attributes of this attribute, that are contained in a given set of attributes
 String getNamespace()
          Gets the namespace of this attribute accoring to the syntax define above.
 Locale getOriginalLocale()
          Gets the original locale of this attribute.
 IPcdAttributeId getPcdId()
          Gets the PCD attribute identifier if this attribute has a PCD-extended attribute ID.
 String getStorage()
          Convenience method to access the meta-attribute storage.
 String getTextType()
          Gets the text type of this attribute
 PcdAttributeValueType getType()
          Returns the type of the attribute value.
 boolean hasType(PcdAttributeValueType valueType)
          Returns true if the given value type matches the type of the attribute value.
 boolean isReadOnly()
          Gets the read-only flag of this attribute.
 String remove(Locale locale)
          Removes the text of a locale.
 Object set(int ix, Object value)
          Sets an attribute value in the ordered list of attribute values.
 String set(Locale locale, String value)
          If this attribute is multilingual, method set(Local, String) allows to set the value for a given locale.
 Object setBinaries(int ix, InputStream is, int length)
          Sets an attribute value in the ordered list of attribute values.
 boolean setBoolean(int ix, boolean value)
          Sets an attribute value in the ordered list of attribute values.
 byte setByte(int ix, byte value)
          Sets an attribute value in the ordered list of attribute values.
 double setDouble(int ix, double value)
          Sets an attribute value in the ordered list of attribute values.
 void setInheritance(String value)
          Convenience method to set the meta-attribute inheritance
 int setInt(int ix, int value)
          Sets an attribute value in the ordered list of attribute values.
 long setLong(int ix, long value)
          Sets an attribute value in the ordered list of attribute values.
 void setStorage(String value)
          Convenience method to set the meta-attribute storage
 void setTextType(String textType)
          Sets the text type of the attribute.
 
Methods inherited from interface javax.naming.directory.Attribute
clear, contains, get, get, getAll, getAttributeDefinition, getAttributeSyntaxDefinition, getID, isOrdered, remove, remove, size
 

Field Detail

GL_NAMESPACE_PREFIX

static final String GL_NAMESPACE_PREFIX
Namespace for all attributes used by the pcd gl itself

See Also:
Constant Field Values

GL_NAMESPACE_PREFIX_LENGTH

static final int GL_NAMESPACE_PREFIX_LENGTH

APPLICATION

static final String APPLICATION
Mandatory schema attribute for object classes. Denotes the application which is responsible for this object class. For a portal service this is the value of IService.getKey(). For a WebDynpro application this is WDDeployableObjectPart.getDeployableObjectName().

See Also:
Constant Field Values

STATE_FACTORY

static final String STATE_FACTORY
Mandatory attribute for object classes. Denotes the state factory which is is to be used to transform a semantic object into storable data.

See Also:
Constant Field Values

OBJECT_FACTORY

static final String OBJECT_FACTORY
Mandatory attribute for object classes. Denotes the object factory which is is to be used to create a semantic object from the stored data.

See Also:
Constant Field Values

TRANSPORT_DEPENDENCIES

static final String TRANSPORT_DEPENDENCIES
Optional attribute for transportable objects. The String attribute contains unique access URLs of objects that the current object directly depends on.

See Also:
Constant Field Values

TRANSPORTABLE

static final String TRANSPORTABLE
Optional attribute for transportable objects. If existing, the boolean attribute determines if the object may be exported or not.

See Also:
Constant Field Values

JAVA_CLASS

static final String JAVA_CLASS
Mandatory attribute for object classes. Denotes the semantic Java class that corresponds to the stored data items.

See Also:
Constant Field Values

JAVA_INTERFACE

static final String JAVA_INTERFACE
Mandatory attribute for object classes. Denotes the semantic Java interface that corresponds to the stored data items.

See Also:
Constant Field Values

IMPLEMENTED_INTERFACES

static final String IMPLEMENTED_INTERFACES
Optional definition of additional interfaces that are implemented by the semantic object which is created by the object factory

See Also:
Constant Field Values

INHERITS_FROM

static final String INHERITS_FROM
As attribute of an object class, this denotes the inheritance of the object class.

See Also:
Constant Field Values

ENHANCED_PERMISSIONS

static final String ENHANCED_PERMISSIONS
See Also:
Constant Field Values

DESCRIPTION

static final String DESCRIPTION
See Also:
Constant Field Values

OBJECT_CLASS

static final String OBJECT_CLASS
This is a mandatory attribute for every object. It denotes the object's class.

See Also:
Constant Field Values

FILTER_ASSIGNMENT

static final String FILTER_ASSIGNMENT
Assigned filter class

See Also:
Constant Field Values

FILTER_FACTORY

static final String FILTER_FACTORY
Schema attribute for filter factory

See Also:
Constant Field Values

IMPLEMENTED_ASPECTS

static final String IMPLEMENTED_ASPECTS
Schema attribute: list of implemented aspects

See Also:
Constant Field Values

HANDLED_ASPECTS

static final String HANDLED_ASPECTS
Schema attribute: list of handled aspects for context converter classes

See Also:
Constant Field Values

READONLY_ASPECTS

static final String READONLY_ASPECTS
Schema attribute that denotes the list of aspects that the object provider declares to be "read-only" compliant. For lookups with one of these aspects, the Pcd will hand over to the object factory the uncloned set of attributes as it is currently in the cache. This is faster because object creation is avoided, but it goes beyond the usual JNDI contract, which specifies that all method parameters and return values that are handed over to the application must belong to the application. Illegal changes are excluded because the uncloned attributes are read-only instances that can't be changed.

See Also:
Constant Field Values

PERSISTENCY_ASPECT

static final String PERSISTENCY_ASPECT
See Also:
AspectSupport.ASPECT_PERSISTENCY, Constant Field Values

ASPECT_PERMISSION

static final String ASPECT_PERMISSION
See Also:
AspectSupport.ASPECT_PERMISSION, Constant Field Values

ASPECT_PERMISSION_NAME

static final String ASPECT_PERMISSION_NAME
See Also:
AspectSupport.ASPECT_PERMISSION_NAME, Constant Field Values

ASPECT_EXISTENCE

static final String ASPECT_EXISTENCE
See Also:
AspectSupport.ASPECT_EXISTENCE, Constant Field Values

ACTIVITY_REPRESENTATION_ASPECT

static final String ACTIVITY_REPRESENTATION_ASPECT
Activity representation aspect

See Also:
Constant Field Values

SCHEMA_ATTRIBUTE_APPLICATION_TYPE

static final String SCHEMA_ATTRIBUTE_APPLICATION_TYPE
Schema attribute: Application Type. Optional schema attribute that defines the application type of a semantic object provider. Must be one of the following types:

See Also:
Constant Field Values

SCHEMA_ATTRIBUTE_LOCAL_MIME_PATH

static final String SCHEMA_ATTRIBUTE_LOCAL_MIME_PATH
Schema attribute: Local Mime Path. Optional schema attribute that defines the local path to an icon that represents the semantic object. The path is relative to the object provider's context.

See Also:
Constant Field Values

COLLECTION

@Deprecated
static final String COLLECTION
Deprecated. use the unit attribute IUnit.COLLECTIONinstead
Collection

See Also:
Constant Field Values

DOMAIN

@Deprecated
static final String DOMAIN
Deprecated. use the unit attribute IUnit.DOMAINinstead
Domain

See Also:
Constant Field Values

ORIGINAL_LANGUAGE

@Deprecated
static final String ORIGINAL_LANGUAGE
Deprecated. use the dedicated methods for the original locale in IUnitinstead
Original Language

See Also:
Constant Field Values

ORIGINAL_COUNTRY

@Deprecated
static final String ORIGINAL_COUNTRY
Deprecated. use the dedicated methods for the original locale in IUnitinstead
Original Country

See Also:
Constant Field Values

RESPONSIBLE

@Deprecated
static final String RESPONSIBLE
Deprecated. use the unit attribute IUnit.RESPONSIBLEinstead
Responsible person

See Also:
Constant Field Values

OBJECT_CLASS_OBJECTCLASS

static final String OBJECT_CLASS_OBJECTCLASS
Predefined object class "com.sap.portal.pcd.gl.ObjectClass" This object class can only be assigned to schema entries.

See Also:
Constant Field Values

OBJECT_CLASS_FILTERCLASS

static final String OBJECT_CLASS_FILTERCLASS
Predefined object class "com.sap.portal.pcd.gl.FilterClass". This object class can only be assigned to schema entries. Please refer to the section "Object/State-Factories" in the package description of com.sapportals.portal.pcd.glfor details.

See Also:
Constant Field Values

OBJECT_CLASS_CONTEXTCONVERTER

static final String OBJECT_CLASS_CONTEXTCONVERTER
Predefined object class "com.sap.portal.pcd.gl.GlContextConverter". This object class can only be assigned to schema entries. Please refer to the section "Object/State-Factories" in the package description of com.sapportals.portal.pcd.glfor details.

See Also:
Constant Field Values

OBJECT_CLASS_GL_CONTEXT

static final String OBJECT_CLASS_GL_CONTEXT
Predefined object class "com.sap.portal.pcd.gl.GlContext". Please refer to the section "Object/State-Factories" in the package description of com.sapportals.portal.pcd.glfor details.

See Also:
Constant Field Values

OBJECT_CLASS_GL_RELATION

static final String OBJECT_CLASS_GL_RELATION
Predefined object class "com.sap.portal.pcd.gl.GlRelation". Please refer to the section "Object/State-Factories" in the package description of com.sapportals.portal.pcd.glfor details.

See Also:
Constant Field Values

OBJECT_CLASS_GL_LINKREF

static final String OBJECT_CLASS_GL_LINKREF
Predefined object class "com.sap.portal.pcd.gl.GlLinkRef" This is used internally only.

See Also:
Constant Field Values

NO_SUBCONTEXT_CACHE

static final String NO_SUBCONTEXT_CACHE
If this attribute is set, the context does not cache the list of its subcontexts. This saves memory and time with the first lookup of the context in case of a large number of subcontexts. But it slows down methods like list(), listBindings() etc. significantly.

See Also:
Constant Field Values

ATOMIC_NAME

static final String ATOMIC_NAME
Virtual attribute for the atomic name of an object. The attribute does not exist physically, i.e., it is never returned with getAttributes and it cannot be modified with modifyAttributes. This attribute id can be used in search calls to refer to the object name.

See Also:
Constant Field Values

CREATED_BY

@Deprecated
static final String CREATED_BY
Deprecated. With NW 05, this attribute will be removed without full replacement; instead this information will be maintained on unit root nodes only.
Creator of the object

See Also:
Constant Field Values

CREATED_AT

@Deprecated
static final String CREATED_AT
Deprecated. With NW 05, this attribute will be removed without full replacement; instead this information will be maintained on unit root nodes only.
Creation time of the object

See Also:
Constant Field Values

LAST_CHANGED_BY

@Deprecated
static final String LAST_CHANGED_BY
Deprecated. With NW 05, this attribute will be removed without full replacement; instead this information will be maintained on unit root nodes only.
Last user who changed the object

See Also:
Constant Field Values

LAST_CHANGED_AT

@Deprecated
static final String LAST_CHANGED_AT
Deprecated. With NW 05, this attribute will be removed without full replacement; instead this information will be maintained on unit root nodes only.
Last time the object was changed

See Also:
Constant Field Values

EMPTY_LOCALE

static final Locale EMPTY_LOCALE
Empty Locale. If there are texts in a text attribute, then there is at least one text assigned to the empty locale. The empty locale is used as last resort in the fallback rules for text attributes. Please refer to the section "Text-Attributes" in the package description of com.sapportals.portal.pcd.glfor details.


DELTA_LINK_STATE

static final String DELTA_LINK_STATE
Delta link state of the object. The possible values are defined as members of IPcdAttribute.DL_STATE.

See Also:
Constant Field Values

DL_PLUSROOT_NAME

static final String DL_PLUSROOT_NAME
See Also:
Constant Field Values

DL_MODIFROOT_NAME

static final String DL_MODIFROOT_NAME
See Also:
Constant Field Values

DL_TARGETRELATION_NAME

@Deprecated
static final String DL_TARGETRELATION_NAME
Deprecated. the deltalink target must only be addressed through the specific methods in IDeltaLink
See Also:
Constant Field Values

DL_MODIFIED_SORT_STRING_ATTRIBUTE

static final String DL_MODIFIED_SORT_STRING_ATTRIBUTE
See Also:
Constant Field Values

IS_DELTALINK

static final String IS_DELTALINK
See Also:
Constant Field Values

IS_BROKEN_DELTALINK

static final String IS_BROKEN_DELTALINK
See Also:
Constant Field Values

IS_BROKEN_DELTALINK_DUE_TO_CYCLE

static final String IS_BROKEN_DELTALINK_DUE_TO_CYCLE
See Also:
Constant Field Values

DL_TARGET

static final String DL_TARGET
See Also:
Constant Field Values

ATTR_INHERITANCE_FINAL

static final String ATTR_INHERITANCE_FINAL
Return values for method getInheritance

See Also:
Constant Field Values

ATTR_INHERITANCE_NONFINAL

static final String ATTR_INHERITANCE_NONFINAL
Return values for method getInheritance

See Also:
Constant Field Values

ATTR_STORAGE_GROUP

@Deprecated
static final String ATTR_STORAGE_GROUP
Deprecated. will be removed with NW05
Return value for method getStorage

See Also:
Constant Field Values

ATTR_STORAGE_PERSONALIZABLE

static final String ATTR_STORAGE_PERSONALIZABLE
Return value for method getStorage that denotes a personalizable attribute; this is overridden by inheritance=final!

See Also:
Constant Field Values

ATTR_STORAGE_NON_PERSONALIZABLE

static final String ATTR_STORAGE_NON_PERSONALIZABLE
Return value for method getStorage overrides inheritance=non-final

See Also:
Constant Field Values

ATTR_STORAGE_USER

@Deprecated
static final String ATTR_STORAGE_USER
Deprecated. use ATTR_STORAGE_PERSONALIZABLEinstead
Return value for method getStorage

See Also:
Constant Field Values

ATTR_STORAGE_ORIGINAL

@Deprecated
static final String ATTR_STORAGE_ORIGINAL
Deprecated. use ATTR_STORAGE_NON_PERSONALIZABLEinstead
Return value for method getStorage

See Also:
Constant Field Values

ATTR_NAMESPACE_SEPERATOR_CHAR

static final char ATTR_NAMESPACE_SEPERATOR_CHAR
Recommended namespace seperator in attribute-ids.

See Also:
Constant Field Values

ATTR_NAMESPACE_SEPERATOR

static final String ATTR_NAMESPACE_SEPERATOR
See Also:
Constant Field Values

ATTR_META_SEPERATOR_CHAR

static final char ATTR_META_SEPERATOR_CHAR
Meta-Attribute separator: For the definition of attribute-attributes, the syntax
 
  
   
      <meta_prefix><attr_meta_seperator><attr_name>
    
   
  
 
is recommended.

See Also:
Constant Field Values

ATTR_META_SEPERATOR

static final String ATTR_META_SEPERATOR
See Also:
Constant Field Values
Method Detail

setTextType

void setTextType(String textType)
Sets the text type of the attribute.

Parameters:
textType - String representation of the text type
Throws:
IllegalStateException - this attribute is not a text or the textType is too long
See Also:
IPcdUtils.getMaxLengthTextType()

getTextType

String getTextType()
Gets the text type of this attribute

Returns:
@throws IllegalStateException if this attribute is not a text

getType

PcdAttributeValueType getType()
Returns the type of the attribute value.

Returns:
The type of this attribute as described by class PcdAttributeValueType.

hasType

boolean hasType(PcdAttributeValueType valueType)
Returns true if the given value type matches the type of the attribute value.

Parameters:
valueType -
Returns:
boolean

getInheritance

String getInheritance()
Convenience method to access the meta-attribute inheritance

Returns:
String

getStorage

String getStorage()
Convenience method to access the meta-attribute storage. The default value is (ATTR_STORAGE_PERSONALIZABLE). If set to ( ATTR_STORAGE_NON_PERSONALIZABLE), the attribute cannot be personalized.

Returns:
String

setInheritance

void setInheritance(String value)
Convenience method to set the meta-attribute inheritance

Parameters:
value -

setStorage

void setStorage(String value)
Convenience method to set the meta-attribute storage

Parameters:
value -

get

String get(Locale locale)
If this attribute is multi-lingual, method get(Local) returns the string-value for a given locale.

If there is no text to the input locale then the following fallback rules are applied: Try to get a text to the input locale with no country specification. Try to get a text to the default locale. Try to get a text to the default locale with no country spedification. Try to get a text to the original locale. Try to get a text to the original locale with no country spedification. Try to get a text to the empty locale. If there is even no text to the empty locale, which means there is no text at all, then return null.

For example a text is needed, say, for locale [lang="de", country="CH"], the system's default locale is [lang="en", country="US"], and the original language of the hosting unit is [lang="fr", country="CA"], then the text is looked up in the following sequence:

  1. lang="de", country="CH" (requested locale)
  2. lang="de" (requested locale without country specification)
  3. lang="en", country="US" (default locale)
  4. lang="en" (default locale without country specification)
  5. lang="fr", country="CA" (original language of the unit)
  6. lang="fr" (original locale without country specification)
  7. lang="", country="" (origianl locale without country specification)
This sequence is followed until the text is found. If the text is not found for any of these locales, null is returned.

Parameters:
locale - The locale, for wich the value is requested
Returns:
The value as String if defined, null otherwise
Throws:
IllegalStateException - If the type of this attribute is not TEXT

set

String set(Locale locale,
           String value)
If this attribute is multilingual, method set(Local, String) allows to set the value for a given locale. If this attribute does not have type multilingual text, the set does not change it. Text attributes with texts always contain a text to the empty locale. The first setting of a text always additionally sets the text of the empty locale with the same text. The text of the empty locale can also be set explicitly.

Parameters:
locale - The locale of the given string
value - The value of this text attribute for the given locale
Returns:
old value or null if there is no old value
Throws:
IllegalArgumentException - if the locale or text is null or if the locale is not the original locale and the system settings don't allow that
IllegalStateException - if this is not a TEXT attribute

remove

String remove(Locale locale)
Removes the text of a locale. If the locale is the empty locale this method does nothing and returns null

Parameters:
locale -
Returns:
removed text
Throws:
IllegalStateException - attribute is no text attribute

set

Object set(int ix,
           Object value)
Sets an attribute value in the ordered list of attribute values.

Specified by:
set in interface Attribute
Parameters:
ix - index
value - value of the attribute
Returns:
old value
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If value already exists and the attribute values are unordered.
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
Attribute.set(int ix, java.lang.Object value)

add

boolean add(Object value)
Adds a new value to the attribute.

Specified by:
add in interface Attribute
Parameters:
value - value of the attribute
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
Attribute.add(java.lang.Object value)

add

void add(int ix,
         Object value)
Adds an attribute value to the ordered list of attribute values.

Specified by:
add in interface Attribute
Parameters:
ix - index of the attribute value
value - value of the attribute
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
Attribute.add(int ix, java.lang.Object value)

addInt

void addInt(int ix,
            int value)
Adds an attribute value to the ordered list of attribute values.

Parameters:
ix - index of the attribute value
value - value of the attribute
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(int ix, java.lang.Object value)

addInt

boolean addInt(int value)
Adds a new value to the attribute.

Parameters:
value - value of the attribute
Returns:
boolean
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(java.lang.Object value)

addBinaries

void addBinaries(int ix,
                 InputStream is,
                 int length)
                 throws IOException
Adds an attribute value to the ordered list of attribute values. It is not defined when exactly the InputStream is read and closed. It is guaranteed that the InputStream is read and closed when the attribute is stored in the PCD by creating a new context or executing modifyAttribute() or modifyAttributes()

Parameters:
ix - index of the attribute value
is - input stream containing the binaries to be read
length - length of the input stream
Throws:
IllegalStateException - If the type of this attribute is not BINARY_STREAM
IOException
See Also:
add(int ix, java.lang.Object value)

addBinaries

boolean addBinaries(InputStream is,
                    int length)
                    throws IOException
Adds a new value to the attribute. It is not defined when exactly the InputStream is read and closed. It is guaranteed that the InputStream is read and closed when the attribute is stored in the PCD by creating a new context or executing modifyAttribute() or modifyAttributes()

Parameters:
is - input stream containing the binaries to be read
length - length of the input stream
Returns:
boolean
Throws:
IOException
IllegalStateException - If the type of this attribute is not BINARY_STREAM
See Also:
add(java.lang.Object value)

addDouble

void addDouble(int ix,
               double value)
Adds an attribute value to the ordered list of attribute values.

Parameters:
ix - index of the attribute value
value - value of the attribute
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(int ix, java.lang.Object value)

addDouble

boolean addDouble(double value)
Adds a new value to the attribute.

Parameters:
value - value of the attribute
Returns:
boolean
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(java.lang.Object value)

addLong

void addLong(int ix,
             long value)
Adds an attribute value to the ordered list of attribute values.

Parameters:
ix - index of the attribute value
value - value of the attribute
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(int ix, java.lang.Object value)

addLong

boolean addLong(long value)
Adds a new value to the attribute.

Parameters:
value - value of the attribute
Returns:
boolean
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(java.lang.Object value)

addByte

void addByte(int ix,
             byte value)
Adds an attribute value to the ordered list of attribute values.

Parameters:
ix - index of the attribute value
value - value of the attribute
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(int ix, java.lang.Object value)

addByte

boolean addByte(byte value)
Adds a new value to the attribute.

Parameters:
value - value of the attribute
Returns:
boolean
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(java.lang.Object value)

addBoolean

void addBoolean(int ix,
                boolean value)
Adds an attribute value to the ordered list of attribute values.

Parameters:
ix - index of the attribute value
value - value of the attribute
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(int ix, java.lang.Object value)

addBoolean

boolean addBoolean(boolean value)
Adds a new value to the attribute.

Parameters:
value - value of the attribute
Returns:
boolean
Throws:
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
add(java.lang.Object value)

getLong

long getLong()
Retrieves the first of this attribute's values.

Returns:
long
Throws:
NoSuchElementException - this attribute has no value
IllegalStateException - attribute value type is not LONG
See Also:
Attribute.get()

getInt

int getInt()
Retrieves the first of this attribute's values.

Returns:
int
Throws:
NoSuchElementException - this attribute has no value
IllegalStateException - attribute value type is not INTEGER
See Also:
Attribute.get()

getDouble

double getDouble()
Retrieves the first of this attribute's values.

Returns:
double
Throws:
NoSuchElementException - this attribute has no value
IllegalStateException - attribute value type is not DOUBLE
See Also:
Attribute.get()

getDouble

double getDouble(int ix)
Retrieves the attribute value from the ordered list of attribute values. This method returns the value at the ix index of the list of attribute values. If the attribute values are unordered, this method returns the value that happens to be at that index.

Parameters:
ix - index
Returns:
double
Throws:
IndexOutOfBoundsException - there is no value to this index.
IllegalStateException - attribute value type is not DOUBLE
See Also:
Attribute.get(int ix)

getBoolean

boolean getBoolean()
Retrieves the first of this attribute's values.

Returns:
boolean
Throws:
NoSuchElementException - this attribute has no value
IllegalStateException - attribute value type is not boolean
See Also:
Attribute.get()

getBoolean

boolean getBoolean(int ix)
Retrieves the attribute value from the ordered list of attribute values. This method returns the value at the ix index of the list of attribute values. If the attribute values are unordered, this method returns the value that happens to be at that index.

Parameters:
ix - index
Returns:
boolean
Throws:
IndexOutOfBoundsException - there is no value to this index.
IllegalStateException - attribute value type is not DOUBLE
See Also:
Attribute.get(int ix)

getByte

byte getByte()
Retrieves the first of this attribute's values.

Returns:
byte
Throws:
NoSuchElementException - this attribute has no value
IllegalStateException - attribute value type is not BYTE
See Also:
Attribute.get()

getByte

byte getByte(int ix)
Retrieves the attribute value from the ordered list of attribute values. This method returns the value at the ix index of the list of attribute values. If the attribute values are unordered, this method returns the value that happens to be at that index.

Parameters:
ix - index
Returns:
byte
Throws:
IndexOutOfBoundsException - there is no value to this index.
IllegalStateException - attribute value type is not DOUBLE
See Also:
Attribute.get(int ix)

getLong

long getLong(int ix)
Retrieves the attribute value from the ordered list of attribute values. This method returns the value at the ix index of the list of attribute values. If the attribute values are unordered, this method returns the value that happens to be at that index.

Parameters:
ix - index
Returns:
long
Throws:
IndexOutOfBoundsException - there is no value to this index.
IllegalStateException - attribute value type is not LONG
See Also:
Attribute.get(int ix)

getInt

int getInt(int ix)
Retrieves the attribute value from the ordered list of attribute values. This method returns the value at the ix index of the list of attribute values. If the attribute values are unordered, this method returns the value that happens to be at that index.

Parameters:
ix - index
Returns:
int
Throws:
IndexOutOfBoundsException - there is no value to this index.
IllegalStateException - attribute value type is not INTEGER
See Also:
Attribute.get(int ix)

setInt

int setInt(int ix,
           int value)
Sets an attribute value in the ordered list of attribute values.

Parameters:
ix - index
value - value of the attribute
Returns:
old int value
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If value already exists and the attribute values are unordered.
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
Attribute.set(int ix, java.lang.Object value)

setDouble

double setDouble(int ix,
                 double value)
Sets an attribute value in the ordered list of attribute values.

Parameters:
ix - index
value - value of the attribute
Returns:
old double value
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If value already exists and the attribute values are unordered.
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
Attribute.set(int ix, java.lang.Object value)

setLong

long setLong(int ix,
             long value)
Sets an attribute value in the ordered list of attribute values.

Parameters:
ix - index
value - value of the attribute
Returns:
old long value
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If value already exists and the attribute values are unordered.
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
Attribute.set(int ix, java.lang.Object value)

setByte

byte setByte(int ix,
             byte value)
Sets an attribute value in the ordered list of attribute values.

Parameters:
ix - index
value - value of the attribute
Returns:
old byte value
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If value already exists and the attribute values are unordered.
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
Attribute.set(int ix, java.lang.Object value)

setBoolean

boolean setBoolean(int ix,
                   boolean value)
Sets an attribute value in the ordered list of attribute values.

Parameters:
ix - index
value - value of the attribute
Returns:
old boolean value
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If value already exists and the attribute values are unordered.
IllegalStateException - If the type of this attribute is not equal to the type of the input
See Also:
Attribute.set(int ix, java.lang.Object value)

setBinaries

Object setBinaries(int ix,
                   InputStream is,
                   int length)
                   throws IOException
Sets an attribute value in the ordered list of attribute values. It is not defined when exactly the InputStream is read and closed. It is guaranteed that the InputStream is read and closed when the attribute is stored in the PCD by creating a new context or executing modifyAttribute() or modifyAttributes()

Parameters:
ix - index
is - stream that contains the value of the attribute
length - length of the stream
Returns:
old byte array
Throws:
IndexOutOfBoundsException - If ix is outside the specified range.
IllegalStateException - If value already exists and the attribute values are unordered.
IllegalStateException - If the type of this attribute is not BINARY_STREAM
IOException
See Also:
Attribute.set(int ix, java.lang.Object value)

getNamespace

String getNamespace()
Gets the namespace of this attribute accoring to the syntax define above.

Returns:
the namespace as string

getMetaAttributes

Enumeration getMetaAttributes(Attributes attrs)
Creates an enumeration of all attributes of this attribute, that are contained in a given set of attributes

Parameters:
attrs - Attributes in which meta-attributes are contained
Returns:
enumeration of meta attribues

isReadOnly

boolean isReadOnly()
Gets the read-only flag of this attribute. If this flag is true then every modification operation is prevented by throwing an IllegalStateException.

Returns:
boolean

getOriginalLocale

Locale getOriginalLocale()
Gets the original locale of this attribute.

Returns:
Locale

clone

Object clone()
Makes a copy of the attribute. The clone is not read-only.

Specified by:
clone in interface Attribute
See Also:
Attribute.clone()

getPcdId

IPcdAttributeId getPcdId()
Gets the PCD attribute identifier if this attribute has a PCD-extended attribute ID. For attributes using simple IDs, the Identifier shall be retrieved by the JNDI standard method javax.naming.directory.Attribute.getID().

The PCD provides a memory-efficient implementation for structured attribute IDs (see IPcdAttributeId). Regular attributes are still stored as String values as defined by the JNDI standard. To avoid string concatenations for the structured attribute IDs, it is recommended to call this method first for retrieving the ID and evaluate it with the methods provided by IPcdAttributeId and use the javax.naming.directory.Attribute.getID() if this method returns null.

Returns:
the attribute id as IPcdAttributeId or null, if this attribute has a string-valued identifier
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api - EP-PIN
[sap.com] EP-BASIS [sap.com] tc/epbc/pcd/pars/srvgldeprecated api BC-PIN-PCD
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2011 SAP AG Complete Copyright Notice