Update Node's mixin and ACL.

@param node NodeData
760168
protected void updateMixin(NodeData node)
   {
      NodeData prevData = (NodeData)cache.put(new CacheId(getOwnerId(), node.getIdentifier()), node, true);
      // prevent update NullNodeData
      if (!(prevData instanceof NullNodeData))
      {
         if (prevData != null)
         {
            // do update ACL if needed
            if (prevData.getACL() == null || !prevData.getACL().equals(node.getACL()))
            {
               updateChildsACL(node.getIdentifier(), node.getACL());
            }
         }
         else if (LOG.isDebugEnabled())
         {
            LOG.debug("Previous NodeData not found for mixin update " + node.getQPath().getAsString());
         }
      }
   }
106955
function updateNode(node, content, append) {
  append = append || false;

  while(!append && node.firstChild) {
    node.removeChild(node.firstChild);
  }

  if(content instanceof Element) {
    node.appendChild(content);
  }
  else if(content instanceof Array) {
    content.forEach(function(element) {
      node.appendChild(element);
    });
  }
  else {
    node.textContent = content;
  }
}
793667
function nodeSBindUpdate(node, sBind, changes, updater) {
    if (sBind) {
        var len = changes.length;

        while (len--) {
            if (changeExprCompare(changes[len].expr, sBind.value, node.scope)) {
                var newBindData = evalExpr(sBind.value, node.scope, node.owner);
                var keys = unionKeys(newBindData, node._sbindData);

                for (var i = 0, l = keys.length; i < l; i++) {
                    var key = keys[i];
                    var value = newBindData[key];

                    if (value !== node._sbindData[key]) {
                        updater(key, value);
                    }
                }

                node._sbindData = newBindData;
                break;
            }

        }
    }
}
305031
public static void setVersion(JsonNode node, Long version) {
		obj(node).put(ID_VERSION, version);
	}
919324
private void setNodeDirty(final Node<K, V> node) {
		final int nodeid = node.id;
		final int index = nodeid < 0 ? -nodeid : nodeid;
		(node.isLeaf() ? dirtyLeafNodes : dirtyInternalNodes).put(nodeid, node);
		(node.isLeaf() ? cacheLeafNodes : cacheInternalNodes).remove(nodeid);
		if (enableIOStats) {
			getIOStat(nodeid).incCacheWrite();
		}
		if (enableDirtyCheck) {
			dirtyCheck.set(index);
		}
	}
1102131
private void fillNode(final ResourceXMLParser.Entity entity, final NodeEntryImpl node) {
        node.setUsername(entity.getProperty(NODE_USERNAME));
        node.setHostname(entity.getProperty(NODE_HOSTNAME));
        node.setOsArch(entity.getProperty(NODE_OS_ARCH));
        node.setOsFamily(entity.getProperty(NODE_OS_FAMILY));
        node.setOsName(entity.getProperty(NODE_OS_NAME));
        node.setOsVersion(entity.getProperty(NODE_OS_VERSION));
        node.setDescription(entity.getProperty(COMMON_DESCRIPTION));
        final String tags = entity.getProperty(COMMON_TAGS);
        final HashSet<String> tags1;
        if (null != tags && !"".equals(tags)) {
            tags1 = new HashSet<String>();
            for (final String s : tags.split(",")) {
                tags1.add(s.trim());
            }
        } else {
            tags1 = new HashSet<String>();
        }
        node.setTags(tags1);

        if (null == node.getAttributes()) {
            node.setAttributes(new HashMap<String, String>());
        }
        if (null != entity.getProperties()) {
            for (String key : entity.getProperties().stringPropertyNames()) {
                if (!ResourceXMLConstants.allPropSet.contains(key)) {
                    node.getAttributes().put(key, entity.getProperty(key));
                }
            }

        }
        //parse embedded attribute elements
    }
