Package org.nuxeo.ecm.core.schema
Interface DocumentType
- All Superinterfaces:
ComplexType
,CompositeType
,Serializable
,Type
- All Known Implementing Classes:
DocumentTypeImpl
Document types are composite types made of several schemas.
Sample document types are Workspace, Section, Domain,... The list of builtin document type is visible at NXCore/OSGI-INF/CoreExtensions.xml.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the list of types that can effectively be created inside this type.Gets all the facets of this document type.Returns the types of the children that cannot be created inside this type.Gets the prefetch info, or null if no prefetch is defined.Returns the types of the children that can be created inside this type.boolean
hasAllowedSubtype
(String subtype) Returnstrue
if the givensubtype
type can effectively be created inside this type.boolean
Returnstrue
if this document type has the givenfacetName
facet,false otherwise
.boolean
hasForbiddenSubtype
(String subtype) Returnstrue
if the givensubtype
type was forbidden from being created inside this type.boolean
hasSubtype
(String subtype) Returnstrue
if the givensubtype
type was explicitly allowed to be created inside this type.boolean
isFile()
Tests whether this type describes a document (not a folder!)boolean
isFolder()
Tests whether this type describes a folder or not.boolean
Tests whether this type describe an ordered folder or not.void
setForbiddenSubtypes
(Collection<String> subtypes) Sets the types of the children that cannot be created inside the this type.void
setSubtypes
(Collection<String> subtypes) Sets the types of the children that can be created inside the this type.Methods inherited from interface org.nuxeo.ecm.core.schema.types.ComplexType
addField, getField, getField, getFields, getFieldsCount, getNamespace, hasField, hasFields
Methods inherited from interface org.nuxeo.ecm.core.schema.types.CompositeType
getSchema, getSchemaNames, getSchemas, hasSchema, hasSchemas
Methods inherited from interface org.nuxeo.ecm.core.schema.types.Type
convert, decode, encode, getConstraints, getName, getObjectResolver, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isComplexType, isCompositeType, isListType, isSimpleType, isSuperTypeOf, newInstance, validate
-
Method Details
-
getPrefetchInfo
PrefetchInfo getPrefetchInfo()Gets the prefetch info, or null if no prefetch is defined.If the prefetch info is not null, the caller should use it when instantiating a document to preload the fields defined by the prefetch info.
If no prefetch is specified by the document type, the caller is free to use a default prefetch info or no prefetch at all.
- Returns:
- the prefetch info or null
-
isFile
boolean isFile()Tests whether this type describes a document (not a folder!) or not.- Returns:
- true if the type describes a document folder, otherwise returns false
-
isFolder
boolean isFolder()Tests whether this type describes a folder or not.- Returns:
- true if the type describes a folder, otherwise returns false
-
isOrdered
boolean isOrdered()Tests whether this type describe an ordered folder or not.- Returns:
- true if the type describes an ordered folder, otherwise returns false
-
getFacets
Gets all the facets of this document type.Facets inherited from parents are taken into account.
- Returns:
- the facets
-
hasFacet
Returnstrue
if this document type has the givenfacetName
facet,false otherwise
.- Since:
- 5.7
-
getSubtypes
Returns the types of the children that can be created inside this type.- Since:
- 8.4
-
setSubtypes
Sets the types of the children that can be created inside the this type.- Since:
- 8.4
-
hasSubtype
Returnstrue
if the givensubtype
type was explicitly allowed to be created inside this type.- Since:
- 8.4
-
getForbiddenSubtypes
Returns the types of the children that cannot be created inside this type.- Since:
- 8.4
-
setForbiddenSubtypes
Sets the types of the children that cannot be created inside the this type.- Since:
- 8.4
-
hasForbiddenSubtype
Returnstrue
if the givensubtype
type was forbidden from being created inside this type.- Since:
- 8.4
-
getAllowedSubtypes
Returns the list of types that can effectively be created inside this type. Allowed types results from the exclusion of the forbidden subtypes from the subtypes.- Since:
- 8.4
-
hasAllowedSubtype
Returnstrue
if the givensubtype
type can effectively be created inside this type.- Since:
- 8.4
-