Jive API (3.0.13) Core Javadocs

com.jivesoftware.community
Interface DocumentTypeManager

All Superinterfaces:
JiveManager

public interface DocumentTypeManager
extends JiveManager

Handles the creation, deletion, and access of DocumentTypes. By default, only one type exists which represents a simple document with just a title, body, attachments and language fields. It is accessed with getDefaultDocumentType(), which is the only method of interest for users of the api who are not defining their own types.

See Also:
DocumentType

Method Summary
 DocumentType createDocumentType(String name, String description)
          Create a new document type with the specified attributes.
 void deleteDocumentType(DocumentType documentType)
          Deletes the specified document type from the system.
 DocumentType getDefaultDocumentType()
          Returns the default document type in the system, which includes the fields title, body, attachments, and language.
 DocumentType getDocumentType(long typeID)
          Retrieve the document type with the specified id.
 List<DocumentType> getDocumentTypes()
          Returns a list of DocumentType objects that list all the current document types.
 void setDocumentTypeIndex(DocumentType documentType, int newIndex)
          Sets the index of the document type.
 
Methods inherited from interface com.jivesoftware.community.JiveManager
destroy
 

Method Detail

getDocumentTypes

List<DocumentType> getDocumentTypes()
Returns a list of DocumentType objects that list all the current document types. The returned list will be sorted according to the document type index.

Returns:
a list of all the document types.

getDefaultDocumentType

DocumentType getDefaultDocumentType()
Returns the default document type in the system, which includes the fields title, body, attachments, and language. It is always present and cannot be deleted. This is the document type used for wiki functionality.

Returns:
the default document type in the system.

getDocumentType

DocumentType getDocumentType(long typeID)
                             throws DocumentObjectNotFoundException
Retrieve the document type with the specified id.

Parameters:
typeID - the id of the document to return.
Returns:
the DocumentType corresponding to the typeID.
Throws:
DocumentObjectNotFoundException - if no document type exists for the specified typeID.

setDocumentTypeIndex

void setDocumentTypeIndex(DocumentType documentType,
                          int newIndex)
                          throws UnauthorizedException
Sets the index of the document type. The index value can be used to display documents in a community in an arbitrary order. Index values are from 0 to getDocumentTypeCount() - 1.

Parameters:
documentType - the document type to adjust the index of.
newIndex - the new index value for the document type.
Throws:
UnauthorizedException - if not an administrator

createDocumentType

DocumentType createDocumentType(String name,
                                String description)
                                throws UnauthorizedException
Create a new document type with the specified attributes.

Parameters:
name - the name of the new document type
description - the description of the new document type.
Returns:
a new DocumentType object.
Throws:
UnauthorizedException - if not a system administrator.

deleteDocumentType

void deleteDocumentType(DocumentType documentType)
                        throws UnauthorizedException
Deletes the specified document type from the system. Documents that have the document type as their document type will be versioned as deleted.

Parameters:
documentType - the document type to delete.
Throws:
UnauthorizedException - if not a system administrator.

Jive Product Page

Copyright © 1999-2007 Jive Software.