If not already created, a new <code>user-attribute</code> element will be created and returned.
Otherwise, the first existing <code>user-attribute</code> element will be returned.
@return the instance defined for the element <code>user-attribute</code>
507922
public UserAttributeType<PortletAppType<T>> getOrCreateUserAttribute()
   {
      List<Node> nodeList = childNode.get("user-attribute");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new UserAttributeTypeImpl<PortletAppType<T>>(this, "user-attribute", childNode, nodeList.get(0));
      }
      return createUserAttribute();
   }
45808
public static Node createUserNode(final String userId) {
		if (INDEX_USERS.get(IDENTIFIER, userId).getSingle() == null) {
			final Node user = DATABASE.createNode();
			user.setProperty(Properties.User.IDENTIFIER, userId);
			INDEX_USERS.add(user, IDENTIFIER, userId);
			return user;
		}

		throw new IllegalArgumentException("user node with identifier \""
				+ userId + "\" already existing!");
	}
553094
public List<UserAttributeType<PortletDescriptor>> getAllUserAttribute()
   {
      List<UserAttributeType<PortletDescriptor>> list = new ArrayList<UserAttributeType<PortletDescriptor>>();
      List<Node> nodeList = model.get("user-attribute");
      for(Node node: nodeList)
      {
         UserAttributeType<PortletDescriptor>  type = new UserAttributeTypeImpl<PortletDescriptor>(this, "user-attribute", model, node);
         list.add(type);
      }
      return list;
   }
826037
public T create() throws Exception {
        if (type == TYPE_DEFAULT) {
            if (args == null || args.length == 0) {
                return aClass.newInstance();
            }
        } else if (type == TYPE_CREATOR) {
            return creator.create();
        }

        throw new RuntimeException("Unsupported create method");
    }
1076490
public ElemAttrs buildAttrOb()
    {
        int count = mAttrCount;
        if (count == 0) {
            return null;
        }
        // If we have actual attributes, let's first just create the
        // raw array that has all attribute information:
        String[] raw = new String[count << 2];
        for (int i = 0; i < count; ++i) {
            Attribute attr = mAttributes[i];
            int ix = (i << 2);
            raw[ix] = attr.mLocalName;
            raw[ix+1] = attr.mNamespaceURI;
            raw[ix+2] = attr.mPrefix;
            raw[ix+3] = getValue(i);
        }

        // Do we have a "short" list?
        if (count < LONG_ATTR_LIST_LEN) {
            return new ElemAttrs(raw, mNonDefCount);
        }

        // Ok, nope; we need to also pass the Map information...
        /* 02-Feb-2009, TSa: Must make a copy of the Map array now,
         *   otherwise could get overwritten.
         */
        int amapLen = mAttrMap.length;
        int[] amap = new int[amapLen];
        // TODO: JDK 1.6 has Arrays.copyOf(), should use with Woodstox 6
        System.arraycopy(mAttrMap, 0, amap, 0, amapLen);
        return new ElemAttrs(raw, mNonDefCount,
                             amap, mAttrHashSize, mAttrSpillEnd);
    }
464596
public Dissector getNewInstance() {
        try {
            Constructor<? extends Dissector> co = this.getClass().getConstructor();
            Dissector newInstance = co.newInstance();
            initializeNewInstance(newInstance);
            return newInstance;
        } catch (Exception e) {
            LOG.error("Unable to create instance of {}: {}", this.getClass().getCanonicalName(), e);
        }
        return null;
    }
769129
public static  UUID getOrCreateUserToken() {
        UUID userToken;
        if (Request.getPerThreadRequestData().getRequestId() != null) {
            try {
                userToken = UUID.fromString(Request.getPerThreadRequestData().getRequestId());
            } catch (final IllegalArgumentException ignored) {
                userToken = UUIDs.randomUUID();
            }
        } else {
            userToken = UUIDs.randomUUID();
        }
        return userToken;
    }
1328891
public Version<Attributes<T>> getOrCreateVersion()
   {
      List<Node> nodeList = childNode.get("version");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new VersionImpl<Attributes<T>>(this, "version", childNode, nodeList.get(0));
      }
      return createVersion();
   }
695395
protected T createInstance() {
        try {
            Constructor<T> ctor = clazz.getDeclaredConstructor();
            ctor.setAccessible(true);
            return ctor.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (SecurityException e) {
            throw new RuntimeException(e);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }
238885
public TCert getNextTCert(List<String> attrs) {
        if (!isEnrolled()) {
            throw new RuntimeException(String.format("user '%s' is not enrolled", this.getName()));
        }
        String key = getAttrsKey(attrs);

        logger.debug(String.format("Member.getNextTCert: key=%s", key));
        TCertGetter tcertGetter = this.tcertGetterMap.get(key);
        if (tcertGetter == null) {
            logger.debug(String.format("Member.getNextTCert: key=%s, creating new getter", key));
            tcertGetter = new TCertGetter(this, attrs, key);
            this.tcertGetterMap.put(key, tcertGetter);
        }
        return tcertGetter.getNextTCert();
    }
960748
public List<UserAttributeType<PortletAppType<T>>> getAllUserAttribute()
   {
      List<UserAttributeType<PortletAppType<T>>> list = new ArrayList<UserAttributeType<PortletAppType<T>>>();
      List<Node> nodeList = childNode.get("user-attribute");
      for(Node node: nodeList)
      {
         UserAttributeType<PortletAppType<T>>  type = new UserAttributeTypeImpl<PortletAppType<T>>(this, "user-attribute", childNode, node);
         list.add(type);
      }
      return list;
   }
833706
public Iterator<Attribute<?>> attrs() {
        final AtomicReferenceArray<DefaultAttribute<?>> attributes = this.attributes;
        if (attributes == null) {
            return Collections.emptyIterator();
        }

        return new IteratorImpl(attributes);
    }
706271
@Bean(name = "usernameAttributeProvider")
    public IUsernameAttributeProvider getUsernameAttributeProvider() {
        final SimpleUsernameAttributeProvider rslt = new SimpleUsernameAttributeProvider();
        rslt.setUsernameAttribute(USERNAME_ATTRIBUTE);
        return rslt;
    }
238868
public Attribute getAttributeByOriginalName(String name) {
		for (Attribute a : attributes)
			if (name.equals(a.getOriginalName()))
				return a;
		return null;
	}
869394
@Override
    public IPersonAttributes getOriginalUserAttributes(String uid) {
        final IPersonAttributeDao delegatePersonAttributeDao =
                this.portalRootPersonAttributeDao.getDelegatePersonAttributeDao();
        return delegatePersonAttributeDao.getPerson(uid);
    }
707063
public Property<Properties<T>> getOrCreateProperty()
   {
      List<Node> nodeList = childNode.get("property");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new PropertyImpl<Properties<T>>(this, "property", childNode, nodeList.get(0));
      }
      return createProperty();
   }
188876
public CamundaUserTaskFormFieldBuilder camundaFormField() {
    CamundaFormData camundaFormData = getCreateSingleExtensionElement(CamundaFormData.class);
    CamundaFormField camundaFormField = createChild(camundaFormData, CamundaFormField.class);
    return new CamundaUserTaskFormFieldBuilder(modelInstance, element, camundaFormField);
  }