Class UserProfileStringURNFactory
- All Implemented Interfaces:
IURNProvider
User Profile String URN's are encoded in IIZI as:
urn:iz-pstr:type:id=userID[?+reload] or
urn:iz-pstr:type:name=userName[?+reload]
The reload parameter is optional as will force a database request rather than using a potential cached value. The brackets around ?+reload indicates that the value is options and the brackets should not be specified. Be careful when using it too much as performance is impacted.
The userID is a {code long} value unique to the user ID in question, the name is a UTF-8 encoded string, and the type is the queried string type, one of the names available in {@link UserProfileStringURNQuery} plus an additional one-based index entry when the {@link UserProfileStringURNQuery#multiple} flag allows it.
Examples of type by direct String:
- "
FullName" - "
LastName" - "
FirstName" - "
CompanyName" - "
ZipCode" - "
City" - "
StateProvince" - "
Country"
Examples of type in String format when multiple values can be assigned to the query by appending "_2" to the second value, "_3" to the third value, and so on:
- "
WorkMobile<strong>_2</strong>" - "
WorkMobile<strong>_3</strong>" - "
AdditionalEmail<strong>_2</strong>" - "
AdditionalEmail<strong>_3</strong>" - "
AdditionalEmail<strong>_4</strong>"
- Author:
- Christopher Mindus
- See Also:
Method Summary
Modifier and TypeMethodDescriptionstatic UserProfileStringURNFactoryReturns the singleton instance of the User Profile String URN factory.getNID()Gets the Naming IDentifier of the provider.Gets the location or locations supported by the provider.Parses the URN after the NID specification, i.e.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IURNProvider
paramString0
Method Details
getInstance
Returns the singleton instance of the User Profile String URN factory.- Returns:
- The User Profile String URN factory instance.
getNID
Gets the Naming IDentifier of the provider.- Specified by:
getNIDin interfaceIURNProvider- Returns:
- The
NID.PROFILE_STRING.
getResourceTypes
Gets the location or locations supported by the provider.- Specified by:
getResourceTypesin interfaceIURNProvider- Returns:
- The supported locations: none, i.e. an empty list.
parse
public URN parse(String urnString, String nss, String req, String query, String fragment) throws URNException Parses the URN after the NID specification, i.e. after "urn:NID:".- Specified by:
parsein interfaceIURNProvider- Parameters:
urnString- The full unparsed original URN string.nss- The NSS part of the string (before request/query/fragment).req- The decoded request String (without "?+"),nullfor none.query- The decoded query String (without "?="),nullfor none.fragment- The decoded fragment,nullfor none.- Returns:
- The URN instance.
- Throws:
URNException- For URN exceptions.