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

java.lang.Object
  extended by com.ibm.itim.dataservices.model.DirectoryObjectEntity
      extended by com.ibm.itim.dataservices.model.domain.ServiceEntity
All Implemented Interfaces:
com.ibm.itim.util.Sortable, 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
 
Fields inherited from interface com.ibm.itim.util.Sortable
ATTR_NAME
 
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.).
 java.util.Collection getHostedServices()
          Returns all the hosted services associated with this service.
 OrganizationEntity getOrganization()
          Returns the organization of the current object.
 PersonEntity getOwner()
          Deprecated. Replace with getOwners() since TIM 5.0
 DirectoryObjectEntity getOwnerObject()
          Returns the owner object of the service (if any).
 java.util.Collection<PersonEntity> getOwners()
          Returns the owner(s) of the service (if any).
 java.util.Collection getPrerequisites()
          Returns the prerequisites (if any) of the service.
 boolean hasHostedService()
          Deprecated. use getHostedServices instead
 void removeHostedServices()
          Removes all hosted services representing this service.
 void setOwner(PersonEntity person)
          Changes the owner of the service.
 void setOwner(RoleEntity owner)
          Changes the owner of the service.
 void setPrerequisites(java.util.Collection services)
          Changes the list of prerequisites for the service.
 void update()
          Updates the attributes of the entity in the data store.
 
Methods inherited from class com.ibm.itim.dataservices.model.DirectoryObjectEntity
equals, getDirectoryObject, getDistinguishedName, getEntity, getLifecycle, getObjectCategory, getParent, getParentDN, getProfile, getRelationship, getSortValue, getSupportedRelationships, hashCode, initialize, initialize, isSupportedRelationship, remove, remove, setLifecycle, toString, 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
Deprecated. Replace with getOwners() since TIM 5.0

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.

getOwnerObject

public DirectoryObjectEntity getOwnerObject()
                                     throws ModelCommunicationException,
                                            ModelIntegrityException
Returns the owner object of the service (if any).

Returns:
DirectoryObjectEntity 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.

getOwners

public java.util.Collection<PersonEntity> getOwners()
                                             throws ModelCommunicationException,
                                                    ModelIntegrityException
Returns the owner(s) of the service (if any).

Returns:
collection of PersonEntity objects representing owner(s) of the service, empty collection if none defined. If role is defined for owner, this method will return all members of the role.
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.
Since:
5.0

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.

setOwner

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

Parameters:
owner - RoleEntity 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.
Since:
5.0

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
Deprecated. use getHostedServices instead

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.

getHostedServices

public java.util.Collection getHostedServices()
                                       throws ModelCommunicationException
Returns all the hosted services associated with this service.

Returns:
Collection of DirectoryObjectEntity
Throws:
ModelCommunicationException

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.

update

public void update()
            throws ModelCommunicationException,
                   ObjectNotFoundException
Description copied from class: DirectoryObjectEntity
Updates the attributes of the entity in the data store. An DirectoryObject value object is used to obtain the changes that need to be made.

Overrides:
update in class DirectoryObjectEntity
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.
See Also:
DirectoryObjectEntity.update()


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.