Package org.cyclos.impl.users
Class RecordCustomFieldServiceImpl
- 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<RecordCustomField,RecordCustomFieldPossibleValueCategory,RecordCustomFieldPossibleValue,QRecordCustomField,RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>
-
- org.cyclos.impl.users.RecordCustomFieldServiceImpl
-
- All Implemented Interfaces:
CRUDServiceLocal<RecordCustomField,RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>,RecordCustomFieldServiceLocal,CRUDService<RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>,CRUDWithConfirmationPasswordService<RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>,Service,BaseCustomFieldService<RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>,RecordCustomFieldService
@Service public class RecordCustomFieldServiceImpl extends BaseCustomFieldServiceImpl<RecordCustomField,RecordCustomFieldPossibleValueCategory,RecordCustomFieldPossibleValue,QRecordCustomField,RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO> implements RecordCustomFieldServiceLocal
Service implementation for record custom field service
-
-
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, cacheHandler, 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 RecordCustomFieldServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCustomInternalNameValidations(Property internalName, RecordCustomFieldDTO dto)This method may be overridden to add custom validations for the INTERNAL_NAME property.protected RecordCustomFieldDatagetData(RecordCustomField field)Returns details data for the given entityprotected IntegergetMaxOrder(RecordCustomField field)Should be implemented in order to return the maximum order number for fields like the given oneprotected IntegergetMaxOrder(RecordType recordType)protected BaseCustomFieldPossibleValueCategoryServiceLocal<RecordCustomField,RecordCustomFieldPossibleValueCategory,RecordCustomFieldPossibleValue>getPossibleValueCategoryService()Must be implemented in order to return the corresponding category serviceprotected RecordCustomFieldPossibleValueServiceLocalgetPossibleValueService()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 typesvoidlinkShared(RecordTypeVO recordTypeVO, CustomFieldVO customFieldVO)Relates the given record type with the given custom fieldList<RecordCustomFieldVO>list(RecordTypeVO recordTypeVO)Lists the fields in the given record type returning also the shared ones.List<RecordCustomField>listAllShared()Returns all shared record fieldsList<RecordCustomFieldDetailedVO>listDetailed(RecordType recordType)Lists the fields in the given record type returning also the shared ones as detailed VOs.List<CustomFieldVO>listShared()Lists all the available shared fieldsprotected voidmoveFieldToLastPosition(RecordType recordType, RecordCustomField field)RecordCustomFieldnewEntity(RecordTypeVO recordTypeVO)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidonAfterSave(RecordCustomField entity, RecordCustomField currentCopy, Object dataFromOnBeforeSave)May be overridden in order to perform custom logic after saving an entityprotected voidonBeforeRemove(RecordCustomField entity)May be overridden in order to perform custom logic before removing an entityprotected ObjectonBeforeSave(RecordCustomField field, RecordCustomField currentCopy)May be overridden in order to perform custom logic before saving an entity.protected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkvoidsaveOrder(List<Long> ids)Saves the order of the given orderable entities idsvoidsaveOrderOnType(RecordTypeVO recordTypeVO, List<CustomFieldVO> customFieldVOs)Saves the order of the given custom field.voidunlinkShared(RecordTypeVO recordTypeVO, CustomFieldVO customFieldVO)Removes the link that exists between the record type and the shared field-
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, onAfterRemove, preProcessCurrentCopy, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, 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, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, 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.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
-
linkShared
public void linkShared(RecordTypeVO recordTypeVO, CustomFieldVO customFieldVO)
Description copied from interface:RecordCustomFieldServiceRelates the given record type with the given custom field- Specified by:
linkSharedin interfaceRecordCustomFieldService
-
list
public List<RecordCustomFieldVO> list(RecordTypeVO recordTypeVO)
Description copied from interface:RecordCustomFieldServiceLists the fields in the given record type returning also the shared ones.- Specified by:
listin interfaceRecordCustomFieldService
-
listAllShared
public List<RecordCustomField> listAllShared()
Description copied from interface:RecordCustomFieldServiceLocalReturns all shared record fields- Specified by:
listAllSharedin interfaceRecordCustomFieldServiceLocal
-
listDetailed
public List<RecordCustomFieldDetailedVO> listDetailed(RecordType recordType)
Description copied from interface:RecordCustomFieldServiceLocalLists the fields in the given record type returning also the shared ones as detailed VOs.- Specified by:
listDetailedin interfaceRecordCustomFieldServiceLocal
-
listShared
public List<CustomFieldVO> listShared()
Description copied from interface:RecordCustomFieldServiceLists all the available shared fields- Specified by:
listSharedin interfaceRecordCustomFieldService
-
newEntity
public RecordCustomField newEntity(RecordTypeVO recordTypeVO)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<RecordCustomField,RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>- Specified by:
newEntityin classCRUDServiceImpl<RecordCustomField,QRecordCustomField,RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>
-
saveOrder
public final void saveOrder(List<Long> ids)
Description copied from class:CRUDServiceImplSaves the order of the given orderable entities ids- Specified by:
saveOrderin interfaceBaseCustomFieldService<RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>- Overrides:
saveOrderin classCRUDServiceImpl<RecordCustomField,QRecordCustomField,RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>
-
saveOrderOnType
public void saveOrderOnType(RecordTypeVO recordTypeVO, List<CustomFieldVO> customFieldVOs)
Description copied from interface:RecordCustomFieldServiceSaves the order of the given custom field.- Specified by:
saveOrderOnTypein interfaceRecordCustomFieldService
-
unlinkShared
public void unlinkShared(RecordTypeVO recordTypeVO, CustomFieldVO customFieldVO)
Description copied from interface:RecordCustomFieldServiceRemoves the link that exists between the record type and the shared field- Specified by:
unlinkSharedin interfaceRecordCustomFieldService
-
addCustomInternalNameValidations
protected void addCustomInternalNameValidations(Property internalName, RecordCustomFieldDTO dto)
Description copied from class:CRUDServiceImplThis method may be overridden to add custom validations for the INTERNAL_NAME property.
-
getData
protected RecordCustomFieldData getData(RecordCustomField field)
Description copied from class:CRUDServiceImplReturns details data for the given entity
-
getMaxOrder
protected Integer getMaxOrder(RecordCustomField field)
Description copied from class:BaseCustomFieldServiceImplShould be implemented in order to return the maximum order number for fields like the given one
-
getMaxOrder
protected Integer getMaxOrder(RecordType recordType)
-
getPossibleValueCategoryService
protected BaseCustomFieldPossibleValueCategoryServiceLocal<RecordCustomField,RecordCustomFieldPossibleValueCategory,RecordCustomFieldPossibleValue> getPossibleValueCategoryService()
Description copied from class:BaseCustomFieldServiceImplMust be implemented in order to return the corresponding category service
-
getPossibleValueService
protected RecordCustomFieldPossibleValueServiceLocal 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
-
moveFieldToLastPosition
protected void moveFieldToLastPosition(RecordType recordType, RecordCustomField field)
-
onAfterSave
protected void onAfterSave(RecordCustomField entity, RecordCustomField currentCopy, Object dataFromOnBeforeSave)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after saving an entity- Overrides:
onAfterSavein classCRUDServiceImpl<RecordCustomField,QRecordCustomField,RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>
-
onBeforeRemove
protected void onBeforeRemove(RecordCustomField entity)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic before removing an entity- Overrides:
onBeforeRemovein classCRUDServiceImpl<RecordCustomField,QRecordCustomField,RecordCustomFieldDTO,RecordCustomFieldData,RecordTypeVO>
-
onBeforeSave
protected Object onBeforeSave(RecordCustomField field, RecordCustomField 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
-
-