mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Added isSubType(qname) to ScriptNode API.
- Example: var isType = node.isSubType("abc:someqname"); git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14225 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -667,7 +667,7 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
|
||||
|
||||
return isLinkToDocument.booleanValue();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return true if the Node is a Category
|
||||
*/
|
||||
@@ -706,7 +706,7 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
|
||||
}
|
||||
|
||||
/**
|
||||
* @param aspect The aspect name to test for (full qualified or short-name form)
|
||||
* @param aspect The aspect name to test for (fully qualified or short-name form)
|
||||
* @return true if the node has the aspect false otherwise
|
||||
*/
|
||||
public boolean hasAspect(String aspect)
|
||||
@@ -714,6 +714,19 @@ public class ScriptNode implements Serializable, Scopeable, NamespacePrefixResol
|
||||
return getAspectsSet().contains(createQName(aspect));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type The qname type to test this object against (fully qualified or short-name form)
|
||||
* @return true if this Node is a sub-type of the specified class (or itself of that class)
|
||||
*/
|
||||
public boolean isSubType(String type)
|
||||
{
|
||||
ParameterCheck.mandatoryString("Type", type);
|
||||
|
||||
QName qnameType = createQName(type);
|
||||
|
||||
return this.services.getDictionaryService().isSubClass(getQNameType(), qnameType);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return QName path to this node. This can be used for Lucene PATH: style queries
|
||||
*/
|
||||
|
Reference in New Issue
Block a user