|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.sling.jcr.base.NodeTypeLoader
public class NodeTypeLoader
The NodeTypeSupport
contains utility methods to register node
types from a CND
nodetype definition file given as an URL or InputStream with the
repository.
Constructor Summary | |
---|---|
NodeTypeLoader()
|
Method Summary | |
---|---|
static boolean |
registerNodeType(javax.jcr.Session session,
InputStream source)
Registers node types from the CND file read from the source
with the node type manager available from the given session . |
static boolean |
registerNodeType(javax.jcr.Session session,
String systemId,
Reader reader,
boolean reregisterExisting)
|
static boolean |
registerNodeType(javax.jcr.Session session,
URL source)
Registers node types from the CND file accessible by the URL
with the node type manager available from the given session . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NodeTypeLoader()
Method Detail |
---|
public static boolean registerNodeType(javax.jcr.Session session, URL source)
URL
with the node type manager available from the given session
.
The NodeTypeManager
returned by the session
's
workspace is expected to be of type
org.apache.jackrabbit.api.JackrabbitNodeTypeManager
for
the node type registration to succeed.
This method is not synchronized. It is up to the calling method to prevent paralell execution.
session
- The Session
providing the node type manager
through which the node type is to be registered.source
- The URL from which to read the CND file
true
if registration of all node types succeeded.public static boolean registerNodeType(javax.jcr.Session session, InputStream source) throws IOException, javax.jcr.RepositoryException
source
with the node type manager available from the given session
.
The NodeTypeManager
returned by the session
's
workspace is expected to be of type
org.apache.jackrabbit.api.JackrabbitNodeTypeManager
for
the node type registration to succeed.
This method is not synchronized. It is up to the calling method to prevent paralell execution.
session
- The Session
providing the node type manager
through which the node type is to be registered.source
- The InputStream
from which the CND file is
read.
true
if registration of all node types succeeded.
IOException
javax.jcr.RepositoryException
public static boolean registerNodeType(javax.jcr.Session session, String systemId, Reader reader, boolean reregisterExisting) throws IOException, javax.jcr.RepositoryException
IOException
javax.jcr.RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |