Package org.nuxeo.ecm.core.schema
Interface SchemaManager
-
- All Superinterfaces:
PropertyCharacteristicHandler
,TypeProvider
- All Known Implementing Classes:
SchemaManagerImpl
public interface SchemaManager extends TypeProvider, PropertyCharacteristicHandler
The Schema Manager manages core document types, schemas, facets and field types.
-
-
Field Summary
Fields Modifier and Type Field Description static Pattern
PATH_INDEX_PATTERN
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Set<String>
getAllowedSubTypes(String type)
Returns the types of the children that can be created inside a giventype
type.boolean
getAllowVersionWriteForDublinCore()
Whether we allow to write the dublincore schema on a version.boolean
getClearComplexPropertyBeforeSet()
Whether or not to ignore any previous values when setting complex properties.PropertyDeprecationHandler
getDeprecatedProperties()
Deprecated.since 11.1, usePropertyCharacteristicHandler
methods insteadSet<String>
getDocumentTypeNamesExtending(String docType)
Return the names of all document types extending the given one, which is included.Set<String>
getDocumentTypeNamesForFacet(String facet)
Returns the names of all document types that have given facet.int
getDocumentTypesCount()
Field
getField(String xpath)
Returns the field with given xpath, or null if not found.Field
getField(Field field, String subFieldName)
Returns the field with given parent field and sub name, or null if not found.PropertyDeprecationHandler
getRemovedProperties()
Deprecated.since 11.1, usePropertyCharacteristicHandler
methods insteadSchema
getSchemaFromPrefix(String schemaPrefix)
Schema
getSchemaFromURI(String schemaURI)
Deprecated.since 11.1, seems unusedString
getXPathSchemaName(String xpath, Set<String> schemas)
Finds within the schemas the first matching schema having a property with the same name as the first path segment of the xpath.boolean
hasSuperType(String docType, String superType)
Returns true ifdocType
is or extendssuperType
, false otherwise.static String
normalizePath(String path)
Remove prefix if any and replace the index of complex properties of the given path.-
Methods inherited from interface org.nuxeo.ecm.core.schema.PropertyCharacteristicHandler
getDeprecatedProperties, getFallback, getIndexedProperties, getRemovedProperties, getRetainableProperties, getRetainableProperties, isDeprecated, isRemoved, isSecured
-
Methods inherited from interface org.nuxeo.ecm.core.schema.TypeProvider
getDocumentType, getDocumentTypes, getFacet, getFacets, getNoPerDocumentQueryFacets, getProxySchemas, getSchema, getSchemas, getSpecialDocumentTypes, isProxySchema
-
-
-
-
Field Detail
-
PATH_INDEX_PATTERN
static final Pattern PATH_INDEX_PATTERN
-
-
Method Detail
-
normalizePath
static String normalizePath(String path)
Remove prefix if any and replace the index of complex properties of the given path.i.e. files:files/1/file -> files\/*\/file
- Parameters:
path
- the path- Returns:
- a normalize path
- Since:
- 2021.32
-
getField
Field getField(Field field, String subFieldName)
Returns the field with given parent field and sub name, or null if not found.- Since:
- 7.2
-
getXPathSchemaName
String getXPathSchemaName(String xpath, Set<String> schemas)
Finds within the schemas the first matching schema having a property with the same name as the first path segment of the xpath. The xpath can be prefixed or unprefixed.- Parameters:
xpath
- the prefixed or unprefixed xpathschemas
- the schemas to be searched- Returns:
- the first schema containing a property matching the xpath
- Since:
- 2023
-
getSchemaFromURI
@Deprecated(since="11.1") Schema getSchemaFromURI(String schemaURI)
Deprecated.since 11.1, seems unused
-
getDocumentTypeNamesForFacet
Set<String> getDocumentTypeNamesForFacet(String facet)
Returns the names of all document types that have given facet.- Returns:
- null or the names as a guaranteed non-empty set.
-
getDocumentTypeNamesExtending
Set<String> getDocumentTypeNamesExtending(String docType)
Return the names of all document types extending the given one, which is included.- Returns:
- null or the set of names.
-
getDocumentTypesCount
int getDocumentTypesCount()
-
hasSuperType
boolean hasSuperType(String docType, String superType)
Returns true ifdocType
is or extendssuperType
, false otherwise.- Since:
- 5.9.4
-
getAllowedSubTypes
Set<String> getAllowedSubTypes(String type)
Returns the types of the children that can be created inside a giventype
type.- Since:
- 8.4
-
getDeprecatedProperties
@Deprecated(since="11.1") PropertyDeprecationHandler getDeprecatedProperties()
Deprecated.since 11.1, usePropertyCharacteristicHandler
methods instead- Returns:
- the deprecated properties handler
- Since:
- 9.2
-
getRemovedProperties
@Deprecated(since="11.1") PropertyDeprecationHandler getRemovedProperties()
Deprecated.since 11.1, usePropertyCharacteristicHandler
methods instead- Returns:
- the removed properties handler
- Since:
- 9.2
-
getClearComplexPropertyBeforeSet
boolean getClearComplexPropertyBeforeSet()
Whether or not to ignore any previous values when setting complex properties.- Returns:
true
if setting a complex property ignores any previous values- Since:
- 9.3
-
getAllowVersionWriteForDublinCore
boolean getAllowVersionWriteForDublinCore()
Whether we allow to write the dublincore schema on a version.- Returns:
true
if write to the dublincore schema of a version is allowed- Since:
- 10.3
-
-