com.ibm.itim.dataservices.model.domain
Class ServiceEntity

java.lang.Object
  |
  +--com.ibm.itim.dataservices.model.DirectoryObjectEntity
        |
        +--com.ibm.itim.dataservices.model.domain.ServiceEntity
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HostedServiceEntity

public class ServiceEntity
extends DirectoryObjectEntity

Class that represents a service within the data model.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.itim.dataservices.model.DirectoryObjectEntity
ORGANIZATION, PARENT
 
Constructor Summary
ServiceEntity(DirectoryObject dirObject)
          Constructs a ServiceEntity with a value object.
 
Method Summary
static ServiceEntity create(ObjectProfile profile, Service service)
          Create a ServiceEntity object for this Service.
static ServiceEntity create(Service serviceObject)
          Create a ServiceEntity object for this Service.
 AccountTable getAccountTable()
          Returns the table of accounts for this service.
 ServiceProfile getConcreteServiceProfile()
          Returns the profile that identifies the type of concrete service (i.e., NTDomain, Solaris, etc.).
 OrganizationEntity getOrganization()
          Returns the organization of the current object.
 PersonEntity getOwner()
          Returns the owner of the service (if any).
 java.util.Collection getPrerequisites()
          Returns the prerequisites (if any) of the service.
 boolean hasHostedService()
          Determines whether the service has a hosted service proxying it.
 void removeHostedServices()
          Removes all hosted services representing this service.
 void setOwner(PersonEntity person)
          Changes the owner of the service.
 void setPrerequisites(java.util.Collection services)
          Changes the list of prerequisites for the service.
 
Methods inherited from class com.ibm.itim.dataservices.model.DirectoryObjectEntity
equals, getDirectoryObject, getDistinguishedName, getEntity, getLifecycle, getParent, getParentDN, getProfile, getRelationship, getSupportedRelationships, hashCode, isSupportedRelationship, remove, remove, setLifecycle, toString, update, update
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceEntity

public ServiceEntity(DirectoryObject dirObject)
Constructs a ServiceEntity with a value object.

Parameters:
dirObject - Service object holding the attributes of the service.
Method Detail

create

public static ServiceEntity create(Service serviceObject)
Create a ServiceEntity object for this Service. Used to ensure that the correct type of Entity (ServiceEntity or HostedServiceEntity) is created.

Returns:
ServiceEntity object and HostedServiceEntity if the service is a hosted service.

create

public static ServiceEntity create(ObjectProfile profile,
                                   Service service)
Create a ServiceEntity object for this Service. Used to ensure that the correct type of Entity (ServiceEntity or HostedServiceEntity) is created.

Parameters:
profile - Profile identifying the type of this service (e.g., NT, Exchange).
Returns:
ServiceEntity object and HostedServiceEntity if the service is a hosted service.

getOwner

public PersonEntity getOwner()
                      throws ModelCommunicationException,
                             ModelIntegrityException
Returns the owner of the service (if any).

Returns:
PersonEntity representing the owner object of the service, null if none defined.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the evaluation of the relationship.

setOwner

public void setOwner(PersonEntity person)
              throws ModelCommunicationException,
                     ObjectNotFoundException
Changes the owner of the service.

Parameters:
person - PersonEntity representing the new owner.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

getPrerequisites

public java.util.Collection getPrerequisites()
                                      throws ModelCommunicationException,
                                             ModelIntegrityException
Returns the prerequisites (if any) of the service.

Returns:
Collection of ServiceEntities representing the service's prerequisites.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if a problem exists with the consistency of the data model preventing the location of the service's prerequisites. This is most likely due to the removal of a service from the data store that is identified as one of the prerequisites.

setPrerequisites

public void setPrerequisites(java.util.Collection services)
                      throws ModelCommunicationException,
                             ObjectNotFoundException
Changes the list of prerequisites for the service.

Parameters:
services - Collection of ServiceEntities representing the prerequisites of the service.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the entity in the data store. This may be due to a data integrity problem, or the entity may have been removed by another client.

getAccountTable

public AccountTable getAccountTable()
Returns the table of accounts for this service.

Returns:
AccountTable holding the accounts for this service.

removeHostedServices

public void removeHostedServices()
                          throws ModelCommunicationException,
                                 ModelRemoveException
Removes all hosted services representing this service.

Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelRemoveException - Thrown if a problem occurs while trying to remove the hosted services, leaving one or more in the data store.

hasHostedService

public boolean hasHostedService()
                         throws ModelCommunicationException
Determines whether the service has a hosted service proxying it.

Returns:
true if there is a hosted service proxying the service.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.

getOrganization

public OrganizationEntity getOrganization()
                                   throws ModelCommunicationException,
                                          ModelIntegrityException
Returns the organization of the current object.

Returns:
OrganizationEntity representing the object's organization.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ModelIntegrityException - Thrown if unable to locate the related organization. This may be due to a data integrity problem.

getConcreteServiceProfile

public ServiceProfile getConcreteServiceProfile()
                                         throws ModelCommunicationException,
                                                ObjectNotFoundException
Returns the profile that identifies the type of concrete service (i.e., NTDomain, Solaris, etc.).

Returns:
ServiceProfile of the concrete service.
Throws:
ModelCommunicationException - Thrown if unable to communicate with the data store.
ObjectNotFoundException - Thrown if unable to locate the related profile. This may be due to a data integrity problem.


IBM Tivoli Identity Manager 4.6
© Copyright International Business Machines Corporation 2005. All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.