com.sapportals.portal.pcd.gl

Interface IPcdContext

All Superinterfaces:
Context, DirContext, IObservable
All Known Subinterfaces:
IDeltaLink, IRelation

public interface IPcdContext
extends DirContext, IObservable

The basic interface for the persistence objects of the Pcd GL. It adds following functionality to javax.naming.directory.DirContext:

Applications basically use IPcdContext to store their data. The support for bind -methods is very limited: Only objects that implement IPcdContext,IRelation and IPcdLink can be bound this IPcdContext.

Restrictions: The length of atomic names is restricted. Get the maximum length with the method IPcdObjectFactory.getMaxLengthAtomicName. This value is currently 105.

This interface is not intended to be implemented by clients.

See Also:
IDeltaLink, IUnit, IPcdAttribute

Field Summary
static String APPLICATION_OBJECT_FACTORIES
          Dynamic replacement of object factories
static String APPLICATION_STATE_FACTORIES
          Dynamic replacement of state factories
static String CRAWLER_OBJECTS
          Key for tracking crawled objects
static String FACTORY_SERVICE_ID
           
static String PCD_DISABLE_OBJECT_CLASS_CHECK
          Deprecated. not to be used at all
static String PCD_FILTER
          Environment key for filter.
static String PCD_GL_OBJECT_FACTORY
          If this is used as value for the Context.OBJECT_FACTORIES environment setting, the PCD does not call any semantic object factory but returns its own objects (IPcdContext etc.)
static String PCD_GL_STATE_FACTORY
           
static String PCD_INITIAL_CONTEXT_FACTORY
          Name of the intial context factory of the PCD.
static String PCD_PERSONALIZATION_PRINCIPAL
          Environment property key for the principal that is to be used for personalization.
