Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.togethersoft.openapi.rwi
Interface RwiLink

public interface RwiLink
extends RwiElement

A link between two `RwiElement`s. Links are navigatable in one direction--from source to destination. The `RwiElement.outgoingLinks` method is used to get the enumeration of outgoing links for every `RwiElement`.

Note that there is no way to get the incoming links enumeration using a similar approach, because there is no such method.

Most links can be redirected--either source or destination can be changed via `setSource` or `setDestination` methods respectively.

Methods `getSource` and `getDestination` are used to get link's source and destination elements. Important notice about links: links to the attributes have `null` as a destination.

Author:
  TogetherSoft
See Also: RwiElement.outgoingLinks()

Method Summary
`boolean` | `canSetDestination(RwiElement destination)` Checks whether this link can have the element as a destination.
`boolean` | `canSetSource(RwiElement source)` Checks whether this link can have the element as a source.
`RwiElement` | `getDestination()` Returns this link's destination
`RwiElement` | `getSource()` Returns this link's source.
`void` | `setDestination(RwiElement destination)` Sets the destination for this link.
`void` | `setSource(RwiElement source)` Sets the source for this link.

Methods inherited from interface com.togethersoft.openapi.rwi.RwiElement
`accept, canCreateIncomingLink, canCreateOutgoingLink, canCreateOutgoingLink, canCreateOutgoingLinkByPattern, canCut, canDelete, codeElements, copy, createOutgoingLink, createOutgoingLinkByPattern, cut, delete, getCodeElement, getTimeStamp, getUniqueName, isDeleted, outgoingLinks`

Methods inherited from interface com.togethersoft.openapi.rwi.RwiPropertyMap
`addProperty, canAddProperty, canSetProperty, canSetProperty, getProperty, hasProperty, isPropertyReadable, isPropertyWritable, properties, properties, setProperty, setProperty`

Method Detail

### canSetDestination

    public boolean canSetDestination(RwiElement destination)

  Checks whether this link can have the element as a destination.
  Parameters:
    destination - the `RwiElement` which will be assigned as a destination for this link
  Returns: `true` if the `destination` can be set as a destination for this link, `false` otherwise

### canSetSource

    public boolean canSetSource(RwiElement source)

  Checks whether this link can have the element as a source.
  Parameters:
    source - the `RwiElement` which will be assigned as a source for this link
  Returns: `true` if the `source` can be set as a source for this link, `false` otherwise

### getDestination

    public RwiElement getDestination()

  Returns this link's destination
  Returns: this link's destination

### getSource

    public RwiElement getSource()

  Returns this link's source.
  Returns: this link's source

### setDestination

    public void setDestination(RwiElement destination)

  Sets the destination for this link.
  Parameters:
    destination - the `RwiElement` which will be assigned as a destination for this link

### setSource

    public void setSource(RwiElement source)

  Sets the source for this link.
  Parameters:
    source - the `RwiElement` which will be assigned as a source for this link

Overview | Package | Class | Use | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD