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 classNodeFactory.DefaultStrategystatic classNodeFactory.NtFileStrategystatic classNodeFactory.NtLinkedFileStrategystatic classNodeFactory.NtResourceStrategystatic classNodeFactory.OakIndexStrategystatic interfaceNodeFactory.TypeStrategy
-
Field Summary
Fields Modifier and Type Field Description protected NodeFactory.TypeStrategydefaultStrategystatic NodeFactorySINGLETONprotected 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.NodecreateNode(org.apache.sling.api.SlingHttpServletRequest request, javax.jcr.Node parentNode, String name, NodeTreeServlet.NodeParameters parameters)static voidsetMimeTypeByData(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.RepositoryExceptionIOExceptionParameterValidationException
-
setMimeTypeByData
public static void setMimeTypeByData(String name, javax.jcr.Node node, javax.jcr.Property property) throws javax.jcr.RepositoryException
- Throws:
javax.jcr.RepositoryException
-
-