static String PCD_REPORTING_PRINCIPAL
          Environment property key for the principal that is to be used for reporting (e.g.
static String PCD_RETURN_OBJECT_CLASS_IN_ENUMERATIONS
          Environment key for enumerations.
static String PCD_RUNTIME_PERMISSION_CHECK
          Environment property that forces the PCD to check the runtime permission.
static String PCD_SCHEMA_PREFIX
          Schema prefix for the PCD.
static String PCD_USE_NON_PERSONALIZED_COPY_SOURCE
          Environment property for specific copy use cases.
static String PCD_VERSION_CONTROL_ACTIVITY
          Key for DTR activity
static String REQUESTED_INTERFACE
          Deprecated. Use aspects instead
static String UCD_INITIAL_CONTEXT_FACTORY
          Name of the intial context factory of the UCD.
static String UCD_SCHEMA_PREFIX
          Schema prefix for the UCD.
 
Fields inherited from interface javax.naming.directory.DirContext
ADD_ATTRIBUTE, REMOVE_ATTRIBUTE, REPLACE_ATTRIBUTE
 
Fields inherited from interface javax.naming.Context
APPLET, AUTHORITATIVE, BATCHSIZE, DNS_URL, INITIAL_CONTEXT_FACTORY, LANGUAGE, OBJECT_FACTORIES, PROVIDER_URL, REFERRAL, SECURITY_AUTHENTICATION, SECURITY_CREDENTIALS, SECURITY_PRINCIPAL, SECURITY_PROTOCOL, STATE_FACTORIES, URL_PKG_PREFIXES
 
Method Summary
 void bind(Name name, Object obj, Attributes attrs, int position)
          Binds an object as a child of this context (see DirContext).
 void bind(String name, Object obj, Attributes attrs, int position)
          Binds an object to context (see DirContext).
 void copy(Name source, Name target)
          Perform a copy of the source to the target.
 void copy(Name oldName, Name newName, boolean recursive)
          Perform a (optionally deep) copy of the source to the target.
 void copy(Name oldName, Name newName, boolean recursive, int targetPos)
          Perform a (optionally deep) copy of the source to the target.
 void copy(Name oldName, Name newName, boolean recursive, int targetPos, boolean physically)
          Perform a (optionally deep) copy of the source to the target.
 void copy(Name oldName, Name newName, boolean recursive, int targetPos, boolean physically, Attributes newAttributes)
          Perform a (optionally deep) copy of the source to the target.
 void copy(Name oldName, Name newName, boolean recursive, int targetPos, boolean physically, Attributes newAttributes, String[] attributeFilterStrings)
          Performs a (optionally deep) copy of the source to the target.
 void copy(String oldName, String newName)
          Perform a copy of the source to the target.
 void copy(String oldName, String newName, boolean recursive)
          Perform a (optionally ) copy of the source to the target.
 void copy(String oldName, String newName, boolean recursive, int targetPos)
          Perform a (optionally ) copy of the source to the target.
 void copy(String oldName, String newName, boolean recursive, int targetPos, boolean physically)
          Perform a (optionally deep) copy of the source to the target.
 void copy(String oldName, String newName, boolean recursive, int targetPos, boolean physically, Attributes newAttributes)
          Perform a (optionally deep) copy of the source to the target.
 void copy(String oldName, String newName, boolean recursive, int targetPos, boolean physically, Attributes newAttributes, String[] attributeFilterStrings)
          Performs a (optionally deep) copy of the source to the target.
 IDeltaLink createDeltaLink(Name name, Attributes attributes, Name target)
          Create a DeltaLink as (virtual) subcontext of this context.
 IDeltaLink createDeltaLink(Name name, Attributes attributes, Name target, int position)
          Create a DeltaLink as (virtual) subcontext of this context.
 IDeltaLink createDeltaLink(String name, Attributes attributes, String target)
          Create a DeltaLink as (virtual) subcontext of this context.
 IDeltaLink createDeltaLink(String name, Attributes attributes, String target, int position)
          Create a DeltaLink as (virtual) subcontext of this context.
 DirContext createSubcontext(Name name, Attributes attributes, int position)
          Creates a new subcontext (see DirContext).
 DirContext createSubcontext(String name, Attributes attributes, int position)
          Creates a new subcontext (see DirContext).
 void destroySubcontext(Name name, boolean recursive)
          Deletes a (optionally deep) Subcontext The personalization of all objects will be deleted as well.
 void destroySubcontext(Name name, boolean recursive, boolean removePersonalization)
          Deletes a (optionally deep) Subcontext
 void destroySubcontext(String name, boolean recursive)
          Deletes a (optionally deep) Subcontext.
 void destroySubcontext(String name, boolean recursive, boolean removePersonalization)
          Deletes a (optionally deep) Subcontext.
 String getAccessUrl()
          Returns the unique id of the object, including the schema prefix
 IAclHandle getAclHandle()
          This method returns the Acl Handler which allowes you to access the ACL object and ACE objects.
 String getAtomicName()
          Gets the atomic name of the object.
 Attributes getAttributes(Name name, boolean readOnly)
          Retrieves all of the attributes associated with a named object.
 Attributes getAttributes(String name, boolean readOnly)
          Retrieves all of the attributes associated with a named object.
 int getChildPosition(Name name)
          Gets the current child position of child specified by name
 int getChildPosition(String name)
          Gets the current child position of child specified by name
 Date getDateOfLastChange(Name name)
          The method returns the date of the last change that affects this node.
 Date getDateOfLastChange(String name)
           
 IDlModificationState getDlModificationState(Name name)
          Return the modification state if this context is a delta link.
 IDlModificationState getDlModificationState(String name)
          Return the modification state if this context is a delta link.
 IUnit getUnit(Name name)
          Retrieve the unit for the object specified by name (analogous to getAttributes).
 IUnit getUnit(String name)
          Retrieve the unit for the object specified by name (analogous to getAttributes)
 NamingEnumeration getWhereUsedList(Name name)
          Returns a NamingEnumeration that lists all delta links and simple links that link to the object specified by the given name
 NamingEnumeration getWhereUsedList(String name)
           
 boolean isPartOfUnit(Name name)
          Checks if context is the part of a unit
 boolean isPartOfUnit(String name)
          Checks if context is the part of a unit
 boolean isRootOfUnit(Name name)
          Checks if context is the root of a unit
 boolean isRootOfUnit(String name)
          Checks if context is the root of a unit
 NamingEnumeration list(Name name, int fromIndex, int numberOfEntries)
          Returns only a defined sublist containing numberOfEntries objects starting with index fromIndex.
 NamingEnumeration list(String name, int fromIndex, int numberOfEntries)
           
 NamingEnumeration listBindings(Name name, int fromIndex, int numberOfEntries)
          Returns only a defined sublist containing numberOfEntries objects starting with index fromIndex.
 NamingEnumeration listBindings(String name, int fromIndex, int numberOfEntries)
           
 NamingEnumeration listRelations(Name name, Attributes matchingAttributes, RelationDirection direction)
          Returns a NamingEnumeration that lists all relations for which the IPcdContext identified by name is source or target and where the relations attributes match matchingAttributes (unless matchingAttributes is null).
 NamingEnumeration listRelations(String name, Attributes matchingAttributes, RelationDirection direction)
           
 int listSize(Name name)
          Returns the number of objects bound to the context.
 int listSize(String name)
          Returns the number of objects bound to the context.
 void modifyAttributes(Name name, int mod_op, Attributes attrs)
          Modifies the attributes associated with a named object.
 void modifyAttributes(Name name, ModificationItem[] mods)
          Modifies the attributes associated with a named object using an ordered list of modifications.
 void modifyAttributes(String name, int mod_op, Attributes attrs)
          Modifies the attributes associated with a named object.
 void modifyAttributes(String name, ModificationItem[] mods)
          Modifies the attributes associated with a named object using an ordered list of modifications.
 void rebind(Name name, Object obj, Attributes attrs, int position)
          Rebinds an object to context (see DirContext).
 void rebind(Name name, Object obj, Attributes attrs, int position, boolean removePersonalization)
          Rebinds an object to context (see DirContext).
 void rebind(String name, Object obj, Attributes attrs, int position)
          Rebinds an object to context (see DirContext).
 void rebind(String name, Object obj, Attributes attrs, int position, boolean removePersonalization)
          Rebinds an object to context (see DirContext).
 void removeAttributeModifications(Name name, String[] attributeIds)
          Removes attribute modifications if the context is part of a delta link.
 void removeAttributeModifications(String name, String[] attributeIds)
          Removes attribute modifications if the context is part of a delta link.
 void removeModifications(Name name)
          Removes modifications if the context is part of a delta link.
 void removeModifications(String name)
          Removes modifications if the context is part of a delta link.
 void rename(Name oldName, Name newName, boolean recursive)
          Perform a (optionally deep) rename of the source to the target.
 void rename(Name oldName, Name newName, boolean recursive, int targetPos)
          Perform a (optionally deep) rename of the source to the target.
 void rename(Name oldName, Name newName, boolean recursive, int targetPos, Attributes newAttributes)
          Perform a (optionally deep) rename of the source to the target.
 void rename(String oldName, String newName, boolean recursive)
          Perform a (optionally deep) rename of the source to the target.
 void rename(String oldName, String newName, boolean recursive, int targetPos)
          Perform a (optionally deep) rename of the source to the target.
 void rename(String oldName, String newName, boolean recursive, int targetPos, Attributes newAttributes)
          Perform a (optionally deep) rename of the source to the target.
 NamingEnumeration search(Name name, Attributes matchingAttributes, SearchControls cons)
          Allows to use matchingAttributes in combination with SearchControls.
 NamingEnumeration search(Name name, String filterExpr, Object[] filterArgs, SearchControls cons)
          Allows to use filter arguments in combination with the filter expression.
 NamingEnumeration search(String name, Attributes matchingAttributes, SearchControls cons)
          Allows to use matchingAttributes in combination with SearchControls.
 void setChildPosition(Name name, int position)
          Sets a new position for a subobject specified by name.
 void setChildPosition(String name, int position)
           
 void unbind(Name name, boolean removePersonalization)
          Unbinds (deletes) an object from the context (see DirContext).
 void unbind(String name, boolean removePersonalization)
          Unbinds (deletes) an object from the context (see DirContext).
 
Methods inherited from interface javax.naming.directory.DirContext
bind, bind, createSubcontext, createSubcontext, getAttributes, getAttributes, getAttributes, getAttributes, getSchema, getSchema, getSchemaClassDefinition, getSchemaClassDefinition, rebind, rebind, search, search, search, search, search, search, search
 
Methods inherited from interface javax.naming.Context
addToEnvironment, bind, bind, close, composeName, composeName, createSubcontext, createSubcontext, destroySubcontext, destroySubcontext, getEnvironment, getNameInNamespace, getNameParser, getNameParser, list, list, listBindings, listBindings, lookup, lookup, lookupLink, lookupLink, rebind, rebind, removeFromEnvironment, rename, rename, unbind, unbind
 
Methods inherited from interface com.sapportals.portal.pcd.gl.notif.IObservable
register
 

Field Detail

PCD_SCHEMA_PREFIX

static final String PCD_SCHEMA_PREFIX
Schema prefix for the PCD.

See Also:
Constant Field Values

PCD_INITIAL_CONTEXT_FACTORY

static final String PCD_INITIAL_CONTEXT_FACTORY
Name of the intial context factory of the PCD.

See Also:
Constant Field Values

UCD_SCHEMA_PREFIX

static final String UCD_SCHEMA_PREFIX
Schema prefix for the UCD.

See Also:
Constant Field Values

UCD_INITIAL_CONTEXT_FACTORY

static final String UCD_INITIAL_CONTEXT_FACTORY
Name of the intial context factory of the UCD.

See Also:
Constant Field Values

PCD_GL_OBJECT_FACTORY

static final String PCD_GL_OBJECT_FACTORY
If this is used as value for the Context.OBJECT_FACTORIES environment setting, the PCD does not call any semantic object factory but returns its own objects (IPcdContext etc.)

See Also:
Constant Field Values

PCD_GL_STATE_FACTORY

static final String PCD_GL_STATE_FACTORY
See Also:
Constant Field Values

PCD_PERSONALIZATION_PRINCIPAL

static final String PCD_PERSONALIZATION_PRINCIPAL
Environment property key for the principal that is to be used for personalization.

See Also:
Constant Field Values

PCD_REPORTING_PRINCIPAL

static final String PCD_REPORTING_PRINCIPAL
Environment property key for the principal that is to be used for reporting (e.g. Admin Traceability reports, Change Recording operations).

See Also:
Constant Field Values

PCD_RUNTIME_PERMISSION_CHECK

static final String PCD_RUNTIME_PERMISSION_CHECK
Environment property that forces the PCD to check the runtime permission. If this flag is set, modifications will cause an exception.

See Also:
Constant Field Values

PCD_USE_NON_PERSONALIZED_COPY_SOURCE

static final String PCD_USE_NON_PERSONALIZED_COPY_SOURCE
Environment property for specific copy use cases. If this property is set to "true" (String) together with the PCD_PERSONALIZATION_PRINCIPAL, the copy source will be the non-personalized object and the copy target will be personalized.

See Also:
Constant Field Values

APPLICATION_OBJECT_FACTORIES

static final String APPLICATION_OBJECT_FACTORIES
Dynamic replacement of object factories

See Also:
Constant Field Values

APPLICATION_STATE_FACTORIES

static final String APPLICATION_STATE_FACTORIES
Dynamic replacement of state factories

See Also:
Constant Field Values

REQUESTED_INTERFACE

@Deprecated
static final String REQUESTED_INTERFACE
Deprecated. Use aspects instead
Requested Interface If this value is set the generic layer checks if the object factory that is specified with the object class implements the given interface. For a successful check, the requested interface must be set in IPcdAttribute.JAVA_INTERFACE or must be element of IPcdAttribute.IMPLEMENTED_INTERFACES

See Also:
Constant Field Values

PCD_RETURN_OBJECT_CLASS_IN_ENUMERATIONS

static final String PCD_RETURN_OBJECT_CLASS_IN_ENUMERATIONS
Environment key for enumerations. If this parameter is set, the enumerations returned by list(), listBindings() and search() return the PCD object class instead of the java class in the NameClassPair-entries.

See Also:
Constant Field Values

FACTORY_SERVICE_ID

static final String FACTORY_SERVICE_ID
See Also:
Constant Field Values

PCD_FILTER

static final String PCD_FILTER
Environment key for filter. A filter can either be a set of attributes or a filter expression (see also search parameters).

See Also:
Constant Field Values

PCD_VERSION_CONTROL_ACTIVITY

static final String PCD_VERSION_CONTROL_ACTIVITY
Key for DTR activity

See Also:
Constant Field Values

PCD_DISABLE_OBJECT_CLASS_CHECK

@Deprecated
static final String PCD_DISABLE_OBJECT_CLASS_CHECK
Deprecated. not to be used at all
See Also:
Constant Field Values

CRAWLER_OBJECTS

static final String CRAWLER_OBJECTS
Key for tracking crawled objects

See Also:
Constant Field Values
Method Detail

bind

void bind(Name name,
          Object obj,
          Attributes attrs,
          int position)
          throws NamingException
Binds an object as a child of this context (see DirContext). Additionally allows to specify a position.

Parameters:
name - The name (as instance of Name)
attrs - The attributes of object
obj - The object to be bound
position - The position where the object is to be inserted; this has no effect if this context is not part of a unit. throws NamingException
Throws:
NamingException

bind

void bind(String name,
          Object obj,
          Attributes attrs,
          int position)
          throws NamingException
Binds an object to context (see DirContext). Additionally allows to specify a position.

Parameters:
name - The name (as instance of String)
attrs - The attributes of object
obj - The object to be bound
position - The position where the object is to be inserted
Throws:
NamingException

rebind

void rebind(Name name,
            Object obj,
            Attributes attrs,
            int position)
            throws NamingException
Rebinds an object to context (see DirContext). Additionally allows to specify a position. The personalization of the existing object will be deleted.

Parameters:
name - The name (as instance of Name)
attrs - The attributes of object
obj - The object to be bound
position - The position where the object is to be inserted
Throws:
NamingException

rebind

void rebind(Name name,
            Object obj,
            Attributes attrs,
            int position,
            boolean removePersonalization)
            throws NamingException
Rebinds an object to context (see DirContext). Additionally allows to specify a position.

Parameters:
name - The name (as instance of Name)
attrs - The attributes of object
obj - The object to be bound
position - The position where the object is to be inserted
removePersonalization - True if the personalization is to be removed.
Throws:
NamingException

rebind

void rebind(String name,
            Object obj,
            Attributes attrs,
            int position)
            throws NamingException
Rebinds an object to context (see DirContext). Additionally allows to specify a position. The personalization of the existing object will be deleted.

Parameters:
name - The name (as instance of String)
attrs - The attributes of object
obj - The object to be bound
position - The position where the object is to be inserted
Throws:
NamingException

rebind

void rebind(String name,
            Object obj,
            Attributes attrs,
            int position,
            boolean removePersonalization)
            throws NamingException
Rebinds an object to context (see DirContext). Additionally allows to specify a position.

Parameters:
name - The name (as instance of String)
attrs - The attributes of object
obj - The object to be bound
position - The position where the object is to be inserted
removePersonalization - True if the personalization is to be removed.
Throws:
NamingException

unbind

void unbind(Name name,
            boolean removePersonalization)
            throws NamingException
Unbinds (deletes) an object from the context (see DirContext).

Parameters:
name - The name (as instance of Name)
removePersonalization - True if the personalization is to be removed.
Throws:
NamingException

unbind

void unbind(String name,
            boolean removePersonalization)
            throws NamingException
Unbinds (deletes) an object from the context (see DirContext).

Parameters:
name - The name (as instance of String)
removePersonalization - True if the personalization is to be removed.
Throws:
NamingException

createSubcontext

DirContext createSubcontext(Name name,
                            Attributes attributes,
                            int position)
                            throws NamingException
Creates a new subcontext (see DirContext). Additionally allows to specify a position.

Parameters:
name - The name of the subcontext(as instance of Name)
attributes - The attributes of the new context
position - The position where the object is to be inserted
Returns:
DirContext
Throws:
NamingException

createSubcontext

DirContext createSubcontext(String name,
                            Attributes attributes,
                            int position)
                            throws NamingException
Creates a new subcontext (see DirContext). Additionally allows to specify a position.

Parameters:
name - The name of the subcontext(as instance of String)
attributes - The attributes of the new context
position - The position where the object is to be inserted
Returns:
DirContext
Throws:
NamingException

createDeltaLink

IDeltaLink createDeltaLink(Name name,
                           Attributes attributes,
                           Name target)
                           throws NamingException
Create a DeltaLink as (virtual) subcontext of this context.

Parameters:
name - The name of the delta link (as instance of Name)
attributes - The attributes of the DeltaLink
target - The target of the delta link as instance of Name, which must identify another IPcdContext
Returns:
The new deltaLink instance
Throws:
NamingException

createDeltaLink

IDeltaLink createDeltaLink(String name,
                           Attributes attributes,
                           String target)
                           throws NamingException
Create a DeltaLink as (virtual) subcontext of this context.

Parameters:
name - The name of the delta link (as instance of String)
attributes - The attributes of the DeltaLink
target - The target of the delta link as instance of String, which must identify another IPcdContext
Returns:
The new deltaLink instance
Throws:
NamingException

createDeltaLink

IDeltaLink createDeltaLink(Name name,
                           Attributes attributes,
                           Name target,
                           int position)
                           throws NamingException
Create a DeltaLink as (virtual) subcontext of this context.

Parameters:
name - The name of the delta link (as instance of Name)
attributes - The attributes of the DeltaLink
target - The target of the delta link as instance of Name, which must identify another IPcdContext
position - The position where the delta link is to be inserted
Returns:
The new deltaLink instance
Throws:
NamingException

createDeltaLink

IDeltaLink createDeltaLink(String name,
                           Attributes attributes,
                           String target,
                           int position)
                           throws NamingException
Create a DeltaLink as (virtual) subcontext of this context.

Parameters:
name - The name of the delta link (as instance of String)
attributes - The attributes of the DeltaLink
target - The target of the delta link as instance of String, which must identify another IPcdContext
position - The position where the delta link is to be inserted
Returns:
The new deltaLink instance
Throws:
NamingException

getUnit

IUnit getUnit(Name name)
              throws NamingException
Retrieve the unit for the object specified by name (analogous to getAttributes). The unit of the object is determined by traversing the hierarchy up to the root and looking for a node that is marked as unit.

Parameters:
name - The name (as instance of Name) of the objects for which the unit is requested.
Returns:
The IUnit, that contains the bound to the given name
Throws:
NamingException

getUnit

IUnit getUnit(String name)
              throws NamingException
Retrieve the unit for the object specified by name (analogous to getAttributes)

Parameters:
name - The name (as instance of String) of the objects for which the unit is requested.
Returns:
The IUnit, that contains the bound to the given name
Throws:
NamingException

getAtomicName

String getAtomicName()
                     throws NamingException
Gets the atomic name of the object. It the object is the root object, the atomic name is an empty string.

Returns:
The atomic name of the context
Throws:
NamingException

isRootOfUnit

boolean isRootOfUnit(Name name)
                     throws NamingException
Checks if context is the root of a unit

Parameters:
name -
Returns:
boolean
Throws:
NamingException

isRootOfUnit

boolean isRootOfUnit(String name)
                     throws NamingException
Checks if context is the root of a unit

Parameters:
name -
Returns:
boolean
Throws:
NamingException

isPartOfUnit

boolean isPartOfUnit(Name name)
                     throws NamingException
Checks if context is the part of a unit

Parameters:
name -
Returns:
boolean
Throws:
NamingException

isPartOfUnit

boolean isPartOfUnit(String name)
                     throws NamingException
Checks if context is the part of a unit

Parameters:
name -
Returns:
boolean
Throws:
NamingException

copy

void copy(Name source,
          Name target)
          throws NamingException
Perform a copy of the source to the target.

Parameters:
source - The name of the source (given as Name)
target - The name of the target (given as Name)
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).
NamingException

