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
Retrieves the available user profile images
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
Current user providerprotected DefaultProfileImageProvider
User profile image providerprotected ServerCommHelper
Servercomm helperFields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected 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
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)act
(Redirector redirector, SourceResolver resolver, Map objectModel, String source, Parameters parameters) void
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
_serverCommHelper
Servercomm helper -
_currentUserProvider
Current user provider -
_profileImageProvider
User profile image provider
-
-
Constructor Details
-
GetUserProfileImagesAction
public GetUserProfileImagesAction()
-
-
Method Details
-
service
- 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
Add the stored image from the userpref (uploaded image are stored in the userpref)- Parameters:
images
- The image list accumulatoruser
- The user
-
_addGravatarImage
Add the gravatar image to the list if existing- Parameters:
images
- The image list accumulatoruser
- The user
-
_addInitialsImage
Add the image with initials to the list- Parameters:
images
- The image list accumulatoruser
- The user
-
_addLocalImages
Add the local images to the list- Parameters:
images
- The image list accumulatorlogin
- The user login
-
_addDefaultImage
Add the default image- Parameters:
images
- The image list accumulator
-