org.openliberty.wsc
Class PeopleService

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

public class PeopleService
extends BaseServiceClient


Nested Class Summary
static class PeopleService.ListStructure
           
static class PeopleService.PeopleServiceRequest
           
 
Field Summary
private  WSFMessage currentReqRespMessage
           
protected static org.apache.log4j.Logger log
           
static java.lang.String SERVICE_URN
           
 
Constructor Summary
PeopleService(DiscoveryService discoveryService, EndpointReference initialEndpointReference)
          
 
Method Summary
 PSCollection addCollection(PSCollection collection, PSSubscription subscription)
          (urn:liberty:ps:2006-08:AddCollection*) - The ClientLib will provide a mechanism for adding collections to the PS.
 PSEntity addEntity(PSEntity entity, PSSubscription subscription)
          (urn:liberty:ps:2006-08:AddEntity*) - The ClientLib will provide a mechanism for adding entities to the PS.
 PSEntity addKnownEntity(PSEntity entity, Token token, boolean createReciprocalPSObject, PSSubscription subscription)
          (urn:liberty:ps:2006-08:AddKnownEntity*) - The WSC sends an identity token to the PS to attempt the addition of a known entity.
 void addObjectsToCollection(java.util.List<PSObjectID> objectIDs, TargetPSObjectID collectionID, PSSubscription subscription)
          This method requests that the PS add the objects referenced by the supplied object IDs to the collection specified by the collection ID
 WSFMessage currentReqRespMessage()
           
 java.util.List<PSObject> findObjects(javax.xml.xpath.XPathExpression pathExpression, int count, int offset, PSSubscription subscription)
          (urn:liberty:ps:2006-08:QueryObjects*) The PS Client will provide a mechanism for creating an xpath base query to the PS, which will return 0...n Objects in a flat list (no tree).
 PSObject getObjectInfo(PSObjectRef objectRef, PSSubscription subscription)
          This method simply invokes objectForObjectRef() and is included for naming consistency with the spec
 void invoke(PeopleService.PeopleServiceRequest request)
           
 java.util.List<PSObject> listCollectionMembers(TargetPSObjectID collectionID, PeopleService.ListStructure structure, java.lang.Integer count, java.lang.Integer offset, PSSubscription subscription)
          The PS Client will provide a facility for a ClientLIb user to list the members of a collection.
 PSObject objectForObjectRef(PSObjectRef objectRef, PSSubscription subscription)
          (urn:liberty:ps:2006-08:GetObjectInfo*) a method for retrieving the object info for a specific object.
static PeopleService peopleServiceForEndpointReference(DiscoveryService discoveryService, EndpointReference epr)
          Factory method that creates and initializes a PeopleService.
 boolean removeCollections(java.util.List<PSCollection> collections)
          This method takes a list of PSCollections and asks the PS to remove them
 boolean removeEntities(java.util.List<PSEntity> entities)
          This method takes a list of PSObjects and asks the PS to remove them
 void removeObjectsFromCollection(java.util.List<PSObjectID> objectIDs, TargetPSObjectID collectionID, PSSubscription subscription)
          This method requests that the PS remove the objects referenced by the supplied object IDs from the collection specified by the collection ID
 java.util.List<ResolveOutput> resolveIdentifiers(java.util.List<ResolveInput> inputs)
          urn:liberty:ps:2006-08:ResolveIdentifier* Method for retrieving stored identity tokens from an object identifier list 1...n.
 void setObjectInfo(java.util.List<PSObject> objects, PSSubscription subscription)
          This method simply invokes updateObjects() and is included for naming consistency with the spec
 boolean testMembership(Token identityToken, PSCollection collection, PSSubscription subscription)
          (urn:liberty:ps:2006-08:TestMembership*) Poses the question 'Is user X a member of group Y?' to the PS
 void updateObjects(java.util.List<PSObject> objects, PSSubscription subscription)
          (urn:liberty:ps:2006-08:SetObjectInfo*) updating the object info for a list of existing objects (1...n)
 
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
See Also:
Constant Field Values

currentReqRespMessage

private WSFMessage currentReqRespMessage
Constructor Detail

PeopleService

public PeopleService(DiscoveryService discoveryService,
                     EndpointReference initialEndpointReference)

Method Detail

peopleServiceForEndpointReference

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

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

currentReqRespMessage

public WSFMessage currentReqRespMessage()

addEntity

public PSEntity addEntity(PSEntity entity,
                          PSSubscription subscription)
