Class 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:id=userID[?+reload]?=requestString or

    urn:iz-pstr:userName=userName[?+reload]?=requestString

    The {code reload} parameter is optional as will force a database request rather than using a potential cached value. 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 userName is a UTF-8 encoded string, and the string is the requested String, one of:

    • {@link URNProfileUserString#Title}: Title (Mr., Mrs., Ms., Dr., Prof., Baron, Baroness, etc),
    • {@link URNProfileUserString#FullName}: Full name,
    • {@link URNProfileUserString#LastName}: Last name,
    • {@link URNProfileUserString#MiddleName}: Middle name,
    • {@link URNProfileUserString#FirstName}: First name,
    • {@link URNProfileUserString#LocalizedTitle}: Localized title (Mr., Mrs., Ms., Dr., Prof., Baron, Baroness, etc),
    • {@link URNProfileUserString#LocalizedFullName}: Localized full name,
    • {@link URNProfileUserString#LocalizedLastName}: Localized last name,
    • {@link URNProfileUserString#LocalizedMiddleName}: Localized middle name,
    • {@link URNProfileUserString#LocalizedFirstName}: Localized first name,
    • {@link URNProfileUserString#PinCode}: Pin code,
    • {@link URNProfileUserString#FixedPassword}: Fixed password flag (true/false),
    • {@link URNProfileUserString#RecoveryQuestion}: Recovery question,
    • {@link URNProfileUserString#RecoveryAnswer}: Recovery answer,
    • {@link URNProfileUserString#CompanyName}: Company name,
    • {@link URNProfileUserString#CompanyDivision}: Company division,
    • {@link URNProfileUserString#JobTitle}: Job title,
    • {@link URNProfileUserString#Address}: Address line 1,
    • {@link URNProfileUserString#Address_2}: Address line 2,
    • {@link URNProfileUserString#Address_3}: Address line 3,
    • {@link URNProfileUserString#Address}+"_NN": Address line NN where NN is a value between 2 to 99,
    • {@link URNProfileUserString#ZipCode}: Zip code,
    • {@link URNProfileUserString#City}: City,
    • {@link URNProfileUserString#StateProvince}: State or Province,
    • {@link URNProfileUserString#Country}: Country,
    • {@link URNProfileUserString#Email}: IZS-Email,
    • {@link URNProfileUserString#AdditionalEmail}: Additional email,
    • {@link URNProfileUserString#AdditionalEmail}+"NN": Additional email NN, where NN is a value between 2 and 99,
    • {@link URNProfileUserString#Phone}: Phone number,
    • {@link URNProfileUserString#Phone_2}: Phone number 2,
    • {@link URNProfileUserString#Phone}+"_NN": Phone number NN, where NN is a value between 2 and 99,
    • {@link URNProfileUserString#HomePhone}: Home phone number,
    • {@link URNProfileUserString#HomePhone}+"_NN": Home phone number NN, where NN is a value between 2 and 99,
    • {@link URNProfileUserString#HomeMobile}: Home mobile number,
    • {@link URNProfileUserString#HomeMobile}+"_NN": Home mobile number NN, where NN is a value between 2 and 99,
    • {@link URNProfileUserString#HomeFax}: Home fax,
    • {@link URNProfileUserString#HomeFax}+"_NN": Home fax NN, where NN is a value between 2 and 99,
    • {@link URNProfileUserString#WorkPhone}: Work phone number,
    • {@link URNProfileUserString#WorkPhone}+"_NN": Work phone number NN, where NN is a value between 2 and 99,
    • {@link URNProfileUserString#WorkMobile}: Work mobile number,
    • {@link URNProfileUserString#WorkMobile}+"_NN": Work mobile number NN, where NN is a value between 2 and 99,
    • {@link URNProfileUserString#WorkFax}: Work fax number,
    • {@link URNProfileUserString#WorkFax}+"_NN": Work fax number NN, where NN is a value between 2 and 99,
    • {@link URNProfileUserString#DeveloperID}: Developer ID,
    • {@link URNProfileUserString#DeveloperGroupID}: DevelGroupID.
    Author:
    Christopher Mindus
    See Also:
    UserProfileStringURNQuery
    • 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.
      • getResourceTypes

        public java.util.List<URNResourceType> getResourceTypes()
        Gets the location or locations supported by the provider.
        Specified by:
        getResourceTypes in 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:
        parse in 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 "?+"), null for none.
        query - The decoded query String (without "?="), null for none.
        fragment - The decoded fragment, null for none.
        Returns:
        The URN instance.
        Throws:
        URNException - For URN exceptions.