syntheticoperation
Class WriteOnlyAttributeHandler

java.lang.Object
  extended by com.wrq.vhi.script.api.AttributeEventHandler
      extended by syntheticoperation.WriteOnlyAttributeHandler
All Implemented Interfaces:
com.wrq.vhi.script.api.EventHandler

public class WriteOnlyAttributeHandler
extends com.wrq.vhi.script.api.AttributeEventHandler

Event handler that prevents reading from attributes, while pretending to do so.

The web applications generated by the Web Builder sometimes insist upon reading from attributes, even when they are never displayed. This event handler "pretends" to read the attribute, but only returns a single blank.


Field Summary
static java.lang.String description
           
static int readAttributeTimeout
          Timeout in seconds for the readAttribute() event.
static int writeAttributeTimeout
          Timeout in seconds for the writeAttribute() event.
 
Fields inherited from interface com.wrq.vhi.script.api.EventHandler
DEFAULT_TIMEOUT
 
Constructor Summary
WriteOnlyAttributeHandler()
           
 
Method Summary
 java.lang.String readAttribute(com.wrq.vhi.script.api.ReadAttributeEvent event)
          Return a string containing a single blank when reading this attribute.
 void writeAttribute(com.wrq.vhi.script.api.WriteAttributeEvent event)
          Write new value to this attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

public static final java.lang.String description
See Also:
Constant Field Values

readAttributeTimeout

public static final int readAttributeTimeout
Timeout in seconds for the readAttribute() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values

writeAttributeTimeout

public static final int writeAttributeTimeout
Timeout in seconds for the writeAttribute() event. A value of DEFAULT_TIMEOUT means the event will use the model defined default event timeout.

See Also:
Constant Field Values
Constructor Detail

WriteOnlyAttributeHandler

public WriteOnlyAttributeHandler()
Method Detail

readAttribute

public java.lang.String readAttribute(com.wrq.vhi.script.api.ReadAttributeEvent event)
                               throws com.wrq.apptrieve.agent.ApptrieveException
Return a string containing a single blank when reading this attribute.

Overrides:
readAttribute in class com.wrq.vhi.script.api.AttributeEventHandler
Parameters:
event - the event instance
Returns:
the attribute value
Throws:
com.wrq.apptrieve.agent.ApptrieveException

writeAttribute

public void writeAttribute(com.wrq.vhi.script.api.WriteAttributeEvent event)
                    throws com.wrq.apptrieve.agent.ApptrieveException
Write new value to this attribute.

Overrides:
writeAttribute in class com.wrq.vhi.script.api.AttributeEventHandler
Parameters:
event - the event instance
Throws:
com.wrq.apptrieve.agent.ApptrieveException