public interface DocumentType extends CompositeType
Sample document types are Workspace, Section, Domain,... The list of builtin document type is visible at NXCore/OSGI-INF/CoreExtensions.xml.
Modifier and Type | Method and Description |
---|---|
Set<String> |
getAllowedSubtypes()
Returns the list of types that can effectively be created inside this type.
|
Set<String> |
getFacets()
Gets all the facets of this document type.
|
Set<String> |
getForbiddenSubtypes()
Returns the types of the children that cannot be created inside this type.
|
PrefetchInfo |
getPrefetchInfo()
Gets the prefetch info, or null if no prefetch is defined.
|
Set<String> |
getSubtypes()
Returns the types of the children that can be created inside this type.
|
boolean |
hasAllowedSubtype(String subtype)
Returns
true if the given subtype type can effectively be created inside this type. |
boolean |
hasFacet(String facetName)
Returns
true if this document type has the given facetName facet, false otherwise . |
boolean |
hasForbiddenSubtype(String subtype)
Returns
true if the given subtype type was forbidden from being created inside this type. |
boolean |
hasSubtype(String subtype)
Returns
true if the given subtype type was explicitly allowed to be created inside this type. |
boolean |
isFile()
Tests whether this type describes a document (not a folder!) or not.
|
boolean |
isFolder()
Tests whether this type describes a folder or not.
|
boolean |
isOrdered()
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.
|
getSchema, getSchemaNames, getSchemas, hasSchema, hasSchemas
addField, getField, getField, getFields, getFieldsCount, getNamespace, hasField, hasFields
convert, decode, encode, getConstraints, getName, getObjectResolver, getSchema, getSchemaName, getSuperType, getTypeHierarchy, isAnyType, isComplexType, isCompositeType, isListType, isSimpleType, isSuperTypeOf, newInstance, validate
PrefetchInfo getPrefetchInfo()
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.
boolean isFile()
boolean isFolder()
boolean isOrdered()
Set<String> getFacets()
Facets inherited from parents are taken into account.
boolean hasFacet(String facetName)
true
if this document type has the given facetName
facet, false otherwise
.Set<String> getSubtypes()
void setSubtypes(Collection<String> subtypes)
boolean hasSubtype(String subtype)
true
if the given subtype
type was explicitly allowed to be created inside this type.Set<String> getForbiddenSubtypes()
void setForbiddenSubtypes(Collection<String> subtypes)
boolean hasForbiddenSubtype(String subtype)
true
if the given subtype
type was forbidden from being created inside this type.Set<String> getAllowedSubtypes()
boolean hasAllowedSubtype(String subtype)
true
if the given subtype
type can effectively be created inside this type.Copyright © 2017 Nuxeo. All rights reserved.