Interface IContext

All Superinterfaces:
Serializable
All Known Implementing Classes:
VelocityContext

@OpenApiAll public interface IContext extends Serializable
Interface describing the application data context. This set of routines is used by the application to set and remove 'named' data object to pass them to the template engine to use when rendering a template.
Since:
Jun 11, 2007
  • Method Summary

    Modifier and Type
    Method
    Description
    Finds all the keys of the entry in this context.
    Finds all the keys of the entry in this context as array.
    get(String key)
    Gets the value corresponding to the provided key from the context.
    put(String key, Object value)
    Adds a name/value pair to the context.
    Removes the value associated with the specified key from the context.
    void
    Removes all items from this context.
  • Method Details

    • get

      Object get(String key)
      Gets the value corresponding to the provided key from the context.
      Parameters:
      key - The name of the desired value.
      Returns:
      The value corresponding to the provided key.
    • put

      Object put(String key, Object value)
      Adds a name/value pair to the context.
      Parameters:
      key - The name to key the provided value with.
      value - The corresponding value.
      Returns:
      The old object or null if there was no old object.
    • remove

      Object remove(String key)
      Removes the value associated with the specified key from the context.
      Parameters:
      key - The name of the value to remove.
      Returns:
      The value that the key was mapped to, or null if unmapped.
    • removeAll

      void removeAll()
      Removes all items from this context.
    • contextKeys

      Iterator<String> contextKeys()
      Finds all the keys of the entry in this context.
      Returns:
      an Iterator of all the key of the entry in this context.
    • contextKeysArray

      String[] contextKeysArray()
      Finds all the keys of the entry in this context as array.
      Returns:
      an array of all the key of the entry in this context.