|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DocumentType
The DocumentType interface provides structure to Documents by defining the fields
that make up a document and the creators and presenters to use to create and display it.
Because is possible that one might want to additional information with each document type each document type can have an arbitrary number of properties. For example, a property "customLayoutType" could be stored with each document type for use by a custom skin implementation to customize the UI for each document type.
Security for DocumentType objects is provided by DocumentTypeProxy protection proxy objects.
| Method Summary | |
|---|---|
DocumentTypeElement |
addBuiltInElement(DocumentTypeElement.Type type)
Used to create and add a new built-in type element to this DocumentTypeSectionElement. |
void |
addDocumentFieldElement(DocumentField documentField)
Adds a DocumentField to this DocumentTypeSectionElement as an element. |
DocumentTypeSectionElement |
addDocumentTypeSectionElement()
Creates and adds a DocumentTypeSectionElement. |
DocumentTypeLabelElement |
addLabelElement(String value)
Used to create and add a new Label Element to this DocumentTypeSectionElement |
boolean |
containsElement(DocumentTypeElement element)
A convenience method for checking whether the document type contains the specified field |
DocumentPresenter |
createPresenter(String name)
Creates a DocumentPresenter and adds it to this DocumentType. |
void |
deleteDocumentElement(DocumentTypeElement element)
Removes the specified DocumentTypeElement from this DocumentType |
void |
deleteDocumentPresenter()
Deletes the document presenter associated with the given name within the document type. |
AttachmentManager |
getAttachmentManager()
Returns an attachment manager that can be used to manage attachment settings for the document type. |
BinaryBodyManager |
getBinaryBodyManager()
Returns a binary body manager that can be used to manage binary document body settings. |
String |
getDescription()
Retrieve the description of the document type. |
List<DocumentTypeElement> |
getDocumentElements()
Returns the elements that make up this document type as a list of DocumentTypeElements. |
List<DocumentTypeElement> |
getDocumentElements(DocumentTypeElement.Type type)
Returns the elements that make up this document type and match the given type. |
DocumentPresenter |
getDocumentPresenter()
Returns a document presenter with the specified name, or null if no presenter is defined with the specified name. |
String |
getName()
Returns the name of the document type. |
Map<String,String> |
getProperties()
Retrieve a map of all the extended properties for the document type. |
DocumentTypeValidator |
getValidator()
Returns the validator for the document type. |
void |
save()
Persists changes to this DocumentType to the database |
void |
setDescription(String description)
Set the description of the document type. |
void |
setDocumentElementIndex(DocumentTypeElement element,
int index)
Sets the index where the specified DocumentTypeElement should appear |
void |
setDocumentPresenter(DocumentPresenter presenter)
Sets the document presenter associated with the given name within the document type. |
void |
setName(String name)
Set the name of the document type |
void |
setValidator(DocumentTypeValidator validator)
Sets the validator for the document type. |
| Methods inherited from interface com.jivesoftware.community.JiveObject |
|---|
getID, getObjectType |
| Method Detail |
|---|
String getName()
void setName(String name)
throws UnauthorizedException
name - the name of this document type
UnauthorizedException - if not an administratorString getDescription()
void setDescription(String description)
throws UnauthorizedException
description - the description associated with the document type.
UnauthorizedException - if not an administrator.boolean containsElement(DocumentTypeElement element)
element - the element to check
DocumentPresenter getDocumentPresenter()
As part of the default skin implementation there are 2 'magic' presenter names that if specified will override the autogenerated output, those being 'default' and 'print'.
void setDocumentPresenter(DocumentPresenter presenter)
throws UnauthorizedException
As part of the default skin implementation there are 2 'magic' presenter names that if specified will override the autogenerated output, those being 'default' and 'print'.
presenter - the document presenter
UnauthorizedException - if not an administrator.
void deleteDocumentPresenter()
throws UnauthorizedException
UnauthorizedException - if not an administrator.DocumentTypeValidator getValidator()
void setValidator(DocumentTypeValidator validator)
throws UnauthorizedException
validator - the validator for the document type.
UnauthorizedException - if not an administrator.AttachmentManager getAttachmentManager()
AttachmentManagerBinaryBodyManager getBinaryBodyManager()
BinaryBodyManagerMap<String,String> getProperties()
void save()
throws UnauthorizedException
UnauthorizedException - if not an administratorDocumentPresenter createPresenter(String name)
name - name of the presenter
List<DocumentTypeElement> getDocumentElements()
DocumentTypeElements.
DocumentTypeElements.List<DocumentTypeElement> getDocumentElements(DocumentTypeElement.Type type)
getDocumentElements().
The list contains DocumentTypeElements.
type - the type of element to match against.
void setDocumentElementIndex(DocumentTypeElement element,
int index)
throws UnauthorizedException
element - DocumentTypeElement Element in the DocumentType to moveindex - index index to move the element too
UnauthorizedException - If the user is not an administrator
IllegalArgumentException - if the element is not part of this DocumentType
void deleteDocumentElement(DocumentTypeElement element)
throws UnauthorizedException
element - the DocumentTypeElement to remove
UnauthorizedException - if the user is not an Administrator
IllegalArgumentException - if the specified element does not belong to this document typeDocumentTypeLabelElement addLabelElement(String value)
value - string value for the label element
DocumentTypeElement addBuiltInElement(DocumentTypeElement.Type type)
type - built-in type (type.isBuiltIn() must return true)
void addDocumentFieldElement(DocumentField documentField)
documentField - the document field to addDocumentTypeSectionElement addDocumentTypeSectionElement()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||