Package com.iizix.urn.user
Class UserProfileImageURN
java.lang.Object
com.iizix.urn.URN
com.iizix.urn.user.UserProfileImageURN
- All Implemented Interfaces:
- Serializable,- Cloneable
User Profile Image Uniform Resource Naming (URN) instance class, holding various User Profile Image of the requested type.
User Profile Image URN's are encoded in IIZI as:
    urn:iz-pimg:type:id=userID or
    urn:iz-pimg:type:name=userName
The type is the image type are the {@link UserProfileImageURNType#name()}, i.e. one of the Strings
- Uploaded
- CroppedUploaded
- Large
- Thumbnail
The userID is a {code long} value unique to the user ID in question, the userName is a UTF-8 encoded string.
- Author:
- Christopher Mindus
- See Also:
- Field Summary
- Method SummaryModifier and TypeMethodDescription- static IUserProfileImageRequestCreates an uninitialized profile image request.- booleanChecks if two instances are equal.- static UserProfileImageURN- fromUserID- (UserProfileImageURNType type, long id) Creates a User Profile String URN using a possible cached instance of the user information.- static UserProfileImageURN- fromUserName- (UserProfileImageURNType type, String userName) Creates a User Profile String URN using a possible cached instance of the user information.Gets the parameter string for the- URN.toString()method.- getURL()Gets the URL of this as a data URL in UTF-8 encoded data.- int- hashCode()Hash code of this instance.- static voidAssigns the User Profile Image URN provider.- Methods inherited from class com.iizix.urn.URN- asURNResource, from, getImageTarget, getURNString, isImageTargetSupported, isURNResource, toString
- Method Details- setUserProfileImageURNProviderAssigns the User Profile Image URN provider. This is an IIZI internal method. This method cannot only be called from the server and should not be called elsewhere.- Throws:
- NullPointerException- If- provideris- null.
- IllegalStateException- If called twice or outside the server.
 
- createRequestCreates an uninitialized profile image request.- Returns:
- The uninitialized request.
- Throws:
- NullPointerException- If the User Profile Image URN provider is not initialized.
 
- fromUserIDCreates a User Profile String URN using a possible cached instance of the user information.- Parameters:
- type- The type.
- id- The- longuser ID.
- Throws:
- NullPointerException- If- typeis- null.
- IllegalArgumentException- If the- idis zero.
 
- fromUserNameCreates a User Profile String URN using a possible cached instance of the user information.- Parameters:
- type- The type.
- userName- The User Name.
- Throws:
- NullPointerException- If- typeor- userNameis- null.
 
- getURLGets the URL of this as a data URL in UTF-8 encoded data.
- getParamStringGets the parameter string for the- URN.toString()method.- Specified by:
- getParamStringin class- URN
- Returns:
- The parameter string, always non-null, formatted as"type:name=UserName"or"type:id=UserID"whereQueryis the queried enum string.
 
- hashCodepublic int hashCode()Hash code of this instance.
- equalsChecks if two instances are equal.