org.xcmis.spi
Interface TypeManager

All Known Subinterfaces:
Storage
All Known Implementing Classes:
BasicStorage, BasicTypeManager

public interface TypeManager

Produces type definition.

Version:
$Id: TypeManager.java 316 2010-03-09 15:20:28Z andrew00x $
Author:
Andrey Parfonov

Method Summary
 String addType(TypeDefinition type)
          Add new type in repository.
 ItemsIterator<TypeDefinition> getTypeChildren(String typeId, boolean includePropertyDefinitions)
          Iterator over object types.
 TypeDefinition getTypeDefinition(String typeId, boolean includePropertyDefinition)
          Get type definition for type typeId .
 void removeType(String typeId)
          Remove type definition for type typeId .
 

Method Detail

addType

String addType(TypeDefinition type)
               throws ConstraintException,
                      StorageException
Add new type in repository. 2.1.3 Object-Type A repository MAY define additional object-types beyond the CMIS Base Object-Types Implementation Compatibility: MAY be implemented.

Parameters:
type - the type definition
Returns:
ID of added type
Throws:
StorageException - if type can't be added cause to storage internal problem
ConstraintException - if any of the following conditions are met:
NotSupportedException - if storage does not support adding new types

getTypeDefinition

TypeDefinition getTypeDefinition(String typeId,
                                 boolean includePropertyDefinition)
                                 throws TypeNotFoundException
Get type definition for type typeId .

Parameters:
typeId - type Id
includePropertyDefinition - if true property definition should be included
Returns:
type definition
Throws:
TypeNotFoundException - if type typeId does not exist

getTypeChildren

ItemsIterator<TypeDefinition> getTypeChildren(String typeId,
                                              boolean includePropertyDefinitions)
                                              throws TypeNotFoundException
Iterator over object types.

Parameters:
typeId - the type id, if not null then return only specified Object Type and its direct descendant. If null then return base types
includePropertyDefinitions - true if property definition should be included false otherwise
Returns:
set of base types or specified object type and its direct children
Throws:
TypeNotFoundException - if type typeId does not exist

removeType

void removeType(String typeId)
                throws ConstraintException,
                       TypeNotFoundException,
                       StorageException
Remove type definition for type typeId .

Parameters:
typeId - type Id
Throws:
TypeNotFoundException - if type typeId not found in repository
StorageException - if type can't be added cause to storage internal problem
ConstraintException - if removing type violates a storage constraint. For example, if storage already contains object of this type


Copyright © 2010 eXo Platform SAS. All Rights Reserved.