Interface ContentTypes
-
public interface ContentTypes
A lightweight and immutable representation of the ContentType definitions. If the model is still 'current' its version property can be compared against the current version provided by theContentTypeService
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ContentType
getContentTypeForNode(Node node)
Returns the effective ContentType representation for a specific NodeContentType
getContentTypeForNodeByPath(Session session, String path)
Returns the effective ContentType representation for an existing Node identified by its absolute pathContentType
getContentTypeForNodeByUuid(Session session, String uuid)
Returns the effective ContentType representation for an existing Node identified by its uuidEffectiveNodeTypes
getEffectiveNodeTypes()
ContentType
getType(String name)
SortedMap<String,Set<ContentType>>
getTypesByPrefix()
long
version()
-
-
-
Method Detail
-
getEffectiveNodeTypes
EffectiveNodeTypes getEffectiveNodeTypes()
- Returns:
- The EffectiveNodeTypes used by this ContentTypes instance.
-
version
long version()
- Returns:
- The immutable instance version which is automatically incremented for every new (changed) ContentTypes instance created by the ContentTypeService
-
getType
ContentType getType(String name)
- Parameters:
name
- Qualified Name for a ContentType (see JCR-2.0 3.2.5.2)- Returns:
- The immutable ContentType definition
-
getTypesByPrefix
SortedMap<String,Set<ContentType>> getTypesByPrefix()
- Returns:
- The immutable map of ContentTypes grouped and sorted by their namespace prefix as key and their elements ordered (but not sorted) by their name
-
getContentTypeForNode
ContentType getContentTypeForNode(Node node) throws RepositoryException
Returns the effective ContentType representation for a specific Node- Parameters:
node
- The Node for which to retrieve the ContentType representation- Returns:
- the ContentType representation for a specific Node
- Throws:
RepositoryException
- if a repository error occurs
-
getContentTypeForNodeByUuid
ContentType getContentTypeForNodeByUuid(Session session, String uuid) throws ItemNotFoundException, RepositoryException
Returns the effective ContentType representation for an existing Node identified by its uuidThe existence and allowed read access to the Node is first checked through the provided Session.
- Parameters:
session
- An active repository Sessionuuid
- An existing Node uuid- Returns:
- the ContentType representation for an existing Node identified by its uuid
- Throws:
ItemNotFoundException
- if node doesn't exist or is not accessibleRepositoryException
- if another error occurs
-
getContentTypeForNodeByPath
ContentType getContentTypeForNodeByPath(Session session, String path) throws PathNotFoundException, RepositoryException
Returns the effective ContentType representation for an existing Node identified by its absolute pathThe existence and allowed read access to the Node is first checked through the provided Session.
- Parameters:
session
- An active repository Sessionpath
- The absolute path of an existing Node- Returns:
- the ContentType representation for an existing Node identified by its absolute path
- Throws:
PathNotFoundException
- if node doesn't exist or is not accessibleRepositoryException
- if a repository error occurs
-
-