@Override public NodeService getNodeService() { return serviceRegistry.getNodeService(); }
/** * @return <code>true</code> if this node is a working copy */ public boolean getIsWorkingCopy() { return this.services.getNodeService().hasAspect(this.nodeRef, ContentModel.ASPECT_WORKING_COPY); }
/** * Injects the ServiceRegistry bean. * @param serviceRegistry ServiceRegistry */ public void setServiceRegistry(ServiceRegistry serviceRegistry) { this.contentService = serviceRegistry.getContentService(); this.nodeService = serviceRegistry.getNodeService(); }
@Override public NodeRef doWork() throws Exception { NodeRef child = parent.nodeRef; while (t.hasMoreTokens() && child != null) { String name = t.nextToken(); child = services.getNodeService().getChildByName(child, org.alfresco.model.ContentModel.ASSOC_CONTAINS, name); } return child; } }, AuthenticationUtil.getSystemUserName());
private NodeService getNodeService() { if (nodeService == null) { nodeService = getServiceRegistry().getNodeService(); } return nodeService; }
/** * @return Returns the type. */ public QName getType() { if (this.type == null) { this.type = this.services.getNodeService().getType(this.nodeRef); } return type; }
/** * {@inheritDoc} */ @Override public void init() { super.init(); this.nodeService = serviceRegistry.getNodeService(); }
/** * @return true if the node has the children false otherwise */ public boolean getHasChildren() { if (this.hasChildren == null) { this.hasChildren = !this.services.getNodeService().getChildAssocs( getNodeRef(), RegexQNamePattern.MATCH_ALL, RegexQNamePattern.MATCH_ALL, false).isEmpty(); } return this.hasChildren; }
/** * @return true if the Node has children */ public boolean getHasChildren() { if (this.hasChildren == null) { this.hasChildren = !this.services.getNodeService().getChildAssocs( getNodeRef(), RegexQNamePattern.MATCH_ALL, RegexQNamePattern.MATCH_ALL, false).isEmpty(); } return hasChildren; }
/** * @return true if the node has the children false otherwise */ public boolean getHasChildren() { if (this.hasChildren == null) { this.hasChildren = !this.services.getNodeService().getChildAssocs( getNodeRef(), RegexQNamePattern.MATCH_ALL, RegexQNamePattern.MATCH_ALL, false).isEmpty(); } return this.hasChildren; }
/** * @return Display path to this node - the path built of 'cm:name' attribute values. */ public String getDisplayPath() { if (displayPath == null) { displayPath = this.services.getNodeService().getPath(getNodeRef()).toDisplayPath( services.getNodeService(), services.getPermissionService()); } return displayPath; }
/** * @return The list of aspects applied to this node */ public Set<QName> getAspects() { if (this.aspects == null) { this.aspects = this.services.getNodeService().getAspects(getNodeRef()); } return this.aspects; }
/** * @return Returns the type. */ public QName getType() { return parent.services.getNodeService().getType(this.version.getFrozenStateNodeRef()); }
public Boolean command() throws Throwable { return serviceRegistry.getNodeService().exists(folderInfo.getNodeRef()); } }.run(true);
/** * @return The list of aspects applied to this node */ @Override public Set<QName> getAspects() { if (this.aspects == null) { this.aspects = parent.services.getNodeService().getAspects(this.version.getFrozenStateNodeRef()); } return this.aspects; }
public void setMimetype(String mimetype) { mimetype = mimetype.toLowerCase(); this.contentData = ContentData.setMimetype(this.contentData, mimetype); services.getNodeService().setProperty(nodeRef, this.property, this.contentData); updateContentData(false); }
public void register() { super.register(); templateLoader = new ClassPathRepoTemplateLoader(this.services.getNodeService(), this.services .getContentService(), defaultEncoding); }
/** * @return QName path to this node. This can be used for Lucene PATH: style queries */ public String getQnamePath() { return this.services.getNodeService().getPath(getNodeRef()).toPrefixString(this.services.getNamespaceService()); }
/** * @return QName path to this node. This can be used for Lucene PATH: style queries */ public String getQnamePath() { return this.services.getNodeService().getPath(getNodeRef()).toPrefixString(this.services.getNamespaceService()); }
private void updateTagProperty() { Serializable tags = this.services.getNodeService().getProperty(this.nodeRef, ContentModel.PROP_TAGS); if (this.properties != null) { this.properties.put(ContentModel.PROP_TAGS.toString(), getValueConverter().convertValueForScript(ContentModel.PROP_TAGS, tags)); } }