Package org.opencms.relations
Class CmsLinkInfo
- java.lang.Object
-
- org.opencms.relations.CmsLinkInfo
-
public class CmsLinkInfo extends java.lang.Object
Immutable bean representing most of the information in a CmsLink.
-
-
Field Summary
Fields Modifier and Type Field Description static CmsLinkInfo
EMPTY
Empty link.
-
Constructor Summary
Constructors Constructor Description CmsLinkInfo(CmsUUID structureId, java.lang.String target, java.lang.String query, java.lang.String anchor, CmsRelationType type, boolean internal)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getAnchor()
Gets the anchor.java.lang.String
getQuery()
Gets the queryCmsUUID
getStructureId()
Gets the structure id.java.lang.String
getTarget()
Gets the target.CmsRelationType
getType()
Gets the relation type.int
hashCode()
boolean
isInternal()
Checks whether the link is internal.CmsLink
toLink()
Converts this to a CmsLink.java.lang.String
toString()
-
-
-
Field Detail
-
EMPTY
public static final CmsLinkInfo EMPTY
Empty link.
-
-
Constructor Detail
-
CmsLinkInfo
public CmsLinkInfo(CmsUUID structureId, java.lang.String target, java.lang.String query, java.lang.String anchor, CmsRelationType type, boolean internal)
Creates a new instance.- Parameters:
structureId
- the structure idtarget
- the link targetquery
- the queryanchor
- the anchortype
- the typeinternal
- true if the link is internal
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- See Also:
Object.equals(java.lang.Object)
-
getAnchor
public java.lang.String getAnchor()
Gets the anchor.- Returns:
- the anchor
-
getQuery
public java.lang.String getQuery()
Gets the query- Returns:
- the query
-
getStructureId
public CmsUUID getStructureId()
Gets the structure id.- Returns:
- the structure id
-
getTarget
public java.lang.String getTarget()
Gets the target.- Returns:
- the target
-
getType
public CmsRelationType getType()
Gets the relation type.- Returns:
- the type
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- See Also:
Object.hashCode()
-
isInternal
public boolean isInternal()
Checks whether the link is internal.- Returns:
- true if this is an internal
-
toLink
public CmsLink toLink()
Converts this to a CmsLink.- Returns:
- a new CmsLink instance with the information from this bean
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
-