org.xcmis.spi
Class DelegatedTypeManager

java.lang.Object
  extended by org.xcmis.spi.DelegatedTypeManager
All Implemented Interfaces:
TypeManager
Direct Known Subclasses:
QueryNameTypeManager

public class DelegatedTypeManager
extends Object
implements TypeManager

A wrapper for TypeManager that exposes only the TypeManager methods of the TypeManager implementation.

Version:
$Id: $
Author:
Andrey Parfonov

Constructor Summary
DelegatedTypeManager(TypeManager typeManager)
           
 
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 .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatedTypeManager

public DelegatedTypeManager(TypeManager typeManager)
Method Detail

addType

public String addType(TypeDefinition type)
               throws ConstraintException,
                      StorageException
Description copied from interface: TypeManager
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.

Specified by:
addType in interface TypeManager
Parameters:
type - the type definition
Returns:
ID of added type
Throws:
ConstraintException - if any of the following conditions are met:
StorageException - if type can't be added cause to storage internal problem

getTypeDefinition

public TypeDefinition getTypeDefinition(String typeId,
                                        boolean includePropertyDefinition)
                                 throws TypeNotFoundException
Description copied from interface: TypeManager
Get type definition for type typeId .

Specified by:
getTypeDefinition in interface TypeManager
Parameters:
typeId - type Id
includePropertyDefinition - if true property definition should be included
Returns:
type definition
Throws:
TypeNotFoundException - if type typeId does not exist

getTypeChildren

public ItemsIterator<TypeDefinition> getTypeChildren(String typeId,
                                                     boolean includePropertyDefinitions)
                                              throws TypeNotFoundException
Description copied from interface: TypeManager
Iterator over object types.

Specified by:
getTypeChildren in interface TypeManager
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

public void removeType(String typeId)
                throws ConstraintException,
                       TypeNotFoundException,
                       StorageException
Description copied from interface: TypeManager
Remove type definition for type typeId .

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


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.