Enterprise Information Portal APIs

com.ibm.mm.sdk.common
Class DKAdminDomainsMgmtICM

java.lang.Object
  |
  +--com.ibm.mm.sdk.common.dkAbstractAdminDomainsMgmt
        |
        +--com.ibm.mm.sdk.common.DKAdminDomainsMgmtICM
All Implemented Interfaces:
dkAdminDomainsMgmt, DKMessageId, java.io.Serializable

public class DKAdminDomainsMgmtICM
extends dkAbstractAdminDomainsMgmt
implements java.io.Serializable

The DKAdminDomainsMgmtICM class is the implementation of the abstract class dkAdminDomainsMgmt. It represents and processes management functions for administrative domains. The dkAdminDomainsMgmt provides facilities to query, retrieve, update, store, and manage objects associated with administrative domains.

See Also:
, Serialized Form

Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
DKAdminDomainsMgmtICM(dkDatastore ds)
          Constructs an administrative domain management class and initializes it with the datastore object.
 
Method Summary
 void add(dkAdminDomainDef adObj)
          adds an Admininistrative Domain object into the datastore
 void addACLNames(java.lang.String domainName, java.lang.String[] ACLNames)
          adds a list of ACLs to this administrative domain
 void addGroupNames(java.lang.String domainName, java.lang.String[] groupNames)
          adds a list of user groups to this administrative domain.
 void addPrivSetNames(java.lang.String domainName, java.lang.String[] privSetNames)
          adds a list of privilege sets to this administrative domain
 void addUserNames(java.lang.String domainName, java.lang.String[] userNames)
          adds a list of users to the this administrative domain.
 dkAdminDomainDef createAdminDomain()
          Create an instance of DKAdminDomainDefICM.
 void del(dkAdminDomainDef adObj)
          deletes an Administrative Domain object from the datastore.
 void del(java.lang.String name)
          deletes an Administrative Domain object from the datastore.
 dkDatastore getDatastore()
          Gets the reference to the associated datastore object which this object manages.
 int getIDfromName(java.lang.String name)
          Get the Admin Domain ID from the given Domain name
 boolean isDomainEmpty(java.lang.String domainName)
          objectChecks if the Administrative Domain object is empty.
 java.lang.String[] listACLNames(java.lang.String domainName)
          gets a list of ACLs defined to this administrative domain.
 java.lang.String[] listAdminDomainNames()
          gets a list of Administrative Domain names defined in the datastore.
 dkCollection listAdminDomains()
          gets a list of Administrative Domain objects defined in the datastore.
 java.lang.String[] listGroupNames(java.lang.String domainName)
          gets a list of user groups defined to this administrative domain
 java.lang.String[] listPrivSetNames(java.lang.String domainName)
          gets a list of privilege set names defined to this administrative domain
 java.lang.String[] listResourceMgrNames(java.lang.String domainName)
          gets a list of resource managers defined to this administrative domain
 java.lang.String[] listSMSCollectionNames(java.lang.String domainName)
          gets a list of SMS collections defined to this administrative domain
 java.lang.String[] listUserNames(java.lang.String domainName)
          gets a list of users defined to this administrative domain
 void removeACLNames(java.lang.String domainName, java.lang.String[] ACLNames)
          removes a list of ACLs from this administrative domain
 void removeGroupNames(java.lang.String[] groupNames)
          removes a list of user groups from this administrative domain.
 void removePrivSetNames(java.lang.String domainName, java.lang.String[] privSetNames)
          removes a list of privilege sets from this administrative domain
 void removeUserNames(java.lang.String[] userNames)
          removes a list of users from this administrative domain.
 dkAdminDomainDef retrieve(dkAdminDomainDef adObj)
          retrieves an Administrative Domain object from the datastore.
 dkAdminDomainDef retrieve(java.lang.String name)
          retrieves an Administrative Domain object from the datastore.
 void setDatastore(dkDatastore ds)
          Sets the datastore on which the administrative domains are to be managed.
 void update(dkAdminDomainDef adObj)
          updates an Administrative Domain object in the datastore
 
Methods inherited from class com.ibm.mm.sdk.common.dkAbstractAdminDomainsMgmt
addResourceMgrNames, addSMSCollectionNames, removeResourceMgrNames, removeSMSCollectionNames
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DKAdminDomainsMgmtICM

