Class DocumentCustomFieldServiceImpl
- 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<DocumentCustomField,DocumentCustomFieldPossibleValueCategory,DocumentCustomFieldPossibleValue,QDocumentCustomField,DocumentCustomFieldDTO,DocumentCustomFieldData,Long>
-
- org.cyclos.impl.contentmanagement.DocumentCustomFieldServiceImpl
-
- All Implemented Interfaces:
DocumentCustomFieldServiceLocal,CRUDServiceLocal<DocumentCustomField,DocumentCustomFieldDTO,DocumentCustomFieldData,Long>,DocumentCustomFieldService,CRUDService<DocumentCustomFieldDTO,DocumentCustomFieldData,Long>,CRUDWithConfirmationPasswordService<DocumentCustomFieldDTO,DocumentCustomFieldData,Long>,Service,BaseCustomFieldService<DocumentCustomFieldDTO,DocumentCustomFieldData,Long>
@Service public class DocumentCustomFieldServiceImpl extends BaseCustomFieldServiceImpl<DocumentCustomField,DocumentCustomFieldPossibleValueCategory,DocumentCustomFieldPossibleValue,QDocumentCustomField,DocumentCustomFieldDTO,DocumentCustomFieldData,Long> implements DocumentCustomFieldServiceLocal
Service implementation for document 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, 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 DocumentCustomFieldServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddCustomValidations(Validator validator, DocumentCustomFieldDTO dto)It may be overridden to add specific validations for the custom field.protected IntegergetMaxOrder(DocumentCustomField field)Should be implemented in order to return the maximum order number for fields like the given oneprotected BaseCustomFieldPossibleValueCategoryServiceLocal<DocumentCustomField,DocumentCustomFieldPossibleValueCategory,DocumentCustomFieldPossibleValue>getPossibleValueCategoryService()Must be implemented in order to return the corresponding category serviceprotected DocumentCustomFieldPossibleValueServiceLocalgetPossibleValueService()Must be implemented in order to return the corresponding possible value serviceprotected booleanisBinaryTypesAllowed()Indicates whether this custom field nature allows binary typesList<CustomFieldVO>list(DocumentVO documentVO)Lists all fields for the given documentDocumentCustomFieldnewEntity(Long documentId)Should be implemented in order to instantiate a new entity based on the given context parametersprotected 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
addCustomInternalNameValidations, getData, getPropertyClasses, isEntityInternalNameRequired, onBeforeSave, 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, onAfterSave, onBeforeRemove, 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, 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.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
-
list
public List<CustomFieldVO> list(DocumentVO documentVO)
Description copied from interface:DocumentCustomFieldServiceLists all fields for the given document- Specified by:
listin interfaceDocumentCustomFieldService
-
newEntity
public DocumentCustomField newEntity(Long documentId)
Description copied from class:CRUDServiceImplShould be implemented in order to instantiate a new entity based on the given context parameters- Specified by:
newEntityin interfaceCRUDServiceLocal<DocumentCustomField,DocumentCustomFieldDTO,DocumentCustomFieldData,Long>- Specified by:
newEntityin classCRUDServiceImpl<DocumentCustomField,QDocumentCustomField,DocumentCustomFieldDTO,DocumentCustomFieldData,Long>
-
addCustomValidations
protected void addCustomValidations(Validator validator, DocumentCustomFieldDTO dto)
Description copied from class:BaseCustomFieldServiceImplIt may be overridden to add specific validations for the custom field. NOTE: You musn't add validations for the followings properties: 'internal_name' and 'name'.
UseCRUDServiceImpl.addCustomInternalNameValidations(Property, org.cyclos.model.EntityDTO)orCRUDServiceImpl.addCustomNameValidations(Property, org.cyclos.model.EntityDTO)instead.- Overrides:
addCustomValidationsin classBaseCustomFieldServiceImpl<DocumentCustomField,DocumentCustomFieldPossibleValueCategory,DocumentCustomFieldPossibleValue,QDocumentCustomField,DocumentCustomFieldDTO,DocumentCustomFieldData,Long>dto- the DTO to be validated
-
getMaxOrder
protected Integer getMaxOrder(DocumentCustomField 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<DocumentCustomField,DocumentCustomFieldPossibleValueCategory,DocumentCustomFieldPossibleValue> getPossibleValueCategoryService()
Description copied from class:BaseCustomFieldServiceImplMust be implemented in order to return the corresponding category service
-
getPossibleValueService
protected DocumentCustomFieldPossibleValueServiceLocal getPossibleValueService()
Description copied from class:BaseCustomFieldServiceImplMust be implemented in order to return the corresponding possible value service
-
isBinaryTypesAllowed
protected boolean isBinaryTypesAllowed()
Description copied from class:BaseCustomFieldServiceImplIndicates whether this custom field nature allows binary types
-
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
-
-