Class StaticContentServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.CRUDServiceSecurity<BaseStaticContentDTO,BaseStaticContent,StaticContentData,StaticContentDataParams>
-
- org.cyclos.security.contentmanagement.StaticContentServiceSecurity
-
- All Implemented Interfaces:
StaticContentService,CRUDService<BaseStaticContentDTO,StaticContentData,StaticContentDataParams>,CRUDWithConfirmationPasswordService<BaseStaticContentDTO,StaticContentData,StaticContentDataParams>,Service
@Security public class StaticContentServiceSecurity extends CRUDServiceSecurity<BaseStaticContentDTO,BaseStaticContent,StaticContentData,StaticContentDataParams> implements StaticContentService
Security for static contents.
-
-
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 StaticContentServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckCreateNew(StaticContentDataParams params)Checks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif notprotected voidcustomizeData(StaticContentData data)Can be overridden in order to process the returned data object for the given entityprotected booleandoHasManageAccess(BaseStaticContent entity)Should be implemented in order to return whether the caller is allowed to manage the given entity, for the given operationbooleandoHasViewAccess(BaseStaticContent entity)Should be implemented in order to return whether the caller is allowed to view the given entity.StringgetHelpContent(Role role)protected StaticContentServiceLocalgetImplementation()Should be implemented in order to return the actual implementation of the serviceStaticContentListDatagetListData(ConfigurationVO configurationVO)Returns data to list the static contents of a given configurationStringgetSmsHelpContent(Role role)booleanisAccessible(SessionData sessionData, BaseStaticContent entity)Must be implemented in order to determine whether the given entity is accessible for the given session data.List<StaticContentVO>list(ConfigurationVO configurationVO)Lists the static contents of a given configurationStringpreviewEMail(PreviewEmailTemplateParams params)Previews the e-mail content by applying the given template to the given user-
Methods inherited from class org.cyclos.security.CRUDServiceSecurity
canPerformOperation, canViewData, checkManageAccess, checkOperation, checkSave, checkViewAccess, 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
-
doHasViewAccess
public boolean doHasViewAccess(BaseStaticContent entity)
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<BaseStaticContentDTO,BaseStaticContent,StaticContentData,StaticContentDataParams>
-
getHelpContent
public String getHelpContent(Role role)
- Specified by:
getHelpContentin interfaceStaticContentService- Returns:
- the help content according to the specified
Role
-
getListData
public StaticContentListData getListData(ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:StaticContentServiceReturns data to list the static contents of a given configuration- Specified by:
getListDatain interfaceStaticContentService- Throws:
FrameworkException
-
getSmsHelpContent
public String getSmsHelpContent(Role role) throws FrameworkException
- Specified by:
getSmsHelpContentin interfaceStaticContentService- Returns:
- the sms help content. Note for version 4.0.3.x: at this moment only the role admin is supported.
- Throws:
FrameworkException
-
isAccessible
public boolean isAccessible(SessionData sessionData, BaseStaticContent entity)
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<BaseStaticContentDTO,BaseStaticContent,StaticContentData,StaticContentDataParams>
-
list
public List<StaticContentVO> list(ConfigurationVO configurationVO) throws FrameworkException
Description copied from interface:StaticContentServiceLists the static contents of a given configuration- Specified by:
listin interfaceStaticContentService- Throws:
FrameworkException
-
previewEMail
public String previewEMail(PreviewEmailTemplateParams params) throws FrameworkException
Description copied from interface:StaticContentServicePreviews the e-mail content by applying the given template to the given user- Specified by:
previewEMailin interfaceStaticContentService- Throws:
FrameworkException
-
checkCreateNew
protected void checkCreateNew(StaticContentDataParams params)
Description copied from class:CRUDServiceSecurityChecks whether creating new entities with the given context parameters is allowed, throwingPermissionDeniedExceptionif not- Specified by:
checkCreateNewin classCRUDServiceSecurity<BaseStaticContentDTO,BaseStaticContent,StaticContentData,StaticContentDataParams>
-
customizeData
protected void customizeData(StaticContentData data)
Description copied from class:CRUDServiceSecurityCan be overridden in order to process the returned data object for the given entity- Overrides:
customizeDatain classCRUDServiceSecurity<BaseStaticContentDTO,BaseStaticContent,StaticContentData,StaticContentDataParams>
-
doHasManageAccess
protected boolean doHasManageAccess(BaseStaticContent entity)
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<BaseStaticContentDTO,BaseStaticContent,StaticContentData,StaticContentDataParams>
-
getImplementation
protected StaticContentServiceLocal getImplementation()
Description copied from class:CRUDServiceSecurityShould be implemented in order to return the actual implementation of the service- Specified by:
getImplementationin classCRUDServiceSecurity<BaseStaticContentDTO,BaseStaticContent,StaticContentData,StaticContentDataParams>
-
-