com.sapportals.portal.pcd.gl

Interface IPcdAttributes

All Superinterfaces:
Attributes, Cloneable, Serializable

public interface IPcdAttributes
extends Attributes

A PCD-specific extension of javax.naming.directory.Attributes.

In addition to the JNDI standard, the PCD provides immutable (read-only) instances of Attributes which can safely be shared among several object instances. Clients can check whether an Attributes instance is read-only with the method isReadOnly(). For getting a mutable instance which contains mutable Attribute instances, the method getDeepClone() can be used.

Beside that, the PCD offers other attribute identifiers than String (see IPcdAttributeId. Therefore, the get(IPcdAttributeId), put(IPcdAttributeId, Object) and remove(IPcdAttributeId) methods are overridden accordingly. These overridden methods shall be used for attributes with IPcdAttributeId-typed identifiers. For string-typed attribute IDs, the corresponding methods of the JNDI standard interface javax.naming.directory.Attributes shall be used.

This interface is not intended to be implemented by clients.


Method Summary
 Attribute get(IPcdAttributeId pcdAttributeId)
          Retrieves the attribute with the given PCD attribute id from the attribute set.
 IPcdAttributes getDeepClone()
          Makes a deep copy of the attribute set, i.e., the contained attribute instances are cloned, too.
 boolean isReadOnly()
          Gets the read-only flag of this attributes instance.
 Attribute put(IPcdAttributeId pcdAttributeId, Object val)
          Adds a new attribute with the specified PCD attribute ID and value to the attribute set.
 Attribute remove(IPcdAttributeId pcdAttributeId)
          Removes the attribute with the attribute id 'attrID' from the attribute set.
 
Methods inherited from interface javax.naming.directory.Attributes
clone, get, getAll, getIDs, isCaseIgnored, put, put, remove, size
 

Method Detail

getDeepClone

IPcdAttributes getDeepClone()
Makes a deep copy of the attribute set, i.e., the contained attribute instances are cloned, too. The clone is not read-only.

Returns:
a deep clone of this instance
See Also:
Attributes.clone()

isReadOnly

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

Returns:
boolean

get

Attribute get(IPcdAttributeId pcdAttributeId)
Retrieves the attribute with the given PCD attribute id from the attribute set.

Parameters:
pcdAttributeId - The non-null id of the attribute to retrieve.
Returns:
The attribute identified by attrID; null if not found.
See Also:
Attributes.get( java.lang.String )

put

Attribute put(IPcdAttributeId pcdAttributeId,
              Object val)
Adds a new attribute with the specified PCD attribute ID and value to the attribute set.

Parameters:
pcdAttributeId - non-null The id of the attribute to add. Must be either of class java.lang.String or an instance of IPcdAttributeId.
val - The possibly null value of the attribute to add. If null, the attribute does not have any values.
Returns:
The Attribute with attrID that was previous in this attribute set; null if no such attribute existed.
See Also:
Attributes.put( java.lang.String, java.lang.Object )

remove

Attribute remove(IPcdAttributeId pcdAttributeId)
Removes the attribute with the attribute id 'attrID' from the attribute set. If the attribute does not exist, ignore.

Parameters:
pcdAttributeId - The non-null PCD id of the attribute to remove.
Returns:
The Attribute with the same ID as attrID that was previous in the attribute set; null if no such attribute existed.
See Also:
Attributes.remove( java.lang.String )
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[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 - EP-PIN
[sap.com] EP-BASIS-API [sap.com] tc/epbc/pcd/gl/api api EP-PIN
[sap.com] EP-RUNTIME [sap.com] tc/ep/semantics/api api EP-PIN
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2015 SAP AG Complete Copyright Notice