Class NodeFactoryImpl
java.lang.Object
ch.tocco.nice2.dms.impl.NodeFactoryImpl
- All Implemented Interfaces:
NodeFactory
-
Constructor Summary
ConstructorsConstructorDescriptionNodeFactoryImpl(CommandExecutor executor, ContentTreeService treeService, EntityDefaultValueService defaultValueService, ResourceContentService resourceContentService, BinaryFactory binaryFactory, CascadingDeleteService cascadingDeleteService, SecurityManager securityManager) -
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.
-
Constructor Details
-
NodeFactoryImpl
public NodeFactoryImpl(CommandExecutor executor, ContentTreeService treeService, EntityDefaultValueService defaultValueService, ResourceContentService resourceContentService, BinaryFactory binaryFactory, CascadingDeleteService cascadingDeleteService, SecurityManager securityManager)
-
-
Method Details
-
createResourceNode
public ResourceNode createResourceNode(String name, InputStream content, PublishStatus status, ContentTreeNode parent) throws IOException Description copied from interface:NodeFactoryCreates 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!- Specified by:
createResourceNodein interfaceNodeFactory- Throws:
IOException
-
loadContent
Description copied from interface:NodeFactoryLoads the given content into the existingResourceNode, setting its status toPublishStatus.CHANGED.- Specified by:
loadContentin interfaceNodeFactory- Throws:
IOException
-
loadContentAndPublish
Description copied from interface:NodeFactoryLoads the given content into the existingResourceNodeand immediately publishes it. The state of the resource will bePublishStatus.PUBLISHED.- Specified by:
loadContentAndPublishin interfaceNodeFactory- Throws:
IOException
-
createFolder
Description copied from interface:NodeFactoryCreates a newFolderNodeconnected to the supplied parent node with the given name.- Specified by:
createFolderin interfaceNodeFactory
-
getDomainNodes
Description copied from interface:NodeFactoryReturns the list of all domain nodes.- Specified by:
getDomainNodesin interfaceNodeFactory
-
findDomainByLabel
Description copied from interface:NodeFactoryFinds a domain node by the given label.- Specified by:
findDomainByLabelin interfaceNodeFactory
-
findDomainByAlias
Description copied from interface:NodeFactoryFinds a domain node by the given alias.- Specified by:
findDomainByAliasin interfaceNodeFactory
-