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
Modifier and TypeFieldDescriptionprotected static UserDirectoryHelper
The user directory helperstatic final String
Attribute path for user's imageFields inherited from class org.ametys.plugins.core.ui.user.ProfileImageResolverHelper
_context, _srcResolver
-
Constructor Summary
-
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 urivoid
service
(ServiceManager smanager) Methods inherited from class org.ametys.web.transformation.xslt.ProfileImageResolverHelper
getUri
Methods 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:
service
in interfaceServiceable
- Overrides:
service
in classProfileImageResolverHelper
- Throws:
ServiceException
-
getProfileImageUri
Description copied from class:ProfileImageResolverHelper
Get the profile image uri- Overrides:
getProfileImageUri
in 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:ProfileImageResolverHelper
Get the input stream of the profile image- Overrides:
getProfileImage
in 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
-