Class ResolveAvatarURIComponent
java.lang.Object
org.ametys.plugins.userdirectory.transformation.xslt.ResolveAvatarURIComponent
- All Implemented Interfaces:
LogEnabled,PluginAware,Contextualizable,Serviceable
public class ResolveAvatarURIComponent
extends Object
implements Serviceable, Contextualizable, LogEnabled, PluginAware
Helper to get the URI for the avatar of a user
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(Context context) static StringCompute the avatar URI of a user This method provide a convenient way to obtain the proxy URL on the base64 representation of the avatar based on the request attribute "forceBase64Encoding".voidservice(ServiceManager manager) voidCalled at creation time to provide aLogger.voidsetPluginInfo(String pluginName, String featureName, String id) Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.
-
Field Details
-
USER_CONTENT_IMAGE_PATH
Attribute path for user's image- See Also:
-
-
Constructor Details
-
ResolveAvatarURIComponent
public ResolveAvatarURIComponent()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
setLogger
Description copied from interface:LogEnabledCalled at creation time to provide aLogger.- Specified by:
setLoggerin interfaceLogEnabled- Parameters:
logger- aLoggerfor messages.
-
setPluginInfo
Description copied from interface:PluginAwareSets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level.- Specified by:
setPluginInfoin interfacePluginAware- Parameters:
pluginName- Unique identifier for the plugin hosting the extensionfeatureName- Unique feature identifier (unique for a given pluginName)id- Unique identifier of this component
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
resolve
Compute the avatar URI of a user This method provide a convenient way to obtain the proxy URL on the base64 representation of the avatar based on the request attribute "forceBase64Encoding".- Parameters:
login- the login of the userpopulationId- the population of the userlang- the language used to retrieve the user contentsize- the size for the avatar- Returns:
- the avatar URI
-