public class TemporaryNodes
extends org.junit.rules.ExternalResource
| Constructor and Description |
|---|
TemporaryNodes(ApplicationContextInit appContextRule)
Constructs the rule with a reference to a
rule which can be used to retrieve the ApplicationContext. |
| Modifier and Type | Method and Description |
|---|---|
void |
addNodeRef(org.alfresco.service.cmr.repository.NodeRef temporaryNodeRef)
Add a specified NodeRef to the list of NodeRefs to be deleted by this rule.
|
protected void |
after() |
protected void |
before() |
org.alfresco.service.cmr.repository.NodeRef |
createNode(org.alfresco.service.cmr.repository.NodeRef parentNode,
java.lang.String nodeCmName,
org.alfresco.service.namespace.QName nodeType,
java.lang.String nodeCreator)
This method creates a NodeRef and adds it to the internal list of NodeRefs to be tidied up by the rule.
|
org.alfresco.service.cmr.repository.NodeRef |
createNodeWithTextContent(org.alfresco.service.cmr.repository.NodeRef parentNode,
org.alfresco.service.namespace.QName childName,
java.lang.String nodeCmName,
org.alfresco.service.namespace.QName nodeType,
java.lang.String nodeCreator,
java.lang.String textContent)
This method creates a NodeRef with some text/plain, UTF-8 content and adds it to the internal list of NodeRefs to be tidied up by the rule.
|
org.alfresco.service.cmr.repository.NodeRef |
createNodeWithTextContent(org.alfresco.service.cmr.repository.NodeRef parentNode,
java.lang.String nodeCmName,
org.alfresco.service.namespace.QName nodeType,
java.lang.String nodeCreator,
java.lang.String textContent)
This method creates a NodeRef with some text/plain, UTF-8 content and adds it to the internal list of NodeRefs to be tidied up by the rule.
|
public TemporaryNodes(ApplicationContextInit appContextRule)
rule which can be used to retrieve the ApplicationContext.appContextRule - a rule which can be used to retrieve the spring app context.protected void before()
throws java.lang.Throwable
before in class org.junit.rules.ExternalResourcejava.lang.Throwableprotected void after()
after in class org.junit.rules.ExternalResourcepublic void addNodeRef(org.alfresco.service.cmr.repository.NodeRef temporaryNodeRef)
temporaryNodeRef - a NodeRefpublic org.alfresco.service.cmr.repository.NodeRef createNode(org.alfresco.service.cmr.repository.NodeRef parentNode,
java.lang.String nodeCmName,
org.alfresco.service.namespace.QName nodeType,
java.lang.String nodeCreator)
parentNode - the parent nodenodeCmName - the cm:name of the new nodenodeType - the type of the new nodenodeCreator - the username of the person who will create the nodepublic org.alfresco.service.cmr.repository.NodeRef createNodeWithTextContent(org.alfresco.service.cmr.repository.NodeRef parentNode,
java.lang.String nodeCmName,
org.alfresco.service.namespace.QName nodeType,
java.lang.String nodeCreator,
java.lang.String textContent)
parentNode - the parent nodenodeCmName - the cm:name of the new nodenodeType - the type of the new nodenodeCreator - the username of the person who will create the nodetextContent - the text/plain, UTF-8 content that will be stored in the node's content. null content will not be written.public org.alfresco.service.cmr.repository.NodeRef createNodeWithTextContent(org.alfresco.service.cmr.repository.NodeRef parentNode,
org.alfresco.service.namespace.QName childName,
java.lang.String nodeCmName,
org.alfresco.service.namespace.QName nodeType,
java.lang.String nodeCreator,
java.lang.String textContent)
parentNode - the parent nodenodeCmName - the cm:name of the new nodenodeType - the type of the new nodenodeCreator - the username of the person who will create the nodetextContent - the text/plain, UTF-8 content that will be stored in the node's content. null content will not be written.Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.