Class ProfileImageResolverHelper
java.lang.Object
org.ametys.plugins.core.ui.user.ProfileImageResolverHelper
org.ametys.cms.transformation.xslt.ProfileImageResolverHelper
org.ametys.web.transformation.xslt.ProfileImageResolverHelper
org.ametys.plugins.userdirectory.transformation.xslt.ProfileImageResolverHelper
- All Implemented Interfaces:
Initializable,Contextualizable,Serviceable
Implementation of
ProfileImageResolverHelper to get the profile image from user content if exists-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static UserDirectoryHelperThe user directory helperstatic final StringAttribute path for user's imageFields inherited from class org.ametys.plugins.core.ui.user.ProfileImageResolverHelper
_context, _srcResolver -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetProfileImage(String login, String populationId, int cropSize, String lang) Get the input stream of the profile imageGet the image uri from user content if existsgetProfileImageUri(String login, String populationId, int size) Get the profile image urivoidservice(ServiceManager smanager) Methods inherited from class org.ametys.web.transformation.xslt.ProfileImageResolverHelper
getUriMethods inherited from class org.ametys.plugins.core.ui.user.ProfileImageResolverHelper
contextualize, initialize, resolve, resolve, resolve, resolveAsBase64
-
Field Details
-
USER_CONTENT_IMAGE_PATH
Attribute path for user's image- See Also:
-
_userDirectoryHelper
The user directory helper
-
-
Constructor Details
-
ProfileImageResolverHelper
public ProfileImageResolverHelper()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classProfileImageResolverHelper- Throws:
ServiceException
-
getProfileImageUri
Description copied from class:ProfileImageResolverHelperGet the profile image uri- Overrides:
getProfileImageUriin classProfileImageResolverHelper- Parameters:
login- the login of the userpopulationId- the population of the usersize- the size for the image- Returns:
- the uri
-
getProfileImage
Description copied from class:ProfileImageResolverHelperGet the input stream of the profile image- Overrides:
getProfileImagein classProfileImageResolverHelper- Parameters:
login- the login of the userpopulationId- the population of the usercropSize- the size for the imagelang- the lang to use to resolve image. Can be null.- Returns:
- the image as input stream
-
getProfileImageFileFromUserContentIfExists
Get the image uri from user content if exists- Parameters:
user- the user identitylang- the content language- Returns:
- the file image or null if not found
-