copy

void copy(String oldName,
          String newName)
          throws NamingException
Perform a copy of the source to the target.

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).
NamingException

copy

void copy(String oldName,
          String newName,
          boolean recursive)
          throws NamingException
Perform a (optionally ) copy of the source to the target.

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
recursive - Deep copy option
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).
NamingException

copy

void copy(String oldName,
          String newName,
          boolean recursive,
          int targetPos)
          throws NamingException
Perform a (optionally ) copy of the source to the target.

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
recursive - Deep copy option
targetPos - position in the target context
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

copy

void copy(Name oldName,
          Name newName,
          boolean recursive)
          throws NamingException
Perform a (optionally deep) copy of the source to the target.

Parameters:
oldName - The name of the source (given as Name)
newName - The name of the target (given as Name)
recursive - Deep copy option
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

copy

void copy(Name oldName,
          Name newName,
          boolean recursive,
          int targetPos)
          throws NamingException
Perform a (optionally deep) copy of the source to the target.

Parameters:
oldName - The name of the source (given as Name)
newName - The name of the target (given as Name)
recursive - Deep copy option
targetPos - position in the target context
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

copy

void copy(Name oldName,
          Name newName,
          boolean recursive,
          int targetPos,
          boolean physically)
          throws NamingException
Perform a (optionally deep) copy of the source to the target.

