Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKPrivilegeSetICM

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractPrivilegeSet
        |
        +--com.ibm.mm.sdk.common.DKPrivilegeSetICM
All Implemented Interfaces:
DKConstant, DKMessageId, DKMessageIdICM, dkPrivilegeSet, java.io.Serializable

public class DKPrivilegeSetICM
extends dkAbstractPrivilegeSet
implements DKConstant, DKMessageIdICM, java.io.Serializable

A Content Manager privilege set is a named group of privileges. The purpose of using privilege sets is to ease system administration. Content Manager privileges must be grouped into privilege sets before they can be granted to users or used to define ACLs. Privilege sets granted to users are called user privileges. They define the individual users' individual bounds on using the system. When applied to ACL specifications, the privilege set specify the limits of the operations allowed on the bound Controlled Entity. Only individual users can be associated with privilege sets. User groups cannot hold privilege sets for their members. The DKPrivilegeSetICM class is used to represent Content Manager privilege sets.

See Also:
DKPrivilegeGroupICM, DKPrivilegeICM, Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageIdICM
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKPrivilegeSetICM()
          Default constructor.
DKPrivilegeSetICM(dkDatastore ds)
          Constructor that takes a datastore instance as a parameter.
 
Method Summary
 void addPrivilege(dkPrivilege privObj)
          Adds a new privilege to the in-memory (cached) representation of the privilege set instance.
 void addPrivilegeGroup(dkPrivilegeGroup privGroupObj)
          Adds a privilege group to the in-memory (cached) representation of the privilege set instance.
 void clearCache()
          Clears the privilege set cache by removing all contained privileges from the in-memory (cached) representation of this privilege set .
 dkCollection getAdminDomains()
          Retrieves the collection of domains with which this privilege set instance is associated.
 long getID()
          Returns the identifier associated with this privilege set instance.
 boolean isRetrieved()
          Checks to see if the privileges comprising this privilege set have been retrieved from the datastore
 java.lang.String[] listPrivilegeNames()
          Retrieves the name of all the privileges associated with this privilege set from the datastore if caching is turned off or if caching is on but the privilege names have not yet been retrieved into the in-memory cache.
 dkCollection listPrivileges()
          Retrieves the list of privileges associated with this privilege set from the datastore.
 void removePrivilege(long priv_id)
          Removes the privilege object instance corresponding to the privilege identifier specified in the input parameter, from the in-memory representation of this privilege set instance.
 void removePrivilege(java.lang.String priv_name)
          Removes the privilege object corresponding to the privilege name specified in the input parameter, from the in-memory representation of this privilege set instance.
 void setAdminDomains(dkCollection collDomain)
          Sets the admininstration domains that this privilege set object is associated with.
 void setID(long id)
          Sets the privilege group identifier.
 void setRetrieved(boolean isRetrieved)
          Sets a value that determines whether the privileges comprising this privilege set was retrieved from the datastore or not
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractPrivilegeSet
getDatastore, getDescription, getName, setDatastore, setDescription, setName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKPrivilegeSetICM

public DKPrivilegeSetICM()
Default constructor. Constructs and initializes a privilege set object that is currently not associated with any datastore instance

DKPrivilegeSetICM

public DKPrivilegeSetICM(dkDatastore ds)
Constructor that takes a datastore instance as a parameter. The returned privilege set instance is associated with the datastore instance. Equivalent to calling the default constructor followed by the setDatastore method on the created privilege set instance
Parameters:
ds - datastore reference. Should be an instance of DKDatastoreICM
See Also:
dkDatastore, DKDatastoreICM
Method Detail

setID

public void setID(long id)
Sets the privilege group identifier.
Parameters:
id - the new identifier to be associated with this privilege set instance

getID

public long getID()
Returns the identifier associated with this privilege set instance.
Returns:
identifier for of this privilege set instance

setAdminDomains

public void setAdminDomains(dkCollection collDomain)
Sets the admininstration domains that this privilege set object is associated with.
Parameters:
collDomain - collection of DKAdminDomainDefICM object instances with which this privilege set will henceforth be associated
See Also:
DKAdminDomainDefICM

getAdminDomains

