|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.relations.CmsRelationType
public final class CmsRelationType
Wrapper class for the different types of relations.
The possibles values are:
HYPERLINKEMBEDDED_IMAGEEMBEDDED_OBJECTXML_STRONGXML_WEAKJSP_STRONGJSP_WEAKOU_RESOURCECATEGORYXSDUser defined relation types are also available.
| Field Summary | |
|---|---|
static CmsRelationType |
CATEGORY
Constant for the category of an OpenCmsVfsFile. |
static CmsRelationType |
EMBEDDED_IMAGE
Constant for the <img src=''> tag in a html page/element. |
static CmsRelationType |
EMBEDDED_OBJECT
Constant for the <embed src=''> tag in a html page/element. |
static CmsRelationType |
HYPERLINK
Constant for the <a href=''> tag in a html page/element. |
static CmsRelationType |
JSP_STRONG
Constant for the all types of links in a jsp file using the link.strong macro. |
static CmsRelationType |
JSP_WEAK
Constant for the all types of links in a jsp file using the link.weak macro. |
static CmsRelationType |
OU_RESOURCE
Constant for the organizational units resource associations. |
static CmsRelationType |
XML_STRONG
Constant for the OpenCmsVfsFile values in xml content that were defined as 'strong' links. |
static CmsRelationType |
XML_WEAK
Constant for the OpenCmsVfsFile values in xml content that were defined as 'weak' links. |
static CmsRelationType |
XSD
Constant for the weak links from xmlcontent to the used xsd. |
| Constructor Summary | |
|---|---|
CmsRelationType(int id,
java.lang.String name,
java.lang.String type)
Public constructor for user defined relation types. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
static java.util.List<CmsRelationType> |
filterDefinedInContent(java.util.Collection<CmsRelationType> relationTypes)
Returns all relation types in the given list that define relations in the content. |
static java.util.List<CmsRelationType> |
filterInternal(java.util.Collection<CmsRelationType> relationTypes)
Returns all internal defined relation types in the given list. |
static java.util.List<CmsRelationType> |
filterNotDefinedInContent(java.util.Collection<CmsRelationType> relationTypes)
Returns all relation types in the given list that are not defined in the content. |
static java.util.List<CmsRelationType> |
filterStrong(java.util.Collection<CmsRelationType> relationTypes)
Returns all strong relation types in the given list. |
static java.util.List<CmsRelationType> |
filterUserDefined(java.util.Collection<CmsRelationType> relationTypes)
Returns all user defined relation types in the given list. |
static java.util.List<CmsRelationType> |
filterWeak(java.util.Collection<CmsRelationType> relationTypes)
Returns all weak relation types in the given list. |
static java.util.List<CmsRelationType> |
getAll()
Returns all relation types. |
static java.util.List<CmsRelationType> |
getAllDefinedInContent()
Returns all relation types for relations defined in the content. |
static java.util.List<CmsRelationType> |
getAllInternal()
Returns all internally defined relation types. |
static java.util.List<CmsRelationType> |
getAllNotDefinedInContent()
Returns all relation types for relations that are not defined in the content. |
static java.util.List<CmsRelationType> |
getAllStrong()
Returns all strong relation types. |
static java.util.List<CmsRelationType> |
getAllUserDefined()
Returns all user defined relation types. |
static java.util.List<CmsRelationType> |
getAllWeak()
Returns all weak relation types. |
int |
getId()
Returns the internal representation of this type. |
java.lang.String |
getLocalizedName(CmsMessages messages)
Returns a localized name for the given relation type. |
java.lang.String |
getLocalizedName(java.util.Locale locale)
Returns a localized name for the given relation type. |
java.lang.String |
getName()
Returns the type name. |
java.lang.String |
getNameForXml()
Returns the type name for xml output. |
java.lang.String |
getType()
Returns the string strong or weak. |
int |
hashCode()
|
boolean |
isDefinedInContent()
Checks if this relation type is defined in the content of a resource or not. |
boolean |
isInternal()
Checks if this is an internal relation type. |
boolean |
isStrong()
Checks if the relation type is strong or weak. |
java.lang.String |
toString()
|
static CmsRelationType |
valueOf(int id)
Parses an int into a relation type. |
static CmsRelationType |
valueOf(java.lang.String name)
Parses an String into a relation type. |
static CmsRelationType |
valueOfJsp(java.lang.String name)
Parses the given value into a valid enumeration element for a JSP relation type. |
static CmsRelationType |
valueOfXml(java.lang.String name)
Parses the given value into a valid enumeration element for a XML relation type. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final CmsRelationType CATEGORY
OpenCmsVfsFile.
public static final CmsRelationType EMBEDDED_IMAGE
<img src=''> tag in a html page/element.
public static final CmsRelationType EMBEDDED_OBJECT
<embed src=''> tag in a html page/element.
public static final CmsRelationType HYPERLINK
<a href=''> tag in a html page/element.
public static final CmsRelationType JSP_STRONG
link.strong macro.
public static final CmsRelationType JSP_WEAK
link.weak macro.
public static final CmsRelationType OU_RESOURCE
public static final CmsRelationType XML_STRONG
OpenCmsVfsFile values in xml content that were defined as 'strong' links.
public static final CmsRelationType XML_WEAK
OpenCmsVfsFile values in xml content that were defined as 'weak' links.
public static final CmsRelationType XSD
| Constructor Detail |
|---|
public CmsRelationType(int id,
java.lang.String name,
java.lang.String type)
id - the id of the relation typename - the name of the relationtype - the type of relation type, strong or weak| Method Detail |
|---|
public static java.util.List<CmsRelationType> filterDefinedInContent(java.util.Collection<CmsRelationType> relationTypes)
relationTypes - the collection of relation types to filter
CmsRelationType objectspublic static java.util.List<CmsRelationType> filterInternal(java.util.Collection<CmsRelationType> relationTypes)
relationTypes - the collection of relation types to filter
CmsRelationType objectspublic static java.util.List<CmsRelationType> filterNotDefinedInContent(java.util.Collection<CmsRelationType> relationTypes)
relationTypes - the collection of relation types to filter
CmsRelationType objectspublic static java.util.List<CmsRelationType> filterStrong(java.util.Collection<CmsRelationType> relationTypes)
relationTypes - the collection of relation types to filter
CmsRelationType objectspublic static java.util.List<CmsRelationType> filterUserDefined(java.util.Collection<CmsRelationType> relationTypes)
relationTypes - the collection of relation types to filter
CmsRelationType objectspublic static java.util.List<CmsRelationType> filterWeak(java.util.Collection<CmsRelationType> relationTypes)
relationTypes - the collection of relation types to filter
CmsRelationType objectspublic static java.util.List<CmsRelationType> getAll()
CmsRelationType objectspublic static java.util.List<CmsRelationType> getAllDefinedInContent()
CmsRelationType objectspublic static java.util.List<CmsRelationType> getAllInternal()
CmsRelationType objectspublic static java.util.List<CmsRelationType> getAllNotDefinedInContent()
CmsRelationType objectspublic static java.util.List<CmsRelationType> getAllStrong()
CmsRelationType objectspublic static java.util.List<CmsRelationType> getAllUserDefined()
CmsRelationType objectspublic static java.util.List<CmsRelationType> getAllWeak()
CmsRelationType objects
public static CmsRelationType valueOf(int id)
throws CmsIllegalArgumentException
int into a relation type.
id - the internal representation number to parse
CmsIllegalArgumentException - if the given value could not be matched against a
CmsRelationType object.
public static CmsRelationType valueOf(java.lang.String name)
throws CmsIllegalArgumentException
String into a relation type.
name - the relation type name
CmsIllegalArgumentException - if the given value could not be matched against a
CmsRelationType objectvalueOfXml(String),
valueOfJsp(String)public static CmsRelationType valueOfJsp(java.lang.String name)
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".
name - the name to get the JSP type for
valueOf(String)public static CmsRelationType valueOfXml(java.lang.String name)
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".
name - the name to get the XML type for
valueOf(String)public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int getId()
public java.lang.String getLocalizedName(CmsMessages messages)
messages - the message bundle to use to resolve the name
public java.lang.String getLocalizedName(java.util.Locale locale)
locale - the locale
public java.lang.String getName()
valueOf(String)public java.lang.String getNameForXml()
The short type name of XML or JSP types is only "WEAK" or "STRONG".
For other types the short name is equal to the name.
In case you need the full type name, use getName().
getName(),
valueOfJsp(String),
valueOfXml(String)public java.lang.String getType()
isStrong()public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public boolean isDefinedInContent()
true if this relation type is defined in the content of a resourcepublic boolean isInternal()
true if this is an internal relation typepublic boolean isStrong()
true if the relation type is strongpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||