com.ibm.itim.apps.pim
Class SharedAccessPolicyMO

java.lang.Object
  extended by com.ibm.itim.apps.pim.SharedAccessPolicyMO
All Implemented Interfaces:
java.io.Serializable

public class SharedAccessPolicyMO
extends java.lang.Object
implements java.io.Serializable

Managed object representing a shared access policy. Shared access policy entitles users to access the credentials or credential pools based on the organization roles.

Since:
ISIM 6.0
See Also:
SharedAccessPolicy, SAEntitlement, SAMembership, Serialized Form

Constructor Summary
SharedAccessPolicyMO(PlatformContext platform, javax.security.auth.Subject subject, DistinguishedName name)
          This API constructs the the managed object with a platform context, a subject, and the distinguished name of the object to manage.
 
Method Summary
 void addEntitlement(SAEntitlement entitlement)
          Add a new entitlement to the policy.
 void addMembership(SAMembership membership)
          Add a new membership to the policy.
 SharedAccessPolicy getData()
          This API returns a current snapshot of the shared access policy.
 DistinguishedName getDistinguishedName()
          Returns the distinguished name of the managed object
 java.util.Collection<SAEntitlement> getEntitlements()
          This method returns a list of entitlement objects that contains the entitlement information associated with the policy.
 java.util.Collection<SAMembership> getMemberships()
          This method returns a list of membership objects that contain the membership information associated with the policy.
 void remove()
          This method removes the shared access policy object.
 void removeEntitlement(SAEntitlement entitlement)
          Remove an entitlement from the policy.
 void removeMembership(SAMembership membership)
          Remove a membership from the policy.
 void setEntitlements(java.util.Collection<SAEntitlement> entitlements)
          Set the entitlements to the policy.
 void setMemberships(java.util.Collection<SAMembership> memberships)
          Set the memberships to the policy.
 void update(SharedAccessPolicy policy)
          Updates the policy with the given SharedAccessPolicy value object.
 void update(SharedAccessPolicy policy, java.util.Collection<SAMembership> memberships, java.util.Collection<SAEntitlement> entitlements)
          Updates the policy with the given SharedAccessPolicy value object, the memberships, and the entitlements.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedAccessPolicyMO

public SharedAccessPolicyMO(PlatformContext platform,
                            javax.security.auth.Subject subject,
                            DistinguishedName name)
This API constructs the the managed object with a platform context, a subject, and the distinguished name of the object to manage.

Parameters:
platform - specifies the PlatformContext that holds platform connection information.
subject - specifies the Subject that represents the authenticated caller.
name - specifies the DistinguishedName of the shared access policy.
Method Detail

getDistinguishedName

public DistinguishedName getDistinguishedName()
Returns the distinguished name of the managed object

Returns:
DistinguishedName of the managed object.

getData

public SharedAccessPolicy getData()
                           throws java.rmi.RemoteException,
                                  ApplicationException
This API returns a current snapshot of the shared access policy.

Returns:
the SharedAccessPolicy object that holds attribute information.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with platform.
ApplicationException - This exception is thrown if the API cannot retrieve data.

getEntitlements

public java.util.Collection<SAEntitlement> getEntitlements()
                                                    throws java.rmi.RemoteException,
                                                           AuthorizationException,
                                                           ApplicationException
This method returns a list of entitlement objects that contains the entitlement information associated with the policy.

Returns:
a list of SAEntitlement objects. This return is an empty list if no entitlement is found for this policy.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to search the shared access policy or view the entitlement information.
ApplicationException - This exception is thrown if the method is unable to retrieve data.
See Also:
SAEntitlement

getMemberships

public java.util.Collection<SAMembership> getMemberships()
                                                  throws java.rmi.RemoteException,
                                                         AuthorizationException,
                                                         ApplicationException
This method returns a list of membership objects that contain the membership information associated with the policy.

Returns:
a list of SAMembership objects. Returns an empty list, if no membership is found for this policy.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to search the shared access policy or view the membership information.
ApplicationException - This exception is thrown if the method is unable to retrieve data.
See Also:
SAMembership

addEntitlement

public void addEntitlement(SAEntitlement entitlement)
                    throws java.rmi.RemoteException,
                           AuthorizationException,
                           ApplicationException
Add a new entitlement to the policy.

Parameters:
entitlement - SAEntitlement value object.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to modify the shared access policy.
ApplicationException - This exception is thrown if the request fails to complete.

