com.tivoli.pd.jadmin
Class PDSSOResourceGroup

java.lang.Object
  extended by com.tivoli.pd.jutil.PDEnvironmentObject
      extended by com.tivoli.pd.jadmin.PDSSOResourceGroup
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class PDSSOResourceGroup
extends com.tivoli.pd.jutil.PDEnvironmentObject
implements java.lang.Cloneable

This class represents a group of single sign on (SSO) resources in the Security Access Manager policy server.

Modes: Local,Remote

See Also:
Serialized Form

Constructor Summary
PDSSOResourceGroup(PDContext context, java.lang.String gName, PDMessages messages)
          Creates a PDSSOResourceGroup object by retrieving the specified SSO resource group data from the Security Access Manager policy server.
 
Method Summary
 void addSSOResource(PDContext context, java.lang.String rName, PDMessages messages)
          Adds the specified SSO resource to this resource group.
static void addSSOResource(PDContext context, java.lang.String resourceGroupName, java.lang.String resource, PDMessages messages)
          Adds the specified SSO resource to the specified resource group.
 java.lang.Object clone()
          Returns a copy of this object.
static void createSSOResourceGroup(PDContext context, java.lang.String gName, java.lang.String description, PDMessages messages)
          Creates an SSO resource group in the Security Access Manager policy server.
static void deleteSSOResourceGroup(PDContext context, java.lang.String gName, PDMessages messages)
          Deletes an SSO resource group from the Security Access Manager policy server.
 boolean equals(java.lang.Object obj)
          Determines whether this PDSSOResourceGroup is equivalent to the input object.
 java.lang.String getDescription()
          Returns the SSO resource group description for this object.
 java.lang.String getId()
          Returns the ID for this SSO resource group as defined by Security Access Manager.
 java.util.ArrayList getSSOResources()
          Returns the list of SSO resource names in this resource group.
static java.util.ArrayList listSSOResourceGroups(PDContext context, PDMessages messages)
          Lists all of the SSO resource groups.
 void removeSSOResource(PDContext context, java.lang.String rName, PDMessages messages)
          Removes the specified SSO resource from this resource group.
static void removeSSOResource(PDContext context, java.lang.String resourceGroupName, java.lang.String resource, PDMessages messages)
          Removes the specified SSO resource from the specified resource group.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class com.tivoli.pd.jutil.PDEnvironmentObject
getContext, setContext
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PDSSOResourceGroup

public PDSSOResourceGroup(PDContext context,
                          java.lang.String gName,
                          PDMessages messages)
                   throws PDException
Creates a PDSSOResourceGroup object by retrieving the specified SSO resource group data from the Security Access Manager policy server.

This constructor corresponds to the ivadmin_ssogroup_get() C API.

Parameters:
context - the context for communicating with the Security Access Manager policy server.
gName - the name of the SSO resource group to instantiate. This value cannot be null and must have a non-zero length.
messages - in/out parameter; empty PDMessages on input; may contain zero or more informational or warning messages on output.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.
Method Detail

getId

public java.lang.String getId()
                       throws PDException
Returns the ID for this SSO resource group as defined by Security Access Manager.

This method corresponds to the ivadmin_ssogroup_getid() C API.

Throws:
PDException

getDescription

public java.lang.String getDescription()
                                throws PDException
Returns the SSO resource group description for this object. The return value will never be null, but it may be an empty String if the description has not been set.

This method corresponds to the ivadmin_ssogroup_getdescription() C API.

Throws:
PDException

getSSOResources

public java.util.ArrayList getSSOResources()
                                    throws PDException
Returns the list of SSO resource names in this resource group. The list may be empty if this object represents a resource group that has no SSO resources.

This method corresponds to the ivadmin_ssogroup_getresources() C API.

Returns:
an ArrayList of strings representing the names of SSO resources which belong to this resource group. The list may be empty if no resources belong to the resource group.
Throws:
PDException

addSSOResource

public void addSSOResource(PDContext context,
                           java.lang.String rName,
                           PDMessages messages)
                    throws PDException
Adds the specified SSO resource to this resource group.

