@Security public class UserServiceSecurity extends CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams> implements UserService
UserServiceentityClassauthHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandleraccountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandlerANY_PRINCIPAL_TYPE, PIN_PRINCIPAL_TYPE, SELF| Constructor and Description |
|---|
UserServiceSecurity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPerformOperation(User user,
CRUDOperation operation)
Returns whether the logged user can perform the given operation over the given entity
|
boolean |
canViewData(User user)
Should be implemented in order to return whether the caller is allowed to call getData on the given entity.
|
protected void |
checkCreateNew(UserDataParams params)
Checks whether creating new entities with the given context parameters is allowed, throwing
PermissionDeniedException if not |
boolean |
checkQuery(AbstractUserQuery query) |
boolean |
doHasManageAccess(User user)
Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given
operation
|
boolean |
doHasViewAccess(User user)
Should be implemented in order to return whether the caller is allowed to view the given entity.
|
FileInfo |
exportUsers(ExportFormatVO format,
UserQuery params)
Exports the user search results to a file
|
ActiveConfigurationData |
getActiveConfiguration(UserLocatorVO locator)
Returns the
ActiveConfigurationData, containing all the actual configuration for the user matching the
given locator |
UserWithRolesVO |
getCurrentUser()
Returns the current user logged in
|
protected UserServiceLocal |
getImplementation()
Should be implemented in order to return the actual implementation of the service
|
PublicRegistrationData |
getPublicRegistrationData(InitialGroupVO group)
Returns data for registering a user from the public registration
|
java.util.List<InitialGroupVO> |
getPublicRegistrationGroups()
Return the list of groups guests user can register
|
UserSearchData |
getSearchData(UserSearchContext context,
UserLocatorVO brokerVO)
Gets data used on the search page, according to the given search type
|
java.util.List<InitialGroupVO> |
getUserRegistrationGroups(boolean asMember)
Return the list of groups the logged user can register new users.
|
ViewProfileData |
getViewProfileData(UserLocatorVO locator)
Return a
ViewProfileData for the user matching the given locator |
boolean |
isAccessible(SessionData sessionData,
User entity)
Must be implemented in order to determine whether the given entity is accessible for the given session data.
|
UserVO |
locate(UserLocatorVO locator)
Locates a user by a customizable key.
|
protected void |
onBeforeSave(UserDTO dto,
User user) |
UserRegistrationResult |
publicRegister(PublicRegistrationDTO dto)
Registers a user from a public registration
|
UserRegistrationResult |
register(UserRegistrationDTO dto)
Registers a user
|
UserRegistrationResult |
registerByMember(UserRegistrationByMemberDTO dto)
Registers a user by a regular member.
|
Page<UserWithFieldsVO> |
search(UserQuery query)
Search users according to the specified query parameters.
|
java.lang.String |
validateRegistrationField(ValidateRegistrationFieldParams params)
Validates a field for user registration.
|
checkManageAccess, checkOperation, checkSave, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPasswordcheckGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initializecanManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validatedelete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPasswordgetData, getDataForNew, load, remove, removeAll, savepublic boolean canPerformOperation(User user, CRUDOperation operation)
CRUDServiceSecuritycanPerformOperation in class CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams>public boolean canViewData(User user)
CRUDServiceSecuritycanViewData in class CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams>public boolean checkQuery(AbstractUserQuery query)
public boolean doHasManageAccess(User user)
CRUDServiceSecuritydoHasManageAccess in class CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams>public boolean doHasViewAccess(User user)
CRUDServiceSecuritydoHasViewAccess in class CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams>public FileInfo exportUsers(ExportFormatVO format, UserQuery params) throws FrameworkException
UserServiceexportUsers in interface UserServiceFrameworkExceptionpublic ActiveConfigurationData getActiveConfiguration(UserLocatorVO locator) throws EntityNotFoundException
UserServiceActiveConfigurationData, containing all the actual configuration for the user matching the
given locatorgetActiveConfiguration in interface UserServiceEntityNotFoundExceptionpublic UserWithRolesVO getCurrentUser() throws FrameworkException
UserServicegetCurrentUser in interface UserServiceFrameworkExceptionpublic PublicRegistrationData getPublicRegistrationData(InitialGroupVO group) throws FrameworkException
UserServicegetPublicRegistrationData in interface UserServiceFrameworkExceptionpublic java.util.List<InitialGroupVO> getPublicRegistrationGroups() throws FrameworkException
UserServicegetPublicRegistrationGroups in interface UserServiceFrameworkExceptionpublic UserSearchData getSearchData(UserSearchContext context, UserLocatorVO brokerVO) throws FrameworkException
UserServicegetSearchData in interface UserServiceFrameworkExceptionpublic java.util.List<InitialGroupVO> getUserRegistrationGroups(boolean asMember) throws FrameworkException
UserServicegetUserRegistrationGroups in interface UserServiceasMember - flag used only in case the logged user is a broker to distinguish between registering as
member/broker.FrameworkExceptionpublic ViewProfileData getViewProfileData(UserLocatorVO locator)
UserServiceViewProfileData for the user matching the given locatorgetViewProfileData in interface UserServicepublic boolean isAccessible(SessionData sessionData, User entity)
CRUDServiceSecurityCRUDServiceSecurity.hasViewAccess(BaseEntity). If the only condition for an entity is
CRUDServiceSecurity.hasViewAccess(BaseEntity), this method
should return false.isAccessible in class CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams>public UserVO locate(UserLocatorVO locator) throws FrameworkException
UserServicelocate in interface UserServiceFrameworkExceptionpublic UserRegistrationResult publicRegister(PublicRegistrationDTO dto) throws FrameworkException
UserServicepublicRegister in interface UserServiceFrameworkExceptionpublic UserRegistrationResult register(UserRegistrationDTO dto) throws ValidationException, PasswordException
UserServiceregister in interface UserServiceValidationExceptionPasswordExceptionpublic UserRegistrationResult registerByMember(UserRegistrationByMemberDTO dto) throws FrameworkException
UserServiceregisterByMember in interface UserServiceFrameworkExceptionpublic Page<UserWithFieldsVO> search(UserQuery query) throws QueryParseException
UserServiceBasicUserVO.DISPLAY and BasicUserVO.SHORT_DISPLAY
properties filled in or specific profile fields, depending on the products (permissions) of the viewing user.
If there are profile fields marked to be returned, display and short display are not returned, as in most cases
it would mean repeated information.search in interface UserServiceQueryParseExceptionpublic java.lang.String validateRegistrationField(ValidateRegistrationFieldParams params) throws FrameworkException
UserServiceBasicProfileField.getByAlias(String) or the internal name of a
custom field, and must be valid for the given group.
The value should be a valid reference value, just as accepted by
CustomFieldValueDTO.setReferenceValue(String)validateRegistrationField in interface UserServiceFrameworkExceptionprotected void checkCreateNew(UserDataParams params)
CRUDServiceSecurityPermissionDeniedException if notcheckCreateNew in class CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams>protected UserServiceLocal getImplementation()
CRUDServiceSecuritygetImplementation in class CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams>protected void onBeforeSave(UserDTO dto, User user)
onBeforeSave in class CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams>