org.openliberty.wsc
Class DirectoryAccessProtocolService

java.lang.Object
  extended by org.openliberty.wsc.BaseServiceClient
      extended by org.openliberty.wsc.DirectoryAccessProtocolService

public class DirectoryAccessProtocolService
extends BaseServiceClient

This is a Service Client for an ID-SIS-DAP Service. This class provides fairly simple access to ID-SIS-DAP, and is based entirely on the xmltooling classes in org.openliberty.xmltooling.idsis.dap which have a full implementation of all possible options over the protocol.

Author:
asa

Nested Class Summary
static class DirectoryAccessProtocolService.RequestType
          Enumeration of the 5 request types possib le within ID-SIS-DAP
 
Field Summary
protected static org.apache.log4j.Logger log
           
static java.lang.String OPTION_NO_PAGINATION
          Pagination of results is OPTIONAL (typically, the backend would have to implement [RFC2696] or [LDAPVLV]).
static java.lang.String OPTION_NO_SORTING
          Sorting is OPTIONAL (typically, the back end would have to implement [RFC2891]).
static java.lang.String OPTION_NO_STATIC
          Support static sets in pagination is OPTIONAL (the backend probably would have to support [LDAPVLV]).
static java.lang.String OPTION_NO_SUBSCRIBE
          Supporting objectType "_Subscription" is OPTIONAL (typically, the backend would have to support [LDAPPSearch]).
static java.lang.String SERVICE_URN
          This is the URN representing the ID-SIS-DAP Service
static java.lang.String SIMULATION_URN
          The simulation method using the ProcessingContext header with value "urn:liberty:sb:2003-08:ProcessingContext:Simulate," as specified in [LibertySOAPBinding], MUST be supported.
 
Constructor Summary
DirectoryAccessProtocolService(DiscoveryService discoveryService, EndpointReference initialEndpointReference)
          
 
Method Summary
 java.util.Hashtable<java.lang.String,java.lang.String> getEntityAttributes(java.util.List<java.lang.String> attributeNames, boolean isSimulation)
          Takes a list of attributes and returns a Hashtable of attribute key:value pairs.
 java.util.List<DAPQueryResponse> invokeQueries(java.util.List<DAPQuery> queries, boolean isSimulation)
          Send a list of DAPQuery objects and
 DAPQueryResponse invokeQuery(DAPQuery query, boolean isSimulation)
          Invokes a single DAPQUery
private  org.opensaml.ws.soap.soap11.Body invokeRequest(java.util.List bodyObjects, DirectoryAccessProtocolService.RequestType requestType, boolean isSimulation)
          This method provides support for multiple QueryItem elements
 DAPModifyResponse modify(DAPModify request, boolean isSimulation)
           
 java.util.List<DAPModifyResponse> modify(java.util.List<DAPModify> modifications, boolean isSimulation)
           
 java.util.Hashtable<java.lang.String,java.lang.String> modifyEntityAttributes(java.util.Hashtable<java.lang.String,java.lang.String> attributes, boolean isSimulation)
          Takes a hash of attribute pairs and sends them in a DAPModify request, the results returned in a similar hash.
 boolean serviceDoesNotSupportPagination()
          If pagination is not supported for objectType "entry" this method returns true.
 boolean serviceDoesNotSupportSorting()
          If sorting is not supported for objectType "entry" this will return true
 boolean serviceDoesNotSupportStatic()
          This method returns true if the server does not support static sets in pagination.
 boolean serviceDoesNotSupportSubscribe()
          returns true id subscribe is not supported by the server
static DirectoryAccessProtocolService serviceForEndpointReference(DiscoveryService discoveryService, EndpointReference epr)
          Factory method that creates and initializes a DirectoryAccessProtocolService.
 
Methods inherited from class org.openliberty.wsc.BaseServiceClient
getDiscoveryService, getServiceEndpointReference, getServiceEndpointReferenceStore, isSigningOutgoingMessages, replaceServiceEndpointReference, serviceExplicitlySupportsOption, setDiscoveryService, setServiceEndpointReference, setSigningOutgoingMessages
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log

SERVICE_URN

public static final java.lang.String SERVICE_URN
This is the URN representing the ID-SIS-DAP Service


OPTION_NO_SORTING

public static final java.lang.String OPTION_NO_SORTING
Sorting is OPTIONAL (typically, the back end would have to implement [RFC2891]). If sorting is not supported for objectType "entry," discovery option keyword urn:liberty:dst:noSorting MUST be registered.

See Also:
Constant Field Values