Parameters:
context - the context for communicating with the Security Access Manager policy server.
rName - the SSO resource name (String) to add to the resource group. This value cannot be null and must have a non-zero length.
messages - in/out parameter; empty PDMessages on input; may contain zero or more informational or warning messages on output.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

removeSSOResource

public void removeSSOResource(PDContext context,
                              java.lang.String rName,
                              PDMessages messages)
                       throws PDException
Removes the specified SSO resource from this resource group.

Parameters:
context - the context for communicating with the Security Access Manager policy server.
rName - the SSO resource name (String) to remove from the resource group This value cannot be null and must have a non-zero length.
messages - in/out parameter; empty PDMessages on input; may contain zero or more informational or warning messages on output.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

toString

public java.lang.String toString()
Returns a String representation of this object.

Overrides:
toString in class java.lang.Object

clone

public java.lang.Object clone()
Returns a copy of this object.

Overrides:
clone in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Determines whether this PDSSOResourceGroup is equivalent to the input object.

Overrides:
equals in class java.lang.Object

createSSOResourceGroup

public static void createSSOResourceGroup(PDContext context,
                                          java.lang.String gName,
                                          java.lang.String description,
                                          PDMessages messages)
                                   throws PDException
Creates an SSO resource group in the Security Access Manager policy server.

This constructor corresponds to the ivadmin_ssogroup_create() C API.

Parameters:
context - the context for communicating with the Security Access Manager policy server.
gName - the resource group name. This value cannot be null and must have a non-zero length.
description - the description of the SSO resource group. Can be null.
messages - in/out parameter; empty PDMessages on input; may contain zero or more informational or warning messages on output.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

deleteSSOResourceGroup

public static void deleteSSOResourceGroup(PDContext context,
                                          java.lang.String gName,
                                          PDMessages messages)
                                   throws PDException
Deletes an SSO resource group from the Security Access Manager policy server.

This method corresponds to the ivadmin_ssogroup_delete() C API.

Parameters:
context - the context for communicating with the Security Access Manager policy server.
gName - the Security Access Manager resource group name. This value cannot be null and must have a non-zero length.
messages - in/out parameter; empty PDMessages on input; may contain zero or more informational or warning messages on output.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

listSSOResourceGroups

public static java.util.ArrayList listSSOResourceGroups(PDContext context,
                                                        PDMessages messages)
                                                 throws PDException
Lists all of the SSO resource groups. The returned list may be empty but it will never be null.

This method corresponds to the ivadmin_ssogroup_list() C API.

Parameters:
context - the context for communicating with the Security Access Manager policy server.
messages - in/out parameter; empty PDMessages on input; may contain zero or more informational or warning messages on output.
Returns:
an ArrayList of strings that represent the names of resource groups. The returned list will never be null.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

addSSOResource

public static void addSSOResource(PDContext context,
                                  java.lang.String resourceGroupName,
                                  java.lang.String resource,
                                  PDMessages messages)
                           throws PDException
Adds the specified SSO resource to the specified resource group.

This method corresponds to the ivadmin_ssogroup_addres() C API.

Parameters:
context - the context for communicating with the Security Access Manager policy server.
resourceGroupName - the Security Access Manager resource group name. This value cannot be null and must have a non-zero length.
resource - the SSO resource (String) to add to the resource group. This value cannot be null and must have a non-zero length.
messages - in/out parameter; empty PDMessages on input; may contain zero or more informational or warning messages on output.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.

removeSSOResource

public static void removeSSOResource(PDContext context,
                                     java.lang.String resourceGroupName,
                                     java.lang.String resource,
                                     PDMessages messages)
                              throws PDException
Removes the specified SSO resource from the specified resource group. This change affects only resource group data in the Security Access Manager policy server.

This method corresponds to the ivadmin_ssogroup_removeres() C API.

Parameters:
context - the context for communicating with the Security Access Manager policy server.
resourceGroupName - the Security Access Manager resource group name. This value cannot be null and must have a non-zero length.
resource - the resource name (String) to remove from the group. This value cannot be null and must have a non-zero length.
messages - in/out parameter; empty PDMessages on input; may contain zero or more informational or warning messages on output.
Throws:
PDException - if an error occurs. This exception may contain error and message codes defined in the product Error Message Reference document.