protected String propertyValue;
protected void setUp() throws Exception {
super.setUp();
NodeTypeManager ntMgr = superuser.getWorkspace().getNodeTypeManager();
// assert that this repository support versioning
try {
NodeType versionableNt = ntMgr.getNodeType(mixVersionable);
if (versionableNt == null) {
fail("Repository does not support Versioning: mixin nodetype 'mix:versionable' is missing.");
}
} catch (NoSuchNodeTypeException e) {
fail("Repository does not support Versioning: mixin nodetype 'mix:versionable' is missing.");
}
// retrieve versionable nodetype
String versionableNodeTypeName = getProperty("versionableNodeType");
try {
versionableNodeType = ntMgr.getNodeType(versionableNodeTypeName);
if (versionableNodeType == null) {
fail("Property 'versionableNodeType' does not define a valid nodetype: '"+versionableNodeTypeName+"'");
}
} catch (NoSuchNodeTypeException e) {
fail("Property 'versionableNodeType' does not define an existing nodetype: '"+versionableNodeTypeName+"'");
}
// make sure 'non-versionable' nodetype is properly defined
try {
nonVersionableNodeType = ntMgr.getNodeType(testNodeType);
if (nonVersionableNodeType == null || nonVersionableNodeType.isNodeType(mixVersionable)) {
fail("Property 'testNodeType' does define a versionable nodetype: '"+testNodeType+"'");
}
} catch (NoSuchNodeTypeException e) {
fail("Property 'testNodeType' does not define an existing nodetype: '"+testNodeType+"'");