Package org.cyclos.security.system
Class ConfigurationServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<DTO,E,D,DP>
-
- org.cyclos.security.ConfigurationEntityCRUDServiceSecurity<ConfigurationDTO,Configuration,ConfigurationData,ConfigurationVO>
-
- org.cyclos.security.system.ConfigurationServiceSecurity
-
- All Implemented Interfaces:
CRUDService<ConfigurationDTO,ConfigurationData,ConfigurationVO>,CRUDWithConfirmationPasswordService<ConfigurationDTO,ConfigurationData,ConfigurationVO>,Service,ConfigurationService
@Security public class ConfigurationServiceSecurity extends ConfigurationEntityCRUDServiceSecurity<ConfigurationDTO,Configuration,ConfigurationData,ConfigurationVO> implements ConfigurationService
Security forConfigurationService
-
-
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 ConfigurationServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckCreateNew(ConfigurationVO parentVO)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notvoidcheckManageContent(Configuration configuration)booleandoHasManageAccess(Configuration configuration)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(Configuration configuration)Should be implemented in order to return whether the caller is allowed to view the given entity.ActiveConfigurationDatagetActiveConfiguration(ConfigurationVO configurationVO)Returns the active configuration for the configuration with the given idConfigurationVOgetDefault()Returns the default configuration for the current network (or the global default configuration)protected ConfigurationServiceLocalgetImplementation()Should be implemented in order to return the actual implementation of the serviceConfigurationSearchDatagetSearchData()Gets data used on the search pagebooleanhasManageContent(Configuration configuration)booleanisVisibleForManageContent(Configuration configuration)List<ConfigurationDetailedVO>list()Returns all visible configurationsprotected voidonBeforeSave(ConfigurationDTO dto, Configuration entity)Page<ConfigurationDetailedVO>search(ConfigurationQuery params)Search configurations according to the specified query parameters-
Methods inherited from class org.cyclos.security.ConfigurationEntityCRUDServiceSecurity
isAccessible
-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canPerformOperation, canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, customizeData, find, getConfirmationPasswordInputForRemove, getData, getDataForNew, getEntityClass, hasManageAccess, hasViewAccess, load, 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
-
checkManageContent
public void checkManageContent(Configuration configuration)
-
doHasManageAccess
public boolean doHasManageAccess(Configuration configuration)
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<ConfigurationDTO,Configuration,ConfigurationData,ConfigurationVO>
-
doHasViewAccess
public boolean doHasViewAccess(Configuration configuration)
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<ConfigurationDTO,Configuration,ConfigurationData,ConfigurationVO>
-
getActiveConfiguration
public ActiveConfigurationData getActiveConfiguration(ConfigurationVO configurationVO)
Description copied from interface:ConfigurationServiceReturns the active configuration for the configuration with the given id- Specified by:
getActiveConfigurationin interfaceConfigurationService
-
getDefault
public ConfigurationVO getDefault() throws FrameworkException
Description copied from interface:ConfigurationServiceReturns the default configuration for the current network (or the global default configuration)- Specified by:
getDefaultin interfaceConfigurationService- Throws:
FrameworkException
-
getSearchData
public ConfigurationSearchData getSearchData()
Description copied from interface:ConfigurationServiceGets data used on the search page- Specified by:
getSearchDatain interfaceConfigurationService
-
hasManageContent
public boolean hasManageContent(Configuration configuration)
-
isVisibleForManageContent
public boolean isVisibleForManageContent(Configuration configuration)
- Returns:
- true if the logged admin has view access for the specified configuration or that configuration is an
ancestor of at least one of the
managed specific configurations (
Permission.SPECIFIC_CONFIGURATION_MANAGE_CONTENTpermission).
-
list
public List<ConfigurationDetailedVO> list() throws FrameworkException
Description copied from interface:ConfigurationServiceReturns all visible configurations- Specified by:
listin interfaceConfigurationService- Throws:
FrameworkException
-
search
public Page<ConfigurationDetailedVO> search(ConfigurationQuery params) throws FrameworkException
Description copied from interface:ConfigurationServiceSearch configurations according to the specified query parameters- Specified by:
searchin interfaceConfigurationService- Throws:
FrameworkException
-
checkCreateNew
protected void checkCreateNew(ConfigurationVO parentVO)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<ConfigurationDTO,Configuration,ConfigurationData,ConfigurationVO>
-
getImplementation
protected ConfigurationServiceLocal getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<ConfigurationDTO,Configuration,ConfigurationData,ConfigurationVO>
-
onBeforeSave
protected void onBeforeSave(ConfigurationDTO dto, Configuration entity)
- Overrides:
onBeforeSavein classCRUDServiceSecurity<ConfigurationDTO,Configuration,ConfigurationData,ConfigurationVO>
-
-