Package org.cyclos.impl.users
Interface ProductServiceLocal
-
- All Superinterfaces:
CRUDService<ProductDTO,ProductData,ProductNature>,CRUDServiceLocal<Product,ProductDTO,ProductData,ProductNature>,ProductService,Service
- All Known Implementing Classes:
ProductServiceImpl
public interface ProductServiceLocal extends ProductService, CRUDServiceLocal<Product,ProductDTO,ProductData,ProductNature>
Local interface for product service
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanViewProducts()Returns true if the logged user can view productsAdminProductcreateAdminProduct(AdminGroup group)Creates an administrator product which will be default for the given (still transient) adminitrator groupvoidcreateRelationship(Product product, Property<?,?> dtoProperty, SimpleEntity entity)Make sure the given value is related to the given product via a DTO property.<DTO extends ProductDTO>
ProductConversionHandler<?,DTO,?>getProductConverter(DTO dto)Returns the associated conversion handler for the given dto.<P extends Product,DTO extends ProductDTO,AD extends ActiveProductsData>
ProductConversionHandler<P,DTO,AD>getProductConverter(P product)Returns the associated conversion handler for the given product.List<MemberProduct>listByAccount(UserAccountType accountType)Returns the products which define the given account typeList<Product>listByRoles(Collection<Role> roles)Lists products by rolesList<Product>listEntities()Returns a list of product entities.UserProductsQueryResultpermissionQuery(Permission... permissions)Returns an object that can apply to a query of users that have one of the given permissionsUserProductsQueryResultproductQuery(Collection<? extends Product> products)Returns an object that can apply to a query of users that have one of the given productsvoidremoveAllRelationships(Property<?,?> dtoProperty, SimpleEntity entity)For each product related to the given value via DTO path, remove the value from the collection, and, if the collection is empty, remove the corresponding permissionActiveProductsDatatoActiveProduct(ProductsAccessor accessor)Converts the given products accessor into anActiveProductsDatavoidupdateProductPasswordActions(PasswordType passwordType)Creates password actions for global admin products when a new password type is created-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, newEntity, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
Methods inherited from interface org.cyclos.services.users.ProductService
getSearchData, search
-
-
-
-
Method Detail
-
canViewProducts
boolean canViewProducts()
Returns true if the logged user can view products
-
createAdminProduct
AdminProduct createAdminProduct(AdminGroup group)
Creates an administrator product which will be default for the given (still transient) adminitrator group
-
createRelationship
void createRelationship(Product product, Property<?,?> dtoProperty, SimpleEntity entity)
Make sure the given value is related to the given product via a DTO property. Also makes sure the corresponding permission is set
-
getProductConverter
<DTO extends ProductDTO> ProductConversionHandler<?,DTO,?> getProductConverter(DTO dto)
Returns the associated conversion handler for the given dto.
-
getProductConverter
<P extends Product,DTO extends ProductDTO,AD extends ActiveProductsData> ProductConversionHandler<P,DTO,AD> getProductConverter(P product)
Returns the associated conversion handler for the given product.
-
listByAccount
List<MemberProduct> listByAccount(UserAccountType accountType)
Returns the products which define the given account type
-
listByRoles
List<Product> listByRoles(Collection<Role> roles)
Lists products by roles
-
permissionQuery
UserProductsQueryResult permissionQuery(Permission... permissions)
Returns an object that can apply to a query of users that have one of the given permissions
-
productQuery
UserProductsQueryResult productQuery(Collection<? extends Product> products)
Returns an object that can apply to a query of users that have one of the given products
-
removeAllRelationships
void removeAllRelationships(Property<?,?> dtoProperty, SimpleEntity entity)
For each product related to the given value via DTO path, remove the value from the collection, and, if the collection is empty, remove the corresponding permission
-
toActiveProduct
ActiveProductsData toActiveProduct(ProductsAccessor accessor)
Converts the given products accessor into anActiveProductsData
-
updateProductPasswordActions
void updateProductPasswordActions(PasswordType passwordType)
Creates password actions for global admin products when a new password type is created
-
-