Package org.cyclos.impl.users
Class IntegerPermissionHandlerImpl<P extends Product,DTO extends ProductDTO,AD extends ActiveProductsData>
- java.lang.Object
-
- org.cyclos.impl.users.PermissionHandlerImpl<DTO,AD>
-
- org.cyclos.impl.users.BasePermissionHandlerImpl<T,T,DTO,AD>
-
- org.cyclos.impl.users.SinglePermissionHandlerImpl<T,P,DTO,AD>
-
- org.cyclos.impl.users.SingleOnePermissionPermissionHandlerImpl<Integer,P,DTO,AD>
-
- org.cyclos.impl.users.IntegerPermissionHandlerImpl<P,DTO,AD>
-
public class IntegerPermissionHandlerImpl<P extends Product,DTO extends ProductDTO,AD extends ActiveProductsData> extends SingleOnePermissionPermissionHandlerImpl<Integer,P,DTO,AD>
Handles mapping of integer permissions: the permission is granted only if the value is greater than zero.
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.users.SingleOnePermissionPermissionHandlerImpl
permission
-
Fields inherited from class org.cyclos.impl.users.BasePermissionHandlerImpl
dataProperty, dtoProperty, key
-
-
Constructor Summary
Constructors Constructor Description IntegerPermissionHandlerImpl(Permission permission, com.querydsl.core.types.dsl.NumberPath<Integer> intPath, Property<Integer,? super DTO> dtoProperty, MessageKey key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetValue(P product)voidwritePermissions(DTO dto, Collection<Permission> permissions)Adds / removes corresponding permissions to the collection, according to the DTO properties-
Methods inherited from class org.cyclos.impl.users.SingleOnePermissionPermissionHandlerImpl
getPermissions
-
Methods inherited from class org.cyclos.impl.users.BasePermissionHandlerImpl
getDTOProperty, getKey
-
Methods inherited from class org.cyclos.impl.users.PermissionHandlerImpl
readPermissions, readPermissions
-
-
-
-
Constructor Detail
-
IntegerPermissionHandlerImpl
public IntegerPermissionHandlerImpl(Permission permission, com.querydsl.core.types.dsl.NumberPath<Integer> intPath, Property<Integer,? super DTO> dtoProperty, MessageKey key)
-
-
Method Detail
-
getValue
public Integer getValue(P product)
- Specified by:
getValuein classSinglePermissionHandlerImpl<Integer,P extends Product,DTO extends ProductDTO,AD extends ActiveProductsData>
-
writePermissions
public void writePermissions(DTO dto, Collection<Permission> permissions)
Description copied from class:PermissionHandlerImplAdds / removes corresponding permissions to the collection, according to the DTO properties- Overrides:
writePermissionsin classPermissionHandlerImpl<DTO extends ProductDTO,AD extends ActiveProductsData>
-
-