Parameters:
oldName - The name of the source (given as Name)
newName - The name of the target (given as Name)
recursive - Deep copy option
targetPos - position in the target context
physically - false if delta links are to be resolved
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

copy

void copy(String oldName,
          String newName,
          boolean recursive,
          int targetPos,
          boolean physically)
          throws NamingException
Perform a (optionally deep) copy of the source to the target.

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
recursive - Deep copy option
targetPos - position in the target context
physically - false if delta links are to be resolved
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

copy

void copy(Name oldName,
          Name newName,
          boolean recursive,
          int targetPos,
          boolean physically,
          Attributes newAttributes)
          throws NamingException
Perform a (optionally deep) copy of the source to the target.

Parameters:
oldName - The name of the source (given as Name)
newName - The name of the target (given as Name)
recursive - Deep copy option
targetPos - position in the target context
physically - false if delta links are to be resolved
newAttributes - Attributes to add for the target object
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

copy

void copy(Name oldName,
          Name newName,
          boolean recursive,
          int targetPos,
          boolean physically,
          Attributes newAttributes,
          String[] attributeFilterStrings)
          throws NamingException
Performs a (optionally deep) copy of the source to the target. It allows to specify a list of filters that contain the criteria for attributes that are NOT to be copied (e. g. com.sap.appx.*).

