Package org.ametys.plugins.core.ui.user
Class GetUserProfileImagesAction
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.apache.cocoon.acting.AbstractAction
-
- org.apache.cocoon.acting.ServiceableAction
-
- org.ametys.plugins.core.ui.user.GetUserProfileImagesAction
-
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
public class GetUserProfileImagesAction extends ServiceableAction
Retrieves the available user profile images
-
-
Field Summary
Fields Modifier and Type Field Description protected CurrentUserProvider
_currentUserProvider
Current user providerprotected DefaultProfileImageProvider
_profileImageProvider
User profile image providerprotected ServerCommHelper
_serverCommHelper
Servercomm helper-
Fields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
-
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
-
Constructor Summary
Constructors Constructor Description GetUserProfileImagesAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_addDefaultImage(List<Map<String,Object>> images)
Add the default imageprotected void
_addGravatarImage(List<Map<String,Object>> images, UserIdentity user)
Add the gravatar image to the list if existingprotected void
_addInitialsImage(List<Map<String,Object>> images, UserIdentity user)
Add the image with initials to the listprotected void
_addLocalImages(List<Map<String,Object>> images, String login)
Add the local images to the listprotected void
_addStoredImage(List<Map<String,Object>> images, UserIdentity user)
Add the stored image from the userpref (uploaded image are stored in the userpref)Map
act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters)
void
service(ServiceManager sm)
-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_serverCommHelper
protected ServerCommHelper _serverCommHelper
Servercomm helper
-
_currentUserProvider
protected CurrentUserProvider _currentUserProvider
Current user provider
-
_profileImageProvider
protected DefaultProfileImageProvider _profileImageProvider
User profile image provider
-
-
Constructor Detail
-
GetUserProfileImagesAction
public GetUserProfileImagesAction()
-
-
Method Detail
-
service
public void service(ServiceManager sm) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
act
public Map act(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws Exception
- Throws:
Exception
-
_addStoredImage
protected void _addStoredImage(List<Map<String,Object>> images, UserIdentity user)
Add the stored image from the userpref (uploaded image are stored in the userpref)- Parameters:
images
- The image list accumulatoruser
- The user
-
_addGravatarImage
protected void _addGravatarImage(List<Map<String,Object>> images, UserIdentity user)
Add the gravatar image to the list if existing- Parameters:
images
- The image list accumulatoruser
- The user
-
_addInitialsImage
protected void _addInitialsImage(List<Map<String,Object>> images, UserIdentity user)
Add the image with initials to the list- Parameters:
images
- The image list accumulatoruser
- The user
-
_addLocalImages
protected void _addLocalImages(List<Map<String,Object>> images, String login)
Add the local images to the list- Parameters:
images
- The image list accumulatorlogin
- The user login
-
_addDefaultImage
protected void _addDefaultImage(List<Map<String,Object>> images)
Add the default image- Parameters:
images
- The image list accumulator
-
-