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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) static String
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".void
service
(ServiceManager manager) void
Called at creation time to provide aLogger
.void
setPluginInfo
(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
setLogger
Description copied from interface:LogEnabled
Called at creation time to provide aLogger
.- Specified by:
setLogger
in interfaceLogEnabled
- Parameters:
logger
- aLogger
for messages.
-
setPluginInfo
Description copied from interface:PluginAware
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.- Specified by:
setPluginInfo
in 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:
contextualize
in 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
-