|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.relations.CmsRelation
A relation between two opencms resources.
Field Summary | |
static java.util.Comparator |
COMPARATOR
A comparator for the source & target path plus the relation type of 2 relations. |
Constructor Summary | |
CmsRelation(CmsResource source,
CmsResource target,
CmsRelationType type)
Creates a new relation object of the given type between the given resources. |
|
CmsRelation(CmsUUID sourceId,
java.lang.String sourcePath,
CmsUUID targetId,
java.lang.String targetPath,
CmsRelationType type)
Base constructor. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
CmsResource |
getSource(CmsObject cms,
CmsResourceFilter filter)
Returns the source resource wenn possible to read with the given filter. |
CmsUUID |
getSourceId()
Returns the structure id of the source resource. |
java.lang.String |
getSourcePath()
Returns the path of the source resource. |
CmsResource |
getTarget(CmsObject cms,
CmsResourceFilter filter)
Returns the target resource wenn possible to read with the given filter. |
CmsUUID |
getTargetId()
Returns the tructure id of the target resource. |
java.lang.String |
getTargetPath()
Returns the path of the target resource. |
CmsRelationType |
getType()
Returns the relation type. |
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.util.Comparator COMPARATOR
Constructor Detail |
public CmsRelation(CmsResource source, CmsResource target, CmsRelationType type)
source
- the source resourcetarget
- the target resourcetype
- the relation typepublic CmsRelation(CmsUUID sourceId, java.lang.String sourcePath, CmsUUID targetId, java.lang.String targetPath, CmsRelationType type)
sourceId
- the source structure idsourcePath
- the source pathtargetId
- the target structure idtargetPath
- the target pathtype
- the relation typeMethod Detail |
public boolean equals(java.lang.Object obj)
Object.equals(java.lang.Object)
public CmsResource getSource(CmsObject cms, CmsResourceFilter filter) throws CmsException
cms
- the current user contextfilter
- the filter to use
CmsException
- if something goes wrongpublic CmsUUID getSourceId()
public java.lang.String getSourcePath()
public CmsResource getTarget(CmsObject cms, CmsResourceFilter filter) throws CmsException
cms
- the current user contextfilter
- the filter to use
CmsException
- if something goes wrongpublic CmsUUID getTargetId()
public java.lang.String getTargetPath()
public CmsRelationType getType()
public int hashCode()
Object.hashCode()
public java.lang.String toString()
Object.toString()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |