Package org.cyclos.impl.system
Class BaseCustomFieldPossibleValueServiceImpl<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,A extends com.querydsl.core.types.EntityPath<PV>>
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.CRUDServiceImpl<PV,A,CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
- org.cyclos.impl.system.BaseCustomFieldPossibleValueServiceImpl<CF,C,PV,A>
-
- All Implemented Interfaces:
CRUDServiceLocal<PV,CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>,BaseCustomFieldPossibleValueServiceLocal<CF,C,PV>,CRUDService<CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>,CRUDWithConfirmationPasswordService<CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>,Service,BaseCustomFieldPossibleValueService
- Direct Known Subclasses:
AdCustomFieldPossibleValueServiceImpl,ContactCustomFieldPossibleValueServiceImpl,ContactInfoFieldPossibleValueServiceImpl,CustomOperationFieldPossibleValueServiceImpl,CustomWizardFieldPossibleValueServiceImpl,DocumentCustomFieldPossibleValueServiceImpl,RecordCustomFieldPossibleValueServiceImpl,TransactionCustomFieldPossibleValueServiceImpl,UserCustomFieldPossibleValueServiceImpl
public abstract class BaseCustomFieldPossibleValueServiceImpl<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,A extends com.querydsl.core.types.EntityPath<PV>> extends CRUDServiceImpl<PV,A,CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams> implements BaseCustomFieldPossibleValueServiceLocal<CF,C,PV>
Base implementation for custom field possible value services
-
-
Field Summary
-
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, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<CF>getCustomFieldClass()Returns the custom field class handled by this serviceprotected CustomFieldPossibleValueDatagetData(PV entity)Returns details data for the given entityClass<C>getPossibleValueCategoryClass()Returns the possible value category class handled by this servicevoidinsert(CustomFieldVO customFieldVO, CustomFieldPossibleValueCategoryVO customFieldPossibleValueCategoryVO, List<String> possibleValues)Inserts a list of custom field possible values, optionally in a categoryvoidmove(Long id, boolean up)Moves the given possible value in order, either up or downPVnewEntity(CustomFieldPossibleValueDataParams params)Should be implemented in order to instantiate a new entity based on the given context parametersprotected voidonAfterSave(PV possibleValue, PV currentCopy, Object dataFromOnBeforeSave)May be overridden in order to perform custom logic after saving an entityprotected ObjectonBeforeSave(PV entity, PV currentCopy)May be overridden in order to perform custom logic before saving an entity.protected ValidatorresolveValidator(CustomFieldPossibleValueDTO dto)Page<CustomFieldPossibleValueVO>search(CustomFieldPossibleValueQuery query)Searches for possible values-
Methods inherited from class org.cyclos.impl.CRUDServiceImpl
addCustomInternalNameValidations, addCustomNameValidations, checkConfirmationPassword, doRemove, find, findAll, from, getConfirmationPasswordInput, getConfirmationPasswordInputForRemove, getData, getDataForNew, getDeviceConfirmationParams, getEntityClass, getEntityInternalNameKey, getExcludedPropertiesToDTO, getExcludedPropertiesToEntity, getNameLabel, getUniqueInternalNameQuery, getUniqueNameQuery, isEntityInternalNameRequired, isNameRequired, load, logEntity, onAfterRemove, onBeforeRemove, preProcessCurrentCopy, remove, remove, removeAll, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveDTOType, resolveEntityType, resolveExtensionPointAccessor, save, saveOrder, saveSkippingEntityLog, saveWithConfirmationPassword, shouldCheckConfirmationPassword, subClassMappings, toDTO, toEntity, validate
-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings, registerNetworkMappings
-
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.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
-
getCustomFieldClass
public Class<CF> getCustomFieldClass()
Description copied from interface:BaseCustomFieldPossibleValueServiceLocalReturns the custom field class handled by this service- Specified by:
getCustomFieldClassin interfaceBaseCustomFieldPossibleValueServiceLocal<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>>
-
getPossibleValueCategoryClass
public Class<C> getPossibleValueCategoryClass()
Description copied from interface:BaseCustomFieldPossibleValueServiceLocalReturns the possible value category class handled by this service- Specified by:
getPossibleValueCategoryClassin interfaceBaseCustomFieldPossibleValueServiceLocal<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>>
-
insert
public void insert(CustomFieldVO customFieldVO, CustomFieldPossibleValueCategoryVO customFieldPossibleValueCategoryVO, List<String> possibleValues) throws FrameworkException
Description copied from interface:BaseCustomFieldPossibleValueServiceInserts a list of custom field possible values, optionally in a category- Specified by:
insertin interfaceBaseCustomFieldPossibleValueService- Throws:
FrameworkException
-
move
public void move(Long id, boolean up) throws EntityNotFoundException
Description copied from interface:BaseCustomFieldPossibleValueServiceMoves the given possible value in order, either up or down- Specified by:
movein interfaceBaseCustomFieldPossibleValueService- Throws:
EntityNotFoundException
-
newEntity
public PV newEntity(CustomFieldPossibleValueDataParams 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<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>,A extends com.querydsl.core.types.EntityPath<PV>>- Specified by:
newEntityin classCRUDServiceImpl<PV extends CustomFieldPossibleValue<CF,C,PV>,A extends com.querydsl.core.types.EntityPath<PV>,CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
search
public Page<CustomFieldPossibleValueVO> search(CustomFieldPossibleValueQuery query) throws FrameworkException
Description copied from interface:BaseCustomFieldPossibleValueServiceSearches for possible values- Specified by:
searchin interfaceBaseCustomFieldPossibleValueService- Throws:
FrameworkException
-
getData
protected CustomFieldPossibleValueData getData(PV entity)
Description copied from class:CRUDServiceImplReturns details data for the given entity- Specified by:
getDatain classCRUDServiceImpl<PV extends CustomFieldPossibleValue<CF,C,PV>,A extends com.querydsl.core.types.EntityPath<PV>,CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
onAfterSave
protected void onAfterSave(PV possibleValue, PV currentCopy, Object dataFromOnBeforeSave)
Description copied from class:CRUDServiceImplMay be overridden in order to perform custom logic after saving an entity- Overrides:
onAfterSavein classCRUDServiceImpl<PV extends CustomFieldPossibleValue<CF,C,PV>,A extends com.querydsl.core.types.EntityPath<PV>,CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
onBeforeSave
protected Object onBeforeSave(PV entity, PV 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- Overrides:
onBeforeSavein classCRUDServiceImpl<PV extends CustomFieldPossibleValue<CF,C,PV>,A extends com.querydsl.core.types.EntityPath<PV>,CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
resolveValidator
protected Validator resolveValidator(CustomFieldPossibleValueDTO dto)
- Specified by:
resolveValidatorin classCRUDServiceImpl<PV extends CustomFieldPossibleValue<CF,C,PV>,A extends com.querydsl.core.types.EntityPath<PV>,CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
-