org.outerj.daisy.repository.schema
Interface RepositorySchema


public interface RepositorySchema

Allows querying and manipulation of the Repository Schema.

The Repository Schema defines the types of documents that can be stored in the repository. See DocumentType for more information about what constitutes a Document Type.

The various get methods all take a parameter "updateable". If true, the returned object can be modified and saved, and is caller-specific. If false, the returned object is not updateable (thus immutable), and the same object instance can be returned to different callers (i.e. it is threadsafe). The returned objects can in that case be retrieved from a cache, allowing very fast access to the schema information. So in general, if you don't need to modify the schema information, supply false for the updateable parameter.


Method Summary
 void addListener(RepositorySchemaListener listener)
           
 DocumentType createDocumentType(java.lang.String name)
          Creates a new document type with the given name.
 FieldType createFieldType(java.lang.String name, ValueType valueType)
           
 FieldType createFieldType(java.lang.String name, ValueType valueType, boolean multiValue)
           
 DocumentType createNewDocumentType(java.lang.String name)
          Deprecated. Use createDocumentType instead.
 FieldType createNewFieldType(java.lang.String name, ValueType valueType)
          Deprecated. Use createFieldType instead.
 PartType createNewPartType(java.lang.String name, java.lang.String mimeTypes)
          Deprecated. Use createPartType instead.
 PartType createPartType(java.lang.String name, java.lang.String mimeTypes)
           
 void deleteDocumentType(long documentTypeId)
           
 void deleteFieldType(long fieldTypeId)
           
 void deletePartType(long partTypeId)
           
 DocumentTypes getAllDocumentTypes(boolean updateable)
           
 FieldTypes getAllFieldTypes(boolean updateable)
           
 PartTypes getAllPartTypes(boolean updateable)
           
 DocumentType getDocumentType(java.lang.String nameOrId, boolean updateable)
           
 DocumentType getDocumentTypeById(long id, boolean updateable)
           
 DocumentType getDocumentTypeByName(java.lang.String name, boolean updateable)
           
 FieldType getFieldTypeById(long id, boolean updateable)
           
 FieldType getFieldTypeByName(java.lang.String name, boolean updateable)
           
 LinkExtractorInfos getLinkExtractors()
          Returns information about the available link extractors.
 PartType getPartTypeById(long id, boolean updateable)
           
 PartType getPartTypeByName(java.lang.String name, boolean updateable)
           
 void removeListener(RepositorySchemaListener listener)
           
 

Method Detail

createNewDocumentType

DocumentType createNewDocumentType(java.lang.String name)
Deprecated. Use createDocumentType instead.


createDocumentType

DocumentType createDocumentType(java.lang.String name)
Creates a new document type with the given name. The document type is not created immediately in the repository, to do this you need to call the save() method on the returned object.


deleteDocumentType

void deleteDocumentType(long documentTypeId)
                        throws RepositoryException
Throws:
RepositoryException

createNewFieldType

FieldType createNewFieldType(java.lang.String name,
                             ValueType valueType)
Deprecated. Use createFieldType instead.


createFieldType

FieldType createFieldType(java.lang.String name,
                          ValueType valueType)

createFieldType

FieldType createFieldType(java.lang.String name,
                          ValueType valueType,
                          boolean multiValue)

deleteFieldType

void deleteFieldType(long fieldTypeId)
                     throws RepositoryException
Throws:
RepositoryException

createNewPartType

PartType createNewPartType(java.lang.String name,
                           java.lang.String mimeTypes)
Deprecated. Use createPartType instead.


createPartType

PartType createPartType(java.lang.String name,
                        java.lang.String mimeTypes)

deletePartType

void deletePartType(long partTypeId)
                    throws RepositoryException
Throws:
RepositoryException

addListener

void addListener(RepositorySchemaListener listener)

removeListener

void removeListener(RepositorySchemaListener listener)

getAllDocumentTypes

DocumentTypes getAllDocumentTypes(boolean updateable)
                                  throws RepositoryException
Throws:
RepositoryException

getAllFieldTypes

FieldTypes getAllFieldTypes(boolean updateable)
                            throws RepositoryException
Throws:
RepositoryException

getAllPartTypes

PartTypes getAllPartTypes(boolean updateable)
                          throws RepositoryException
Throws:
RepositoryException

getPartTypeById

PartType getPartTypeById(long id,
                         boolean updateable)
                         throws RepositoryException
Throws:
PartTypeNotFoundException - in case the part type does not exist.
RepositoryException

getPartTypeByName

PartType getPartTypeByName(java.lang.String name,
                           boolean updateable)
                           throws RepositoryException
Throws:
PartTypeNotFoundException - in case the part type does not exist.
RepositoryException

getFieldTypeById

FieldType getFieldTypeById(long id,
                           boolean updateable)
                           throws RepositoryException
Throws:
FieldTypeNotFoundException - in case the field type does not exist.
RepositoryException

getFieldTypeByName

FieldType getFieldTypeByName(java.lang.String name,
                             boolean updateable)
                             throws RepositoryException
Throws:
FieldTypeNotFoundException - in case the field type does not exist.
RepositoryException

getDocumentTypeById

DocumentType getDocumentTypeById(long id,
                                 boolean updateable)
                                 throws RepositoryException
Throws:
DocumentTypeNotFoundException - in case the document type does not exist.
RepositoryException

getDocumentTypeByName

DocumentType getDocumentTypeByName(java.lang.String name,
                                   boolean updateable)
                                   throws RepositoryException
Throws:
DocumentTypeNotFoundException - in case the document type does not exist.
RepositoryException

getDocumentType

DocumentType getDocumentType(java.lang.String nameOrId,
                             boolean updateable)
                             throws RepositoryException
Parameters:
nameOrId - if this starts with a digit, will do getDocumentTypeById, otherwise ByName
Throws:
RepositoryException

getLinkExtractors

LinkExtractorInfos getLinkExtractors()
                                     throws RepositoryException
Returns information about the available link extractors.

Throws:
RepositoryException


Copyright © -2012 . All Rights Reserved.