public DKAdminDomainsMgmtICM(dkDatastore ds)
                      throws DKException,
                             java.lang.Exception
Constructs an administrative domain management class and initializes it with the datastore object. The administrative domain management are done on this datastore..

It initializes userManagement, authorizationMgmt and configurationMgmt objects from datastore Admin class for handling objects related to administrative domains.

Parameters:
ds - the owner datastore object
Throws:
DKException - fails to initialize management objects
See Also:
dkDatastoreDef.datastoreAdmin(), DKDatastoreAdminICM.userManagement(), DKDatastoreAdminICM.authorizationMgmt(), DKDatastoreAdminICM.configurationManagement()
Method Detail

getDatastore

public dkDatastore getDatastore()
Gets the reference to the associated datastore object which this object manages.
Overrides:
getDatastore in class dkAbstractAdminDomainsMgmt
Returns:
the target datastore object on which this object performs operations

setDatastore

public void setDatastore(dkDatastore ds)
Sets the datastore on which the administrative domains are to be managed.
Overrides:
setDatastore in class dkAbstractAdminDomainsMgmt
Parameters:
ds - the object datastore object on which the adminstrative domains are to be managed.

listAdminDomains

public dkCollection listAdminDomains()
                              throws DKException,
                                     java.lang.Exception
gets a list of Administrative Domain objects defined in the datastore. Note: To get just a list of administrative domain names use listAdminDomainNames.
Overrides:
listAdminDomains in class dkAbstractAdminDomainsMgmt
Returns:
a collection of administrative domain object that represent all available adminstrative domains in the datastore.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs
See Also:
listAdminDomainNames

listAdminDomainNames

public java.lang.String[] listAdminDomainNames()
                                        throws DKException,
                                               java.lang.Exception
gets a list of Administrative Domain names defined in the datastore.
Overrides:
listAdminDomainNames in class dkAbstractAdminDomainsMgmt
Returns:
A string array of administrative domain names.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs
See Also:
listAdminDomains

add

public void add(dkAdminDomainDef adObj)
         throws DKAlreadyExistException,
                DKException,
                java.lang.Exception
adds an Admininistrative Domain object into the datastore
Overrides:
add in class dkAbstractAdminDomainsMgmt
Parameters:
adObj - an administrative domain object that describes the administrative domain to be added to the datastore.
Throws:
DKAlreadyExistException - if domain object already exists
DKException - if error occurs
java.lang.Exception - if error occurs

del

public void del(dkAdminDomainDef adObj)
         throws DKException,
                java.lang.Exception
deletes an Administrative Domain object from the datastore. Note: The domain should be empty and should not have any users, usergroups, privilege sets, ACLs, Resource Managers and SMS Collections when the it is deleted.
Overrides:
del in class dkAbstractAdminDomainsMgmt
Parameters:
adObj - an administrative domain object that describes the administrative domain to be deleted from the datastore.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs
See Also:
,

del

public void del(java.lang.String name)
         throws DKException,
                java.lang.Exception
deletes an Administrative Domain object from the datastore. Note: The domain should be empty and should not have any users, usergroups, privilege sets, ACLs, Resource Managers and SMS Collections when the it is deleted.
Overrides:
del in class dkAbstractAdminDomainsMgmt
Parameters:
name - name of the administrative domain to be deleted from the datastore.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs
See Also:

update

public void update(dkAdminDomainDef adObj)
            throws DKException,
                   java.lang.Exception
updates an Administrative Domain object in the datastore
Overrides:
update in class dkAbstractAdminDomainsMgmt
Parameters:
adObj - the administrative domain object describing the administrative domain to be updated
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

retrieve

public dkAdminDomainDef retrieve(dkAdminDomainDef adObj)
                          throws DKException,
                                 java.lang.Exception
retrieves an Administrative Domain object from the datastore.
Overrides:
retrieve in class dkAbstractAdminDomainsMgmt
Parameters:
adObj - an administrative domain object to be retrieved. Note: the name of the administrative domain is picked up from the administrative domain object and the administrative domain matching that name is retrieved
Returns:
the administrative domain object that was retrieved
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

retrieve

public dkAdminDomainDef retrieve(java.lang.String name)
                          throws DKException,
                                 java.lang.Exception
