Package org.cyclos.impl.users
Interface UserServiceLocal
-
- All Superinterfaces:
CRUDService<UserDTO,UserData,UserDataParams>,CRUDServiceLocal<User,UserDTO,UserData,UserDataParams>,CRUDWithConfirmationPasswordService<UserDTO,UserData,UserDataParams>,Service,UserService
- All Known Implementing Classes:
UserServiceImpl
public interface UserServiceLocal extends UserService, CRUDServiceLocal<User,UserDTO,UserData,UserDataParams>
Local interface forUserService
-
-
Field Summary
Fields Modifier and Type Field Description static StringLANDLINE_PHONE_FIELDstatic StringMOBILE_PHONE_FIELD-
Fields inherited from interface org.cyclos.services.users.UserService
ANY_PRINCIPAL_TYPE, PIN_PRINCIPAL_TYPE, SELF
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidactivateUserIfNeeded(User user)It activates the user's accounts, create a password (if needed) and send the activation email only if the user's group is an active one.booleancanViewActiveConfiguration(User user)Returns true if the logged user can view the active configuration of the given user.booleancanViewProfile(User user)Returns true if the logged user can view the profile of the given userintcountTotalUsers()Returns the total number of users (not admins) which are not removedintcountUsersInGroups(Collection<? extends Group> groups, UserStatus... statuses)Return the count of users in the given groups with the given statuses, if no status is passed, ACTIVE, BLOCKED and DISABLED are used by default.booleanexistsUserWithEmail(String email)Returns true if there exists a user with the given email.booleanexistsUserWithMobilePhone(String normalizedMobilePhone)Returns true if there exists a user with the given normalized mobile phone.voidfill(AbstractUserSearchData data, boolean searchOverBrokeredUsers)Fills-in the common fields of anAbstractUserSearchDataObject[]getExcludedPropertiesToEntity()Same as thegetExcludedPropertiesToEntity()method from theCRUDServiceImplbut for all dto's instances.UserimportUser(UserRegistrationDTO dto)Imports a userInviteTokeninviteToken(String inviteToken)Returns the invitation token for the given string, or null if the given token is null or invalidbooleanisBuiltinRegistrationEnabled()Returns whether, for the current configuration, the built-in registraton form is enabled.com.mysema.commons.lang.CloseableIterator<Long>iterateIds(UserQuery query)Iterates users according to the specified query parametersvoidonRegistrationValidation(User user)Performs additional actions when a user registration is validatedUserregisterByPopulator(UserRegistrationDTO params)Registers a user via a populator, like setup or network with dataRegisterUserBySmsResultregisterBySms(RegisterUserBySmsParams params)Registers a user via SMSUserRegistrationResultregisterByWizard(PublicRegistrationDTO user)Registers a user using a registration wizard<VO extends UserVO>
VOtoUserVO(Class<VO> type, SessionData sessionData, Long id, String displayForManagers, String displayForOthers, String shortDisplay, String brokerIds, ImageVO image)Returns a subclass ofUserVOfilled up with the given fields.UserVOtoUserVO(SessionData sessionData, Long id, String displayForManagers, String displayForOthers, String shortDisplay, String brokerIds, ImageVO userImage)Returns anUserVOfilled up with the given fields.voidvalidate(UserDTO dto, UserRegistration registration, UserValidationFields fields)Validates the user information according to the registration context-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, newEntity, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
Methods inherited from interface org.cyclos.services.CRUDWithConfirmationPasswordService
getConfirmationPasswordInputForRemove, removeAllWithConfirmationPassword, removeWithConfirmationPassword, saveWithConfirmationPassword
-
Methods inherited from interface org.cyclos.services.users.UserService
exportUsers, getActiveConfiguration, getCurrentUser, getPublicRegistrationData, getPublicRegistrationGroups, getSearchData, getUserRegistrationGroups, getViewProfileData, locate, publicRegister, register, registerByMember, search, validateRegistrationField
-
-
-
-
Field Detail
-
LANDLINE_PHONE_FIELD
static final String LANDLINE_PHONE_FIELD
- See Also:
- Constant Field Values
-
MOBILE_PHONE_FIELD
static final String MOBILE_PHONE_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
activateUserIfNeeded
void activateUserIfNeeded(User user)
It activates the user's accounts, create a password (if needed) and send the activation email only if the user's group is an active one.
-
canViewActiveConfiguration
boolean canViewActiveConfiguration(User user)
Returns true if the logged user can view the active configuration of the given user.
-
canViewProfile
boolean canViewProfile(User user)
Returns true if the logged user can view the profile of the given user
-
countTotalUsers
int countTotalUsers()
Returns the total number of users (not admins) which are not removed
-
countUsersInGroups
int countUsersInGroups(Collection<? extends Group> groups, UserStatus... statuses)
Return the count of users in the given groups with the given statuses, if no status is passed, ACTIVE, BLOCKED and DISABLED are used by default.
-
existsUserWithEmail
boolean existsUserWithEmail(String email)
Returns true if there exists a user with the given email.
-
existsUserWithMobilePhone
boolean existsUserWithMobilePhone(String normalizedMobilePhone)
Returns true if there exists a user with the given normalized mobile phone.
-
fill
void fill(AbstractUserSearchData data, boolean searchOverBrokeredUsers)
Fills-in the common fields of anAbstractUserSearchData
-
getExcludedPropertiesToEntity
Object[] getExcludedPropertiesToEntity()
Same as thegetExcludedPropertiesToEntity()method from theCRUDServiceImplbut for all dto's instances.
-
importUser
User importUser(UserRegistrationDTO dto)
Imports a user
-
inviteToken
InviteToken inviteToken(String inviteToken)
Returns the invitation token for the given string, or null if the given token is null or invalid
-
isBuiltinRegistrationEnabled
boolean isBuiltinRegistrationEnabled()
Returns whether, for the current configuration, the built-in registraton form is enabled. It is true if any ofConfigurationAccessor.getLargeScreenRegistrationWizard(),ConfigurationAccessor.getMediumScreenRegistrationWizard()orConfigurationAccessor.getSmallScreenRegistrationWizard()is null. If they are all set to a wizard, the built-in registration form is disabled.
-
iterateIds
com.mysema.commons.lang.CloseableIterator<Long> iterateIds(UserQuery query)
Iterates users according to the specified query parameters
-
onRegistrationValidation
void onRegistrationValidation(User user)
Performs additional actions when a user registration is validated
-
registerByPopulator
User registerByPopulator(UserRegistrationDTO params)
Registers a user via a populator, like setup or network with data
-
registerBySms
RegisterUserBySmsResult registerBySms(RegisterUserBySmsParams params)
Registers a user via SMS
-
registerByWizard
UserRegistrationResult registerByWizard(PublicRegistrationDTO user)
Registers a user using a registration wizard
-
toUserVO
<VO extends UserVO> VO toUserVO(Class<VO> type, SessionData sessionData, Long id, String displayForManagers, String displayForOthers, String shortDisplay, String brokerIds, ImageVO image)
Returns a subclass ofUserVOfilled up with the given fields. UsesQueryHelper.getUserDisplay(org.cyclos.impl.access.SessionData, Long, String, String, String)
-
toUserVO
UserVO toUserVO(SessionData sessionData, Long id, String displayForManagers, String displayForOthers, String shortDisplay, String brokerIds, ImageVO userImage)
Returns anUserVOfilled up with the given fields. UsesQueryHelper.getUserDisplay(org.cyclos.impl.access.SessionData, Long, String, String, String)
-
validate
void validate(UserDTO dto, UserRegistration registration, UserValidationFields fields)
Validates the user information according to the registration context
-
-