Class UserProfileImageURNFactory

  • All Implemented Interfaces:

    public class UserProfileImageURNFactory
    extends java.lang.Object
    implements IURNProvider
    User Profile Image provider for iizi URN's.

    User Profile Image URN's are encoded in iizi as:

    urn:iz-pimg:id=userID[?+reload]?=requestString or


    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... !!!TODO!!!

    Christopher Mindus
    See Also:
    • Method Detail

      • initialize

        public static void initialize​(URNFactory factory,
                                      IUserProfileImageURNProvider provider)
        Initializes the User Profile string URN factory.

        This method is not intended to be called by user code, the system will handle it.

        factory - The URN factory instance.
        provider - The User Profile Image URN provider.
        java.lang.RuntimeException - If this method is called twice for the same URN provider.
      • getInstance

        public static UserProfileImageURNFactory getInstance()
        Gets the singleton instance of the URL URN factory.
        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
        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
        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.
        The URN instance.
        URNException - For URN exceptions.