Clearspace API (1.7.0) Core Javadocs

com.jivesoftware.community
Interface DocumentFieldManager

All Superinterfaces:
JiveManager

public interface DocumentFieldManager
extends JiveManager

Manages the creation and deletion of document fields in Clearspace.

See Also:
DocumentField

Method Summary
 DocumentField createDocumentField(java.lang.String name, java.lang.String displayName, java.lang.String description, DocumentFieldType documentFieldType)
          Creates a new document field.
 void deleteDocumentField(DocumentField field)
          Deletes a document field.
 DocumentField getDocumentField(long id)
          Returns the document field with the given id.
 DocumentField getDocumentField(java.lang.String name)
          Returns the document field with the given name.
 java.util.Collection<DocumentField> getDocumentFields()
          Returns an collection of DocumentField objects that list all the current document fields.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy, initialize
 

Method Detail

getDocumentFields

java.util.Collection<DocumentField> getDocumentFields()
Returns an collection of DocumentField objects that list all the current document fields.

Returns:
an collection of all the document fields.

getDocumentField

DocumentField getDocumentField(long id)
                               throws DocumentObjectNotFoundException
Returns the document field with the given id.

Parameters:
id - the id of the document field.
Returns:
a DocumentField object.
Throws:
DocumentObjectNotFoundException - if the field with the specified ID cannot be found.

getDocumentField

DocumentField getDocumentField(java.lang.String name)
                               throws DocumentObjectNotFoundException
Returns the document field with the given name.

Parameters:
name - the name of the document field.
Returns:
a DocumentField object.
Throws:
DocumentObjectNotFoundException - if the field with the specified name cannot be found

createDocumentField

DocumentField createDocumentField(java.lang.String name,
                                  java.lang.String displayName,
                                  java.lang.String description,
                                  DocumentFieldType documentFieldType)
                                  throws UnauthorizedException,
                                         NotUniqueException
Creates a new document field.

Parameters:
name - the unique name of the document field.
displayName - the unique display name of the field.
description - the description of the document field.
documentFieldType - the type of the document field.
Returns:
a new document field
Throws:
UnauthorizedException - if not an administrator.
NotUniqueException - if the name or display name is not unique.

deleteDocumentField

void deleteDocumentField(DocumentField field)
                         throws UnauthorizedException
Deletes a document field. Note that deleting a document field will delete all references to it in all documents and document types. It may be a better choice to just remove the field from all document types and leave it in the system so as to not change documents unnessarily.

Parameters:
field - the DocumentField to delete.
Throws:
UnauthorizedException - if not an administrator.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.