Class UserProfileStringURNFactory
- java.lang.Object
- com.iizix.urn.user.UserProfileStringURNFactory
 
- All Implemented Interfaces:
- IURNProvider
 - public class UserProfileStringURNFactory extends java.lang.Object implements IURNProvider User Profile String provider for IIZI URN's.- 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 - reloadparameter is optional as will force a database request rather than using a potential cached value. The brackets around- ?+reloadindicates that the value is options and the brackets should not be specified. Be careful when using it too much as performance is impacted.- The - userIDis a {code long} value unique to the user ID in question, the- nameis a UTF-8 encoded string, and the- typeis 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 - typeby direct- String:- "FullName"
- "LastName"
- "FirstName"
- "CompanyName"
- "ZipCode"
- "City"
- "StateProvince"
- "Country"
 - Examples of - typein- Stringformat 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:
- UserProfileStringURN,- UserProfileStringURNType
 
- Field Summary- Fields - Modifier and Type - Field - Description - static NID- nidThe- NID.PROFILE_STRING.
 - Method Summary- All Methods Static Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - static UserProfileStringURNFactory- getInstance()Gets the singleton instance of the URL URN factory.- NID- getNID()Gets the Naming IDentifier of the provider.- java.util.List<URNResourceType>- getResourceTypes()Gets the location or locations supported by the provider.- static void- initialize(URNFactory factory, IUserProfileStringURNProvider provider)Initializes the User Profile String URN factory.- URN- parse(java.lang.String urnString, java.lang.String nss, java.lang.String req, java.lang.String query, java.lang.String fragment)Parses the URN after the NID specification, i.e.- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - Methods inherited from interface com.iizix.urn.IURNProvider- paramString0
 
 
- Field Detail- nid- public static final NID nid The- NID.PROFILE_STRING.
 
 - Method Detail- initialize- public static void initialize(URNFactory factory, IUserProfileStringURNProvider provider) Initializes the User Profile String URN factory.- This method is not intended to be called by user code, the system will handle it. - Parameters:
- factory- The URN factory instance.
- provider- The User Profile String URN provider.
- Throws:
- java.lang.RuntimeException- If this method is called twice for the same URN provider.
 
 - getInstance- public static UserProfileStringURNFactory getInstance() Gets the singleton instance of the URL URN factory.- Returns:
- The URL URN factory instance.
 
 - getNID- public NID getNID() Gets the Naming IDentifier of the provider.- Specified by:
- getNIDin interface- IURNProvider
- Returns:
- The NID.PROFILE_STRING.
 
 - getResourceTypes- public java.util.List<URNResourceType> getResourceTypes() Gets the location or locations supported by the provider.- Specified by:
- getResourceTypesin interface- IURNProvider
- Returns:
- The supported locations: none, i.e. an empty list.
 
 - parse- public URN parse(java.lang.String urnString, java.lang.String nss, java.lang.String req, java.lang.String query, java.lang.String fragment) throws URNException Parses the URN after the NID specification, i.e. after "urn:NID:".- Specified by:
- parsein interface- IURNProvider
- 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.