Package ch.tocco.nice2.dms.api
Interface NodeFactory
- All Known Implementing Classes:
NodeFactoryImpl
public interface NodeFactory
-
Method Summary
Modifier and TypeMethodDescriptioncreateFolder
(String name, ContentTreeNode parent) Creates a newFolderNode
connected to the supplied parent node with the given name.createResourceNode
(String name, InputStream content, PublishStatus status, ContentTreeNode parent) Creates a newResourceNode
setup 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.void
loadContent
(ResourceNode resource, InputStream content) Loads the given content into the existingResourceNode
, setting its status toPublishStatus.CHANGED
.void
loadContentAndPublish
(ResourceNode resource, InputStream content) Loads the given content into the existingResourceNode
and immediately publishes it.
-
Method Details
-
createResourceNode
ResourceNode createResourceNode(String name, InputStream content, PublishStatus status, ContentTreeNode parent) throws IOException Creates a newResourceNode
setup with the given content and connected to the given parent. The `Resource` is initially set to the suppliedPublishStatus
which must be eitherPublishStatus.PUBLISHED
orPublishStatus.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 existingResourceNode
and immediately publishes it. The state of the resource will bePublishStatus.PUBLISHED
.- Throws:
IOException
-
createFolder
Creates a newFolderNode
connected 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.
-