/** * Parses the given value into a valid enumeration element for a XML relation type.<p> * * This should be used to extend Strings like "weak" or "strong" to full relation type descriptors * for XML documents like "XML_WEAK" or "XML_STRONG".<p> * * @param name the name to get the XML type for * * @return the XML enumeration element * * @see #valueOf(String) */ public static CmsRelationType valueOfXml(String name) { CmsRelationType result = valueOfInternal(name); if (result == null) { result = valueOf(PREFIX_XML + name); } return result; }
/** * Parses the given value into a valid enumeration element for a JSP relation type.<p> * * This should be used to extend Strings like "weak" or "strong" to full relation type descriptors * for JSP pages like "JSP_WEAK" or "JSP_STRONG".<p> * * @param name the name to get the JSP type for * * @return the JSP enumeration element * * @see #valueOf(String) */ public static CmsRelationType valueOfJsp(String name) { CmsRelationType result = valueOfInternal(name); if (result == null) { result = valueOf(PREFIX_JSP + name); } return result; }
/** * Parses the given value into a valid enumeration element for a JSP relation type.<p> * * This should be used to extend Strings like "weak" or "strong" to full relation type descriptors * for JSP pages like "JSP_WEAK" or "JSP_STRONG".<p> * * @param name the name to get the JSP type for * * @return the JSP enumeration element * * @see #valueOf(String) */ public static CmsRelationType valueOfJsp(String name) { CmsRelationType result = valueOfInternal(name); if (result == null) { result = valueOf(PREFIX_JSP + name); } return result; }
/** * Parses the given value into a valid enumeration element for a XML relation type.<p> * * This should be used to extend Strings like "weak" or "strong" to full relation type descriptors * for XML documents like "XML_WEAK" or "XML_STRONG".<p> * * @param name the name to get the XML type for * * @return the XML enumeration element * * @see #valueOf(String) */ public static CmsRelationType valueOfXml(String name) { CmsRelationType result = valueOfInternal(name); if (result == null) { result = valueOf(PREFIX_XML + name); } return result; }
/** * Parses an <code>String</code> into a relation type.<p> * * @param name the relation type name * * @return the enumeration element * * @throws CmsIllegalArgumentException if the given value could not be matched against a * <code>{@link CmsRelationType}</code> object * * @see #valueOfXml(String) * @see #valueOfJsp(String) */ public static CmsRelationType valueOf(String name) throws CmsIllegalArgumentException { CmsRelationType result = valueOfInternal(name); if (result == null) { // no type found throw new CmsIllegalArgumentException(org.opencms.db.Messages.get().container( org.opencms.db.Messages.ERR_MODE_ENUM_PARSE_2, name, CmsRelationType.class.getName())); } return result; }
/** * Parses an <code>String</code> into a relation type.<p> * * @param name the relation type name * * @return the enumeration element * * @throws CmsIllegalArgumentException if the given value could not be matched against a * <code>{@link CmsRelationType}</code> object * * @see #valueOfXml(String) * @see #valueOfJsp(String) */ public static CmsRelationType valueOf(String name) throws CmsIllegalArgumentException { CmsRelationType result = valueOfInternal(name); if (result == null) { // no type found throw new CmsIllegalArgumentException(org.opencms.db.Messages.get().container( org.opencms.db.Messages.ERR_MODE_ENUM_PARSE_2, name, CmsRelationType.class.getName())); } return result; }