Interface NodeFactory
- All Known Implementing Classes:
NodeFactoryImpl
public interface NodeFactory
-
Method Summary
Modifier and TypeMethodDescriptioncreateFolder(String name, ContentTreeNode parent) Creates a newFolderNodeconnected to the supplied parent node with the given name.createResourceNode(String name, InputStream content, PublishStatus status, ContentTreeNode parent) Creates a newResourceNodesetup with the given content and connected to the given parent.findDomainByAlias(String alias, ContentTreeContext context) Finds a domain node by the given alias.findDomainByLabel(String label, ContentTreeContext context) Finds a domain node by the given label.getDomainNodes(ContentTreeContext context) Returns the list of all domain nodes.voidloadContent(ResourceNode resource, InputStream content) Loads the given content into the existingResourceNode, setting its status toPublishStatus.CHANGED.voidloadContentAndPublish(ResourceNode resource, InputStream content) Loads the given content into the existingResourceNodeand immediately publishes it.
-
Method Details
-
createResourceNode
ResourceNode createResourceNode(String name, InputStream content, PublishStatus status, ContentTreeNode parent) throws IOException Creates a newResourceNodesetup with the given content and connected to the given parent. The `Resource` is initially set to the suppliedPublishStatuswhich must be eitherPublishStatus.PUBLISHEDorPublishStatus.OFFLINE!- Throws:
IOException
-
loadContent
Loads the given content into the existingResourceNode, setting its status toPublishStatus.CHANGED.- Throws:
IOException
-
loadContentAndPublish
Loads the given content into the existingResourceNodeand immediately publishes it. The state of the resource will bePublishStatus.PUBLISHED.- Throws:
IOException
-
createFolder
Creates a newFolderNodeconnected to the supplied parent node with the given name. -
getDomainNodes
Returns the list of all domain nodes. -
findDomainByLabel
Finds a domain node by the given label. -
findDomainByAlias
Finds a domain node by the given alias.
-