@Security public class UserServiceSecurity extends CRUDServiceSecurity<UserDTO,User,UserData,UserDataParams> implements UserService
UserServiceentityClassSELF| Constructor and Description |
|---|
UserServiceSecurity() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addContact(UserLocatorVO owner,
UserLocatorVO contact)
Adds the given contact to the given user (or logged user if null)'s contact list, returning whether the list has
changed
|
boolean |
canPerformOperation(User user,
CRUDOperation operation)
Returns whether the logged user can perform the given operation over 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.
|
SerializableInputStream |
exportToCSV(UserQuery params)
Generates a CSV with the query result
|
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 an user from the public registration
|
java.util.List<InitialGroupVO> |
getPublicRegistrationGroups()
Return the list of groups guests user can register
|
UserSearchData |
getSearchData(UserSearchContext context)
Gets data used on the search page, according to the given search type
|
java.util.List<GroupVO> |
getUserRegistrationGroups()
Return the list of groups the logged user can register new users for
|
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.
|
UserDetailedVO |
locate(UserLocatorVO locator)
Locates an user by a customizable key.
|
protected void |
onBeforeSave(UserDTO dto,
User user) |
SerializableInputStream |
printUsers(UserQuery query)
Generates the PDF content for an user listing
|
UserRegistrationResult |
publicRegister(PublicRegistrationDTO dto)
Registers an user from a public registration
|
UserRegistrationResult |
register(UserRegistrationDTO dto)
Registers an user
|
boolean |
removeContact(UserLocatorVO owner,
UserLocatorVO contact)
Removes the given contact to the given user (or logged user if null)'s contact list, returning whether the list
has changed
|
Page<UserWithFieldsVO> |
search(UserQuery query)
Search users according to the specified query parameters.
|
void |
updateUserActivity(UserActivityType type)
Updates user information status according to the given activity
|
canViewHistoryLog, checkManageAccess, checkOperation, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPasswordcheckGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initializecanManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getAccountHandler, getAuthHandler, getBaseEntityManagerHandler, getChannelConfiguration, getConfiguration, getConversionHandler, getCustomFieldValueHandler, getEntityManagerHandler, getGroupsHandler, getLoggedBasicUser, getLoggedUser, getProducts, getProductsHandler, getReportHandler, getTranslatedName, getTranslatedValue, getUserLocatorHandler, getValidationResult, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, toDate, toDateTime, validatedelete, detach, find, flush, from, getApplicationContext, getConfigurationHandler, getDataTranslationHandler, getFormatter, getFormatter, getFormatter, getLogger, getNotificationHandler, getProfileFieldHandler, getRemoteAddress, getSessionData, getTransactionHandler, getTranslationHandler, message, message, persist, processBatch, refresh, remove, subQuery, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPasswordgetData, getDataForNew, load, remove, removeAll, savepublic boolean addContact(UserLocatorVO owner, UserLocatorVO contact) throws FrameworkException
UserServiceaddContact in interface UserServiceFrameworkExceptionpublic boolean canPerformOperation(User user, CRUDOperation operation)
CRUDServiceSecuritycanPerformOperation 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 SerializableInputStream exportToCSV(UserQuery params)
UserServiceexportToCSV in interface UserServicepublic 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) throws FrameworkException
UserServicegetSearchData in interface UserServiceFrameworkExceptionpublic java.util.List<GroupVO> getUserRegistrationGroups()
UserServicegetUserRegistrationGroups in interface UserServicepublic 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 UserDetailedVO locate(UserLocatorVO locator) throws FrameworkException
UserServicelocate in interface UserServiceFrameworkExceptionpublic SerializableInputStream printUsers(UserQuery query)
UserServiceprintUsers in interface UserServicepublic UserRegistrationResult publicRegister(PublicRegistrationDTO dto) throws FrameworkException
UserServicepublicRegister in interface UserServiceFrameworkExceptionpublic UserRegistrationResult register(UserRegistrationDTO dto) throws ValidationException, PasswordException
UserServiceregister in interface UserServiceValidationExceptionPasswordExceptionpublic boolean removeContact(UserLocatorVO owner, UserLocatorVO contact) throws FrameworkException
UserServiceremoveContact 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 void updateUserActivity(UserActivityType type)
UserServiceupdateUserActivity in interface UserServiceprotected 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>