03-30-2014 05:36 AM
<type name="my:type1">
<title>My Type 1</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>my:aspect_myaspect1</aspect>
<aspect>my:aspect_myaspect2</aspect>
<aspect>my:aspect_myaspect3</aspect>
</mandatory-aspects>
</type>
<type name="my:type2">
<title>My Type 2</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>my:aspect_myaspect1</aspect>
<aspect>my:aspect_myaspect4</aspect>
<aspect>my:aspect_myaspect5</aspect>
</mandatory-aspects>
</type>
03-30-2014 10:36 AM
03-30-2014 11:42 AM
03-31-2014 03:49 AM
<config evaluator="string-compare" condition="DocumentLibrary"
replace="true">
<type name="my:type1" >
<subtype name="my:type2" />
</type>
<type name="my:type2" >
<subtype name="my:type1" />
</type>
03-31-2014 05:07 AM
03-31-2014 10:13 AM
if (!node.specializeType(type))
{
try {
customSpecializeTypeScript.customSpecializeType(node,type);
} catch (e) {
status.setCode(status.STATUS_INTERNAL_SERVER_ERROR, "Could not change type of nodeRef '" + nodeRef + "' to '" + type + "'");
return null;
}
}
public boolean customSpecializeType(Object obj,Object type) {
if(obj instanceof ScriptNode) {
ScriptNode nodeScript = (ScriptNode)obj;
NodeRef nodeRef = nodeScript.getNodeRef();
if(type instanceof String) {
String[] splitType = ((String)type).split(":");
if(splitType.length==2) {
QName qnameNewType = QName.createQName(Constants.COSTMTYPEURI,splitType[1]);
nodeService.setType(nodeRef, qnameNewType);
return true;
}
}
}
return false;
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.