/** * If a content is added to a <b>cm:mlEmptyTranslation</b>, remove this aspect. */ public void onContentUpdate(NodeRef nodeRef, boolean newContent) { if (newContent) { nodeService.removeAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION); nodeService.removeAspect(nodeRef, ContentModel.ASPECT_TEMPORARY); } }
/** * If a content is added to a <b>cm:mlEmptyTranslation</b>, remove this aspect. */ public void onContentUpdate(NodeRef nodeRef, boolean newContent) { if (newContent) { nodeService.removeAspect(nodeRef, ContentModel.ASPECT_MULTILINGUAL_EMPTY_TRANSLATION); nodeService.removeAspect(nodeRef, ContentModel.ASPECT_TEMPORARY); } }
private void removeIndexControlAspect(NodeRef nodeRef) { nodeService.removeAspect(nodeRef, ContentModel.ASPECT_INDEX_CONTROL); if (logger.isDebugEnabled()) { logger.debug("Removed index control marker: " + nodeRef); } }
private void removeIndexControlAspect(NodeRef nodeRef) { nodeService.removeAspect(nodeRef, ContentModel.ASPECT_INDEX_CONTROL); if (logger.isDebugEnabled()) { logger.debug("Removed index control marker: " + nodeRef); } }
public void removeHiddenAspect(NodeRef nodeRef) { // Remove the aspect nodeService.removeAspect(nodeRef, ContentModel.ASPECT_HIDDEN); if (logger.isDebugEnabled()) { logger.debug("Removed hidden marker: " + nodeRef); } }
public void removeHiddenAspect(NodeRef nodeRef) { // Remove the aspect nodeService.removeAspect(nodeRef, ContentModel.ASPECT_HIDDEN); if (logger.isDebugEnabled()) { logger.debug("Removed hidden marker: " + nodeRef); } }
/** * @see org.alfresco.service.cmr.tagging.TaggingService#removeTagScope(org.alfresco.service.cmr.repository.NodeRef) */ public void removeTagScope(NodeRef nodeRef) { if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_TAGSCOPE) == true) { this.nodeService.removeAspect(nodeRef, ContentModel.ASPECT_TAGSCOPE); } }
/** * @see org.alfresco.service.cmr.tagging.TaggingService#removeTagScope(org.alfresco.service.cmr.repository.NodeRef) */ public void removeTagScope(NodeRef nodeRef) { if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_TAGSCOPE) == true) { this.nodeService.removeAspect(nodeRef, ContentModel.ASPECT_TAGSCOPE); } }
public Object execute() { nodeService.removeAspect(n6Ref, ASPECT_QNAME_TEST_MARKER); return null; } };
private void clearAspects(NodeRef nodeRef) { nodeService.removeAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE); nodeService.removeAspect(nodeRef, ContentModel.ASPECT_CLASSIFIABLE); nodeService.removeAspect(nodeRef, ContentModel.ASPECT_TITLED); } }
/** * @see org.alfresco.repo.action.executer.ActionExecuter#execute(Action, NodeRef) */ public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef) { if (this.nodeService.exists(actionedUponNodeRef) == true) { // Remove the aspect QName aspectQName = (QName)ruleAction.getParameterValue(PARAM_ASPECT_NAME); this.nodeService.removeAspect(actionedUponNodeRef, aspectQName); } }
public void process(NodeRef entry) throws Throwable { nodeService.removeAspect(entry, ImapModel.ASPECT_IMAP_FOLDER_NONSUBSCRIBED); for (ChildAssociationRef userRef : users) { nodeService.createAssociation(userRef.getChildRef(), entry, ImapModel.ASSOC_IMAP_UNSUBSCRIBED); } }
public void process(NodeRef entry) throws Throwable { nodeService.removeAspect(entry, ImapModel.ASPECT_IMAP_FOLDER_NONSUBSCRIBED); for (ChildAssociationRef userRef : users) { nodeService.createAssociation(userRef.getChildRef(), entry, ImapModel.ASSOC_IMAP_UNSUBSCRIBED); } }
/** * @see org.alfresco.repo.action.executer.ActionExecuter#execute(Action, NodeRef) */ public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef) { if (this.nodeService.exists(actionedUponNodeRef) == true) { // Remove the aspect QName aspectQName = (QName)ruleAction.getParameterValue(PARAM_ASPECT_NAME); this.nodeService.removeAspect(actionedUponNodeRef, aspectQName); } }
@Override public Void execute() throws Throwable { nodeService.removeAspect(nodeRef, ContentModel.ASPECT_TITLED); nodeService.removeChild(workspaceRootNodeRef, nodeRef); return null; } };
public void testRemoveMandatoryAspect() throws Exception { NodeRef nodeRef = createNode("abc", TEST_TYPE_WITH_ASPECT, allProperties); // just remove the aspect nodeService.removeAspect(nodeRef, TEST_ASPECT_WITH_PROPERTIES); checkIntegrityExpectFailure("Failed to removal of mandatory aspect", 1); }
public Object execute() throws Exception { // Check that the version history has been created VersionHistory versionHistory = versionService.getVersionHistory(nodeRef); assertNotNull(versionHistory); assertEquals(1, versionHistory.getAllVersions().size()); // Remove the versionable aspect dbNodeService.removeAspect(nodeRef, ContentModel.ASPECT_VERSIONABLE); return null; } });
public void testGetSettablePermissionsForNode() { QName ownable = QName.createQName("cm", "ownable", namespacePrefixResolver); Set<String> answer = permissionService.getSettablePermissions(rootNodeRef); assertEquals(36, answer.size()); nodeService.addAspect(rootNodeRef, ownable, null); answer = permissionService.getSettablePermissions(rootNodeRef); assertEquals(36, answer.size()); nodeService.removeAspect(rootNodeRef, ownable); answer = permissionService.getSettablePermissions(rootNodeRef); assertEquals(36, answer.size()); }
public void testMandatoryPropertiesRemoved() throws Exception { NodeRef nodeRef = createNode("abc", TEST_TYPE_WITH_PROPERTIES, allProperties); // Remove the automatically-added aspect nodeService.removeAspect(nodeRef, TEST_ASPECT_WITH_PROPERTIES); // remove all the properties PropertyMap properties = new PropertyMap(); nodeService.setProperties(nodeRef, properties); checkIntegrityExpectFailure("Failed to detect missing removed properties", 1); }
public void testCreateWithAspectForAspect() throws Exception { NodeRef nodeRef = createNode("abc", TEST_TYPE_WITHOUT_ANYTHING, null); // Add the aspect nodeService.addAspect(nodeRef, TEST_ASPECT_WITH_ASPECT, allProperties); assertTrue("Mandatory aspect missing", nodeService.hasAspect(nodeRef, TEST_ASPECT_WITH_PROPERTIES)); checkIntegrityNoFailure(); // Remove the implied mandatory aspect nodeService.removeAspect(nodeRef, TEST_ASPECT_WITH_PROPERTIES); checkIntegrityExpectFailure("Failed to detect missing aspect for aspect", 1); }