/** * 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> */ public UserAttributeType<PortletDescriptor> getOrCreateUserAttribute() { List<Node> nodeList = model.get("user-attribute"); if (nodeList != null && nodeList.size() > 0) { return new UserAttributeTypeImpl<PortletDescriptor>(this, "user-attribute", model, nodeList.get(0)); } return createUserAttribute(); }
/** * 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> */ public UserAttributeType<PortletDescriptor> getOrCreateUserAttribute() { List<Node> nodeList = model.get("user-attribute"); if (nodeList != null && nodeList.size() > 0) { return new UserAttributeTypeImpl<PortletDescriptor>(this, "user-attribute", model, nodeList.get(0)); } return createUserAttribute(); }