515510
public function execute(NodeData $node)
    {
        $dimensionValuesToBeAdded = $node->getDimensionValues();

        foreach ($this->dimensionValues as $dimensionName => $dimensionValues) {
            if (!isset($dimensionValuesToBeAdded[$dimensionName])) {
                if (is_array($dimensionValues)) {
                    $dimensionValuesToBeAdded[$dimensionName] = $dimensionValues;
                } else {
                    $dimensionValuesToBeAdded[$dimensionName] = [$dimensionValues];
                }
            }
        }

        if ($this->addDefaultDimensionValues === true) {
            $configuredDimensions = $this->contentDimensionRepository->findAll();
            foreach ($configuredDimensions as $configuredDimension) {
                if (!isset($dimensionValuesToBeAdded[$configuredDimension->getIdentifier()])) {
                    $dimensionValuesToBeAdded[$configuredDimension->getIdentifier()] = [$configuredDimension->getDefault()];
                }
            }
        }

        $dimensionsToBeSet = [];
        foreach ($dimensionValuesToBeAdded as $dimensionName => $dimensionValues) {
            foreach ($dimensionValues as $dimensionValue) {
                $dimensionsToBeSet[] = new NodeDimension($node, $dimensionName, $dimensionValue);
            }
        }

        $node->setDimensions($dimensionsToBeSet);
    }
833732
protected function setAsShadowOf(NodeData $nodeData = null)
    {
        $this->setMovedTo($nodeData);
        $this->setRemoved(($nodeData !== null));
        $this->addOrUpdate();
    }
1077784
private void appendNode(Node appendNode) {
        if (currentElement==null) {
            currentDocument.appendChild(appendNode);
        } else {
            currentElement.appendChild(appendNode);
        }
    }
1122285
function updateIfNodeValueChanged(currentNode, newNode){
    var nodeValueChanged = newNode.nodeValue !== currentNode.nodeValue;
    if (nodeValueChanged) {
      $(currentNode).replaceWith(newNode);
    }
  }
1315763
public static void assertMixinNodeType(final Node node, final String mixinType) throws RepositoryException {
        for (final NodeType nt : node.getMixinNodeTypes()) {
            if (mixinType.equals(nt.getName())) {
                return;
            }
        }
        fail("Node " + node.getPath() + " has no mixin type " + mixinType);
    }
1261235
private void updateSelection(Object node)
    {
        State newState = getSelectionState(node);
        List<Object> descendants = 
            JTrees.getAllDescendants(getModel(), node);
        for (Object descendant : descendants)
        {
            setSelectionState(descendant, newState, false);
        }
        
        Object ancestor = JTrees.getParent(getModel(), node);
        while (ancestor != null)
        {
            List<Object> childrenOfAncestor = 
                JTrees.getChildren(getModel(), ancestor);
            State stateForAncestor = computeState(childrenOfAncestor);
            setSelectionState(ancestor, stateForAncestor, false);
            ancestor = JTrees.getParent(getModel(), ancestor);
        }
    }
733702
protected boolean accept(Node node)
   {
      try
      {
         return status == UserStatus.ANY || status.matches(node.canAddMixin(JCROrganizationServiceImpl.JOS_DISABLED));
      }
      catch (RepositoryException e)
      {
         if (LOG.isDebugEnabled())
         {
            String path = "unknown";
            try
            {
               path = node.getPath();
            }
            catch (RepositoryException e1)
            {
               LOG.debug("Could not get the node of the node: " + node, e1);
            }
            LOG.debug("Could not know if the mixin type " + JCROrganizationServiceImpl.JOS_DISABLED
               + " has been added to the node " + path, e);
         }
         return true;
      }
   }