addMembership

public void addMembership(SAMembership membership)
                   throws java.rmi.RemoteException,
                          AuthorizationException,
                          ApplicationException
Add a new membership to the policy.

Parameters:
membership - SAMembership value object.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to modify the shared access policy.
ApplicationException - This exception is thrown if the request fails to complete.

removeEntitlement

public void removeEntitlement(SAEntitlement entitlement)
                       throws java.rmi.RemoteException,
                              AuthorizationException,
                              ApplicationException
Remove an entitlement from the policy.

Parameters:
entitlement - SAEntitlement value object.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to modify the shared access policy.
ApplicationException - This exception is thrown if the request fails to complete.
java.lang.IllegalArgumentException - This exception is thrown if the entitlement parameter is null or its id equals SAEntitlement.ID_NOT_ASSIGNED.

removeMembership

public void removeMembership(SAMembership membership)
                      throws java.rmi.RemoteException,
                             AuthorizationException,
                             ApplicationException
Remove a membership from the policy.

Parameters:
membership - SAMembership value object.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to modify the shared access policy.
ApplicationException - This exception is thrown if the request fails to complete.
java.lang.IllegalArgumentException - This exception is thrown if the membership parameter is null or the membership id equals SAMembership.ID_NOT_ASSIGNED.

setEntitlements

public void setEntitlements(java.util.Collection<SAEntitlement> entitlements)
                     throws java.rmi.RemoteException,
                            AuthorizationException,
                            ApplicationException
Set the entitlements to the policy.

Parameters:
entitlements - Collection of SAEntitlement value objects.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to modify the shared access policy.
ApplicationException - This exception is thrown if the request fails to complete.

setMemberships

public void setMemberships(java.util.Collection<SAMembership> memberships)
                    throws java.rmi.RemoteException,
                           AuthorizationException,
                           ApplicationException
Set the memberships to the policy.

Parameters:
memberships - Collection of SAMembership value objects.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to modify the shared access policy.
ApplicationException - This exception is thrown if the request fails to complete.

update

public void update(SharedAccessPolicy policy)
            throws java.rmi.RemoteException,
                   AuthorizationException,
                   SchemaViolationException,
                   ApplicationException
Updates the policy with the given SharedAccessPolicy value object.

Parameters:
policy - SharedAccessPolicy value object defining the attributes the shared access policy will have.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to modify the shared access policy.
SchemaViolationException - This exception is thrown if any of the attributes in the value object violates the managed object's schema. This may be caused by an invalid attribute or if a required attribute is missing entirely.
ApplicationException - This exception is thrown if the request fails to complete. This might be caused by the container being removed by another client previous to this call.
java.lang.IllegalArgumentException - This exception is thrown if policy parameter or policy DN is null.

update

public void update(SharedAccessPolicy policy,
                   java.util.Collection<SAMembership> memberships,
                   java.util.Collection<SAEntitlement> entitlements)
            throws java.rmi.RemoteException,
                   AuthorizationException,
                   SchemaViolationException,
                   ApplicationException
Updates the policy with the given SharedAccessPolicy value object, the memberships, and the entitlements.

Parameters:
policy - SharedAccessPolicy value object defining the attributes the shared access policy will have.
memberships - Collection of SAMembership value objects. If null value is passed in, the policy memberships is not changed.
entitlements - Collection of SAEntitlement value objects. If null value is passed in, the policy entitlements is not changed.
Throws:
java.rmi.RemoteException - This exception is thrown if the method is unable to communicate with platform.
AuthorizationException - This exception is thrown if client is not authorized to modify the shared access policy.
SchemaViolationException - This exception is thrown if any of the attributes in the value object violates the managed object's schema. This may be caused by an invalid attribute or if a required attribute is missing entirely.
ApplicationException - This exception is thrown if the request fails to complete. This might be caused by the container being removed by another client previous to this call.
java.lang.IllegalArgumentException - This exception is thrown if policy parameter or policy DN is null.

remove

public void remove()
            throws java.rmi.RemoteException,
                   AuthorizationException,
                   ApplicationException
This method removes the shared access policy object.

Throws:
java.rmi.RemoteException - This exception is thrown, if the client is unable to communicate with the platform.
AuthorizationException - This exception is thrown, if the client is unauthorized to remove the policy.
ApplicationException - This exception is thrown, if the client is unable to submit the request. This error might be caused, if another client removes the policy before this call.


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.