/** * @return true if this Node is a container (i.e. a folder) */ private boolean getIsContainer(QName type) { boolean isContainer = dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) && !dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER); return isContainer; }
public Boolean isSubtypeOf(NodeRef nodeRef, QName typeQName) { // get the type of the node QName nodeTypeQName = nodeService.getType(nodeRef); return dictionaryService.isSubClass(nodeTypeQName, typeQName); }
private boolean isSharable(QName type) { return type.equals(ContentModel.TYPE_CONTENT) || dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT); } // Prevent copying of Quick share properties on node copy.
@Override public boolean isSubClass(QName className, QName ofClassName) { return apiFacet.getDictionaryService().isSubClass(className, ofClassName); }
/** * @return true if this Node is a Link to a Document (i.e. a filelink) */ public boolean getIsLinkToDocument() { if (isLinkToDocument == null) { DictionaryService dd = this.services.getDictionaryService(); isLinkToDocument = Boolean.valueOf(dd.isSubClass(getType(), ApplicationModel.TYPE_FILELINK)); } return isLinkToDocument.booleanValue(); }
/** * @return true if this Node is a Link to a Container (i.e. a folderlink) */ public boolean getIsLinkToContainer() { if (isLinkToContainer == null) { DictionaryService dd = this.services.getDictionaryService(); isLinkToContainer = Boolean.valueOf(dd.isSubClass(getQNameType(), ApplicationModel.TYPE_FOLDERLINK)); } return isLinkToContainer.booleanValue(); }
/** * @return true if the node is a Category instance */ public boolean getIsCategory() { if (isCategory == null) { DictionaryService dd = this.services.getDictionaryService(); isCategory = Boolean.valueOf(dd.isSubClass(getType(), ContentModel.TYPE_CATEGORY)); } return isCategory.booleanValue(); }
/** * @return true if this Node is a Link to a Container (i.e. a folderlink) */ public boolean getIsLinkToContainer() { if (isLinkToContainer == null) { DictionaryService dd = this.services.getDictionaryService(); isLinkToContainer = Boolean.valueOf(dd.isSubClass(getType(), ApplicationModel.TYPE_FOLDERLINK)); } return isLinkToContainer.booleanValue(); }
/** * @return true if this Node is a Document (i.e. with content) */ public boolean getIsDocument() { if (isDocument == null) { DictionaryService dd = this.services.getDictionaryService(); isDocument = Boolean.valueOf(dd.isSubClass(getQNameType(), ContentModel.TYPE_CONTENT)); } return isDocument.booleanValue(); }
/** * @return true if this Node is a Document (i.e. with content) */ public boolean getIsDocument() { if (isDocument == null) { DictionaryService dd = this.services.getDictionaryService(); isDocument = Boolean.valueOf(dd.isSubClass(getType(), ContentModel.TYPE_CONTENT)); } return isDocument.booleanValue(); }
/** * @return true if the node is a Category instance */ public boolean getIsCategory() { if (isCategory == null) { DictionaryService dd = this.services.getDictionaryService(); isCategory = Boolean.valueOf(dd.isSubClass(getType(), ContentModel.TYPE_CATEGORY)); } return isCategory.booleanValue(); }
/** * @return true if this Node is a Link to a Container (i.e. a folderlink) */ public boolean getIsLinkToContainer() { if (isLinkToContainer == null) { DictionaryService dd = this.services.getDictionaryService(); isLinkToContainer = Boolean.valueOf(dd.isSubClass(getType(), ApplicationModel.TYPE_FOLDERLINK)); } return isLinkToContainer.booleanValue(); }
/** * @return true if this Node is a Link to a Document (i.e. a filelink) */ public boolean getIsLinkToDocument() { if (isLinkToDocument == null) { DictionaryService dd = this.services.getDictionaryService(); isLinkToDocument = Boolean.valueOf(dd.isSubClass(getType(), ApplicationModel.TYPE_FILELINK)); } return isLinkToDocument.booleanValue(); }
/** * @return true if this Node is a Link to a Container (i.e. a folderlink) */ public boolean getIsLinkToContainer() { if (isLinkToContainer == null) { DictionaryService dd = this.services.getDictionaryService(); isLinkToContainer = Boolean.valueOf(dd.isSubClass(getQNameType(), ApplicationModel.TYPE_FOLDERLINK)); } return isLinkToContainer.booleanValue(); }
/** * @return true if this Node is a Link to a Document (i.e. a filelink) */ public boolean getIsLinkToDocument() { if (isLinkToDocument == null) { DictionaryService dd = this.services.getDictionaryService(); isLinkToDocument = Boolean.valueOf(dd.isSubClass(getQNameType(), ApplicationModel.TYPE_FILELINK)); } return isLinkToDocument.booleanValue(); }
private ContentData getContentData(NodeRef nodeRef) { // Checks if the node is content and if so gets the ContentData QName type = this.nodeService.getType(nodeRef); ContentData content = null; if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT)) { content = (ContentData) this.nodeService.getProperty(nodeRef, ContentModel.PROP_CONTENT); } return content; }
public boolean isRendition(NodeRef node) { final QName aspectToCheckFor = RenditionModel.ASPECT_RENDITION; Set<QName> existingAspects = nodeService.getAspects(node); for (QName nextAspect : existingAspects) { if (nextAspect.equals(aspectToCheckFor) || dictionaryService.isSubClass(nextAspect, aspectToCheckFor)) { return true; } } return false; }
private void checkSiteTitlePropertyRenamed(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) { QName nodeRefType = nodeService.getType(nodeRef); if (dictionaryService.isSubClass(nodeRefType, TYPE_SITE) && propertyChanged(before, after, ContentModel.PROP_TITLE)) { String oldName = ((MLText) before.get(ContentModel.PROP_TITLE)).getDefaultValue(); String newName = ((MLText) after.get(ContentModel.PROP_TITLE)).getDefaultValue(); eventsService.nodeRenamed(nodeRef, oldName, newName); } }
/** * @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); }
/** * @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); }