Gets the user data.

@param node the node
@param waveItem the wave item

@return the user data

@param <T> the generic type
779926
protected <T> Optional<T> getUserData(Optional<? extends Node> node, WaveItem<T> waveItem) {
        if (node.isPresent()) {
            final Node n = node.get();
            return getValue(n, n::getUserData, waveItem);
        }
        return Optional.empty();
    }
645104
public String getItemImageUrl(final TreeItemImage item, final String itemId) {

		if (item == null) {
			return null;
		}

		// Check if has image url
		String url = item.getUrl();
		if (!Util.empty(url)) {
			return url;
		}

		// Check if has image
		Image image = item.getImage();
		if (image == null) {
			return null;
		}

		// Check static resource
		if (image instanceof InternalResource) {
			return ((InternalResource) image).getTargetUrl();
		}

		// Build targetted url
		Environment env = getEnvironment();
		Map<String, String> parameters = env.getHiddenParameters();
		parameters.put(Environment.TARGET_ID, getTargetId());

		String cacheKey = item.getImageCacheKey();

		if (Util.empty(cacheKey)) {
			// Add some randomness to the URL to prevent caching
			String random = WebUtilities.generateRandom();
			parameters.put(Environment.UNIQUE_RANDOM_PARAM, random);
		} else {
			// Remove step counter as not required for cached content
			parameters.remove(Environment.STEP_VARIABLE);
			parameters.remove(Environment.SESSION_TOKEN_VARIABLE);
			// Add the cache key
			parameters.put(Environment.CONTENT_CACHE_KEY, cacheKey);
		}

		// Item id
		parameters.put(ITEM_REQUEST_KEY, itemId);

		// The targetable path needs to be configured for the portal environment.
		url = env.getWServletPath();

		// Note the last parameter. In javascript we don't want to encode "&".
		return WebUtilities.getPath(url, parameters, true);
	}
430313
Node getUsersStorageNode(Session session) throws PathNotFoundException, RepositoryException
   {
      return (Node)session.getItem(service.getStoragePath() + "/" + JCROrganizationServiceImpl.STORAGE_JOS_USERS);
   }
597555
public static <T extends GraphNode<T>> T getLastChild(T node) {
        return hasChildren(node) ? node.getChildren().get(node.getChildren().size() - 1) : null;
    }
905015
public boolean isLeaf()
    {
        NodeData data = (NodeData)this.getUserObject();
        if (data != null)
            return data.isLeaf();
        return false;
    }
1236062
@Override
    public Set<IPortletEntity> getPortletEntitiesForUser(int userId) {
        final Set<IPortletEntity> portletEntities =
                this.delegatePortletEntityDao.getPortletEntitiesForUser(userId);
        return this.wrapEntities(portletEntities);
    }
236350
protected void setUserData(CmsUser user, CmsListItem item) {

        item.set(LIST_COLUMN_LOGIN, user.getName());
        item.set(LIST_COLUMN_NAME, user.getSimpleName());
        item.set(LIST_COLUMN_ORGUNIT, CmsOrganizationalUnit.SEPARATOR + user.getOuFqn());
        item.set(LIST_COLUMN_FULLNAME, user.getFullName());
    }
281125
protected ItemData putItem(ItemData item)
   {
      if (item.isNode())
      {
         return putNode((NodeData)item, ModifyChildOption.MODIFY);
      }
      else
      {
         return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
      }
   }
