public interface DocumentNote
DocumentNoteType that exists on a document.
It therefore contains values for some or all of the fields defined by the
DocumentNoteType. A document can have maximum one instance of a particular
note type.
DocumentNote use DocumentNoteType.createDocumentNote().
Use DocumentNoteUtilities to access the DocumentNoteTypes.
For an example of notes in use see documentation for DocumentNoteUtilities| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
Return the descirption of this note type.
|
List<DocumentNoteField> |
getFields()
Return all the fields of this note type.
|
Object |
getFieldValue(String fieldCode)
Returns the value of a particular field given the field code.
|
String |
getName()
Return the name of the note type.
|
String |
getNoteTypeCode()
Return a unique code for the note type.
|
boolean |
setFieldValue(String fieldCode,
Object value)
Set a value for a particular field.
|
String getName()
DocumentNoteType.getName()String getNoteTypeCode()
DocumentNoteType.getCode()String getDescription()
DocumentNoteType.getDescription()List<DocumentNoteField> getFields()
DocumentNoteType.getFields()boolean setFieldValue(String fieldCode, Object value)
AnnotatedPluginDocument.DocumentNotes.setNote(DocumentNote)
must be called to save the note to a document.fieldCode - of field to set valuevalue - to set or null to clear the value. Must be of correct class specified by DocumentField.getValueType()IllegalArgumentException - if value is not of the class specified by the field's type, if value is not
in the set of options for an enumerated field or if the note value contains characters that can't be serialized to XMLObject getFieldValue(String fieldCode)
fieldCode - of DocumentNoteField from getFields().DocumentNoteField.getValueType().
If this is an enumerated field (DocumentNoteField.isEnumeratedField is true) then the class of this
value will be String.class.DocumentNoteField.getCode(),
DocumentNoteField.getValueType()