Package org.cyclos.impl.users
Class PermissionHandlerImpl<DTO extends ProductDTO,AD extends ActiveProductsData>
- java.lang.Object
-
- org.cyclos.impl.users.PermissionHandlerImpl<DTO,AD>
-
- Direct Known Subclasses:
BasePermissionHandlerImpl
public abstract class PermissionHandlerImpl<DTO extends ProductDTO,AD extends ActiveProductsData> extends Object
Handles conversion of permissions between ProductDTOs and Products
-
-
Constructor Summary
Constructors Constructor Description PermissionHandlerImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Property<?,? super DTO>getDTOProperty()abstract MessageKeygetKey()Returns the message key associated to the DTO propertyabstract List<Permission>getPermissions()voidreadPermissions(Collection<Permission> permissions, AD dto)Reads the permissions collection, setting the corresponding properties on the given Product datavoidreadPermissions(Collection<Permission> permissions, DTO dto)Reads the permissions collection, setting the corresponding properties on the given DTOvoidwritePermissions(DTO dto, Collection<Permission> permissions)Adds / removes corresponding permissions to the collection, according to the DTO properties
-
-
-
Method Detail
-
getDTOProperty
public abstract Property<?,? super DTO> getDTOProperty()
- Returns:
- the property of the DTO used to grant/revoke the managed permissions
- See Also:
getPermissions()
-
getKey
public abstract MessageKey getKey()
Returns the message key associated to the DTO property
-
getPermissions
public abstract List<Permission> getPermissions()
- Returns:
- the list of permissions managed by this handler
-
readPermissions
public void readPermissions(Collection<Permission> permissions, AD dto)
Reads the permissions collection, setting the corresponding properties on the given Product data
-
readPermissions
public void readPermissions(Collection<Permission> permissions, DTO dto)
Reads the permissions collection, setting the corresponding properties on the given DTO
-
writePermissions
public void writePermissions(DTO dto, Collection<Permission> permissions)
Adds / removes corresponding permissions to the collection, according to the DTO properties
-
-