Package org.cyclos.impl.users
Class InternalBasicUserServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.users.InternalBasicUserServiceImpl
-
- All Implemented Interfaces:
InternalBasicUserServiceLocal,Service,InternalBasicUserService
@Service public class InternalBasicUserServiceImpl extends BaseServiceImpl implements InternalBasicUserServiceLocal
Implementation forInternalBasicUserService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description InternalBasicUserServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyPermissionsToBasicFields(BasicUserDTO dto, BasicUser basicUser)Restores existing values for basic fields before saving the user profile.voidchangeGroup(ChangeGroupDTO params)Changes the group of either a user or operatorvoidfilterGroupSets(BasicChangeGroupData data)Make sure no group sets are sent on the dataBasicChangeGroupDatagetChangeGroupData(UserLocatorVO locator)Returns data to change the group of either a user or operatorBasicUserEditProfileData<?>getEditData(UserLocatorVO locator)Returns data to edit the profile fields of a given basic userSaveFullProfileDatagetEditFullProfileData(UserLocatorVO locator)Returns data for editing the full profile of either a regular user or operatorRolegetMainRole(UserLocatorVO locator)Returns the main role of the logged userAbstractViewProfileDatagetViewProfileData(UserLocatorVO locator)Returns data for viewing profile of either a regular user or operator.protected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkvoidremove(@NotNull UserLocatorVO locator)Physically removes a pending user / operatorvoidsave(UserLocatorVO locator, BasicUserDTO dto, String confirmationPassword)Saves the profile of a user or operatorSaveFullProfileResultsaveFullProfile(SaveFullProfileParams params)Saves the full profile of a user, returning the generated ids for created data.ChangeOperatorGroupDTOtoChangeOperatorGroupDTO(ChangeGroupDTO params, BasicUser basicUser)Converts the given parameters to change a user group to parameters to change an operator group-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, 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, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, delete, detach, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
applyPermissionsToBasicFields
public void applyPermissionsToBasicFields(BasicUserDTO dto, BasicUser basicUser)
Description copied from interface:InternalBasicUserServiceLocalRestores existing values for basic fields before saving the user profile. Custom fields are handled inCustomFieldValueHandler.- Specified by:
applyPermissionsToBasicFieldsin interfaceInternalBasicUserServiceLocal
-
changeGroup
public void changeGroup(ChangeGroupDTO params)
Description copied from interface:InternalBasicUserServiceChanges the group of either a user or operator- Specified by:
changeGroupin interfaceInternalBasicUserService
-
filterGroupSets
public void filterGroupSets(BasicChangeGroupData data)
Description copied from interface:InternalBasicUserServiceLocalMake sure no group sets are sent on the data- Specified by:
filterGroupSetsin interfaceInternalBasicUserServiceLocal
-
getChangeGroupData
public BasicChangeGroupData getChangeGroupData(UserLocatorVO locator) throws FrameworkException
Description copied from interface:InternalBasicUserServiceReturns data to change the group of either a user or operator- Specified by:
getChangeGroupDatain interfaceInternalBasicUserService- Throws:
FrameworkException
-
getEditData
public BasicUserEditProfileData<?> getEditData(UserLocatorVO locator)
Description copied from interface:InternalBasicUserServiceReturns data to edit the profile fields of a given basic user- Specified by:
getEditDatain interfaceInternalBasicUserService
-
getEditFullProfileData
public SaveFullProfileData getEditFullProfileData(UserLocatorVO locator) throws FrameworkException
Description copied from interface:InternalBasicUserServiceReturns data for editing the full profile of either a regular user or operator- Specified by:
getEditFullProfileDatain interfaceInternalBasicUserService- Throws:
FrameworkException
-
getMainRole
public Role getMainRole(UserLocatorVO locator) throws FrameworkException
Description copied from interface:InternalBasicUserServiceReturns the main role of the logged user- Specified by:
getMainRolein interfaceInternalBasicUserService- Throws:
FrameworkException
-
getViewProfileData
public AbstractViewProfileData getViewProfileData(UserLocatorVO locator) throws FrameworkException
Description copied from interface:InternalBasicUserServiceReturns data for viewing profile of either a regular user or operator.- Specified by:
getViewProfileDatain interfaceInternalBasicUserService- Throws:
FrameworkException
-
remove
public void remove(@NotNull @NotNull UserLocatorVO locator)Description copied from interface:InternalBasicUserServicePhysically removes a pending user / operator- Specified by:
removein interfaceInternalBasicUserService
-
save
public void save(UserLocatorVO locator, BasicUserDTO dto, String confirmationPassword)
Description copied from interface:InternalBasicUserServiceSaves the profile of a user or operator- Specified by:
savein interfaceInternalBasicUserService
-
saveFullProfile
public SaveFullProfileResult saveFullProfile(SaveFullProfileParams params) throws FrameworkException
Description copied from interface:InternalBasicUserServiceSaves the full profile of a user, returning the generated ids for created data.- Specified by:
saveFullProfilein interfaceInternalBasicUserService- Throws:
FrameworkException
-
toChangeOperatorGroupDTO
public ChangeOperatorGroupDTO toChangeOperatorGroupDTO(ChangeGroupDTO params, BasicUser basicUser)
Description copied from interface:InternalBasicUserServiceLocalConverts the given parameters to change a user group to parameters to change an operator group- Specified by:
toChangeOperatorGroupDTOin interfaceInternalBasicUserServiceLocal
-
registerNetworkMappings
protected void registerNetworkMappings(NetworkPathRegistry networkPathRegistry)
Description copied from class:BaseServiceImplNeeds to be overridden by subclasses to register the path up to the network- Specified by:
registerNetworkMappingsin classBaseServiceImpl
-
-