Package org.cyclos.impl.users
Interface PermissionHandler<DTO extends ProductDTO,AD extends ActiveProductsData>
-
public interface PermissionHandler<DTO extends ProductDTO,AD extends ActiveProductsData>Handles conversion of permissions between ProductDTOs and Products
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Property<?,? super DTO>getDTOProperty()MessageKeygetKey()Returns the message key associated to the DTO propertyList<Permission>getPermissions()default voidreadPermissions(Collection<Permission> permissions, AD dto)Reads the permissions collection, setting the corresponding properties on the given Product datadefault voidreadPermissions(Collection<Permission> permissions, DTO dto)Reads the permissions collection, setting the corresponding properties on the given DTOdefault voidwritePermissions(DTO dto, Collection<Permission> permissions)Adds / removes corresponding permissions to the collection, according to the DTO properties
-
-
-
Method Detail
-
getDTOProperty
Property<?,? super DTO> getDTOProperty()
- Returns:
- the property of the DTO used to grant/revoke the managed permissions
- See Also:
getPermissions()
-
getKey
MessageKey getKey()
Returns the message key associated to the DTO property
-
getPermissions
List<Permission> getPermissions()
- Returns:
- the list of permissions managed by this handler
-
readPermissions
default void readPermissions(Collection<Permission> permissions, AD dto)
Reads the permissions collection, setting the corresponding properties on the given Product data
-
readPermissions
default void readPermissions(Collection<Permission> permissions, DTO dto)
Reads the permissions collection, setting the corresponding properties on the given DTO
-
writePermissions
default void writePermissions(DTO dto, Collection<Permission> permissions)
Adds / removes corresponding permissions to the collection, according to the DTO properties
-
-