retrieves an Administrative Domain object from the datastore.
Overrides:
retrieve in class dkAbstractAdminDomainsMgmt
Parameters:
name - Name of the administrative domain that is to be retrieved. Name can be up to 32 characters long.
Returns:
the administrative domain object that was retrieved
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listUserNames

public java.lang.String[] listUserNames(java.lang.String domainName)
                                 throws DKException,
                                        java.lang.Exception
gets a list of users defined to this administrative domain
Overrides:
listUserNames in class dkAbstractAdminDomainsMgmt
Parameters:
domanNamethe - the name of the administrative domain from which the users list is requested the admin domain name
Returns:
a list of user names who are in this administrative domain.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

addUserNames

public void addUserNames(java.lang.String domainName,
                         java.lang.String[] userNames)
                  throws DKException,
                         java.lang.Exception
adds a list of users to the this administrative domain. Note: A given user can belong to one and only one administrative domain.
Overrides:
addUserNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainName - Name of the administrative domain to which the list of users is added.
userNames - list of user names who are added to the specified administrative domain. The users in this list should already be defined to the datastore.
Throws:
DKException - if error occurs. for example:if one or more users in the list do not exist
java.lang.Exception - if error occurs.

removeUserNames

public void removeUserNames(java.lang.String[] userNames)
                     throws DKNotExistException,
                            DKException,
                            java.lang.Exception
removes a list of users from this administrative domain. Note: the user who is removed from this administrative domain is added to the default domain.
Overrides:
removeUserNames in class dkAbstractAdminDomainsMgmt
Parameters:
userNames - list of user names who are to be removed from this administrative domain.
Throws:
DKNotExistException - if error occurs. for example: if one or more users in the list do not exist.
DKException - if error occurs
java.lang.Exception - if error occurs Note: Before deleting a domain all the user belonging to the domain should be removed.

listGroupNames

public java.lang.String[] listGroupNames(java.lang.String domainName)
                                  throws DKException,
                                         java.lang.Exception
gets a list of user groups defined to this administrative domain
Overrides:
listGroupNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainName - the name of the administrative domain from which the user group names is requested.
Returns:
a list of user group names who are in this administrative domain
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

addGroupNames

public void addGroupNames(java.lang.String domainName,
                          java.lang.String[] groupNames)
                   throws DKException,
                          java.lang.Exception
adds a list of user groups to this administrative domain.
Overrides:
addGroupNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainName - Name of the administrative domain to which the list of user groups to be added.the - admin domain name
groupNames - list of user group names which are added to the specified administrative domain. The user groups in the list should already be defined to the datastore.
Throws:
DKException - if error occurs. for example:if one or more user groups in the list do not exist
java.lang.Exception - if error occurs

removeGroupNames

public void removeGroupNames(java.lang.String[] groupNames)
                      throws DKNotExistException,
                             DKException,
                             java.lang.Exception
removes a list of user groups from this administrative domain. Note: The user group that is removed from the domain is assigned the public domain.
Overrides:
removeGroupNames in class dkAbstractAdminDomainsMgmt
Parameters:
groupNames - the list of user group names
Throws:
DKNotExistException - if error occurs. for example: if one or more user groups in the list do not exist.
DKException - if error occurs
java.lang.Exception - if error occurs

listPrivSetNames

public java.lang.String[] listPrivSetNames(java.lang.String domainName)
                                    throws DKException,
                                           java.lang.Exception
gets a list of privilege set names defined to this administrative domain
Overrides:
listPrivSetNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainName - the name of the administrative domain from which the privilege set names list is requested.
Returns:
a list of privilege set names defined in this administrative domain.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

addPrivSetNames

public void addPrivSetNames(java.lang.String domainName,
                            java.lang.String[] privSetNames)
                     throws DKException,
                            java.lang.Exception
adds a list of privilege sets to this administrative domain
Overrides:
addPrivSetNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainNamethe - The name of the administrative domain to which the privilege sets are to be added.
PrivSetNames - A list of privilege set names to be added to the administrative domain.
Throws:
DKException - if error occurs for example:if one or more privilege set in the list do not exist
java.lang.Exception - if error occurs

removePrivSetNames

public void removePrivSetNames(java.lang.String domainName,
                               java.lang.String[] privSetNames)
                        throws DKNotExistException,
                               DKException,
                               java.lang.Exception
