|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.fopps.model.AbstractItem
|
+--org.fopps.model.Relation
Class Relation is the base class for all relation between model elements. Relation contains methods for
isValid(),
accept(AbstractItem)| Field Summary | |
protected AbstractItem |
from
|
protected AbstractItem |
to
|
| Fields inherited from class org.fopps.model.AbstractItem |
ADDED_EVENT, CHANGE_EVENT, name, REMOVED_EVENT |
| Constructor Summary | |
Relation(AbstractItem pFrom,
AbstractItem pTo)
Creates a new relation between two projects. |
|
| Method Summary | |
boolean |
accept(AbstractItem pItem)
Checks, if the given objects are accepted by the relation. |
void |
disconnect()
Drops connection and saves undo information |
AbstractItem |
getFrom()
Getter of association From |
AbstractItem |
getTo()
Getter of association To |
boolean |
isGhost()
|
boolean |
isValid()
Checks if relation is valid. |
boolean |
loopAllowed()
Returns the current state of loop detection. |
protected void |
saveUndoOnDisconnect()
Called while disconnecting. |
void |
setAllowLoop(boolean pAllowLoops)
Toggle loop detection. |
void |
setFrom(AbstractItem pFrom)
Setter of association From |
void |
setGhost(boolean ghost)
Marks the relation as ghost relation. |
void |
setTo(AbstractItem pTo)
Setter of association To |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected AbstractItem from
protected AbstractItem to
| Constructor Detail |
public Relation(AbstractItem pFrom,
AbstractItem pTo)
throws InvalidRelationException
pTo - Destination itempFrom - Source item
InvalidRelationException, - if source = destination or given peer objects are not accepted
InvalidRelationExceptionaccept(AbstractItem)| Method Detail |
public boolean accept(AbstractItem pItem)
public boolean isGhost()
public void setGhost(boolean ghost)
ghost - If true, the relation changes to a ghost relationpublic boolean loopAllowed()
public void setAllowLoop(boolean pAllowLoops)
throws InvalidRelationException
The default is false.
pAllowLoops - New state of loop detection
InvalidRelationException - ifpublic boolean isValid()
accept(AbstractItem)
public void setTo(AbstractItem pTo)
throws InvalidRelationException
InvalidRelationExceptionpublic AbstractItem getTo()
public AbstractItem getFrom()
public void setFrom(AbstractItem pFrom)
throws InvalidRelationException
InvalidRelationExceptionpublic void disconnect()
protected void saveUndoOnDisconnect()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||