Package org.cyclos.impl.users
Class UserCustomFieldServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<CF,A,DTO,D,DP>
-
- org.cyclos.impl.system.BaseCustomFieldServiceImpl<UserCustomField,UserCustomFieldPossibleValueCategory,UserCustomFieldPossibleValue,QUserCustomField,UserCustomFieldDTO,UserCustomFieldData,Void>
-
- org.cyclos.impl.users.UserCustomFieldServiceImpl
-
- All Implemented Interfaces:
CRUDServiceLocal<UserCustomField,UserCustomFieldDTO,UserCustomFieldData,Void>,UserCustomFieldServiceLocal,CRUDService<UserCustomFieldDTO,UserCustomFieldData,Void>,CRUDWithConfirmationPasswordService<UserCustomFieldDTO,UserCustomFieldData,Void>,Service,BaseCustomFieldService<UserCustomFieldDTO,UserCustomFieldData,Void>,UserCustomFieldService
@Service public class UserCustomFieldServiceImpl extends BaseCustomFieldServiceImpl<UserCustomField,UserCustomFieldPossibleValueCategory,UserCustomFieldPossibleValue,QUserCustomField,UserCustomFieldDTO,UserCustomFieldData,Void> implements UserCustomFieldServiceLocal
Service implementation for user custom fields
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.system.BaseCustomFieldServiceImpl
customFieldValueHandler, customScriptService, dataClass
-
Fields inherited from class org.cyclos.impl.CRUDServiceImpl
$, ATTR_CURRENT_COPY, dtoClass, entityClass, extensionPointService, idPath, internalNamePath, namePath, ownerEntityIdPath, ownerEntityPath, ownerEntityPropertyName, passwordHandler, richTextHandler, withConfirmationPassword
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, 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 UserCustomFieldServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCustomInternalNameValidations(Property internalName, UserCustomFieldDTO dto)This method may be overridden to add custom validations for the INTERNAL_NAME property.booleanexistsUser(UserCustomField field, String value)Returns true if there exists a non removed user that has a custom field value with the given value.protected UserCustomFieldDatagetData(UserCustomField field)Returns details data for the given entityprotected IntegergetMaxOrder(UserCustomField field)Should be implemented in order to return the maximum order number for fields like the given oneprotected BaseCustomFieldPossibleValueCategoryServiceLocal<UserCustomField,UserCustomFieldPossibleValueCategory,UserCustomFieldPossibleValue>getPossibleValueCategoryService()Must be implemented in order to return the corresponding category serviceprotected UserCustomFieldPossibleValueServiceLocalgetPossibleValueService()Must be implemented in order to return the corresponding possible value serviceprotected List<Class<?>>getPropertyClasses()May be overridden in order to return a list of classes to apply internal name property validationsprotected booleanisBinaryTypesAllowed()Indicates whether this custom field nature allows binary typesList<CustomFieldVO>list()Returns all user custom fieldsList<UserCustomField>listAll()Returns all user custom fieldsList<String>listOidcClaims()Returns all OpenID Connect claims from user custom fields for this networkUserCustomFieldnewEntity(Void params)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidonAfterRemove(UserCustomField entity)May be overridden in order to perform custom logic after removing an entityprotected voidonBeforeRemove(UserCustomField field)May be overridden in order to perform custom logic before removing an entityprotected ObjectonBeforeSave(UserCustomField field, UserCustomField currentCopy)May be overridden in order to perform custom logic before saving an entity.voidpurgeValues(BasicUser user)Purges the custom field values of the given user that are set to be purged with the userprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the network-
Methods inherited from class org.cyclos.impl.system.BaseCustomFieldServiceImpl
addCustomValidations, isEntityInternalNameRequired, resolveValidator, supportsValues, toDetailedVOs, toDTO
-
Methods inherited from class org.cyclos.impl.CRUDServiceImpl
addCustomNameValidations, checkConfirmationPassword, doRemove, find, findAll, from, getConfirmationPasswordInput, getConfirmationPasswordInputForRemove, getData, getDataForNew, getDeviceConfirmationParams, getEntityClass, getEntityInternalNameKey, getExcludedPropertiesToDTO, getExcludedPropertiesToEntity, getNameLabel, getUniqueInternalNameQuery, getUniqueNameQuery, isNameRequired, load, logEntity, onAfterSave, preProcessCurrentCopy, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, saveOrder, saveSkippingEntityLog, saveWithConfirmationPassword, shouldCheckConfirmationPassword, subClassMappings, toEntity, validate
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cyclos.services.system.BaseCustomFieldService
saveOrder
-
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, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
-
-
-
Method Detail
-
existsUser
public boolean existsUser(UserCustomField field, String value)
Description copied from interface:UserCustomFieldServiceLocalReturns true if there exists a non removed user that has a custom field value with the given value. Only two types of field are supported: string and integer. Based on the type of the field, it looks on the corresponding attribute of the custom field value.- Specified by:
existsUserin interfaceUserCustomFieldServiceLocal
-
list
public List<CustomFieldVO> list()
Description copied from interface:UserCustomFieldServiceReturns all user custom fields- Specified by:
listin interfaceUserCustomFieldService
-
listAll
public List<UserCustomField> listAll()
Description copied from interface:UserCustomFieldServiceLocalReturns all user custom fields- Specified by:
listAllin interfaceUserCustomFieldServiceLocal
-
listOidcClaims
public List<String> listOidcClaims()
Description copied from interface:UserCustomFieldServiceLocalReturns all OpenID Connect claims from user custom fields for this network- Specified by:
listOidcClaimsin interfaceUserCustomFieldServiceLocal
-
newEntity
public UserCustomField newEntity(Void params)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<UserCustomField,UserCustomFieldDTO,UserCustomFieldData,Void>- Specified by:
newEntityin classCRUDServiceImpl<UserCustomField,QUserCustomField,UserCustomFieldDTO,UserCustomFieldData,Void>
-
purgeValues
public void purgeValues(BasicUser user)
Description copied from interface:UserCustomFieldServiceLocalPurges the custom field values of the given user that are set to be purged with the user- Specified by:
purgeValuesin interfaceUserCustomFieldServiceLocal
-
addCustomInternalNameValidations
protected void addCustomInternalNameValidations(Property internalName, UserCustomFieldDTO dto)
Description copied from class:CRUDServiceImplThis method may be overridden to add custom validations for the INTERNAL_NAME property.
-
getData
protected UserCustomFieldData getData(UserCustomField field)
Description copied from class:CRUDServiceImplReturns details data for the given entity
-
getMaxOrder
protected Integer getMaxOrder(UserCustomField field)
Description copied from class:BaseCustomFieldServiceImplShould be implemented in order to return the maximum order number for fields like the given one
-
getPossibleValueCategoryService
protected BaseCustomFieldPossibleValueCategoryServiceLocal<UserCustomField,UserCustomFieldPossibleValueCategory,UserCustomFieldPossibleValue> getPossibleValueCategoryService()
Description copied from class:BaseCustomFieldServiceImplMust be implemented in order to return the corresponding category service
-
getPossibleValueService
protected UserCustomFieldPossibleValueServiceLocal getPossibleValueService()
Description copied from class:BaseCustomFieldServiceImplMust be implemented in order to return the corresponding possible value service
-
getPropertyClasses
protected List<Class<?>> getPropertyClasses()
Description copied from class:BaseCustomFieldServiceImplMay be overridden in order to return a list of classes to apply internal name property validations
-
isBinaryTypesAllowed
protected boolean isBinaryTypesAllowed()
Description copied from class:BaseCustomFieldServiceImplIndicates whether this custom field nature allows binary types
-
onAfterRemove
protected void onAfterRemove(UserCustomField entity)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after removing an entity- Overrides:
onAfterRemovein classCRUDServiceImpl<UserCustomField,QUserCustomField,UserCustomFieldDTO,UserCustomFieldData,Void>
-
onBeforeRemove
protected void onBeforeRemove(UserCustomField field)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic before removing an entity- Overrides:
onBeforeRemovein classCRUDServiceImpl<UserCustomField,QUserCustomField,UserCustomFieldDTO,UserCustomFieldData,Void>
-
onBeforeSave
protected Object onBeforeSave(UserCustomField field, UserCustomField currentCopy)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic before saving an entity. Any returned value will be passed to theCRUDServiceImpl.onAfterSave(BaseEntity, BaseEntity, Object)method
-
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
-
-