E
- public class Filecontent<E extends DataObject<E> & UniqueidentifiedInterface<E>> extends DataObjectProperty<E>
updatedfieldingui
definition, field, parentpayload
Constructor and Description |
---|
Filecontent(FilecontentDefinition<E> definition,
DataObjectPayload parentpayload)
creates a file content property for the given data object
|
Modifier and Type | Method and Description |
---|---|
void |
addattachment(E object,
Objattachment attachment,
SFile file)
adds an attachment to the object
|
void |
deleteattachment(E object,
DataObjectId<Objattachment> attachmentid)
delete the attachment for the object
|
Objattachment[] |
getattachments(E object,
QueryFilter additionalcondition) |
static java.lang.String |
niceFileSize(long bytes)
a helper method that generates a nice file size (in bytes, KB, MB)
|
void |
setDependentPropertyUniqueidentified(Uniqueidentified<E> uniqueidentified)
set dependent property unique identified
|
void |
updateattachment(E object,
Objattachment attachment,
SFile newfile)
update the object attachment content (binary file)
|
generateSimpleDataEltFromObject, getDisplayDataElt, getDynamicDataElt, getFieldBufferForGUI
getAllTriggersForRefresh, getFieldFromName, getFieldNumber, getStoredField, getTriggersForThisUpdate, initFromDB, postTreatmentAfterInitFromDB
changeName, cleanName, equals, getName
public Filecontent(FilecontentDefinition<E> definition, DataObjectPayload parentpayload)
definition
- definition of the file content propertyparentpayload
- parent object payloadpublic void setDependentPropertyUniqueidentified(Uniqueidentified<E> uniqueidentified)
uniqueidentified
- dependent property unique identifiedpublic void addattachment(E object, Objattachment attachment, SFile file)
object
- object to add attachment toattachment
- attachment objectfile
- file to store on the attachment objectpublic static java.lang.String niceFileSize(long bytes)
bytes
- the file size in bytespublic void deleteattachment(E object, DataObjectId<Objattachment> attachmentid)
object
- data objectattachmentid
- id of the attachment to deletepublic void updateattachment(E object, Objattachment attachment, SFile newfile)
object
- object to updateattachment
- attachment data objectnewfile
- new file to store on the attachment recordpublic Objattachment[] getattachments(E object, QueryFilter additionalcondition)