public class CmsRelation
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.util.Comparator<CmsRelation> |
COMPARATOR
A comparator for the source & target path plus the relation type of 2 relations.
|
| 构造器和说明 |
|---|
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.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(java.lang.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.
|
java.lang.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.
|
java.lang.String |
getTargetPath()
Returns the path of the target resource.
|
CmsRelationType |
getType()
Returns the relation type.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final java.util.Comparator<CmsRelation> COMPARATOR
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 typepublic boolean equals(java.lang.Object obj)
equals 在类中 java.lang.ObjectObject.equals(java.lang.Object)public CmsResource getSource(CmsObject cms, CmsResourceFilter filter) throws CmsException
cms - the current user contextfilter - the filter to useCmsException - 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 useCmsException - if something goes wrongpublic CmsUUID getTargetId()
public java.lang.String getTargetPath()
public CmsRelationType getType()
public int hashCode()
hashCode 在类中 java.lang.ObjectObject.hashCode()public java.lang.String toString()
toString 在类中 java.lang.ObjectObject.toString()