Package org.cyclos.impl.users
Interface UserServiceLocal
-
- All Superinterfaces:
CRUDService<UserDTO,UserData,UserDataParams>,CRUDServiceLocal<User,UserDTO,UserData,UserDataParams>,CRUDWithConfirmationPasswordService<UserDTO,UserData,UserDataParams>,Service,UserService
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.intcountTotalUsers()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(PhoneNumberDescriptor number)Returns true if there exists a user with the given number.voidfetchCollections(User currentCopy)Force fetching the custom values and possible values to later detach the given currentCopyvoidfill(AbstractUserSearchData data, boolean searchOverBrokeredUsers)Fills-in the common fields of anAbstractUserSearchDataObject[]getExcludedPropertiesToEntity()Same as thegetExcludedPropertiesToEntity()method from theCRUDServiceLocalbut for all dto's instances.ProfileTransactionActionsDatagetProfileTransactionActionsData(User user)Returns profile transactions data for the given userUserimportUser(UserRegistrationDTO dto)Imports a userbooleanisBuiltinRegistrationEnabled()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 SMSRegisterUserByWizardResultregisterByWizard(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 brokerIds, ImageVO image)Returns a subclass ofUserVOfilled up with the given fields.UserVOtoUserVO(SessionData sessionData, Long id, String displayForManagers, String displayForOthers, 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.
-
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(PhoneNumberDescriptor number)
Returns true if there exists a user with the given number.
-
fetchCollections
void fetchCollections(User currentCopy)
Force fetching the custom values and possible values to later detach the given currentCopy
-
fill
void fill(AbstractUserSearchData data, boolean searchOverBrokeredUsers)
Fills-in the common fields of anAbstractUserSearchData
-
getExcludedPropertiesToEntity
Object[] getExcludedPropertiesToEntity()
Same as thegetExcludedPropertiesToEntity()method from theCRUDServiceLocalbut for all dto's instances.
-
getProfileTransactionActionsData
ProfileTransactionActionsData getProfileTransactionActionsData(User user)
Returns profile transactions data for the given user
-
importUser
User importUser(UserRegistrationDTO dto)
Imports a user
-
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
RegisterUserByWizardResult 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 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 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
-
-