org.mentawai.core
Interface Output

All Known Implementing Classes:
MapOutput, OutjectionFilter, OutputWrapper, ResponseOutput

public interface Output

Defines the behavior of an action output. An output is like a map where you can put and remove values by name.

Author:
Sergio Oliveira

Method Summary
 java.lang.Object getValue(java.lang.String name)
          Gets an output value by name.
 boolean isEmpty()
          Returns true is this output has no values.
 java.util.Iterator<java.lang.String> keys()
          Gets an iterator with the names of each output value.
 void removeValue(java.lang.String name)
          Removes an output value by name.
 void setObject(java.lang.Object bean)
          Sets the properties of the given bean in the action output, in other words, extract all attributes from the given object and place them in the action output.
 void setObject(java.lang.Object bean, java.lang.String prefix)
          Sets the properties of the given bean in the action output, in other words, extract all attributes from the given object and place them in the action output.
 void setValue(java.lang.String name, java.lang.Object value)
          Sets an output value by name.
 

Method Detail

setValue

void setValue(java.lang.String name,
              java.lang.Object value)
Sets an output value by name.

Parameters:
name - The name of the value
value - The value

getValue

java.lang.Object getValue(java.lang.String name)
Gets an output value by name.

Parameters:
name - The name of the value
Returns:
The value or null if it does not exist

removeValue

void removeValue(java.lang.String name)
Removes an output value by name.

Parameters:
name - The name of the value

isEmpty

boolean isEmpty()
Returns true is this output has no values.

Returns:
true if this output has no values

keys

java.util.Iterator<java.lang.String> keys()
Gets an iterator with the names of each output value.

Returns:
An iterator with all the names

setObject

void setObject(java.lang.Object bean)
Sets the properties of the given bean in the action output, in other words, extract all attributes from the given object and place them in the action output.

Parameters:
bean - The bean (object) from where to get the properties.

setObject

void setObject(java.lang.Object bean,
               java.lang.String prefix)
Sets the properties of the given bean in the action output, in other words, extract all attributes from the given object and place them in the action output. Use the given prefix when placing in the output.

Parameters:
bean - The bean (object) from where to get the properties.
prefix - The prefix to use when placing the properties in the output.


Copyright © 2005 Mentawai Team. All Rights Reserved.