Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.types.ejb
Class TypeManagerBean

java.lang.Object
  extended by org.nuxeo.ecm.platform.types.ejb.TypeManagerBean
All Implemented Interfaces:
TypeManagerLocal, TypeManager

public class TypeManagerBean
extends Object
implements TypeManagerLocal


Constructor Summary
TypeManagerBean()
           
 
Method Summary
 boolean canCreate(String typeName, String containerTypeName)
          Returns true if typeName is a sub type, allowed in creation mode, of containerTypeName, false otherwise.
 boolean canCreate(String typeName, String containerTypeName, DocumentModel currentDoc)
          Returns true if typeName is a sub type, allowed in creation, of containerTypeName, false otherwise.
 Collection<Type> findAllAllowedSubTypesFrom(String typeName)
          Returns recursively all the allowed sub types from the given typeName.
 Collection<Type> findAllAllowedSubTypesFrom(String typeName, DocumentModel currentDoc)
          Returns recursively all the allowed sub types from the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any.
 Collection<Type> getAllowedSubTypes(String typeName)
           
 Collection<Type> getAllowedSubTypes(String typeName, DocumentModel currentDoc)
          Returns the allowed sub types of the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any.
 String[] getSuperTypes(String typeName)
          Gets the super type names for the given type.
 Type getType(String typeName)
          Returns the Type instance for the given typeName.
 Map<String,List<Type>> getTypeMapForDocumentType(String type, DocumentModel currentDoc)
          Returns the sub type of the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any, and organized by type categories.
 Collection<Type> getTypes()
          Returns all the registered Types.
 boolean hasType(String typeName)
          Returns true if typeName is a registered Type, false otherwise.
 void initialize()
           
 boolean isAllowedSubType(String typeName, String containerTypeName)
          Returns true if typeName is an allowed sub type of containerTypeName, false otherwise.
 boolean isAllowedSubType(String typeName, String containerTypeName, DocumentModel currentDoc)
          Returns true if typeName is an allowed sub type of containerTypeName, filtered by a local UI types configuration retrieved from the currentDoc, if any, false otherwise.
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeManagerBean

public TypeManagerBean()
Method Detail

initialize

@PostConstruct
public void initialize()
Specified by:
initialize in interface TypeManagerLocal

getSuperTypes

public String[] getSuperTypes(String typeName)
Description copied from interface: TypeManager
Gets the super type names for the given type.

Specified by:
getSuperTypes in interface TypeManager
Returns:
an array of supertypes or an empty array if no supertype exists. null is returned if no such type exists

getType

public Type getType(String typeName)
Description copied from interface: TypeManager
Returns the Type instance for the given typeName.

Specified by:
getType in interface TypeManager

hasType

public boolean hasType(String typeName)
Description copied from interface: TypeManager
Returns true if typeName is a registered Type, false otherwise.

Specified by:
hasType in interface TypeManager

getTypes

public Collection<Type> getTypes()
Description copied from interface: TypeManager
Returns all the registered Types.

Specified by:
getTypes in interface TypeManager

getAllowedSubTypes

public Collection<Type> getAllowedSubTypes(String typeName)
Specified by:
getAllowedSubTypes in interface TypeManager

getAllowedSubTypes

public Collection<Type> getAllowedSubTypes(String typeName,
                                           DocumentModel currentDoc)
Description copied from interface: TypeManager
Returns the allowed sub types of the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any.

Specified by:
getAllowedSubTypes in interface TypeManager

findAllAllowedSubTypesFrom

public Collection<Type> findAllAllowedSubTypesFrom(String typeName)
Description copied from interface: TypeManager
Returns recursively all the allowed sub types from the given typeName.

Specified by:
findAllAllowedSubTypesFrom in interface TypeManager

findAllAllowedSubTypesFrom

public Collection<Type> findAllAllowedSubTypesFrom(String typeName,
                                                   DocumentModel currentDoc)
Description copied from interface: TypeManager
Returns recursively all the allowed sub types from the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any.

Specified by:
findAllAllowedSubTypesFrom in interface TypeManager

getTypeMapForDocumentType

public Map<String,List<Type>> getTypeMapForDocumentType(String type,
                                                        DocumentModel currentDoc)
Description copied from interface: TypeManager
Returns the sub type of the given typeName, filtered by a local UI types configuration retrieved from the currentDoc, if any, and organized by type categories.

Specified by:
getTypeMapForDocumentType in interface TypeManager

canCreate

public boolean canCreate(String typeName,
                         String containerTypeName)
Description copied from interface: TypeManager
Returns true if typeName is a sub type, allowed in creation mode, of containerTypeName, false otherwise.

Specified by:
canCreate in interface TypeManager

canCreate

public boolean canCreate(String typeName,
                         String containerTypeName,
                         DocumentModel currentDoc)
Description copied from interface: TypeManager
Returns true if typeName is a sub type, allowed in creation, of containerTypeName, false otherwise.

It takes care of a local UI types configuration retrieved from the currentDoc to filter the sub types of typeName before checking the creation mode.

Specified by:
canCreate in interface TypeManager

isAllowedSubType

public boolean isAllowedSubType(String typeName,
                                String containerTypeName)
Description copied from interface: TypeManager
Returns true if typeName is an allowed sub type of containerTypeName, false otherwise.

Specified by:
isAllowedSubType in interface TypeManager

isAllowedSubType

public boolean isAllowedSubType(String typeName,
                                String containerTypeName,
                                DocumentModel currentDoc)
Description copied from interface: TypeManager
Returns true if typeName is an allowed sub type of containerTypeName, filtered by a local UI types configuration retrieved from the currentDoc, if any, false otherwise.

Specified by:
isAllowedSubType in interface TypeManager

remove

public void remove()
Specified by:
remove in interface TypeManagerLocal

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.