Class PermissionHandlerImpl<DTO extends ProductDTO,​AD extends ActiveProductsData>

    • Constructor Detail

      • PermissionHandlerImpl

        public PermissionHandlerImpl()
    • 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