1166752
public void update(NodeData style)
    {
        //setup the font
        CSSProperty.FontWeight weight = style.getProperty("font-weight");
        if (weight != null) fontWeight = weight;
        CSSProperty.FontStyle fstyle =  style.getProperty("font-style");
        if (fstyle != null) fontStyle = fstyle;
        
        String family = null;
        CSSProperty.FontFamily ff = style.getProperty("font-family");
        if (ff == null)
        {
            family = font.getFamily(); //use current
        }
        else if (ff == FontFamily.list_values)
        {
            TermList fmlspec = style.getValue(TermList.class, "font-family");
            if (fmlspec == null)
                family = font.getFamily();
            else
                family = getFontName(fmlspec, fontWeight, fontStyle);
        }
        else
        {
            if (factory != null)
                family = factory.getConfig().getDefaultFont(ff.getAWTValue()); //try to translate to physical font
            if (family == null)
                family = ff.getAWTValue(); //could not translate - use as is
        }
        
        double size;
        double psize = (parent == null) ? CSSUnits.medium_font : parent.getEm();
        CSSProperty.FontSize fsize = style.getProperty("font-size");
        if (fsize == null)
            size = em;
        else if (fsize == CSSProperty.FontSize.length || fsize == CSSProperty.FontSize.percentage)
        {
            TermLengthOrPercent lenspec = style.getValue(TermLengthOrPercent.class, "font-size");
            if (lenspec != null)
            {
                em = psize;
                size = pxLength(lenspec, psize); //pixels are ok here (java is fixed to 72 dpi for font sizes)
            }
            else
                size = em;
        }
        else
            size = CSSUnits.convertFontSize(psize, fsize);
        fontSize = CSSUnits.points(size);
        
        if (rootContext != null)
            rem = rootContext.getEm();
        else
            rem = em; //we don't have a root context?
        
        font = createFont(family, (int) Math.round(size), fontWeight, fontStyle, letterSpacing);
        em = size;
        
        CSSProperty.FontVariant variant = style.getProperty("font-variant");
        if (variant != null) fontVariant = variant;
        CSSProperty.TextDecoration decor = style.getProperty("text-decoration");
        textDecoration.clear();
        if (decor != null)
        {
            if (decor == TextDecoration.list_values)
            {
                TermList list = style.getValue(TermList.class, "text-decoration");
                for (Term<?> t : list)
                {
                    if (t.getValue() instanceof CSSProperty.TextDecoration)
                        textDecoration.add((CSSProperty.TextDecoration) t.getValue());
                }
            }
            else if (decor != TextDecoration.NONE)
                textDecoration.add(decor);
        }
        
        //letter spacing
        CSSProperty.LetterSpacing spacing = style.getProperty("letter-spacing");
        if (spacing != null)
        {
            if (spacing == CSSProperty.LetterSpacing.NORMAL)
                letterSpacing = 0.0;
            else
            {
                TermLength lenspec = style.getValue(TermLength.class, "letter-spacing");
                if (lenspec != null)
                    letterSpacing = pxLength(lenspec);
            }
        }
        
        //color
        TermColor clr = style.getSpecifiedValue(TermColor.class, "color");
        if (clr != null) color = CSSUnits.convertColor(clr.getValue());
    }
785448
private void applyAce(final AccessControllable node, final Ace toAdd, final boolean revoke) throws FrameworkException {

		final String principalId       = toAdd.getPrincipalId();
		final List<String> permissions = toAdd.getPermissions();

		final Principal principal = CMISObjectWrapper.translateUsernameToPrincipal(principalId);
		if (principal != null) {

			for (final String permissionString : permissions) {

				final Permission permission = Permissions.valueOf(permissionString);
				if (permission != null) {

					if (revoke) {

						node.revoke(permission, principal);

					} else {

						node.grant(permission, principal);
					}

				} else {

					throw new CmisInvalidArgumentException("Permission with ID " + permissionString + " does not exist");
				}
			}

		} else {

			throw new CmisObjectNotFoundException("Principal with ID " + principalId + " does not exist");
		}




	}
578180
public void updateNode(CmsSitemapTreeNode node) {

        CmsSitemapTreeNodeData data = (CmsSitemapTreeNodeData)node.getData();
        try {
            CmsSitemapTreeNodeData changedData = m_treeDataProvider.getData(
                A_CmsUI.getCmsObject().readResource(
                    data.getClientEntry().getId(),
                    CmsResourceFilter.IGNORE_EXPIRATION));
            CmsSitemapTreeNode changedNode = createNode(changedData);
            initEventHandlers(changedNode);
            ComponentContainer parent = (ComponentContainer)(node.getParent());
            parent.replaceComponent(node, changedNode);
        } catch (CmsException e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
45784
protected void setNode(Node node) {
        assert node!=null;
        if(node instanceof Slave)
            this.nodeName = node.getNodeName();
        else
            this.nodeName = null;

        setNumExecutors(node.getNumExecutors());
        if (this.temporarilyOffline) {
            // When we get a new node, push our current temp offline
            // status to it (as the status is not carried across
            // configuration changes that recreate the node).
            // Since this is also called the very first time this
            // Computer is created, avoid pushing an empty status
            // as that could overwrite any status that the Node
            // brought along from its persisted config data.
            node.setTemporaryOfflineCause(this.offlineCause);
        }
    }