Package org.cyclos.security.system
Class BaseCustomFieldPossibleValueServiceSecurity<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>>
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<CustomFieldPossibleValueDTO,PV,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
- org.cyclos.security.system.BaseCustomFieldPossibleValueServiceSecurity<CF,C,PV>
-
- All Implemented Interfaces:
CRUDService<CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>,CRUDWithConfirmationPasswordService<CustomFieldPossibleValueDTO,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>,Service,BaseCustomFieldPossibleValueService
- Direct Known Subclasses:
AdCustomFieldPossibleValueServiceSecurity,ContactCustomFieldPossibleValueServiceSecurity,ContactInfoFieldPossibleValueServiceSecurity,CustomOperationFieldPossibleValueServiceSecurity,CustomWizardFieldPossibleValueServiceSecurity,DocumentCustomFieldPossibleValueServiceSecurity,RecordCustomFieldPossibleValueServiceSecurity,TransactionCustomFieldPossibleValueServiceSecurity,UserCustomFieldPossibleValueServiceSecurity,VoucherCustomFieldPossibleValueServiceSecurity
public abstract class BaseCustomFieldPossibleValueServiceSecurity<CF extends CustomField<CF,C,PV>,C extends CustomFieldPossibleValueCategory<CF,C,PV>,PV extends CustomFieldPossibleValue<CF,C,PV>> extends CRUDServiceSecurity<CustomFieldPossibleValueDTO,PV,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams> implements BaseCustomFieldPossibleValueService
Base implementation for security of custom field possible value services
-
-
Field Summary
-
Fields inherited from class org.cyclos.security.CRUDServiceSecurity
entityClass
-
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 BaseCustomFieldPossibleValueServiceSecurity(Class<PV> possibleValueClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcheckCreateNew(CustomFieldPossibleValueDataParams params)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notbooleandoHasManageAccess(PV possibleValue)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(PV possibleValue)Should be implemented in order to return whether the caller is allowed to view the given entity.protected abstract BaseCustomFieldServiceSecurity<?,CF,C,PV,?,?>getCustomFieldServiceSecurity()Must be implemented in order to return the corresponding custom field service securityprotected abstract BaseCustomFieldPossibleValueServiceLocal<CF,C,PV>getImplementation()Should be implemented in order to return the actual implementation of the servicevoidinsert(CustomFieldVO customFieldVO, CustomFieldPossibleValueCategoryVO customFieldPossibleValueCategoryVO, List<String> possibleValues)Inserts a list of custom field possible values, optionally in a categorybooleanisAccessible(SessionData sessionData, PV possibleValue)Must be implemented in order to determine whether the given entity is accessible for the given session data.voidmove(Long id, boolean up)Moves the given possible value in order, either up or downPage<CustomFieldPossibleValueVO>search(CustomFieldPossibleValueQuery query)Searches for possible values-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canPerformOperation, canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, onBeforeSave, remove, removeAll, removeAllWithConfirmationPassword, removeWithConfirmationPassword, resolveEntityCheck, save, saveWithConfirmationPassword
-
Methods inherited from class org.cyclos.security.BaseServiceSecurity
checkGuest, checkId, checkIds, checkInternalName, checkLoggedIn, checkManagesUser, checkRelatesToUser, checkScope, checkVO, checkVOs, doInitialize, getEntityCheckRegistry, getUser, initialize
-
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
-
-
-
-
Method Detail
-
doHasManageAccess
public boolean doHasManageAccess(PV possibleValue)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to manage the given entity, for the given operation- Specified by:
doHasManageAccessin classCRUDServiceSecurity<CustomFieldPossibleValueDTO,PV extends CustomFieldPossibleValue<CF,C,PV>,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
doHasViewAccess
public boolean doHasViewAccess(PV possibleValue)
Description copied from class:CRUDServiceSecurityShould be implemented in order to return whether the caller is allowed to view the given entity.- Specified by:
doHasViewAccessin classCRUDServiceSecurity<CustomFieldPossibleValueDTO,PV extends CustomFieldPossibleValue<CF,C,PV>,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
insert
public final 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
-
isAccessible
public boolean isAccessible(SessionData sessionData, PV possibleValue)
Description copied from class:CRUDServiceSecurityMust be implemented in order to determine whether the given entity is accessible for the given session data. This method shouldn't check the same condition asCRUDServiceSecurity.hasViewAccess(BaseEntity). If the only condition for an entity isCRUDServiceSecurity.hasViewAccess(BaseEntity), this method should return false.- Specified by:
isAccessiblein classCRUDServiceSecurity<CustomFieldPossibleValueDTO,PV extends CustomFieldPossibleValue<CF,C,PV>,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
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
-
search
public final Page<CustomFieldPossibleValueVO> search(CustomFieldPossibleValueQuery query) throws FrameworkException
Description copied from interface:BaseCustomFieldPossibleValueServiceSearches for possible values- Specified by:
searchin interfaceBaseCustomFieldPossibleValueService- Throws:
FrameworkException
-
checkCreateNew
protected void checkCreateNew(CustomFieldPossibleValueDataParams params)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<CustomFieldPossibleValueDTO,PV extends CustomFieldPossibleValue<CF,C,PV>,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
getCustomFieldServiceSecurity
protected abstract BaseCustomFieldServiceSecurity<?,CF,C,PV,?,?> getCustomFieldServiceSecurity()
Must be implemented in order to return the corresponding custom field service security
-
getImplementation
protected abstract BaseCustomFieldPossibleValueServiceLocal<CF,C,PV> getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<CustomFieldPossibleValueDTO,PV extends CustomFieldPossibleValue<CF,C,PV>,CustomFieldPossibleValueData,CustomFieldPossibleValueDataParams>
-
-