(urn:liberty:ps:2006-08:AddEntity*) - The ClientLib will provide a mechanism for adding entities to the PS. The PS may optionally return an URL and saml artifact that are used by the "invited" entity when responding to the "invitation"

  • DisplayName will be required
  • Subscription will be supported, with TokenPolicy for requirements of the new identity's subscription
  • Parameters:
    entity - the entity that the user would like to add
    optionalSubscription - a notification subscription
    Returns:
    a PSEntity containing the ObjectID specified by the PeopleService, a flag will be set if the PS successfully adds, but does not return the object

    addKnownEntity

    public PSEntity addKnownEntity(PSEntity entity,
                                   Token token,
                                   boolean createReciprocalPSObject,
                                   PSSubscription subscription)
    (urn:liberty:ps:2006-08:AddKnownEntity*) - The WSC sends an identity token to the PS to attempt the addition of a known entity.

  • Subscription will be supported, with TokenPolicy for requirements of the new identity's subscription
  • Parameters:
    entity - the entity that the user would like to add
    token - used to convey an identity token for the target user Object being created.
    createReciprocalPSObject - if true, indicates that the WSC wants an object created representing the inviting user at the invited user's PS.
    optionalSubscription - a notification subscription
    Returns:
    a PSEntity containing the ObjectID specified by the PeopleService

    removeEntities

    public boolean removeEntities(java.util.List<PSEntity> entities)
    This method takes a list of PSObjects and asks the PS to remove them

    Parameters:
    objectRefs -
    Returns:

    testMembership

    public boolean testMembership(Token identityToken,
                                  PSCollection collection,
                                  PSSubscription subscription)
    (urn:liberty:ps:2006-08:TestMembership*) Poses the question 'Is user X a member of group Y?' to the PS

    Parameters:
    identityToken - required - identifies the entity being tested for membership
    collection - required - identifies the collection to query about membership
    subscription -
    Returns:

    addCollection

    public PSCollection addCollection(PSCollection collection,
                                      PSSubscription subscription)
    (urn:liberty:ps:2006-08:AddCollection*) - The ClientLib will provide a mechanism for adding collections to the PS.

  • DisplayName is required in the collection
  • Subscription will be supported, with TokenPolicy for requirements of the new identity's subscription
  • Parameters:
    collection - the collection that the user would like to add
    subscription - a notification subscription
    Returns:
    a PSCollection containing the ObjectID specified by the PeopleService, a flag will be set if the PS successfully adds, but does not return the object

    removeCollections

    public boolean removeCollections(java.util.List<PSCollection> collections)
    This method takes a list of PSCollections and asks the PS to remove them

    Parameters:
    objectRefs -
    Returns:

    addObjectsToCollection

    public void addObjectsToCollection(java.util.List<PSObjectID> objectIDs,
                                       TargetPSObjectID collectionID,
                                       PSSubscription subscription)
    This method requests that the PS add the objects referenced by the supplied object IDs to the collection specified by the collection ID

    Parameters:
    objectIDs -
    collectionID -
    subscription -

    removeObjectsFromCollection

    public void removeObjectsFromCollection(java.util.List<PSObjectID> objectIDs,
                                            TargetPSObjectID collectionID,
                                            PSSubscription subscription)
    This method requests that the PS remove the objects referenced by the supplied object IDs from the collection specified by the collection ID

    Parameters:
    objectIDs -
    collectionID -
    subscription -

    listCollectionMembers

    public java.util.List<PSObject> listCollectionMembers(TargetPSObjectID collectionID,
                                                          PeopleService.ListStructure structure,
                                                          java.lang.Integer count,
                                                          java.lang.Integer offset,
                                                          PSSubscription subscription)
    The PS Client will provide a facility for a ClientLIb user to list the members of a collection. If no collection is indicated, then the root collection is assumed. urn:liberty:ps:2006-08:ListMembers

    structure can be "children" "tree" or "entities"

  • children indicates only the direct child entities and collections
  • tree indicates return the full tree structure
  • entities indicates a flat view of the full tree, with no collections
  • count and offset are used to paginate the response tree/list

    Parameters:
    collectionID - if not specified root is assumed
    structure - indicates the structure of the results returned
    count - non-negative value indicating how many objects to return max
    offset - non-negative value indicating where in the full results set to begin returning objects
    subscription -
    Returns:

    objectForObjectRef

    public PSObject objectForObjectRef(PSObjectRef objectRef,
                                       PSSubscription subscription)
    (urn:liberty:ps:2006-08:GetObjectInfo*) a method for retrieving the object info for a specific object.

    Parameters:
    objectRef -
    optionalSubscription -
    Returns:
    the object referenced or null

    getObjectInfo

    public PSObject getObjectInfo(PSObjectRef objectRef,
                                  PSSubscription subscription)
    This method simply invokes objectForObjectRef() and is included for naming consistency with the spec

    Parameters:
    objectRef -
    optionalSubscription -
    Returns:

    updateObjects

    public void updateObjects(java.util.List<PSObject> objects,
                              PSSubscription subscription)
    (urn:liberty:ps:2006-08:SetObjectInfo*) updating the object info for a list of existing objects (1...n)

    Parameters:
    objects -
    subscription -

    setObjectInfo

    public void setObjectInfo(java.util.List<PSObject> objects,
                              PSSubscription subscription)
    This method simply invokes updateObjects() and is included for naming consistency with the spec

    Parameters:
    objectRef -
    optionalSubscription -

    resolveIdentifiers

    public java.util.List<ResolveOutput> resolveIdentifiers(java.util.List<ResolveInput> inputs)
    urn:liberty:ps:2006-08:ResolveIdentifier* Method for retrieving stored identity tokens from an object identifier list 1...n. Each object identifier may specify the requirements of the identity token through the use of sec:TokenPolicy.

    Parameters:
    targetIDs -
    Returns:

    findObjects

    public java.util.List<PSObject> findObjects(javax.xml.xpath.XPathExpression pathExpression,
                                                int count,
                                                int offset,
                                                PSSubscription subscription)
    (urn:liberty:ps:2006-08:QueryObjects*) The PS Client will provide a mechanism for creating an xpath base query to the PS, which will return 0...n Objects in a flat list (no tree). The query is constructed using XPath syntax, always beginning with //Object


    invoke

    public void invoke(PeopleService.PeopleServiceRequest request)