facets.core.superficial.app
Class IndexingTarget

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.core.superficial.TargetCore
          extended by facets.core.superficial.app.IndexingTarget
All Implemented Interfaces:
Notifiable, Notifying, STarget, TargeterCore.TargetType, Identified, Titled
Direct Known Subclasses:
SAreaTarget

public abstract class IndexingTarget
extends TargetCore

STarget with indexing of STarget children.

IndexingTarget defines key behaviour needed by SAreaTarget, based on an SIndexing of STarget children.


Nested Class Summary
 
Nested classes/interfaces inherited from interface facets.core.superficial.STarget
STarget.Targeted
 
Nested classes/interfaces inherited from interface facets.core.superficial.Notifying
Notifying.Impact
 
Field Summary
 
Fields inherited from class facets.core.superficial.TargetCore
targets
 
Fields inherited from interface facets.core.superficial.STarget
NONE
 
Constructor Summary
protected IndexingTarget(java.lang.String title, SIndexing indexing)
          Unique constructor.
 
Method Summary
protected  boolean blockNotification()
          Enables notification to be restricted to this member of the tree.
 java.lang.Object identity()
          Return an object that is as far as possible unique for the implementation.
 Notifying.Impact impact()
          Allows this Notifying to specify a default Notifying.Impact.
 STarget[] indexableTargets()
          Convenience cast for the indexables of the indexing.
 STarget indexedTarget()
          Convenience cast for the indexed of the indexing.
 SIndexing indexing()
          The indexing last set with setIndexing(SIndexing).
 Notifiable monitor()
          The current Notifiable in the notification tree, as set with setMonitor.
protected  TypedNode[] newDebugChildren()
          Create a TypedNode[] representation of this Notifying for debug purposes.
protected static TypedNode newDebugContentNode(java.lang.String title, java.lang.Object source)
           
protected static TypedNode newDebugContentNode(java.lang.String title, java.lang.Object[] source)
           
protected static TypedNode newDebugMonitorNode(Notifiable monitor)
           
 TypedNode newGraphNode()
          Returns a descriptive node for use in debug object graph.
abstract  STargeter newTargeter()
          Overrides superclass method.
protected  boolean notifiesTargeter()
          Used to construct the notification tree.
 void notify(Notice notice)
          Respond to the Notice passed.
 void notifyMonitor(Notifying.Impact impact)
          Call notify on the parent monitor in the notification tree, typically with itself as parameter to the Notice passed.
 IndexingTarget parent()
          Any containing IndexingTarget.
 void setIndexing(SIndexing indexing)
          Sets the SIndexing containing the STarget children of the IndexingTarget.
 void setLive(boolean live)
          Overrides superclass method.
 void setMonitor(Notifiable monitor)
          Attach the Notifying to a Notifiable parent in the notification tree.
 java.lang.String toString()
           
 
Methods inherited from class facets.core.superficial.TargetCore
elements, findMonitorOfType, isLive, join, lazyElements, setElements, title, wantsFocus
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface facets.core.superficial.Notifying
impact, monitor, notifyMonitor, setMonitor
 
Methods inherited from interface facets.core.superficial.Notifiable
notify
 

Constructor Detail

IndexingTarget

protected IndexingTarget(java.lang.String title,
                         SIndexing indexing)
Unique constructor.

Parameters:
title - passed to the superclass
indexing - passed to setIndexing(SIndexing)
Method Detail

setIndexing

public void setIndexing(SIndexing indexing)
Sets the SIndexing containing the STarget children of the IndexingTarget.

Parameters:
indexing - will be returned by indexing(); its indexables will be returned by indexableTargets() and its SIndexing.indexed() by indexedTarget(); the indexables must therefore be a STarget[]

indexing

public final SIndexing indexing()
The indexing last set with setIndexing(SIndexing).


indexableTargets

public final STarget[] indexableTargets()
Convenience cast for the indexables of the indexing.

Returns:
indexing().indexables() cast to a STarget[]

indexedTarget

public final STarget indexedTarget()
Convenience cast for the indexed of the indexing.

Returns:
indexing().indexed() cast to a STarget

newTargeter

public abstract STargeter newTargeter()
Overrides superclass method.

Must return an IndexingTargeter.

Overrides:
newTargeter in class TargetCore

parent

public final IndexingTarget parent()
Any containing IndexingTarget.

Returns:
the parent which may be null

setLive

public final void setLive(boolean live)
Overrides superclass method.

Ensures that only the indexed child is live (but ignores viewers).

Specified by:
setLive in interface STarget
Overrides:
setLive in class TargetCore

toString

public java.lang.String toString()
Overrides:
toString in class TargetCore

notifiesTargeter

protected final boolean notifiesTargeter()
Description copied from class: TargetCore
Used to construct the notification tree.

NOTE This method must NOT be overridden in application code.

Overrides:
notifiesTargeter in class TargetCore

newDebugChildren

protected TypedNode[] newDebugChildren()
Create a TypedNode[] representation of this Notifying for debug purposes.

Overrides:
newDebugChildren in class TargetCore

newDebugContentNode

protected static final TypedNode newDebugContentNode(java.lang.String title,
                                                     java.lang.Object source)

newDebugContentNode

protected static final TypedNode newDebugContentNode(java.lang.String title,
                                                     java.lang.Object[] source)

newDebugMonitorNode

protected static final TypedNode newDebugMonitorNode(Notifiable monitor)

newGraphNode

public final TypedNode newGraphNode()
Returns a descriptive node for use in debug object graph.


impact

public Notifying.Impact impact()
Description copied from interface: Notifying
Allows this Notifying to specify a default Notifying.Impact.

Specified by:
impact in interface Notifying
Returns:
typically Notifying.Impact.DEFAULT

identity

public java.lang.Object identity()
Description copied from interface: Identified
Return an object that is as far as possible unique for the implementation.

This will usually be a class instance counter.

Specified by:
identity in interface Identified

monitor

public final Notifiable monitor()
The current Notifiable in the notification tree, as set with setMonitor.

Complains if no parent has been set.

Specified by:
monitor in interface Notifying

notify

public void notify(Notice notice)
Description copied from interface: Notifiable
Respond to the Notice passed.

When this method is called, the Notifiable should respond based on

Specified by:
notify in interface Notifiable

notifyMonitor

public final void notifyMonitor(Notifying.Impact impact)
Description copied from interface: Notifying
Call notify on the parent monitor in the notification tree, typically with itself as parameter to the Notice passed.

Has no effect if no monitor has been set.

This is the usual means to trigger a surface retargeting, being called by an exposing SFacet on its target.

Specified by:
notifyMonitor in interface Notifying
Parameters:
impact - suggests the level of retargeting required

blockNotification

protected boolean blockNotification()
Enables notification to be restricted to this member of the tree.

Checked by notify(Notice); default returns false.


setMonitor

public final void setMonitor(Notifiable monitor)
Description copied from interface: Notifying
Attach the Notifying to a Notifiable parent in the notification tree.

Specified by:
setMonitor in interface Notifying