Package org.cyclos.security.users
Class ProductsUserServiceSecurity
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.security.BaseServiceSecurity
-
- org.cyclos.security.users.ProductsUserServiceSecurity
-
- All Implemented Interfaces:
Service,BaseProductsOwnerService<UserLocatorVO,UserProductsCollections>,ProductsUserService
@Security public class ProductsUserServiceSecurity extends BaseServiceSecurity implements ProductsUserService
Security layer forProductsUserService
-
-
Field Summary
-
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 ProductsUserServiceSecurity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanassign(ProductVO productVO, UserLocatorVO locator)Assigns the given product to the product owner.ActiveProductsDatagetActiveProducts(UserLocatorVO locator, ChannelVO channel, PrincipalTypeVO principalType)Returns theActiveProductsData, containing all the actual product data for the user/group with the given id and the specified channel (if null then it doesn't filter the products by channel) and principal type (if null then it doesn't filter the products by principal type).UserProductsCollectionsgetData(UserLocatorVO owner)Returns the data used to view / manage an owner's individual productsList<ProductAssignmentLogVO>getLogs(@NotNull UserLocatorVO owner)Returns the log for the individually assigned products to the given user.protected EntityCheck<?>resolveEntityCheck()Must be implemented in order to return theEntityCheckmanaged by this security component, or null if nonebooleanunassign(ProductVO productVO, UserLocatorVO locator)Unassigns the given product from the owner-
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
-
assign
public boolean assign(ProductVO productVO, UserLocatorVO locator) throws ValidationException
Description copied from interface:BaseProductsOwnerServiceAssigns the given product to the product owner.- Specified by:
assignin interfaceBaseProductsOwnerService<UserLocatorVO,UserProductsCollections>- Throws:
ValidationException
-
getActiveProducts
public ActiveProductsData getActiveProducts(UserLocatorVO locator, ChannelVO channel, PrincipalTypeVO principalType) throws FrameworkException
Description copied from interface:BaseProductsOwnerServiceReturns theActiveProductsData, containing all the actual product data for the user/group with the given id and the specified channel (if null then it doesn't filter the products by channel) and principal type (if null then it doesn't filter the products by principal type).- Specified by:
getActiveProductsin interfaceBaseProductsOwnerService<UserLocatorVO,UserProductsCollections>- Throws:
FrameworkException
-
getData
public UserProductsCollections getData(UserLocatorVO owner) throws FrameworkException
Description copied from interface:BaseProductsOwnerServiceReturns the data used to view / manage an owner's individual products- Specified by:
getDatain interfaceBaseProductsOwnerService<UserLocatorVO,UserProductsCollections>- Throws:
FrameworkException
-
getLogs
public List<ProductAssignmentLogVO> getLogs(@NotNull @NotNull UserLocatorVO owner) throws FrameworkException
Description copied from interface:BaseProductsOwnerServiceReturns the log for the individually assigned products to the given user.- Specified by:
getLogsin interfaceBaseProductsOwnerService<UserLocatorVO,UserProductsCollections>- Throws:
FrameworkException
-
unassign
public boolean unassign(ProductVO productVO, UserLocatorVO locator)
Description copied from interface:BaseProductsOwnerServiceUnassigns the given product from the owner- Specified by:
unassignin interfaceBaseProductsOwnerService<UserLocatorVO,UserProductsCollections>
-
resolveEntityCheck
protected 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
-
-