Parameters:
oldName - The name of the source (given as Name)
newName - The name of the target (given as Name)
recursive - Deep copy option
targetPos - position in the target context
physically - false if delta links are to be resolved
newAttributes - Attributes to add for the target object
attributeFilterStrings - Array of strings containing filters for attributes that are to be excluded from the copy operation.
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

copy

void copy(String oldName,
          String newName,
          boolean recursive,
          int targetPos,
          boolean physically,
          Attributes newAttributes)
          throws NamingException
Perform a (optionally deep) copy of the source to the target.

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
recursive - Deep copy option
targetPos - position in the target context
physically - false if delta links are to be resolved
newAttributes - Attributes to add for the target object
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

copy

void copy(String oldName,
          String newName,
          boolean recursive,
          int targetPos,
          boolean physically,
          Attributes newAttributes,
          String[] attributeFilterStrings)
          throws NamingException
Performs a (optionally deep) copy of the source to the target. It allows to specify a list of filters that contain the criteria for attributes that are NOT to be copied (e. g. com.sap.appx.*).

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
recursive - Deep copy option
targetPos - position in the target context
physically - false if delta links are to be resolved
newAttributes - Attributes to add for the target object
attributeFilterStrings - Array of strings containing filters for attributes that are to be excluded from the copy operation.
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

rename

void rename(String oldName,
            String newName,
            boolean recursive)
            throws NamingException
