Interface ElementContext
-
- All Known Implementing Classes:
DefaultElementContext,LogicalPageElementContext,PhysicalPageElementContext
public interface ElementContextCreation-Date: 01.12.2005, 23:14:36- Author:
- Thomas Morgner
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetCounterValue(java.lang.String counterName)Returns the value for the given counter.java.lang.StringgetString(java.lang.String name)Retrieves the value for a given string.voidincrementCounter(java.lang.String name, int value)Increments the counter with the given name.booleanisCounterDefined(java.lang.String counterName)Checks, whether a counter is defined in this or one of the parent contexts.voidresetCounter(java.lang.String name, int value)Reseting an counter creates a new Counter-Instance.voidsetString(java.lang.String name, java.lang.String value, boolean define)Sets a named string.
-
-
-
Method Detail
-
isCounterDefined
boolean isCounterDefined(java.lang.String counterName)
Checks, whether a counter is defined in this or one of the parent contexts. A counter gets defined by the 'counter-reset' property.- Parameters:
counterName- the counter name.- Returns:
- true, if the counter is defined, false otherwise.
-
getCounterValue
int getCounterValue(java.lang.String counterName)
Returns the value for the given counter. If no counter exists under that name, this method returns 0. This method always returns the current value and ignores all page-policy definitions. Enforcing the page policy is up to the page context.- Parameters:
counterName-- Returns:
- the value for the given counter.
-
resetCounter
void resetCounter(java.lang.String name, int value)Reseting an counter creates a new Counter-Instance. Counters from parent elements are not affected and remain unchanged. All further operations issued by all sub-elements will now work with this counter.- Parameters:
name-value-
-
incrementCounter
void incrementCounter(java.lang.String name, int value)Increments the counter with the given name. If no counter is known under that name, the root node will create one.- Parameters:
name-value-
-
setString
void setString(java.lang.String name, java.lang.String value, boolean define)Sets a named string.- Parameters:
name-value-define-
-
getString
java.lang.String getString(java.lang.String name)
Retrieves the value for a given string. The value returned always represents the *actual* value, ignoring any possibly defined page-policies.- Parameters:
name-- Returns:
-
-