public dkCollection getAdminDomains()
Retrieves the collection of domains with which this privilege set instance is associated.
Returns:
returned list contains one or more DKAdminDomainDefICM object instances with which this privilege set is associated
See Also:
DKAdminDomainDefICM

isRetrieved

public boolean isRetrieved()
Checks to see if the privileges comprising this privilege set have been retrieved from the datastore
Returns:
true if the privileges have already retrieved;, false otherwise

setRetrieved

public void setRetrieved(boolean isRetrieved)
Sets a value that determines whether the privileges comprising this privilege set was retrieved from the datastore or not
Parameters:
isRetrieved - if true, the privileges comprising this privilege set are considered to have been retrieved from the data; if false,the privileges comprising this privilege set are considered to not have been retrieved

listPrivileges

public dkCollection listPrivileges()
                            throws DKException,
                                   java.lang.Exception
Retrieves the list of privileges associated with this privilege set from the datastore. if caching is turned off or if caching is on but the privileges have not yet been retrieved into the in-memory cache. If caching is turned on and the privileges have already been retrieved into the in-memory cache, then return the privileges from the in-memory cache.
Overrides:
listPrivileges in class dkAbstractPrivilegeSet
Returns:
Each item in the returned collection is an instance of type DKPrivilegeICM.
Throws:
DKException - when error occurs in the server
java.lang.Exception - when error occurs in the server
See Also:
DKPrivilegeICM

listPrivilegeNames

public java.lang.String[] listPrivilegeNames()
                                      throws DKException,
                                             java.lang.Exception
Retrieves the name of all the privileges associated with this privilege set from the datastore if caching is turned off or if caching is on but the privilege names have not yet been retrieved into the in-memory cache. If caching is turned on and the privilege names have already been retrieved into the in-memory cache, then return the privilege names from the in-memory cache
Overrides:
listPrivilegeNames in class dkAbstractPrivilegeSet
Returns:
an array of names for all the privileges associated with this privilege setprivilege.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

addPrivilege

public void addPrivilege(dkPrivilege privObj)
                  throws DKAlreadyExistException,
                         DKException,
                         java.lang.Exception
Adds a new privilege to the in-memory (cached) representation of the privilege set instance. No datastore call is initiated as a result of calling this method.
Overrides:
addPrivilege in class dkAbstractPrivilegeSet
Parameters:
privObj - a valid DKPriviligeICM instance.
Throws:
DKAlreadyExitsException - if the privObj already exists in this DKPrivilegeSetICM object
DKException - when error occurs
java.lang.Exception - when error occurs
See Also:
DKPrivilegeICM, dkPrivilege

removePrivilege

public void removePrivilege(java.lang.String priv_name)
                     throws DKNotExistException,
                            DKException
Removes the privilege object corresponding to the privilege name specified in the input parameter, from the in-memory representation of this privilege set instance. No datastore call is initiated as a result of calling this method
Overrides:
removePrivilege in class dkAbstractPrivilegeSet
Parameters:
priv_name - name of the privilege to be removed
Throws:
DKNotExistException - if the privilege name does not exist in this privilege set.
DKException - when error occurs

removePrivilege

public void removePrivilege(long priv_id)
                     throws DKNotExistException,
                            DKException
Removes the privilege object instance corresponding to the privilege identifier specified in the input parameter, from the in-memory representation of this privilege set instance. No datastore call is initiated as a result of calling this method
Parameters:
priv_id - identifier of the privilege to be removed
Throws:
DKNotExistException - if the privilege id does not exist in the privilege set
DKException - when error occurs

addPrivilegeGroup

public void addPrivilegeGroup(dkPrivilegeGroup privGroupObj)
                       throws DKException,
                              java.lang.Exception
Adds a privilege group to the in-memory (cached) representation of the privilege set instance. No datastore call is initiated as a result of calling this method
Overrides:
addPrivilegeGroup in class dkAbstractPrivilegeSet
Parameters:
privGroupObj - valid privilege group object as an instance of DKPriviligeGroupICM.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs
See Also:
dkPrivilegeGroup

clearCache

public void clearCache()
                throws DKException,
                       java.lang.Exception
Clears the privilege set cache by removing all contained privileges from the in-memory (cached) representation of this privilege set . No datastore call is initiated as a result of calling this method
Overrides:
clearCache in class dkAbstractPrivilegeSet

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.