OPTION_NO_PAGINATION

public static final java.lang.String OPTION_NO_PAGINATION
Pagination of results is OPTIONAL (typically, the backend would have to implement [RFC2696] or [LDAPVLV]). If pagination is not supported for objectType "entry," discovery option keyword urn:liberty:dst:noPagination MUST be registered.

See Also:
Constant Field Values

OPTION_NO_STATIC

public static final java.lang.String OPTION_NO_STATIC
Support static sets in pagination is OPTIONAL (the backend probably would have to support [LDAPVLV]). If static sets are not supported, discovery option keyword urn:liberty:dst:noStatic MUST be registered.

See Also:
Constant Field Values

OPTION_NO_SUBSCRIBE

public static final java.lang.String OPTION_NO_SUBSCRIBE
Supporting objectType "_Subscription" is OPTIONAL (typically, the backend would have to support [LDAPPSearch]). If subscription is not supported, the discovery option keyword urn:liberty:dst:noSubscribe MUST be registered

See Also:
Constant Field Values

SIMULATION_URN

public static final java.lang.String SIMULATION_URN
The simulation method using the ProcessingContext header with value "urn:liberty:sb:2003-08:ProcessingContext:Simulate," as specified in [LibertySOAPBinding], MUST be supported. If simulated operation succeeds, similar actual operation SHOULD have a high probability of succeeding within next 30 minutes. This feature allows a WSC to test whether a modification is plausible prior to invoking the user interface to query data from the Principal, thus avoiding principal-supplied non-actionable data unnecessarily.

Constructor Detail

DirectoryAccessProtocolService

public DirectoryAccessProtocolService(DiscoveryService discoveryService,
                                      EndpointReference initialEndpointReference)

Method Detail

serviceForEndpointReference

public static DirectoryAccessProtocolService serviceForEndpointReference(DiscoveryService discoveryService,
                                                                         EndpointReference epr)
Factory method that creates and initializes a DirectoryAccessProtocolService.

Parameters:
epr -
Returns:
an instantiated DirectoryAccessProtocolService based on the EndpointReference that is passed in.

serviceDoesNotSupportSorting

public boolean serviceDoesNotSupportSorting()
If sorting is not supported for objectType "entry" this will return true

Returns:

serviceDoesNotSupportPagination

public boolean serviceDoesNotSupportPagination()
If pagination is not supported for objectType "entry" this method returns true.

Returns:

serviceDoesNotSupportStatic

public boolean serviceDoesNotSupportStatic()
This method returns true if the server does not support static sets in pagination.

Returns:

serviceDoesNotSupportSubscribe

public boolean serviceDoesNotSupportSubscribe()
returns true id subscribe is not supported by the server

Returns:

modifyEntityAttributes

public java.util.Hashtable<java.lang.String,java.lang.String> modifyEntityAttributes(java.util.Hashtable<java.lang.String,java.lang.String> attributes,
                                                                                     boolean isSimulation)
Takes a hash of attribute pairs and sends them in a DAPModify request, the results returned in a similar hash.

Parameters:
attributes -
isSimulation -
Returns:

getEntityAttributes

public java.util.Hashtable<java.lang.String,java.lang.String> getEntityAttributes(java.util.List<java.lang.String> attributeNames,
                                                                                  boolean isSimulation)
Takes a list of attributes and returns a Hashtable of attribute key:value pairs.

Parameters:
attributeNames -
isSimulation -
Returns:

invokeQuery

public DAPQueryResponse invokeQuery(DAPQuery query,
                                    boolean isSimulation)
Invokes a single DAPQUery

Parameters:
query -
isSimulation -
Returns:

invokeQueries

public java.util.List<DAPQueryResponse> invokeQueries(java.util.List<DAPQuery> queries,
                                                      boolean isSimulation)
Send a list of DAPQuery objects and

Parameters:
queries -
Returns:

modify

public DAPModifyResponse modify(DAPModify request,
                                boolean isSimulation)

modify

public java.util.List<DAPModifyResponse> modify(java.util.List<DAPModify> modifications,
                                                boolean isSimulation)

invokeRequest

private org.opensaml.ws.soap.soap11.Body invokeRequest(java.util.List bodyObjects,
                                                       DirectoryAccessProtocolService.RequestType requestType,
                                                       boolean isSimulation)
This method provides support for multiple QueryItem elements

As specified in [LibertyDST], a minimally compliant ID-SIS-PP implementation MUST support multiple QueryItem elements.

Parameters:
queryItems -
Returns: