Package org.cyclos.security.system
Class BaseImageServiceSecurity<I extends Image,NP>
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.system.BaseImageServiceSecurity<I,NP>
-
- All Implemented Interfaces:
Service,BaseImageService<NP>
- Direct Known Subclasses:
BaseCategorizedImageServiceSecurity,ConfigurationImageServiceSecurity,TempImageServiceSecurity,ThemeImageServiceSecurity,VoucherTemplateImageServiceSecurity
public abstract class BaseImageServiceSecurity<I extends Image,NP> extends BaseServiceSecurity implements BaseImageService<NP>
Base security layer for images
-
-
Field Summary
Fields Modifier and Type Field Description protected Class<I>imageType-
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 BaseImageServiceSecurity(Class<I> imageType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckCreateNew(NP param)protected voidcheckManageAccess(I image)protected Ifind(Long id)ImageNaturegetImageNature()protected abstract BaseImageServiceLocal<I,NP>getImplementation()abstract booleanhasManageAccess(I image)voidremove(@NotNull Long id)Removes the given imagevoidremoveAll(@NotNull Collection<Long> ids)Removes all the given imageprotected EntityCheck<?>resolveEntityCheck()Must be implemented in order to return theEntityCheckmanaged by this security component, or null if noneImageVOsave(NP param, String name, SerializableInputStream contents, String contentType)Saves the given image for the given parameter (which depends on each image type), returning the descriptorvoidsaveName(@NotNull Long id, String name)Saves the name of the given image-
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
-
-
-
-
Method Detail
-
getImageNature
public ImageNature getImageNature()
-
hasManageAccess
public abstract boolean hasManageAccess(I image)
-
remove
public final void remove(@NotNull @NotNull Long id) throws FrameworkExceptionDescription copied from interface:BaseImageServiceRemoves the given image- Specified by:
removein interfaceBaseImageService<I extends Image>- Throws:
FrameworkException
-
removeAll
public void removeAll(@NotNull @NotNull Collection<Long> ids) throws FrameworkExceptionDescription copied from interface:BaseImageServiceRemoves all the given image- Specified by:
removeAllin interfaceBaseImageService<I extends Image>- Throws:
FrameworkException
-
save
public final ImageVO save(NP param, String name, SerializableInputStream contents, String contentType) throws FrameworkException
Description copied from interface:BaseImageServiceSaves the given image for the given parameter (which depends on each image type), returning the descriptor- Specified by:
savein interfaceBaseImageService<I extends Image>- Throws:
FrameworkException
-
saveName
public final void saveName(@NotNull @NotNull Long id, String name) throws FrameworkExceptionDescription copied from interface:BaseImageServiceSaves the name of the given image- Specified by:
saveNamein interfaceBaseImageService<I extends Image>- Throws:
FrameworkException
-
checkCreateNew
protected abstract void checkCreateNew(NP param)
-
checkManageAccess
protected void checkManageAccess(I image)
-
getImplementation
protected abstract BaseImageServiceLocal<I,NP> getImplementation()
-
resolveEntityCheck
protected final EntityCheck<?> resolveEntityCheck()
Description copied from class:BaseServiceSecurityMust be implemented in order to return theEntityCheckmanaged by this security component, or null if none- Specified by:
resolveEntityCheckin classBaseServiceSecurity
-
-