stella
Interface TargetProviding<T extends TargetDefinition>

All Known Subinterfaces:
TargetQuickProviding<T>
All Known Implementing Classes:
AbstractTargetProvider, SubTargets, TargetDatabase, TargetList

public interface TargetProviding<T extends TargetDefinition>

Target providing instances casn be thought of objects that provide different TargetDefinition. Each taret provider provides only a special class of targets, to minimize possible confusion.


Field Summary
static String SERIAL
          Default extension for serialized targets, including the dot.
static String XML
          Default extension for XML-files, including the dot.
 
Method Summary
 boolean addTarget(T toadd)
          Add a target to all targets.
 void clear()
          Deletes all targets from all lists.
 Collection<T> getActiveTargets()
          Returns all active targets.
 Collection<T> getAllTargets()
          Returns all targets known to this provider.
 Collection<T> getCompletedTargets()
          Returns all targets that are known to be finished.
 T getFromActive(String name)
          Gets the target with the given name from the collection of active targets only.
 T getFromAll(String name)
          Gets the target with the given name from the collection of all targets.
 boolean removeTarget(T remove)
          Removes a target from all lists it is in.
 boolean restore()
          Restores the targets to a predefined state.
 

Field Detail

XML

static final String XML
Default extension for XML-files, including the dot.

See Also:
Constant Field Values

SERIAL

static final String SERIAL
Default extension for serialized targets, including the dot.

See Also:
Constant Field Values
Method Detail

getAllTargets

Collection<T> getAllTargets()
Returns all targets known to this provider.


getActiveTargets

Collection<T> getActiveTargets()
Returns all active targets. These are the targets that take part in a scheduling process. br> This collection must be contained in the getAllTargets().


getCompletedTargets

Collection<T> getCompletedTargets()
Returns all targets that are known to be finished. This method does not need the current observing conditions. May return null, if information is not available.
This collection must be contained in the getAllTargets().

See Also:
HistoryAware, Appointable

addTarget

boolean addTarget(T toadd)
Add a target to all targets. The target state will define, if it also appears in the active/finished list.

Returns:
True, if adding was successful.

removeTarget

boolean removeTarget(T remove)
Removes a target from all lists it is in.

Returns:
True, if target was present in at least one list.

clear

void clear()
Deletes all targets from all lists.


getFromActive

T getFromActive(String name)
Gets the target with the given name from the collection of active targets only.


getFromAll

T getFromAll(String name)
Gets the target with the given name from the collection of all targets.


restore

boolean restore()
Restores the targets to a predefined state.