public class AttachmentPropertyAccessor extends ObjectPropertyAccessor<Attachment,AttachmentProperty>
Constructor and Description |
---|
AttachmentPropertyAccessor(EventDispatcher eventDispatcher) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertReadAccess(Attachment attachment)
Asserts valid read access for the given object.
|
protected void |
assertWriteAccess(Attachment attachment)
Method to assert, that the current user has write access to the given object.
|
protected Long |
getObjectId(Attachment attachment) |
PropertyType |
getPropertyType() |
protected AttachmentProperty |
handleCreateNewProperty(Attachment attachment)
Create a new property and associate it with the object
|
protected Attachment |
load(Long id) |
handleGetObjectPropertyUnfiltered, handleRemoveObjectProperty
getAllObjectProperties, handleGetAllObjectProperties, setObjectProperties, setPropertyValue
addToFilterDefinition, assertLoadObject, assertValidForCreateAndUpdate, getFilterDefintion, getGlobalObjectProperty, getObjectProperty, getObjectPropertyUnfiltered, handleSetObjectProperty, handleSetObjectPropertyUnfiltered, removeFromFilterDefinition, removeObjectProperty, setGlobalObjectProperty, setObjectProperty, setObjectPropertyUnfiltered
public AttachmentPropertyAccessor(EventDispatcher eventDispatcher)
protected void assertReadAccess(Attachment attachment) throws AuthorizationException, AttachmentNotFoundException
PropertyAccessor
assertReadAccess
in class PropertyAccessor<Attachment,AttachmentProperty,String>
attachment
- The object.AuthorizationException
- Thrown, when the read access to the object was denied.AttachmentNotFoundException
protected void assertWriteAccess(Attachment attachment) throws AuthorizationException, AttachmentNotFoundException
PropertyAccessor
assertWriteAccess
in class PropertyAccessor<Attachment,AttachmentProperty,String>
attachment
- The object to assert write access for.AuthorizationException
- Thrown, when the current user is not allowed to write to the given object.AttachmentNotFoundException
protected Long getObjectId(Attachment attachment)
getObjectId
in class PropertyAccessor<Attachment,AttachmentProperty,String>
attachment
- the object the property is / will be assigned topublic PropertyType getPropertyType()
getPropertyType
in class PropertyAccessor<Attachment,AttachmentProperty,String>
protected AttachmentProperty handleCreateNewProperty(Attachment attachment)
PropertyAccessor
handleCreateNewProperty
in class PropertyAccessor<Attachment,AttachmentProperty,String>
attachment
- the object to add a new property toprotected Attachment load(Long id)
load
in class PropertyAccessor<Attachment,AttachmentProperty,String>
id
- the id of the objectCopyright © 2019 Communote team. All rights reserved.