NextApp Echo3
v3.0.b4

nextapp.echo.webcontainer
Class AbstractCommandSynchronizePeer

java.lang.Object
  extended by nextapp.echo.webcontainer.AbstractCommandSynchronizePeer
All Implemented Interfaces:
CommandSynchronizePeer
Direct Known Subclasses:
BrowserOpenWindowCommandPeer, BrowserRedirectCommandPeer

public abstract class AbstractCommandSynchronizePeer
extends java.lang.Object
implements CommandSynchronizePeer

Default abstract implementation of CommandSynchronizePeer.


Nested Class Summary
static interface AbstractCommandSynchronizePeer.IndexedPropertyPeer
          A peer for rendering an indexed property of a Command.
static interface AbstractCommandSynchronizePeer.PropertyPeer
          A peer for rendering a non-indexed property of a Command.
 
Constructor Summary
AbstractCommandSynchronizePeer()
           
 
Method Summary
 void addProperty(java.lang.String propertyName, AbstractCommandSynchronizePeer.IndexedPropertyPeer propertyPeer)
          Adds an indexed property that will be rendered using an IndexedPropertyPeer.
 void addProperty(java.lang.String propertyName, AbstractCommandSynchronizePeer.PropertyPeer propertyPeer)
          Adds a non-indexed property that will be rendered using a PropertyPeer.
 void addProperty(java.lang.String propertyName, boolean indexed)
          Adds a property.
 java.lang.String getClientCommandType()
          Returns the remote client component name.
 java.lang.Object getProperty(nextapp.echo.app.util.Context context, nextapp.echo.app.Command command, java.lang.String propertyName, int propertyIndex)
          Returns the value of a specific property.
 java.util.Iterator getPropertyIndices(nextapp.echo.app.util.Context context, nextapp.echo.app.Command command, java.lang.String propertyName)
          Determines which indices of a particular property are set.
 java.util.Iterator getPropertyNames(nextapp.echo.app.util.Context context, nextapp.echo.app.Command command)
          Returns an Iterator over the collection of names of all output properties that should be rendered to the remote client.
 void init(nextapp.echo.app.util.Context context)
          Initializes the peer.
 boolean isPropertyIndexed(nextapp.echo.app.util.Context context, nextapp.echo.app.Command command, java.lang.String propertyName)
          Determines if the specified output property is indexed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nextapp.echo.webcontainer.CommandSynchronizePeer
getCommandClass
 

Constructor Detail

AbstractCommandSynchronizePeer

public AbstractCommandSynchronizePeer()
Method Detail

addProperty

public void addProperty(java.lang.String propertyName,
                        AbstractCommandSynchronizePeer.PropertyPeer propertyPeer)
Adds a non-indexed property that will be rendered using a PropertyPeer.

Parameters:
propertyName - the name of the property
propertyPeer - the PropertyPeer which will render it

addProperty

public void addProperty(java.lang.String propertyName,
                        AbstractCommandSynchronizePeer.IndexedPropertyPeer propertyPeer)
Adds an indexed property that will be rendered using an IndexedPropertyPeer.

Parameters:
propertyName - the name of the property
propertyPeer - the IndexedPropertyPeer which will render it

addProperty

public void addProperty(java.lang.String propertyName,
                        boolean indexed)
Adds a property. Property names added via this method will be returned by the getPropertyName() method of this class. If the indexed flag is set, the isPropertyIndexed method will also return true for this property name

Parameters:
propertyName - the property name to add
indexed - a flag indicating whether the property is indexed

getClientCommandType

public java.lang.String getClientCommandType()
Description copied from interface: CommandSynchronizePeer
Returns the remote client component name.

Specified by:
getClientCommandType in interface CommandSynchronizePeer
See Also:
CommandSynchronizePeer.getClientCommandType()

getProperty

public java.lang.Object getProperty(nextapp.echo.app.util.Context context,
                                    nextapp.echo.app.Command command,
                                    java.lang.String propertyName,
                                    int propertyIndex)
Description copied from interface: CommandSynchronizePeer
Returns the value of a specific property.

Specified by:
getProperty in interface CommandSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
command - the Command being rendered
propertyName - the name of the property being rendered
propertyIndex - the property index (only relevant for indexed properties, -1 will be provided for non-indexed properties)
Returns:
the property value
See Also:
CommandSynchronizePeer.getProperty(nextapp.echo.app.util.Context, nextapp.echo.app.Command, java.lang.String, int)

getPropertyIndices

public java.util.Iterator getPropertyIndices(nextapp.echo.app.util.Context context,
                                             nextapp.echo.app.Command command,
                                             java.lang.String propertyName)
Description copied from interface: CommandSynchronizePeer
Determines which indices of a particular property are set. This method will only be invoked on properties where isPropertyIndexed() has returned true.

Specified by:
getPropertyIndices in interface CommandSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
command - the command
propertyName - the property name
Returns:
an Iterator that returns the set indices in incrementing order as Integers
See Also:
CommandSynchronizePeer.getPropertyIndices(nextapp.echo.app.util.Context, nextapp.echo.app.Command, java.lang.String)

getPropertyNames

public java.util.Iterator getPropertyNames(nextapp.echo.app.util.Context context,
                                           nextapp.echo.app.Command command)
Description copied from interface: CommandSynchronizePeer
Returns an Iterator over the collection of names of all output properties that should be rendered to the remote client. Only the names of properties with non-default values should be returned.

Specified by:
getPropertyNames in interface CommandSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
command - the command
Returns:
an Iterator of property names
See Also:
CommandSynchronizePeer.getPropertyNames(nextapp.echo.app.util.Context, nextapp.echo.app.Command)

init

public void init(nextapp.echo.app.util.Context context)
Description copied from interface: CommandSynchronizePeer
Initializes the peer. This method will be invoked prior to rendering a specific Command for the first time.

Specified by:
init in interface CommandSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
See Also:
CommandSynchronizePeer.init(nextapp.echo.app.util.Context)

isPropertyIndexed

public boolean isPropertyIndexed(nextapp.echo.app.util.Context context,
                                 nextapp.echo.app.Command command,
                                 java.lang.String propertyName)
Description copied from interface: CommandSynchronizePeer
Determines if the specified output property is indexed.

Specified by:
isPropertyIndexed in interface CommandSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
command - the command
propertyName - the property name
Returns:
true if the property is indexed
See Also:
CommandSynchronizePeer.isPropertyIndexed(nextapp.echo.app.util.Context, nextapp.echo.app.Command, java.lang.String)

NextApp Echo3
v3.0.b4