public class PeopleService extends BaseServiceClient
| Modifier and Type | Class and Description |
|---|---|
static class |
PeopleService.ListStructure
Enumeration that is used during a urn:liberty:ps:2006-08:ListMembersRequest action
to indicate the structure (and with 'entities' to some degree the content) of the
response.
|
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
log |
static String |
SERVICE_URN
People Service URN
|
| Constructor and Description |
|---|
PeopleService(DiscoveryService discoveryService,
EndpointReference initialEndpointReference) |
| Modifier and Type | Method and Description |
|---|---|
AddCollectionResponse |
addCollection(PSObject collection,
Subscription subscription)
(urn:liberty:ps:2006-08:AddCollection*) - The ClientLib provides a mechanism for adding collections to the PS.
|
AddEntityResponse |
addEntity(PSObject entity)
(urn:liberty:ps:2006-08:AddEntity*) - The ClientLib will provide a mechanism for adding entities to the PS.
|
AddEntityResponse |
addEntity(PSObject entity,
Subscription subscription,
TokenPolicy policy,
PStoSPRedirectURL pStoSPRedirectURL,
boolean createReciprocalPSObject)
(urn:liberty:ps:2006-08:AddEntity*) - The ClientLib will provide a mechanism for adding entities to the PS.
|
AddKnownEntityResponse |
addKnownEntity(PSObject entity,
Token token)
(urn:liberty:ps:2006-08:AddKnownEntity*) - The WSC sends an identity token to the PS to attempt the addition of a known entity.
|
AddKnownEntityResponse |
addKnownEntity(PSObject entity,
Token token,
Subscription subscription,
TokenPolicy policy,
PStoSPRedirectURL pStoSPRedirectURL,
boolean createReciprocalPSObject)
(urn:liberty:ps:2006-08:AddKnownEntity*) - The WSC sends an identity token to the PS to attempt the addition of a known entity.
|
AddToCollectionResponse |
addObjectsToCollection(List<ObjectID> objectIDs,
TargetObjectID collectionID,
Subscription subscription)
This method requests that the PS add the objects referenced by the supplied object IDs to the collection specified by the
collection ID
|
PSObject |
getObjectInfo(TargetObjectID targetObjectID,
Subscription subscription)
(urn:liberty:ps:2006-08:GetObjectInfo*) a method for retrieving the object info for a specific object.
|
private ResponseAbstractType |
invoke(RequestAbstractType request)
The basic invocation which involves the creation of an ID-WSF message and construction of a request
body remains the same from request to request.
|
ListMembersResponse |
listCollectionMembers(TargetObjectID collectionID,
PeopleService.ListStructure structure,
Integer count,
Integer offset,
Subscription subscription)
The PS Client will provide a facility for a ClientLIb user to list the members of a collection.
|
static PeopleService |
peopleServiceForEndpointReference(DiscoveryService discoveryService,
EndpointReference epr)
Factory method that creates and initializes a PeopleService.
|
List<PSObject> |
queryObjects(String pathExpression,
int count,
int offset,
Subscription 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).
|
RemoveCollectionResponse |
removeCollectionForTargetObjectID(TargetObjectID id)
This convenience method takes a single TargetObjectID that should reference a collection
and asks the PS to remove it.
|
RemoveCollectionResponse |
removeCollections(List<PSObject> collections)
This method takes a list of PSCollections and asks the PS to remove them
|
RemoveCollectionResponse |
removeCollectionsForTargetIDs(List<TargetObjectID> targetIDs)
This method takes a list of TargetObjectIDs and asks the PS to remove their
associated Collections.
|
RemoveEntityResponse |
removeEntities(List<PSObject> entities)
This method takes a list of PSObjects and asks the PS to remove them
|
RemoveEntityResponse |
removeEntitiesWithIds(List<String> entityIds)
Removes a list of entities from the People Service.
|
RemoveEntityResponse |
removeEntitiesWithTargetObjectIds(List<TargetObjectID> targetObjectIDs)
This method makes a request to remove PS Entities from a People Service based on the supplied
TargetObjectIDs.
|
RemoveEntityResponse |
removeEntityWithTargetObjectID(TargetObjectID id)
A convenience method that removes a single PS Entity referenced by the
supplied TargetObjectID from the People Service.
|
RemoveFromCollectionResponse |
removeObjectsFromCollection(List<ObjectID> objectIDs,
TargetObjectID collectionID,
Subscription subscription)
This method requests that the PS remove the objects referenced by the supplied object IDs from the collection specified by the
collection ID
|
List<ResolveOutput> |
resolveIdentifiers(List<ResolveInput> inputs)
urn:liberty:ps:2006-08:ResolveIdentifier*
Method for retrieving stored identity tokens from an object identifier list 1...n.
|
SetObjectInfoResponse |
setObjectInfo(List<PSObject> objects,
Subscription subscription)
This method simply invokes updateObjects() and is included for naming consistency with the spec
|
TestMembershipResponse |
testMembership(Token identityToken,
TargetObjectID collection,
Subscription subscription)
(urn:liberty:ps:2006-08:TestMembership*)
Poses the question 'Is user X a member of group Y?' to the PS
|
SetObjectInfoResponse |
updateObjects(List<PSObject> objects,
Subscription subscription)
(urn:liberty:ps:2006-08:SetObjectInfo*) updating the object info for a list of existing objects (1...n)
|
getDiscoveryService, getServiceEndpointReference, getServiceEndpointReferenceStore, isSigningOutgoingMessages, replaceServiceEndpointReference, serviceExplicitlySupportsOption, setDiscoveryService, setServiceEndpointReference, setSigningOutgoingMessagesprotected static Logger log
public static final String SERVICE_URN
public PeopleService(DiscoveryService discoveryService, EndpointReference initialEndpointReference)
public static PeopleService peopleServiceForEndpointReference(DiscoveryService discoveryService, EndpointReference epr)
epr - public AddEntityResponse addEntity(PSObject entity)
MUST include an <Object> element
entity - the entity that the user would like to addoptionalSubscription - a notification subscriptionpublic AddEntityResponse addEntity(PSObject entity, Subscription subscription, TokenPolicy policy, PStoSPRedirectURL pStoSPRedirectURL, boolean createReciprocalPSObject)
MUST include an <Object> element
<!-- Declaration of AddEntityRequest element -->
<xs:element name="AddEntityRequest" type="AddEntityRequestType"/>
<!-- Definition of AddEntityRequestType -->
<xs:complexType name="AddEntityRequestType">
<xs:complexContent>
<xs:extension base="RequestAbstractType">
<xs:sequence>
<xs:element ref="Object"/>
<xs:element ref="PStoSPRedirectURL" minOccurs="0"/>
<xs:element ref="CreatePSObject" minOccurs="0"/>
<xs:element ref="Subscription" minOccurs="0"/>
<xs:element ref="sec:TokenPolicy" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Declaration of AddEntityResponse element -->
<xs:element name="AddEntityResponse" type="AddEntityResponseType"/>
<!-- Definition of AddEntityResponseType -->
<xs:complexType name="AddEntityResponseType">
<xs:complexContent>
<xs:extension base="ResponseAbstractType">
<xs:sequence>
<xs:element ref="Object" minOccurs="0"/>
<xs:element ref="SPtoPSRedirectURL" minOccurs="0" maxOccurs="1"/>
<xs:element ref="QueryString" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
entity - the entity that the user would like to addoptionalSubscription - a notification subscriptionpublic AddKnownEntityResponse addKnownEntity(PSObject entity, Token token)
entity - the entity that the user would like to addtoken - used to convey an identity token for the target user Object being created.public AddKnownEntityResponse addKnownEntity(PSObject entity, Token token, Subscription subscription, TokenPolicy policy, PStoSPRedirectURL pStoSPRedirectURL, boolean createReciprocalPSObject)
entity - the entity that the user would like to addtoken - used to convey an identity token for the target user Object being created.subscription - policy - pStoSPRedirectURL - createReciprocalPSObject - if true, indicates that the WSC wants an object created representing the inviting user at the invited user's PS.public RemoveEntityResponse removeEntities(List<PSObject> entities)
<!-- Declaration of RemoveEntityRequest element -->
<xs:element name="RemoveEntityRequest" type="RemoveEntityRequestType"/>
<!-- Definition of RemoveEntityRequestType -->
<xs:complexType name="RemoveEntityRequestType">
<xs:complexContent>
<xs:extension base="RequestAbstractType">
<xs:sequence>
<xs:element ref="TargetObjectID" maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!-- Declaration of RemoveEntityResponse element -->
<xs:element name="RemoveEntityResponse" type="ResponseAbstractType"/>
objectRefs - public RemoveEntityResponse removeEntitiesWithIds(List<String> entityIds)
This method takes a list of PS Entity identifiers as strings, creates a list of TargetObjectID objects, and calls removeEntitiesWithTargetObjectIds which attempts to remove the list of entities from the People Service.
entityIds - public RemoveEntityResponse removeEntityWithTargetObjectID(TargetObjectID id)
id - public RemoveEntityResponse removeEntitiesWithTargetObjectIds(List<TargetObjectID> targetObjectIDs)
This method assumes that the TargetObjectIDs are all associated with PS Entity objects. The PS will fail the removal request if any of the TargetObjectIDs reference PS Collections.
targetObjectIDs - public TestMembershipResponse testMembership(Token identityToken, TargetObjectID collection, Subscription subscription)
identityToken - required - identifies the entity being tested for membershipcollection - - identifies the collection to query about membershipsubscription - public AddCollectionResponse addCollection(PSObject collection, Subscription subscription)
collection - the collection that the user would like to addsubscription - a notification subscriptionpublic RemoveCollectionResponse removeCollections(List<PSObject> collections)
objectRefs - public RemoveCollectionResponse removeCollectionForTargetObjectID(TargetObjectID id)
id - public RemoveCollectionResponse removeCollectionsForTargetIDs(List<TargetObjectID> targetIDs)
Assumes that the TargeObjectID objects specified point to collections, if not, the PS will return a failure.
targetIDs - public AddToCollectionResponse addObjectsToCollection(List<ObjectID> objectIDs, TargetObjectID collectionID, Subscription subscription)
objectIDs - collectionID - subscription - public RemoveFromCollectionResponse removeObjectsFromCollection(List<ObjectID> objectIDs, TargetObjectID collectionID, Subscription subscription)
objectIDs - collectionID - subscription - public ListMembersResponse listCollectionMembers(TargetObjectID collectionID, PeopleService.ListStructure structure, Integer count, Integer offset, Subscription subscription)
structure can be "children" "tree" or "entities"
count and offset are used to paginate the response tree/list
collectionID - if not specified root is assumedstructure - indicates the structure of the results returnedcount - non-negative value indicating how many objects to return maxoffset - non-negative value indicating where in the full results set to begin returning objectssubscription - public PSObject getObjectInfo(TargetObjectID targetObjectID, Subscription subscription)
<!-- Declaration of GetObjectInfoRequest element -->
<xs:element name="GetObjectInfoRequest" type="GetObjectInfoRequestType"/>
<!-- Definition of GetObjectInfoRequestType -->
<xs:complexType name="GetObjectInfoRequestType">
<xs:complexContent>
<xs:extension base="RequestAbstractType">
<xs:sequence>
<xs:element ref="TargetObjectID" minOccurs="0"/>
<xs:element ref="Subscription" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
RESPONSE:
<!-- Declaration of GetObjectInfoResponse element -->
<xs:element name="GetObjectInfoResponse" type="GetObjectInfoResponseType"/>
<!-- Definition of GetObjectInfoResponseType -->
<xs:complexType name="GetObjectInfoResponseType">
<xs:complexContent>
<xs:extension base="ResponseAbstractType">
<xs:sequence>
<xs:element ref="Object" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
targetObjectID - optionalSubscription - public SetObjectInfoResponse updateObjects(List<PSObject> objects, Subscription subscription)
objects - subscription - public SetObjectInfoResponse setObjectInfo(List<PSObject> objects, Subscription subscription)
objectRef - optionalSubscription - public List<ResolveOutput> resolveIdentifiers(List<ResolveInput> inputs)
inputs - public List<PSObject> queryObjects(String pathExpression, int count, int offset, Subscription subscription)
private ResponseAbstractType invoke(RequestAbstractType request)
request - Copyright © 1999–2015. All rights reserved.