Package org.nuxeo.ecm.platform.types
Interface TypeManager
-
- All Superinterfaces:
TimestampedService
- All Known Implementing Classes:
TypeService
public interface TypeManager extends TimestampedService
Service handling registered UI Types.- Author:
- Thomas Roger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canCreate(String typeName, String containerTypeName)
Returnstrue
iftypeName
is a sub type, allowed in creation mode, ofcontainerTypeName
,false
otherwise.boolean
canCreate(String typeName, String containerTypeName, DocumentModel currentDoc)
Returnstrue
iftypeName
is a sub type, allowed in creation, ofcontainerTypeName
,false
otherwise.Collection<Type>
findAllAllowedSubTypesFrom(String typeName)
Returns recursively all the allowed sub types from the giventypeName
.Collection<Type>
findAllAllowedSubTypesFrom(String typeName, DocumentModel currentDoc)
Returns recursively all the allowed sub types from the giventypeName
, filtered by a local UI types configuration retrieved from thecurrentDoc
, if any.Collection<Type>
getAllowedSubTypes(String typeName)
Collection<Type>
getAllowedSubTypes(String typeName, DocumentModel currentDoc)
Returns the allowed sub types of the giventypeName
, filtered by a local UI types configuration retrieved from thecurrentDoc
, if any.String[]
getSuperTypes(String typeName)
Gets the super type names for the given type.Type
getType(String typeName)
Returns theType
instance for the giventypeName
.Map<String,List<Type>>
getTypeMapForDocumentType(String typeName, DocumentModel currentDoc)
Returns the sub type of the giventypeName
, filtered by a local UI types configuration retrieved from thecurrentDoc
, if any, and organized by type categories.Collection<Type>
getTypes()
Returns all the registeredType
s.boolean
hasType(String typeName)
Returnstrue
iftypeName
is a registered Type,false
otherwise.boolean
isAllowedSubType(String typeName, String containerTypeName)
Returnstrue
iftypeName
is an allowed sub type ofcontainerTypeName
,false
otherwise.boolean
isAllowedSubType(String typeName, String containerTypeName, DocumentModel currentDoc)
Returnstrue
iftypeName
is an allowed sub type ofcontainerTypeName
, filtered by a local UI types configuration retrieved from thecurrentDoc
, if any,false
otherwise.-
Methods inherited from interface org.nuxeo.runtime.service.TimestampedService
getLastModified, setLastModified
-
-
-
-
Method Detail
-
getSuperTypes
String[] getSuperTypes(String typeName)
Gets the super type names for the given type.- Returns:
- an array of supertypes or an empty array if no supertype exists. null is returned if no such type exists
-
getTypes
Collection<Type> getTypes()
Returns all the registeredType
s.
-
hasType
boolean hasType(String typeName)
Returnstrue
iftypeName
is a registered Type,false
otherwise.
-
getAllowedSubTypes
Collection<Type> getAllowedSubTypes(String typeName)
-
getAllowedSubTypes
Collection<Type> getAllowedSubTypes(String typeName, DocumentModel currentDoc)
Returns the allowed sub types of the giventypeName
, filtered by a local UI types configuration retrieved from thecurrentDoc
, if any.- Since:
- 5.4.2
-
findAllAllowedSubTypesFrom
Collection<Type> findAllAllowedSubTypesFrom(String typeName)
Returns recursively all the allowed sub types from the giventypeName
.- Since:
- 5.4.2
-
findAllAllowedSubTypesFrom
Collection<Type> findAllAllowedSubTypesFrom(String typeName, DocumentModel currentDoc)
Returns recursively all the allowed sub types from the giventypeName
, filtered by a local UI types configuration retrieved from thecurrentDoc
, if any.- Since:
- 5.4.2
-
getTypeMapForDocumentType
Map<String,List<Type>> getTypeMapForDocumentType(String typeName, DocumentModel currentDoc)
Returns the sub type of the giventypeName
, filtered by a local UI types configuration retrieved from thecurrentDoc
, if any, and organized by type categories.- Since:
- 5.4.2
-
canCreate
boolean canCreate(String typeName, String containerTypeName)
Returnstrue
iftypeName
is a sub type, allowed in creation mode, ofcontainerTypeName
,false
otherwise.- Since:
- 5.4.2
-
canCreate
boolean canCreate(String typeName, String containerTypeName, DocumentModel currentDoc)
Returnstrue
iftypeName
is a sub type, allowed in creation, ofcontainerTypeName
,false
otherwise.It takes care of a local UI types configuration retrieved from the
currentDoc
to filter the sub types oftypeName
before checking the creation mode.- Since:
- 5.4.2
-
isAllowedSubType
boolean isAllowedSubType(String typeName, String containerTypeName)
Returnstrue
iftypeName
is an allowed sub type ofcontainerTypeName
,false
otherwise.- Since:
- 5.4.2
-
isAllowedSubType
boolean isAllowedSubType(String typeName, String containerTypeName, DocumentModel currentDoc)
Returnstrue
iftypeName
is an allowed sub type ofcontainerTypeName
, filtered by a local UI types configuration retrieved from thecurrentDoc
, if any,false
otherwise.- Since:
- 5.4.2
-
-