486491
synchronized public int getDTMHandleFromNode(org.w3c.dom.Node node)
  {
    if(null == node)
      throw new IllegalArgumentException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NODE_NON_NULL, null)); //"node must be non-null for getDTMHandleFromNode!");

    if (node instanceof org.apache.xml.dtm.ref.DTMNodeProxy)
      return ((org.apache.xml.dtm.ref.DTMNodeProxy) node).getDTMNodeNumber();
		
    else
    {
      // Find the DOM2DTMs wrapped around this Document (if any)
      // and check whether they contain the Node in question.
      //
      // NOTE that since a DOM2DTM may represent a subtree rather
      // than a full document, we have to be prepared to check more
      // than one -- and there is no guarantee that we will find
      // one that contains ancestors or siblings of the node we're
      // seeking.
      //
      // %REVIEW% We could search for the one which contains this
      // node at the deepest level, and thus covers the widest
      // subtree, but that's going to entail additional work
      // checking more DTMs... and getHandleOfNode is not a
      // cheap operation in most implementations.
			//
			// TODO: %REVIEW% If overflow addressing, we may recheck a DTM
			// already examined. Ouch. But with the increased number of DTMs,
			// scanning back to check this is painful. 
			// POSSIBLE SOLUTIONS: 
			//   Generate a list of _unique_ DTM objects?
			//   Have each DTM cache last DOM node search?
			int max = m_dtms.length;
      for(int i = 0; i < max; i++)
        {
          DTM thisDTM=m_dtms[i];
          if((null != thisDTM) && thisDTM instanceof DOM2DTM)
          {
            int handle=((DOM2DTM)thisDTM).getHandleOfNode(node);
            if(handle!=DTM.NULL) return handle;
          }
         }

			// Not found; generate a new DTM.
			//
			// %REVIEW% Is this really desirable, or should we return null
			// and make folks explicitly instantiate from a DOMSource? The
			// latter is more work but gives the caller the opportunity to
			// explicitly add the DTM to a DTMManager... and thus to know when
			// it can be discarded again, which is something we need to pay much
			// more attention to. (Especially since only DTMs which are assigned
			// to a manager can use the overflow addressing scheme.)
			//
			// %BUG% If the source node was a DOM2DTM$defaultNamespaceDeclarationNode
			// and the DTM wasn't registered with this DTMManager, we will create
			// a new DTM and _still_ not be able to find the node (since it will
			// be resynthesized). Another reason to push hard on making all DTMs
			// be managed DTMs.

			// Since the real root of our tree may be a DocumentFragment, we need to
      // use getParent to find the root, instead of getOwnerDocument.  Otherwise
      // DOM2DTM#getHandleOfNode will be very unhappy.
      Node root = node;
      Node p = (root.getNodeType() == Node.ATTRIBUTE_NODE) ? ((org.w3c.dom.Attr)root).getOwnerElement() : root.getParentNode();
      for (; p != null; p = p.getParentNode())
      {
        root = p;
      }

      DOM2DTM dtm = (DOM2DTM) getDTM(new javax.xml.transform.dom.DOMSource(root),
																		 false, null, true, true);

      int handle;
      
      if(node instanceof org.apache.xml.dtm.ref.dom2dtm.DOM2DTMdefaultNamespaceDeclarationNode)
      {
				// Can't return the same node since it's unique to a specific DTM, 
				// but can return the equivalent node -- find the corresponding 
				// Document Element, then ask it for the xml: namespace decl.
				handle=dtm.getHandleOfNode(((org.w3c.dom.Attr)node).getOwnerElement());
				handle=dtm.getAttributeNode(handle,node.getNamespaceURI(),node.getLocalName());
      }
      else
				handle = ((DOM2DTM)dtm).getHandleOfNode(node);

      if(DTM.NULL == handle)
        throw new RuntimeException(XMLMessages.createXMLMessage(XMLErrorResources.ER_COULD_NOT_RESOLVE_NODE, null)); //"Could not resolve the node to a handle!");

      return handle;
    }
  }
528269
public Object getUserData(String key) {
	// dynamic load to support jre 1.4 and 1.5
	try {
	    Method m = node.getClass().getMethod("getUserData", new Class[] { key.getClass() });
	    return m.invoke(node, new Object[] { key });
	}
	catch (Exception e) {
	    throw new PageRuntimeException(Caster.toPageException(e));
	}
    }
896553
public List<Map<String, Object>> getItemFieldValues(int itemId, int fieldId) {
		return getResourceFactory().getApiResource(
				"/item/" + itemId + "/value/" + fieldId).get(
				new GenericType<List<Map<String, Object>>>() {
				});
	}
427508
public final MtasDataItem<T1, T2> getData() throws IOException {
    if (collectorType.equals(DataCollector.COLLECTOR_TYPE_DATA)) {
      return item;
    } else {
      throw new IOException("type " + collectorType + " not supported");
    }
  }
1161383
public Object setUserData(String key, Object data, UserDataHandler handler) {
	// dynamic load to support jre 1.4 and 1.5
	try {
	    Method m = node.getClass().getMethod("setUserData", new Class[] { key.getClass(), data.getClass(), handler.getClass() });
	    return m.invoke(node, new Object[] { key, data, handler });
	}
	catch (Exception e) {
	    throw new PageRuntimeException(Caster.toPageException(e));
	}
    }
825557
function getUserProfile(callback) {
    if (_.isUndefined(callback)) {
    } else {
      var u = baseUrl + "/me";
      var tokenData = this.getAuthToken();
      if (tokenData.type != "bearer") {
        throw new Error("Invalid token type. Must use a token of type bearer.");
      }
      return helper.get(tokenData, u, callback);
    }
  }
1087462
public String getTable(FilterNode node) {
        if (tableStrategy == null) return table;
        String t = tableStrategy.getTable(table, node);
        return t == null || t.isEmpty() ? table : t;
    }
341685
@Override
    public ItemProcessor getProcessor(Item item) {
        for (Map.Entry<String, ItemProcessor> mapping : patternToProcessorMappings.entrySet()) {
            if (item.getUrl().matches(mapping.getKey())) {
                return mapping.getValue();
            }
        }

        return null;
    }
232991
@Override
    public Iterable<I> getUserItems(U u) {
        if (userItemPreferences.containsKey(u)) {
            return userItemPreferences.get(u).keySet();
        }
        return Collections.emptySet();
    }