Klasse NodeTypeDefinitionScanner
java.lang.Object
org.apache.sling.testing.mock.sling.NodeTypeDefinitionScanner
Singleton class that fetches all node type definitions from OSGi bundle MANIFEST.MF files
with "Sling-Nodetypes" definitions in the classpath.
Additionally it support registering them to a JCR repository.
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic NodeTypeDefinitionScannerget()voidregister(javax.jcr.Session session, List<String> nodeTypeResources, NodeTypeMode nodeTypeMode) Registers node types found in classpath in JCR repository.voidregister(javax.jcr.Session session, NodeTypeMode nodeTypeMode) Registers node types found in classpath in JCR repository.
-
Methodendetails
-
getNodeTypeDefinitions
- Gibt zurück:
- Node type definitions found in classpath as registered in OSGi bundle headers
-
register
public void register(javax.jcr.Session session, NodeTypeMode nodeTypeMode) throws javax.jcr.RepositoryException Registers node types found in classpath in JCR repository.- Parameter:
session- SessionnodeTypeMode- Node type mode- Löst aus:
javax.jcr.RepositoryException- Repository exception
-
register
public void register(javax.jcr.Session session, List<String> nodeTypeResources, NodeTypeMode nodeTypeMode) throws javax.jcr.RepositoryException Registers node types found in classpath in JCR repository.- Parameter:
session- SessionnodeTypeResources- List of classpath resource URLs pointing to node type definitionsnodeTypeMode- Node type mode- Löst aus:
javax.jcr.RepositoryException- Repository exception
-
get
- Gibt zurück:
- Instance
-