Class AdminUserFieldService
- java.lang.Object
-
- fr.paris.lutece.portal.service.user.attribute.AdminUserFieldService
-
public final class AdminUserFieldService extends Object
AdminUserFieldService
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringcheckUserFields(javax.servlet.http.HttpServletRequest request, Locale locale)Check if the user fields are correctly filledstatic voiddoCreateUserFields(AdminUser user, javax.servlet.http.HttpServletRequest request, Locale locale)Create the user fieldsstatic voiddoModifyUserFields(AdminUser user, javax.servlet.http.HttpServletRequest request, Locale locale, AdminUser currentUser)Modify the user fieldsstatic voiddoRemoveUserFields(AdminUser user, javax.servlet.http.HttpServletRequest request, Locale locale)Remove the user fieldsstatic voiddoRemoveUserFieldsByIdAttribute(int nIdAttribute)Remove the user fields from a given ID attributestatic voiddoRemoveUserFieldsByIdField(int nIdAttributeField)Remove the user fields from a given ID attribute fieldObjectgetAdminUserField(IAttribute attribute, int nUserId, Locale locale)Get the admin user field from a given attribute and a given user IDstatic Map<String,Object>getAdminUserFields(int nUserId, Locale locale)Get the user attribute fieldsstatic Map<String,Object>getAdminUserFields(List<IAttribute> listAttributes, int nUserId, Locale locale)Get the user attribute fields
-
-
-
Method Detail
-
checkUserFields
public static String checkUserFields(javax.servlet.http.HttpServletRequest request, Locale locale)
Check if the user fields are correctly filled- Parameters:
request- HttpServletRequestlocale- locale- Returns:
- null if there are no problem
-
doCreateUserFields
public static void doCreateUserFields(AdminUser user, javax.servlet.http.HttpServletRequest request, Locale locale)
Create the user fields- Parameters:
user- Adminuserrequest- HttpServletRequestlocale- locale
-
doModifyUserFields
public static void doModifyUserFields(AdminUser user, javax.servlet.http.HttpServletRequest request, Locale locale, AdminUser currentUser)
Modify the user fields- Parameters:
user- AdminUserrequest- HttpServletRequestlocale- localecurrentUser- current user
-
doRemoveUserFields
public static void doRemoveUserFields(AdminUser user, javax.servlet.http.HttpServletRequest request, Locale locale)
Remove the user fields- Parameters:
user- Adminuserrequest- HttpServletRequestlocale- locale
-
doRemoveUserFieldsByIdAttribute
public static void doRemoveUserFieldsByIdAttribute(int nIdAttribute)
Remove the user fields from a given ID attribute- Parameters:
nIdAttribute- the ID attribute
-
doRemoveUserFieldsByIdField
public static void doRemoveUserFieldsByIdField(int nIdAttributeField)
Remove the user fields from a given ID attribute field- Parameters:
nIdAttributeField- the attribute field ID
-
getAdminUserFields
public static Map<String,Object> getAdminUserFields(int nUserId, Locale locale)
Get the user attribute fields- Parameters:
nUserId- the user IDlocale- theLocale- Returns:
- a Map of (ID Attribute, Object). The object could be either a File or a list of
AdminUserField
-
getAdminUserFields
public static Map<String,Object> getAdminUserFields(List<IAttribute> listAttributes, int nUserId, Locale locale)
Get the user attribute fields- Parameters:
listAttributes- the list of attributesnUserId- the user IDlocale- theLocale- Returns:
- a Map of (ID Attribute, Object). The object could be either a File or a list of
AdminUserField
-
getAdminUserField
public Object getAdminUserField(IAttribute attribute, int nUserId, Locale locale)
Get the admin user field from a given attribute and a given user ID- Parameters:
attribute- aIAttributenUserId- the user IDlocale- theLocale- Returns:
- either a File (if the attribute is a type img) or a list of
AdminUserField
-
-