removes a list of privilege sets from this administrative domain
Overrides:
removePrivSetNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainNamethe - The name of the administrative domain name from which the privilege sets are to be removed.
PrivSetNames - - A list of privilege set names to be removed from the administrative domain.
Throws:
DKNotExistException - if error occurs. for example: if one or more privilege set in the list do not exist.
DKException - if error occurs
java.lang.Exception - if error occurs Note: Before deleting an administrative domain all the privilege sets should be removed

listACLNames

public java.lang.String[] listACLNames(java.lang.String domainName)
                                throws DKException,
                                       java.lang.Exception
gets a list of ACLs defined to this administrative domain.
Overrides:
listACLNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainName - the name of the administrative domain from which the ACLs list is requested.
Returns:
a list of ACL names for this domain
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

addACLNames

public void addACLNames(java.lang.String domainName,
                        java.lang.String[] ACLNames)
                 throws DKException,
                        java.lang.Exception
adds a list of ACLs to this administrative domain
Overrides:
addACLNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainName - the name of the administrative domain to which the list of ACLs is added.
ACLNames - list of ACLs which are added to the specified administrative domain.
Throws:
DKException - if error occurs for example:if one or more ACLs in the list do not exist
java.lang.Exception - if error occurs

removeACLNames

public void removeACLNames(java.lang.String domainName,
                           java.lang.String[] ACLNames)
                    throws DKNotExistException,
                           DKException,
                           java.lang.Exception
removes a list of ACLs from this administrative domain
Overrides:
removeACLNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainName - The name of the administrative domain name from which the ACLs are to be removed.
ACLNames - A list of ACL names to be removed from the administrative domain.
Throws:
DKNotExistException - if error occurs. for example: if one or more ACLs in the list do not exist.
DKException - if error occurs
java.lang.Exception - if error occurs Note: Before deleting a domain all the ACLs in the domain should be removed

listResourceMgrNames

public java.lang.String[] listResourceMgrNames(java.lang.String domainName)
                                        throws DKException,
                                               java.lang.Exception
gets a list of resource managers defined to this administrative domain
Overrides:
listResourceMgrNames in class dkAbstractAdminDomainsMgmt
Parameters:
domainName - the name of the administrative domain from which the resource manager list is requested.
Returns:
Name of the list of resource managers defined for this administrative domain.
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

listSMSCollectionNames

public java.lang.String[] listSMSCollectionNames(java.lang.String domainName)
                                          throws DKException,
                                                 java.lang.Exception
gets a list of SMS collections defined to this administrative domain
Overrides:
listSMSCollectionNames in class dkAbstractAdminDomainsMgmt
Parameters:
DomainName - - the name of the administrative domain from which the list of SMS Collections is requested.
Returns:
a list of SMS collection names for this domain
Throws:
java.lang.Exception - if error occurs
DKException - if error occurs

getIDfromName

public int getIDfromName(java.lang.String name)
                  throws DKException,
                         java.lang.Exception
Get the Admin Domain ID from the given Domain name
Overrides:
getIDfromName in class dkAbstractAdminDomainsMgmt
Returns:
administrative domain ID
Throws:
DKException - if error occurs
java.lang.Exception - if error occurs

createAdminDomain

public dkAdminDomainDef createAdminDomain()
Create an instance of DKAdminDomainDefICM.
Overrides:
createAdminDomain in class dkAbstractAdminDomainsMgmt
Returns:
the administrative domain object definition

isDomainEmpty

public boolean isDomainEmpty(java.lang.String domainName)
                      throws DKNotExistException,
                             DKException,
                             java.lang.Exception
objectChecks if the Administrative Domain object is empty. An administrative domain is considered empty if there are no users associated with the administrative domain there are no user groups associated with the administrative domain there are no privilege sets associated with the administrative domain there are no ACLs associated with the administrative domain there are no resource managers associated with the administrative domain and there are no SMS collections associated with the administrative domain Note: An administrative domain should be empty before deleting it.
Parameters:
domainName - The admin domain name which is to be verified if it is empty.
Returns:
true - if the administrative domain is empty
Throws:
DKNotExistException - if domain does not exist
DKException - if error occurs
java.lang.Exception - if error occurs

EIP Java APIs

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