Package org.cyclos.impl.users
Interface ProductConversionHandler<P extends Product,DTO extends ProductDTO,AD extends ActiveProductsData>
-
- All Known Implementing Classes:
AdminProductConversionHandlerImpl,BrokerProductConversionHandlerImpl,MemberProductConversionHandlerImpl,ProductConversionHandlerImpl,UserManagementProductConversionHandlerImpl
public interface ProductConversionHandler<P extends Product,DTO extends ProductDTO,AD extends ActiveProductsData>Handles conversion between products and their dto's, handling, for example, permissions population
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfill(Collection<Permission> permissions, AD activeData)Fills the active data objectClass<AD>getActiveDataType()Returns the active data type handled by this objectStringgetAdditionalCollectionForPermission(Permission permission)Returns the additional collection mapping for the given permission, or null if noneProperty<?,?>getDtoCollectionProperty(Permission permission)Returns the DTO property which represents the related value collection for the given property, if any, or null if not applicableClass<DTO>getDTOType()Returns the product DTO type handled by this objectClass<P>getEntityType()Returns the product entity type handled by this objectList<PermissionHandlerImpl<DTO,AD>>getPermissionHandlers()Returns all registered permission handlers.Collection<Permission>getPermissionsForProperty(Property<?,?> dtoProperty)Returns the known permissions for a given DTO propertyProductNaturegetProductNature()Returns the related product natureStringgetProductPropertyForDtoProperty(Property<?,?> dtoProperty)Returns the product property which corresponds to the given DTO propertyRolegetRole()Returns the related product roleDTOtoDTO(P product)Converts the given entity into DTOPtoEntity(DTO dto)Converts the given DTO to entity
-
-
-
Method Detail
-
fill
void fill(Collection<Permission> permissions, AD activeData)
Fills the active data object
-
getAdditionalCollectionForPermission
String getAdditionalCollectionForPermission(Permission permission)
Returns the additional collection mapping for the given permission, or null if none
-
getDtoCollectionProperty
Property<?,?> getDtoCollectionProperty(Permission permission)
Returns the DTO property which represents the related value collection for the given property, if any, or null if not applicable
-
getPermissionHandlers
List<PermissionHandlerImpl<DTO,AD>> getPermissionHandlers()
Returns all registered permission handlers.
-
getPermissionsForProperty
Collection<Permission> getPermissionsForProperty(Property<?,?> dtoProperty)
Returns the known permissions for a given DTO property
-
getProductNature
ProductNature getProductNature()
Returns the related product nature
-
getProductPropertyForDtoProperty
String getProductPropertyForDtoProperty(Property<?,?> dtoProperty)
Returns the product property which corresponds to the given DTO property
-
getRole
Role getRole()
Returns the related product role
-
-