Package com.composum.sling.nodes.servlet
Class NodeFactory
- java.lang.Object
-
- com.composum.sling.nodes.servlet.NodeFactory
-
public class NodeFactory extends Object
the strategy and their implementations to create new nodes in various types during the 'create' operation of the 'node' servlet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NodeFactory.DefaultStrategy
static class
NodeFactory.NtFileStrategy
static class
NodeFactory.NtLinkedFileStrategy
static class
NodeFactory.NtResourceStrategy
static class
NodeFactory.OakIndexStrategy
static interface
NodeFactory.TypeStrategy
-
Field Summary
Fields Modifier and Type Field Description protected NodeFactory.TypeStrategy
defaultStrategy
static NodeFactory
SINGLETON
protected Map<String,NodeFactory.TypeStrategy>
strategyMap
-
Constructor Summary
Constructors Constructor Description NodeFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.jcr.Node
createNode(org.apache.sling.api.SlingHttpServletRequest request, javax.jcr.Node parentNode, String name, NodeTreeServlet.NodeParameters parameters)
static void
setMimeTypeByData(String name, javax.jcr.Node node, javax.jcr.Property property)
-
-
-
Field Detail
-
SINGLETON
public static final NodeFactory SINGLETON
-
defaultStrategy
protected NodeFactory.TypeStrategy defaultStrategy
-
strategyMap
protected Map<String,NodeFactory.TypeStrategy> strategyMap
-
-
Method Detail
-
createNode
public javax.jcr.Node createNode(org.apache.sling.api.SlingHttpServletRequest request, javax.jcr.Node parentNode, String name, NodeTreeServlet.NodeParameters parameters) throws javax.jcr.RepositoryException, IOException, ParameterValidationException
- Throws:
javax.jcr.RepositoryException
IOException
ParameterValidationException
-
setMimeTypeByData
public static void setMimeTypeByData(String name, javax.jcr.Node node, javax.jcr.Property property) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
-