/* (non-Javadoc)
@see org.jasig.services.persondir.IPersonAttributes#getAttributeValue(java.lang.String)
978488
@Override
    public Object getAttributeValue(final String name) {
        for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) {
            final Map<String, List<Object>> attributes = additionalDescriptors.getAttributes();
            if (attributes != null && attributes.containsKey(name)) {
                return additionalDescriptors.getAttributeValue(name);
            }
        }

        return null;
    }
1271097
@SuppressWarnings("unchecked")
	public <T> T getAttribute(String name) {
		return (T) this.webSocketSession.getAttributes().get(name);
	}
1004016
@Override
    public Object getAttribute(String name) {
        if (isInvalid()) {
            throw new IllegalStateException("Session is invalid");
        }
        return this.attributes.get(name);
    }
785293
@Override
    public Object getAttribute(String name) {
        if (name.startsWith(IPortletRenderer.RENDERER_ATTRIBUTE_PREFIX)) {
            return null;
        }

        final Object attribute = this.attributes.get(name);
        if (attribute != null) {
            return attribute;
        }

        if (name.startsWith(AbstractHttpServletRequestWrapper.PORTAL_ATTRIBUTE_PREFIX)) {
            Object result = this.servletRequest.getAttribute(name);
            return result;
        }

        if (name.equals(PortletRequest.RENDER_PART)) {
            Object result = this.servletRequest.getAttribute(name);
            return result;
        }

        return this.requestAttributeService.getAttribute(
                this.servletRequest, portletWindow.getPlutoPortletWindow(), name);
    }
1221565
@Override
    public final Map<String, Object> getUserAttributes(final String uid,
                                                       final IPersonAttributeDaoFilter filter) {
        if (!this.enabled) {
            return null;
        }
        Validate.notNull(uid, "uid may not be null.");

        //Get the attributes from the subclass
        final Map<String, List<Object>> multivaluedUserAttributes = this.getMultivaluedUserAttributes(uid, filter);

        return this.flattenResults(multivaluedUserAttributes);
    }
254992
static String getAttributeValue(Element element, String name) {
        Attr attribute = element.getAttributeNode(name);
        if (attribute == null) {
            return null;
        } else {
            return attribute.getValue();
        }
    }
1307827
@Override
	public String getAttribute(String name) {
		final String sourceMethod = "getAttribute"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(AggregatorExtension.class.getName(), sourceMethod, new Object[]{name});
		}
		String result = attributes.getProperty(name);
		if (result != null && aggregator != null) {
			result = aggregator.substituteProps(result);
		}
		if (isTraceLogging) {
			log.exiting(AggregatorExtension.class.getName(), sourceMethod, result);
		}
		return result;
	}
1336184
public String getValue(int index) {
    if (index < 0 || index >= indexSet.size())
      return null;
    return attributes.getValue(indexSet.get(index));
  }
656192
@Override
    public IPersonAttributes getPerson(String uid) {

        final IPersonAttributes rslt = delegatePersonAttributeDao.getPerson(uid);
        if (rslt == null) {
            // Nothing we can do with that
            return null;
        }

        return postProcessPerson(rslt, uid);
    }
563631
@Override
    public String getName() {
        CommonProfile profile = this.getProfile();
        if(null == principalNameAttribute) {
            return profile.getId();
        }
        Object attrValue = profile.getAttribute(principalNameAttribute);
        return (null == attrValue) ? null : String.valueOf(attrValue);
    }
729753
public static String getAttributeValueOrNull(final Node elementNode, final String attrName)
    {
        if (null == elementNode || null == elementNode.getAttributes())
        {
            return null;
        }

        final Node attrNode = elementNode.getAttributes().getNamedItemNS(null, attrName);
        if (null == attrNode)
        {
            return null;
        }

        return attrNode.getNodeValue();
    }
747873
public Object getValue(String attributeName) {
        if (attributeName != null) {
            return values.get(attributeName);
        }
        return null;
    }
909360
@JsonIgnore
    protected static IPersonAttributeDao getAttributeRepository() {
        val repositories = ApplicationContextProvider.getAttributeRepository();
        return repositories.orElse(null);
    }
1042452
public Object getAttribute(String attributeName) {
    try {
      final int index = Integer.parseInt(attributeName) - 1;
      if (index < reportable.getMaxEntriesToKeep()) {
        return reportable.get(index).getValue();
      }
    } catch (NumberFormatException e) {
      LOGGER.error("Should never happen! Requested attribute should be an integer but was: " + attributeName);
    }
    return null;
  }
46130
@Override
    public String getName() {
        final Object attributeValue = this.getAttributeValue(this.userNameAttribute);
        if (attributeValue == null) {
            return null;
        }

        return attributeValue.toString();
    }
713953
@Override
    public List<Object> getAttributeValues(final String name) {
        final List<Object> values = this.attributes.get(name);
        if (values == null) {
            return null;
        }

        return values;
    }
1181647
public Object getUserAttribute(String key, Object defaultValue)
    {
        Object attributeValue = this.userAttributes.get(key);
        if (attributeValue == null)
            attributeValue = defaultValue;
        return attributeValue;
    }