public class PersonalProfileService extends BaseServiceClient
This Service Client models PP v1.1 using DST 2.1 and utilizing the DST 2.1 Reference implementation. Even though DST 2.1 defines a methodology for Delete and Create, PP only uses Query and Modify.
Currently Supported:
| Modifier and Type | Class and Description |
|---|---|
static class |
PersonalProfileService.DataModifyOption
This enumeration models Table 4.
|
static class |
PersonalProfileService.DataQueryOption
This enumeration models Table 3.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DST_MODIFY_SUFFIX
The suffix that is combined with the SERVICE_URN to indicate in the Action element of the SOAP header
that the request is a Personal Profile Modification.
|
static String |
DST_QUERY_SUFFIX
The suffix that is combined with the SERVICE_URN to indicate in the Action element of the SOAP header
that the request is a Personal Profile Query.
|
private static Logger |
log |
static String |
OPTION_MULTIPLE_MODIFY_ITEM
This is a URN that may be passed as an option from the Discovery
Service indicating that the PP supports multiple ModifyItem objects in single Modify request
|
static String |
OPTION_SUPPORTS_EXTENSIONS
This is a URN that may be passed as an option from the Discovery
Service indicating that the PP supports utilizing the Extensions and xs:anyAttributes
specified in the DST
|
static String |
OPTION_SUPPORTS_FULL_XPATH
This is a URN that may be passed as an option from the Discovery
Service indicating that the full XPath language is supported for making
Queries and Modifications.
|
static String |
SERVICE_URN
This is the URN representing the Personal Profile Service
|
| Constructor and Description |
|---|
PersonalProfileService(DiscoveryService discoveryService,
EndpointReference initialEndpointReference) |
| Modifier and Type | Method and Description |
|---|---|
AddressCard |
addressCardForID(String id)
Selection by the id XML attribute of AddressCard.
|
List<AddressCard> |
addressCardsForAddressType(AddrType.Type addressType)
Selection of AddressCard by an exact match on the contents of a leaf element for the following leaf elements:
pp:AddrType
|
List<AddressCard> |
addressCardsForNickName(String nickname,
boolean localScriptVersion)
Selection of AddressCard by an exact match on the contents of a leaf element for the following leaf elements:
pp:Nick
pp:LNick
|
private List<AddressCard> |
addressCardsForQueryString(String queryString) |
AltID |
altIdForIDType(IDType.Type iDType)
Selection of /pp:PP/pp:LegalIdentity/pp:AltID by an exact match against the AltID's IDType.
|
AltID |
altIdForIDTypeURI(String iDTypeURI)
Selection of /pp:PP/pp:LegalIdentity/pp:AltID by an exact match against the AltID's IDType element content.
|
boolean |
invokeModify(String xPathModifySelector,
org.opensaml.core.xml.XMLObject modifiedObject)
This method attempts to update the portion of the Personal Profile indicated
by the xPathModifySelector with the provided modifiedObject
|
ModifyResponse |
invokeModifyForModifyItems(List<ModifyItem> modifyItems)
This method invoked a Modify request to the Profile Service.
|
QueryResponse |
invokeQuery(String queryItemSelect)
Using the DST 2.1 Reference implementation classes.
|
QueryResponse |
invokeQueryForQueryItem(QueryItem queryItem)
Invokes a PP Query for a single QueryItem
|
QueryResponse |
invokeQueryForQueryItems(List<QueryItem> queryItems)
This method provides support for multiple QueryItem elements
|
ModifyItem |
modifyItemForXPathAndObject(String xPathModifySelector,
org.opensaml.core.xml.XMLObject modifiedObject)
This method returns a ModifyItem with the data necessary to update the portion of the
Personal Profile indicated by the xPathModifySelector with the provided modifiedObject
|
MsgContact |
msgContactForID(String id)
Selection of a MsgContact by its id XML attribute.
|
List<MsgContact> |
msgContactsForNickName(String nickname,
boolean localScriptVersion)
Selection of MsgContact by an exact match on the contents of a leaf element for the following leaf elements:
pp:Nick
pp:LNick
|
private List<MsgContact> |
msgContactsForQueryItem(QueryItem queryItem) |
List<MsgContact> |
msgContactsForSpecifics(MsgTechnology.Technology technology,
MsgMethod.Method method,
MsgType.Type type)
Selection of MsgContact by an exact match on the contents of a leaf element for the following leaf elements:
pp:MsgTechnology
pp:MsgMethod
pp:MsgType
MsgTechnology, MsgMethod, and MsgType can be tested in isolation or simultaneously combined with an AND operator.
|
List<MsgContact> |
msgContactsForSpecifics(String technologyUri,
String methodUri,
String typeUri)
Selection of MsgContact by an exact match on the contents of a leaf element for the following leaf elements:
pp:MsgTechnology
pp:MsgMethod
pp:MsgType
MsgTechnology, MsgMethod, and MsgType can be tested in isolation or simultaneously combined with an AND operator.
|
static PersonalProfileService |
personalProfileServiceForEndpointReference(DiscoveryService discoveryService,
EndpointReference epr)
Factory method that creates and initializes a PersonalProfileService.
|
List<org.opensaml.core.xml.XMLObject> |
profileObjectsForXPathQuery(String xpathQueryString)
slash-separated path to any depth.
|
QueryItem |
queryItemForAddressCardID(String id,
String itemID)
Takes an id (unique) and builds an AddressCard QueryItem
|
QueryItem |
queryItemForAltIdByIDType(String iDType,
String itemID)
Returns a QueryItem for an AltID based on that AltIDs IDType element content
|
QueryItem |
queryItemForMsgContactID(String id,
String itemID)
Takes an id (unique) and builds an MsgContact QueryItem
|
QueryItem |
queryItemForMsgContactNickName(String nickname,
boolean localScriptVersion,
String itemID)
Creates a QueryItem that is for a MsgContact based on a Nickname.
|
QueryItem |
queryItemForMsgContactSpecifics(MsgTechnology.Technology technology,
MsgMethod.Method method,
MsgType.Type type,
String itemID)
Generation of a QueryItem to query for MsgContact by an exact match on the contents of a leaf element for the following leaf elements:
pp:MsgTechnology
pp:MsgMethod
pp:MsgType
MsgTechnology, MsgMethod, and MsgType can be tested in isolation or simultaneously combined with an AND operator.
|
QueryItem |
queryItemForMsgContactSpecifics(String technologyUri,
String methodUri,
String typeUri,
String itemID)
Generation of a QueryItem to query for MsgContact by an exact match on the contents of a leaf element for the following leaf elements:
pp:MsgTechnology
pp:MsgMethod
pp:MsgType
MsgTechnology, MsgMethod, and MsgType can be tested in isolation or simultaneously combined with an AND operator.
|
QueryItem |
queryItemForString(String properlyFormedQueryString,
String itemID)
Accepts any string and places it inside of the select
|
QueryItem |
queryItemForXPathQuery(String xpathQueryString,
String itemID)
Returns a QueryItem for the specified XPath String, if the string compiles.
|
boolean |
serviceExplicitlySupportsDataModifyOption(PersonalProfileService.DataModifyOption option)
Test to see whether the Personal Profile Service has registered support for a specific
data modify option with the Discovery Service.
|
boolean |
serviceExplicitlySupportsDataQueryOption(PersonalProfileService.DataQueryOption option)
Test to see whether the Personal Profile Service has registered support for a specific
data query option with the Discovery Service.
|
boolean |
serviceExplicitlySupportsExtensions()
ID-SIS-PP elements that have enumerated values use URIs as values ("values" may be referred to as "enumerators").
|
boolean |
serviceExplicitlySupportsFullXPath()
This indicates whether Full XPath Expressions can be used for any modify or query invocations
|
boolean |
serviceExplicitlySupportsMultipleModifyItems()
Checks whether multiple modification elements (ModifyItem) may be submitted in one Modify request
|
getDiscoveryService, getServiceEndpointReference, getServiceEndpointReferenceStore, isSigningOutgoingMessages, replaceServiceEndpointReference, serviceExplicitlySupportsOption, setDiscoveryService, setServiceEndpointReference, setSigningOutgoingMessagesprivate static Logger log
public static final String SERVICE_URN
public static final String OPTION_MULTIPLE_MODIFY_ITEM
public static final String OPTION_SUPPORTS_EXTENSIONS
public static final String OPTION_SUPPORTS_FULL_XPATH
public static final String DST_QUERY_SUFFIX
public static final String DST_MODIFY_SUFFIX
public PersonalProfileService(DiscoveryService discoveryService, EndpointReference initialEndpointReference)
public static PersonalProfileService personalProfileServiceForEndpointReference(DiscoveryService discoveryService, EndpointReference epr)
epr - public boolean serviceExplicitlySupportsFullXPath()
The Select string holds an XPATH expression. An ID-SIS-PP implementation MAY support full XPATH expressions [XPATH] as a Select expression. If it does support full XPATH expressions, it MAY advertise the discovery option keyword "urn:liberty:dst:fullXPath"
If an implementation supports full XPATH for querying, then it MUST also support full XPATH for modifies.
public boolean serviceExplicitlySupportsExtensions()
All containers and elements defined in the ID-SIS-PP schema have an Extension element which permits arbitrary schema extension. An implementation MAY support schema extension, but is not required to do so. If an implementation does support schema extension, then it MAY register the corresponding discovery option keyword "urn:liberty:dst:can:extend"
If you plan to extend this PP Client you will need to adhere to the approach designated by the OpenSAML Java XML-Tooling libraries. Any extended elements will need to extend XMLObject
public boolean serviceExplicitlySupportsMultipleModifyItems()
A minimally compliant implementation is not required to support multiple Modification elements. The Modify operation functions as described in [LibertyDST]. The Modify operation has the additional relaxation that a minimally compliant ID-SIS-PP implementation MAY refuse a Modify request with multiple Modification elements, provided all processing rules specified in [LibertyDST] are followed regarding failure to support multiple Modification elements.
Implementations SHOULD support multiple Modification elements when feasible. If an implementation supports multiple Modification elements it MAY register the discovery option keyword "urn:liberty:dst:multipleModification."
public boolean serviceExplicitlySupportsDataQueryOption(PersonalProfileService.DataQueryOption option)
option - public boolean serviceExplicitlySupportsDataModifyOption(PersonalProfileService.DataModifyOption option)
option - public ModifyItem modifyItemForXPathAndObject(String xPathModifySelector, org.opensaml.core.xml.XMLObject modifiedObject)
The following xPathModifySelectors MUST be supported by the PP:
xPathModifySelector - modifiedObject - public boolean invokeModify(String xPathModifySelector, org.opensaml.core.xml.XMLObject modifiedObject)
The following xPathModifySelectors MUST be supported by the PP:
xPathModifySelector - modifiedObject - public ModifyResponse invokeModifyForModifyItems(List<ModifyItem> modifyItems)
A minimally compliant implementation is not required to support multiple Modification elements. The Modify operation functions as described in [LibertyDST]. The Modify operation has the additional relaxation that a minimally compliant ID-SIS-PP implementation MAY refuse a Modify request with multiple Modification elements, provided all processing rules specified in [LibertyDST] are followed regarding failure to support multiple Modification elements.
Although the DST 2.1 reference implementation provides for an additional Query to be placed in ResultQuery elements inside of the Modify element, this is not provided for in PP v1.1, and is therefore not implemented here.
modifyItems - public AltID altIdForIDType(IDType.Type iDType)
iDType - Type enumerated in IDTypepublic AltID altIdForIDTypeURI(String iDTypeURI)
iDTypeURI - public MsgContact msgContactForID(String id)
id - the id that will match a MsgContactpublic List<MsgContact> msgContactsForSpecifics(MsgTechnology.Technology technology, MsgMethod.Method method, MsgType.Type type)
technology - an enumerated technology from the MsgTechnology Objectmethod - an enumerated method from the MsgMethod Objecttype - an enumerated type from the MsgType Objectpublic List<MsgContact> msgContactsForSpecifics(String technologyUri, String methodUri, String typeUri)
technologyUri - methodUri - typeUri - public List<MsgContact> msgContactsForNickName(String nickname, boolean localScriptVersion)
nickname - localScriptVersion - if true indicates that the query should be for pp:LNick. false indicates pp:Nickprivate List<MsgContact> msgContactsForQueryItem(QueryItem queryItem)
public AddressCard addressCardForID(String id)
ID - public List<AddressCard> addressCardsForAddressType(AddrType.Type addressType)
Example:
<QueryItem itemID="home">
<Select>
/pp:PP/pp:AddressCard
[pp:AddressType="urn:liberty:id-sis-pp:addrType:home"]
</Select>
</QueryItem>
Only one of the tests needs to be supported in any one slashed path. Such bracketed expression may also appear
within (i.e., in the middle of) a slashed path.
addressType - public List<AddressCard> addressCardsForNickName(String nickname, boolean localScriptVersion)
nickname - localScriptVersion - private List<AddressCard> addressCardsForQueryString(String queryString)
public QueryItem queryItemForMsgContactID(String id, String itemID)
id - the id that will match a MsgContactitemID - an id that the Data response will reference to indicate correlation with the QueryItempublic QueryItem queryItemForMsgContactNickName(String nickname, boolean localScriptVersion, String itemID)
nickname - localScriptVersion - if true indicates that the query should be for pp:LNick. false indicates pp:NickitemID - an id that the Data response will reference to indicate correlation with the QueryItempublic QueryItem queryItemForMsgContactSpecifics(String technologyUri, String methodUri, String typeUri, String itemID)
technologyUri - methodUri - typeUri - itemID - an id that the Data response will reference to indicate correlation with the QueryItempublic QueryItem queryItemForMsgContactSpecifics(MsgTechnology.Technology technology, MsgMethod.Method method, MsgType.Type type, String itemID)
technology - an enumerated technology from the MsgTechnology Objectmethod - an enumerated method from the MsgMethod Objecttype - an enumerated type from the MsgType ObjectitemID - an id that the Data response will reference to indicate correlation with the QueryItempublic QueryItem queryItemForAddressCardID(String id, String itemID)
id - the id that will match an AddressCarditemID - an id that the Data response will reference to indicate correlation with the QueryItempublic QueryItem queryItemForXPathQuery(String xpathQueryString, String itemID)
NOTE: Should this be used to prepare every QueryItem ?
xpathQueryString - itemID - the id of the QueryItem so that the Data element may be matched by itemIDRefpublic QueryItem queryItemForAltIdByIDType(String iDType, String itemID)
iDType - itemID - the id of the QueryItem so that the Data element may be matched by itemIDRefpublic QueryItem queryItemForString(String properlyFormedQueryString, String itemID)
properlyFormedQueryString - public List<org.opensaml.core.xml.XMLObject> profileObjectsForXPathQuery(String xpathQueryString)
/pp:PP
/pp:PP/pp:InformalName
/pp:PP/pp:LInformalName
/pp:PP/pp:CommonName
/pp:PP/pp:CommonName/pp:CN
/pp:PP/pp:CommonName/pp:LCN
/pp:PP/pp:CommonName/pp:AltCN
/pp:PP/pp:CommonName/pp:LAltCN
/pp:PP/pp:CommonName/pp:AnalyzedName
/pp:PP/pp:CommonName/pp:AnalyzedName/pp:PersonalTitle
/pp:PP/pp:CommonName/pp:AnalyzedName/pp:LPersonalTitle
/pp:PP/pp:CommonName/pp:AnalyzedName/pp:FN
/pp:PP/pp:CommonName/pp:AnalyzedName/pp:LFN
/pp:PP/pp:CommonName/pp:AnalyzedName/pp:SN
/pp:PP/pp:CommonName/pp:AnalyzedName/pp:LSN
/pp:PP/pp:CommonName/pp:AnalyzedName/pp:MN
/pp:PP/pp:CommonName/pp:AnalyzedName/pp:LMN
/pp:PP/pp:LegalIdentity
/pp:PP/pp:LegalIdentity/pp:LegalName
/pp:PP/pp:LegalIdentity/pp:LLegalName
/pp:PP/pp:LegalIdentity/pp:AnalyzedName
/pp:PP/pp:LegalIdentity/pp:AnalyzedName/pp:PersonalTitle
/pp:PP/pp:LegalIdentity/pp:AnalyzedName/pp:LPersonalTitle
/pp:PP/pp:LegalIdentity/pp:AnalyzedName/pp:FN
/pp:PP/pp:LegalIdentity/pp:AnalyzedName/pp:LFN
/pp:PP/pp:LegalIdentity/pp:AnalyzedName/pp:SN
/pp:PP/pp:LegalIdentity/pp:AnalyzedName/pp:LSN
/pp:PP/pp:LegalIdentity/pp:AnalyzedName/pp:MN
/pp:PP/pp:LegalIdentity/pp:AnalyzedName/pp:LMN
/pp:PP/pp:LegalIdentity/pp:VAT
/pp:PP/pp:LegalIdentity/pp:VAT/pp:IDValue
/pp:PP/pp:LegalIdentity/pp:VAT/pp:IDType
/pp:PP/pp:LegalIdentity/pp:AltID
/pp:PP/pp:LegalIdentity/pp:AltID/pp:IDValue
/pp:PP/pp:LegalIdentity/pp:AltID/pp:IDType
/pp:PP/pp:LegalIdentity/pp:DOB
/pp:PP/pp:LegalIdentity/pp:Gender
/pp:PP/pp:LegalIdentity/pp:MaritalStatus
/pp:PP/pp:EmploymentIdentity
/pp:PP/pp:EmploymentIdentity/pp:JobTitle
/pp:PP/pp:EmploymentIdentity/pp:LJobTitle
/pp:PP/pp:EmploymentIdentity/pp:O
/pp:PP/pp:EmploymentIdentity/pp:LO
/pp:PP/pp:EmploymentIdentity/pp:AltO
/pp:PP/pp:EmploymentIdentity/pp:AltLO
/pp:PP/pp:AddressCard
/pp:PP/pp:AddressCard/pp:AddrType
/pp:PP/pp:AddressCard/pp:Address
/pp:PP/pp:AddressCard/pp:Address/pp:PostalAddress
/pp:PP/pp:AddressCard/pp:Address/pp:LPostalAddress
/pp:PP/pp:AddressCard/pp:Address/pp:PostalCode
/pp:PP/pp:AddressCard/pp:Address/pp:L
/pp:PP/pp:AddressCard/pp:Address/pp:LL
/pp:PP/pp:AddressCard/pp:Address/pp:St
/pp:PP/pp:AddressCard/pp:Address/pp:LSt
/pp:PP/pp:AddressCard/pp:Address/pp:C
/pp:PP/pp:AddressCard/pp:Nick
/pp:PP/pp:AddressCard/pp:LNick
/pp:PP/pp:AddressCard/pp:LComment
/pp:PP/pp:MsgContact
/pp:PP/pp:MsgContact/pp:Nick
/pp:PP/pp:MsgContact/pp:LNick
/pp:PP/pp:MsgContact/pp:LComment
/pp:PP/pp:MsgContact/pp:MsgType
/pp:PP/pp:MsgContact/pp:MsgMethod
/pp:PP/pp:MsgContact/pp:MsgTechnology
/pp:PP/pp:MsgContact/pp:MsgProvider
/pp:PP/pp:MsgContact/pp:MsgAccount
/pp:PP/pp:MsgContact/pp:MsgSubaccount
/pp:PP/pp:Facade
/pp:PP/pp:Facade/pp:MugShot
/pp:PP/pp:Facade/pp:WebSite
/pp:PP/pp:Facade/pp:NamePronounced
/pp:PP/pp:Facade/pp:GreetSound
/pp:PP/pp:Facade/pp:GreetMeSound
/pp:PP/pp:Demographics
/pp:PP/pp:Demographics/pp:DisplayLanguage
/pp:PP/pp:Demographics/pp:Language
/pp:PP/pp:Demographics/pp:Birthday
/pp:PP/pp:Demographics/pp:Age
/pp:PP/pp:Demographics/pp:TimeZone
/pp:PP/pp:SignKey
/pp:PP/pp:EncryptKey
/pp:PP/pp:EmergencyContact
/pp:PP/pp:LEmergencyContact
xpathQueryString - public QueryResponse invokeQuery(String queryItemSelect)
(From DST v2.1 specification document 2317 - 2321) When SOAP action names are need, they SHOULD be formed by appending to service type one of the Request names, i.e., Create, Delete, Query, Modify, etc. For Example:
urn:liberty:id-sis-dap:2005-10:dst-2.1:Query
In the case of the Personal Profile Service the Query Action would look like this:
urn:liberty:id-sis-pp:2005-05:dst-2.1:Query
queryItemSelect - an XPath query string, not enforcedpublic QueryResponse invokeQueryForQueryItem(QueryItem queryItem)
queryItem - public QueryResponse invokeQueryForQueryItems(List<QueryItem> queryItems)
As specified in [LibertyDST], a minimally compliant ID-SIS-PP implementation MUST support multiple QueryItem elements.
queryItems - Copyright © 1999–2015. All rights reserved.