Perform a (optionally deep) rename of the source to the target. The personalization of all objects will be deleted as well.

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
recursive - Deep rename option
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

rename

void rename(String oldName,
            String newName,
            boolean recursive,
            int targetPos)
            throws NamingException
Perform a (optionally deep) rename of the source to the target. The personalization of all objects will be deleted as well.

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
recursive - Deep rename option
targetPos - position in the target context
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

rename

void rename(String oldName,
            String newName,
            boolean recursive,
            int targetPos,
            Attributes newAttributes)
            throws NamingException
Perform a (optionally deep) rename of the source to the target.

Parameters:
oldName - The name of the source (given as String)
newName - The name of the target (given as String)
recursive - Deep rename option
targetPos - position in the target context
newAttributes - New attributes for the renamed object
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

rename

void rename(Name oldName,
            Name newName,
            boolean recursive)
            throws NamingException
Perform a (optionally deep) rename of the source to the target. The personalization of all objects will be deleted.

Parameters:
oldName - The name of the source (given as Name)
newName - The name of the target (given as Name)
recursive - Deep rename option
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

rename

void rename(Name oldName,
            Name newName,
            boolean recursive,
            int targetPos,
            Attributes newAttributes)
            throws NamingException
Perform a (optionally deep) rename of the source to the target. The personalization of all objects will be deleted as well.

Parameters:
oldName - The name of the source (given as Name)
newName - The name of the target (given as Name)
recursive - Deep rename option
targetPos - position in the target context
newAttributes - New attributes for the renamed object
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

rename

void rename(Name oldName,
            Name newName,
            boolean recursive,
            int targetPos)
            throws NamingException
Perform a (optionally deep) rename of the source to the target. The personalization of all objects will be deleted as well.

Parameters:
oldName - The name of the source (given as Name)
newName - The name of the target (given as Name)
recursive - Deep rename option
targetPos - position in the target context
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

destroySubcontext

void destroySubcontext(String name,
                       boolean recursive)
                       throws NamingException
Deletes a (optionally deep) Subcontext. The personalization of all objects will be deleted as well.

