com.ca.jcs.sdkws.forwardinc
Class GroupHelper

java.lang.Object
  extended by com.ca.jcs.sdkws.forwardinc.GroupHelper
All Implemented Interfaces:
SDKWSHelper

public class GroupHelper
extends Object
implements SDKWSHelper

Helper class for general group object related functions.

Author:
erstr01

Field Summary
static List<String> DB_ATTRS
          Supported database attributes
static String DESCRIPTION
           
static String ID
          ConnectorMapTo names
static String MEMBERS
           
static String NAME
           
 
Constructor Summary
GroupHelper()
           
 
Method Summary
 boolean doAdd(SDKWSMetaConnector connector, Attributes attrs)
          Adds a group to the endpoint.
 void doConnectionCheck(SDKWSMetaConnector connector)
          Method for doing a connection check.
 boolean doDelete(SDKWSMetaConnector connector, String id)
          Deletes group from the endpoint.
 Attributes doLookUp(SDKWSMetaConnector connector, String id, String[] attrIds)
          Look up the group from the endpoint.
 boolean doModify(SDKWSMetaConnector connector, String id, ModificationItem[] modItems)
          Modify a ws object from ws endpoint via ws operation.
 NamingEnumeration<SearchResult> doSearch(SDKWSMetaConnector connector, String connectorClassName, FilterInfo filterInfo)
          Handles all searches, or only onelevel and subtree searches.
 Attributes makeAttributes(Object object, String[] attrIds)
          Creates an Attributes object for this group from the supplied object.
 String makeRDN(Object object)
          Creates an RDN string for this type from the supplied object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
ConnectorMapTo names

See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

DESCRIPTION

public static final String DESCRIPTION
See Also:
Constant Field Values

MEMBERS

public static final String MEMBERS
See Also:
Constant Field Values

DB_ATTRS

public static final List<String> DB_ATTRS
Supported database attributes

Constructor Detail

GroupHelper

public GroupHelper()
Method Detail

doConnectionCheck

public void doConnectionCheck(SDKWSMetaConnector connector)
                       throws NamingException
Method for doing a connection check.

Specified by:
doConnectionCheck in interface SDKWSHelper
Parameters:
connector - the connector.
Throws:
NamingException - when error occurs.

doAdd

public boolean doAdd(SDKWSMetaConnector connector,
                     Attributes attrs)
              throws NamingException
Adds a group to the endpoint.

Specified by:
doAdd in interface SDKWSHelper
Parameters:
connector - the connector.
attrs - the attributes that make up the group object.
Returns:
true if successful.
Throws:
NamingException - if any errors occur.

doDelete

public boolean doDelete(SDKWSMetaConnector connector,
                        String id)
                 throws NamingException
Deletes group from the endpoint.

Specified by:
doDelete in interface SDKWSHelper
Parameters:
connector - the connector.
id - the ID of the group to remove.
Returns:
true if successful.
Throws:
NamingException - if any errors occur.

doModify

public boolean doModify(SDKWSMetaConnector connector,
                        String id,
                        ModificationItem[] modItems)
                 throws NamingException
Modify a ws object from ws endpoint via ws operation.

Specified by:
doModify in interface SDKWSHelper
Parameters:
connector - the connector.
id - the naming value of the item being modified.
modItems - contains the items to modify.
Returns:
true if successful.
Throws:
NamingException - when error occurs.

doSearch

public NamingEnumeration<SearchResult> doSearch(SDKWSMetaConnector connector,
                                                String connectorClassName,
                                                FilterInfo filterInfo)
                                         throws NamingException
Handles all searches, or only onelevel and subtree searches. See the super class OpProcessor Java Doc for detials.

Specified by:
doSearch in interface SDKWSHelper
Parameters:
connector - the connector.
connectorClassName - the connector class name..
filterInfo - the LDAP filter object.
Returns:
search results.
Throws:
NamingException - when error occurs.

doLookUp

public Attributes doLookUp(SDKWSMetaConnector connector,
                           String id,
                           String[] attrIds)
                    throws NamingException
Look up the group from the endpoint.

Specified by:
doLookUp in interface SDKWSHelper
Parameters:
connector - the connector.
id - the ID of the group to look up.
attrIds - contains the target object's attribute ids to lookup.
Returns:
if successful, a group.
Throws:
NamingException - if any errors occur.

makeAttributes

public Attributes makeAttributes(Object object,
                                 String[] attrIds)
                          throws NamingException
Creates an Attributes object for this group from the supplied object.

Specified by:
makeAttributes in interface SDKWSHelper
Parameters:
object - the group to get the details from to make the attributes.
attrIds - the attribute ids to add to the attrs.
Returns:
the attributes object.
Throws:
NamingException - if the group is null or it's ID is null.

makeRDN

public String makeRDN(Object object)
               throws NamingException
Creates an RDN string for this type from the supplied object.

Specified by:
makeRDN in interface SDKWSHelper
Parameters:
object - the object to get the details from to make the RDN.
Returns:
the RDN.
Throws:
NamingException - if the group is null or it's ID is null.


Created 2011-07-14 13:27 EST