Package org.cyclos.impl.users
Interface ProductsHandler
-
- All Known Implementing Classes:
ProductsHandlerImpl
public interface ProductsHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ProductsAccessorgetAccessibleGroupsAccessor()Returns a products accessor for products on any of the current user's accessible groupsProductsAccessorgetAccessor(Collection<? extends BasicGroup> groups)Returns a products accessor for products on any of the given groupsProductsAccessorgetAccessor(BasicGroup group)Returns a products accessor for the given groupProductsAccessorgetAccessor(BasicUser user)Returns a product accessor for a given user.ProductsAccessorgetAccessor(BasicUser user, Channel channel, PrincipalType principalType)Returns a product accessor for a user in a specific channel and using a specific principal typeProductsAccessorgetAccessor(BasicUser user, Network network)Returns a product accessor for a user on the given network.ProductsAccessorgetAccessor(User user)Returns a product accessor for a given user.ProductsAccessorgetAccessorFor(Collection<? extends Product> products)Returns a products accessor for the given productsProductsAccessorgetAccessorFor(Collection<Product> products, Channel channel, PrincipalType principalType)Returns a products accessor for the given products filtering the products list by the specified channel and principal type.<PR extends PropertyResolver<?>>
PRgetPropertyResolver(Class<PR> type)Returns a property resolver by type<R extends Bean,K>
List<R>toList(Collection<K> allKeys, BooleanPropertiesHolder<K> booleanProperties, Class<R> resultType, Property<?,R> keyProperty)Converts a map of some type toBooleanPropertiesinto a list of objects, for each entry, usesBooleanProperties.instantiate(Class)to instantiate a bean and fills the key as a property in the resulting beans
-
-
-
Method Detail
-
getAccessibleGroupsAccessor
ProductsAccessor getAccessibleGroupsAccessor()
Returns a products accessor for products on any of the current user's accessible groups
-
getAccessor
ProductsAccessor getAccessor(BasicGroup group)
Returns a products accessor for the given group
-
getAccessor
ProductsAccessor getAccessor(BasicUser user)
Returns a product accessor for a given user. When logged-in exactly as thatBasicUser, returnsSessionData.getProducts()to avoid creating a new accessor.
-
getAccessor
ProductsAccessor getAccessor(BasicUser user, Channel channel, PrincipalType principalType)
Returns a product accessor for a user in a specific channel and using a specific principal type
-
getAccessor
ProductsAccessor getAccessor(BasicUser user, Network network)
Returns a product accessor for a user on the given network. Maybe a global administrator switched to a network or a user of the same network
-
getAccessor
ProductsAccessor getAccessor(Collection<? extends BasicGroup> groups)
Returns a products accessor for products on any of the given groups
-
getAccessor
ProductsAccessor getAccessor(User user)
Returns a product accessor for a given user. When logged-in as thatUseror operators of the given user, returnsSessionData.getProducts()to avoid creating a new accessor.
-
getAccessorFor
ProductsAccessor getAccessorFor(Collection<? extends Product> products)
Returns a products accessor for the given products
-
getAccessorFor
ProductsAccessor getAccessorFor(Collection<Product> products, Channel channel, PrincipalType principalType)
Returns a products accessor for the given products filtering the products list by the specified channel and principal type.
-
getPropertyResolver
<PR extends PropertyResolver<?>> PR getPropertyResolver(Class<PR> type)
Returns a property resolver by type
-
toList
<R extends Bean,K> List<R> toList(Collection<K> allKeys, BooleanPropertiesHolder<K> booleanProperties, Class<R> resultType, Property<?,R> keyProperty)
Converts a map of some type toBooleanPropertiesinto a list of objects, for each entry, usesBooleanProperties.instantiate(Class)to instantiate a bean and fills the key as a property in the resulting beans
-
-