Parameters:
name - The name of the source (given as String
recursive - Deep delete
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

destroySubcontext

void destroySubcontext(String name,
                       boolean recursive,
                       boolean removePersonalization)
                       throws NamingException
Deletes a (optionally deep) Subcontext.

Parameters:
name - The name of the source (given as String
recursive - Deep delete
removePersonalization - True if the personalization is to be deleted.
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

destroySubcontext

void destroySubcontext(Name name,
                       boolean recursive)
                       throws NamingException
Deletes a (optionally deep) Subcontext The personalization of all objects will be deleted as well.

Parameters:
name - The name of the source (given as Name
recursive - Deep delete
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

destroySubcontext

void destroySubcontext(Name name,
                       boolean recursive,
                       boolean removePersonalization)
                       throws NamingException
Deletes a (optionally deep) Subcontext

Parameters:
name - The name of the source (given as Name
recursive - Deep delete
removePersonalization - True if the personalization is to be deleted.
Throws:
NamingException - is thrown, if the target can't be created (e.g. because intermedate contexts do not exits).

listRelations

NamingEnumeration listRelations(Name name,
                                Attributes matchingAttributes,
                                RelationDirection direction)
                                throws NamingException
Returns a NamingEnumeration that lists all relations for which the IPcdContext identified by name is source or target and where the relations attributes match matchingAttributes (unless matchingAttributes is null). Direction defines if only outgoing or ingoing or any relations are returned.

Parameters:
name -
matchingAttributes -
direction -
Returns:
NamingEnumeration
Throws:
NamingException

getWhereUsedList

NamingEnumeration getWhereUsedList(String name)
                                   throws NamingException
Parameters:
name -
Returns:
NamingEnumeration
Throws:
NamingException

getWhereUsedList

NamingEnumeration getWhereUsedList(Name name)
                                   throws NamingException
Returns a NamingEnumeration that lists all delta links and simple links that link to the object specified by the given name

Parameters:
name -
Returns:
NamingEnumeration
Throws:
NamingException

setChildPosition

void setChildPosition(String name,
                      int position)
                      throws NamingException
Parameters:
name -
position -
Throws:
NamingException

setChildPosition

void setChildPosition(Name name,
                      int position)
                      throws NamingException
Sets a new position for a subobject specified by name.

Parameters:
name -
position -
Throws:
NamingException

getChildPosition

int getChildPosition(String name)
                     throws NamingException
Gets the current child position of child specified by name

Parameters:
name -
Returns:
int
Throws:
NamingException

getChildPosition

int getChildPosition(Name name)
                     throws NamingException
Gets the current child position of child specified by name

Parameters:
name -
Returns:
int
Throws:
NamingException

listRelations

NamingEnumeration listRelations(String name,
                                Attributes matchingAttributes,
                                RelationDirection direction)
                                throws NamingException
Parameters:
name -
matchingAttributes -
direction -
Returns:
NamingEnumeration
Throws:
NamingException

list

NamingEnumeration list(Name name,
                       int fromIndex,
                       int numberOfEntries)
                       throws NamingException
Returns only a defined sublist containing numberOfEntries objects starting with index fromIndex. If one or more objects have to be skipped because of filters or missing permissions, an EnumerationLimitException is thrown on the last possible call of NamingEnumeration.hasMore() or NamingEnumeration.next(). The EnumerationLimitException is also thrown if the number of entries that was specified is exceeded. The EnumerationLimitException contains the index of the last entry that was read from the PCD.

If the numberOfEntries is negative, the enumeration entries are in reverse order.
This is not supported if filters are used.

Parameters:
name - The name of context (given as Name
fromIndex - Start index
numberOfEntries - number of entries to be returned
Returns:
NamingEnumeration
Throws:
NamingException
See Also:
EnumerationLimitException

list

NamingEnumeration list(String name,
                       int fromIndex,
                       int numberOfEntries)
                       throws NamingException
Parameters:
name - The name of context (given as String
fromIndex - Start index
numberOfEntries - number of entries to be returned
Returns:
NamingEnumeration
Throws:
NamingException
See Also:
list(Name name, int fromIndex, int toIndex)

listBindings

NamingEnumeration listBindings(Name name,
                               int fromIndex,
                               int numberOfEntries)
                               throws NamingException
Returns only a defined sublist containing numberOfEntries objects starting with index fromIndex. If one or more objects have to be skipped because of filters or missing permissions, an EnumerationLimitException is thrown on the last possible call of NamingEnumeration.hasMore() or NamingEnumeration.next(). The EnumerationLimitException is also thrown if the number of entries that was specified is exceeded. The EnumerationLimitException contains the index of the last entry that was read from the PCD.

Parameters:
name - The name of context (given as Name
fromIndex - Start index
numberOfEntries - number of entries to be returned
Returns:
NamingEnumeration
Throws:
NamingException
See Also:
EnumerationLimitException

listBindings

NamingEnumeration listBindings(String name,
                               int fromIndex,
                               int numberOfEntries)
                               throws NamingException
Parameters:
name - The name of context (given as String
fromIndex - Start index
numberOfEntries - number of entries to be returned
Returns:
NamingEnumeration
Throws:
NamingException
See Also:
listBindings(Name name, int fromIndex, int toIndex)

listSize

int listSize(Name name)
             throws NamingException
Returns the number of objects bound to the context. Filters and permissions are NOT taken into account. This means that the number of objects returned by list() and listBindings() could be lower.

Parameters:
name - The name of context (given as Name)
Returns:
int
Throws:
NamingException

listSize

int listSize(String name)
             throws NamingException
Returns the number of objects bound to the context. Filters and permissions are NOT taken into account. This means that the number of objects returned by list() and listBindings() could be lower.

Parameters:
name - The name of context (given as String)
Returns:
int
Throws:
NamingException

search

NamingEnumeration search(Name name,
                         Attributes matchingAttributes,
                         SearchControls cons)
                         throws NamingException
Allows to use matchingAttributes in combination with SearchControls. In accordance to the Jndi specification, this and all other search methods in the Pcd GL operate only on the persisted data. No attempt is made in any place to call an object factory to possibly get another DirContext implementation with a different set of attributes.

Parameters:
name -
matchingAttributes -
cons -
Returns:
NamingEnumeration
Throws:
NamingException

search

NamingEnumeration search(String name,
                         Attributes matchingAttributes,
                         SearchControls cons)
                         throws NamingException
Allows to use matchingAttributes in combination with SearchControls.

Parameters:
name -
matchingAttributes -
cons -
Returns:
NamingEnumeration
Throws:
NamingException

search

NamingEnumeration search(Name name,
                         String filterExpr,
                         Object[] filterArgs,
                         SearchControls cons)
                         throws NamingException
Allows to use filter arguments in combination with the filter expression. The variables in filterExpr are replaced by the filterArgs using the method MessageFormat.format(String,Object[]).

Specified by:
search in interface DirContext
Throws:
NamingException
See Also:
DirContext.search(javax.naming.Name, java.lang.String, java.lang.Object[], javax.naming.directory.SearchControls)

getAclHandle

IAclHandle getAclHandle()
                        throws NamingException
This method returns the Acl Handler which allowes you to access the ACL object and ACE objects.

Returns:
IAclHandle
Throws:
NamingException

getAccessUrl

String getAccessUrl()
                    throws NamingException
Returns the unique id of the object, including the schema prefix

Returns:
String
Throws:
NamingException

modifyAttributes

void modifyAttributes(Name name,
                      int mod_op,
                      Attributes attrs)
                      throws NamingException
Modifies the attributes associated with a named object. The modifications are performed atomically.

The parameter mod_op describes the modification operation. The constant ADD_ATTRIBUTE specifies to add an attribute with the specified values. If attribute does not exist, create the attribute. The resulting attribute has a union of the specified value set and the prior value set. If the attribute is ordered then the specified values are appended otherwise the values are merged. If the attribute value type is PcdAttributeValueType.TEXT then the specified locale-text pairs replace existing locale-text pairs with the same locale.

The constant REPLACE_ATTRIBUTE specifies to replace an attribute with specified values. If attribute already exists, replaces all existing values with new specified values. If the attribute does not exist, creates it. If no value is specified, deletes all the values of the attribute.

The constant REMOVE_ATTRIBUTE specifies to delete the specified attribute values from the attribute. The resulting attribute has the set difference of its prior value set and the specified value set. If no values are specified, deletes the entire attribute. If the attribute does not exist, or if some or all members of the specified value set do not exist, this absence is ignored and the operation succeeds. If the attribute value type is PcdAttributeValueType.TEXT, then generally deletes all locale-text pairs for which the locale is specified. The locale-text pair for the empty locale is not removed.

Specified by:
modifyAttributes in interface DirContext
Parameters:
name - the name of the object whose attributes will be updated
mod_op - the modification operation, one of: ADD_ATTRIBUTE, REPLACE_ATTRIBUTE, REMOVE_ATTRIBUTE.
attrs - the attributes to be used for the modification; may not be null
Throws:
AttributeModificationException - if the modification cannot be completed successfully
NamingException - if a naming exception is encountered
See Also:
modifyAttributes(Name, ModificationItem[])

modifyAttributes

void modifyAttributes(String name,
                      int mod_op,
                      Attributes attrs)
                      throws NamingException
Modifies the attributes associated with a named object. See modifyAttributes(Name, int, Attributes)for details.

Specified by:
modifyAttributes in interface DirContext
Parameters:
name - the name of the object whose attributes will be updated
mod_op - the modification operation, one of: ADD_ATTRIBUTE, REPLACE_ATTRIBUTE, REMOVE_ATTRIBUTE.
attrs - the attributes to be used for the modification; map not be null
Throws:
AttributeModificationException - if the modification cannot be completed successfully
NamingException - if a naming exception is encountered

modifyAttributes

void modifyAttributes(Name name,
                      ModificationItem[] mods)
                      throws NamingException
Modifies the attributes associated with a named object using an ordered list of modifications. The modifications are performed in the order specified. Each modification specifies a modification operation code and an attribute on which to operate. The modifications are performed atomically.

Specified by:
modifyAttributes in interface DirContext
Parameters:
name - the name of the object whose attributes will be updated
mods - an ordered sequence of modifications to be performed; may not be null
Throws:
AttributeModificationException - if the modifications cannot be completed successfully
NamingException - if a naming exception is encountered
See Also:
modifyAttributes(Name, int, Attributes), ModificationItem

modifyAttributes

void modifyAttributes(String name,
                      ModificationItem[] mods)
                      throws NamingException
Modifies the attributes associated with a named object using an ordered list of modifications. See modifyAttributes(Name, ModificationItem[])for details.

Specified by:
modifyAttributes in interface DirContext
Parameters:
name - the name of the object whose attributes will be updated
mods - an ordered sequence of modifications to be performed; may not be null
Throws:
AttributeModificationException - if the modifications cannot be completed successfully
NamingException - if a naming exception is encountered

removeModifications

void removeModifications(Name name)
                         throws NamingException
Removes modifications if the context is part of a delta link. The modifications are removed for the context and all of its subobjects recursively. If the context is personalized, all user specific changes will be removed for the user given in the environment as IPcdContext.PCD_PERSONALIZATION_PRINCIPAL.

Parameters:
name - the name of the object
Throws:
NamingException - if context is not part of a delta link or personalized

removeModifications

void removeModifications(String name)
                         throws NamingException
Removes modifications if the context is part of a delta link. The modifications are removed for the context and all of its subobjects recursively. If the context is personalized, all user specific changes will be removed for the user given in the environment as IPcdContext.PCD_PERSONALIZATION_PRINCIPAL.

Parameters:
name - the name of the object
Throws:
NamingException - if context is not part of a delta link or personalized

removeAttributeModifications

void removeAttributeModifications(Name name,
                                  String[] attributeIds)
                                  throws NamingException
Removes attribute modifications if the context is part of a delta link. All the specified attributes are reset to the values of the delta link target. If the context is personalized, all user specific changes will be removed for the user given in the environment as IPcdContext.PCD_PERSONALIZATION_PRINCIPAL.

Parameters:
name - the name of the object
attributeIds - Ids of the attributes that are to be reset. If null, all attribute modifications will be removed.
Throws:
NamingException - if context is not part of a delta link or personalized

removeAttributeModifications

void removeAttributeModifications(String name,
                                  String[] attributeIds)
                                  throws NamingException
Removes attribute modifications if the context is part of a delta link. All the specified attributes are reset to the values of the delta link target. If the context is personalized, all user specific changes will be removed for the user given in the environment as IPcdContext.PCD_PERSONALIZATION_PRINCIPAL.

Parameters:
name - the name of the object
attributeIds - Ids of the attributes that are to be reset. If null, all attribute modifications will be removed.
Throws:
NamingException - if context is not part of a delta link or personalized

getDlModificationState

IDlModificationState getDlModificationState(Name name)
                                            throws NamingException
Return the modification state if this context is a delta link.

Parameters:
name -
Returns:
null if the object is not a deltalink or inherited through a deltalink
Throws:
NamingException
See Also:
IDlModificationState

getDlModificationState

IDlModificationState getDlModificationState(String name)
                                            throws NamingException
Return the modification state if this context is a delta link.

Parameters:
name -
Returns:
null if the object is not a deltalink or inherited through a deltalink
Throws:
NamingException
See Also:
IDlModificationState

getDateOfLastChange

Date getDateOfLastChange(Name name)
                         throws NamingException
The method returns the date of the last change that affects this node. The method considers deltalink inheritance; if the current node inherits through one or more deltalinks from one or more newer nodes, then the latest change date of these nodes is returned. This method is stable, and will be available also with future releases, in contrast to the attributes IPcdAttribute.LAST_CHANGED_AT etc which are going to be replaced completely with so called unit attributes.

Parameters:
name -
Returns:
Date
Throws:
NamingException

getDateOfLastChange

Date getDateOfLastChange(String name)
                         throws NamingException
Parameters:
name -
Returns:
Date
Throws:
NamingException
See Also:
getDateOfLastChange(javax.naming.Name)

getAttributes

Attributes getAttributes(String name,
                         boolean readOnly)
                         throws NamingException
Retrieves all of the attributes associated with a named object.

Throws:
NamingException - if a naming exception is encountered
See Also:
getAttributes(Name, boolean)

getAttributes

Attributes getAttributes(Name name,
                         boolean readOnly)
                         throws NamingException
Retrieves all of the attributes associated with a named object.

Parameters:
name - the name of the object from which to retrieve attributes
readOnly - If true, the returned instance of the attributes cannot be modified. This avoids that the attributes are cloned.
Returns:
the set of attributes associated with name
Throws:
NamingException - if a naming exception is encountered
See Also:
DirContext.getAttributes(javax.naming.Name)
Access Rights

This class can be accessed from:


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


Copyright 2011 SAP AG Complete Copyright Notice