|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.opencms.relations.CmsRelation
public class CmsRelation
A relation between two opencms resources.
| Field Summary | |
|---|---|
static Comparator<CmsRelation> |
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,
String sourcePath,
CmsUUID targetId,
String targetPath,
CmsRelationType type)
Base constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
CmsResource |
getSource(CmsObject cms,
CmsResourceFilter filter)
Returns the source resource when possible to read with the given filter. |
CmsUUID |
getSourceId()
Returns the structure id of the source resource. |
String |
getSourcePath()
Returns the path of the source resource. |
CmsResource |
getTarget(CmsObject cms,
CmsResourceFilter filter)
Returns the target resource when possible to read with the given filter. |
CmsUUID |
getTargetId()
Returns the structure id of the target resource. |
String |
getTargetPath()
Returns the path of the target resource. |
CmsRelationType |
getType()
Returns the relation type. |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Comparator<CmsRelation> COMPARATOR
| Constructor Detail |
|---|
public CmsRelation(CmsResource source,
CmsResource target,
CmsRelationType type)
source - the source resourcetarget - the target resourcetype - the relation type
public CmsRelation(CmsUUID sourceId,
String sourcePath,
CmsUUID targetId,
String targetPath,
CmsRelationType type)
sourceId - the source structure idsourcePath - the source pathtargetId - the target structure idtargetPath - the target pathtype - the relation type| Method Detail |
|---|
public boolean equals(Object obj)
equals in class ObjectObject.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 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 String getTargetPath()
public CmsRelationType getType()
public int hashCode()
hashCode in class ObjectObject.hashCode()public String toString()
toString in class ObjectObject.toString()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||