com.ibm.openpages.api

Class Context

  • java.lang.Object
    • com.ibm.openpages.api.Context


  • public class Context
    extends java.lang.Object
    Application context used to encapsulate system data to allow it to be shared with other parts of the application. List of valid key values: com.ibm.openpages.sdk.service.factory: specifies the complete path for a service factory implementation (e.g., com.ibm.openpages.sdk.service.local.LocalServiceFactory) com.ibm.openpages.platform.sdk.configuration: for system configuration information
    • Constructor Summary

      Constructors 
      Constructor and Description
      Context()
      Class constructor.
      Context(Context context)
      Copy constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void clear()
      Removes all of the mappings from this context.
      java.lang.Object get(java.lang.String key)
      Returns the value to which the specified key is mapped, or null if this context contains no mapping for the key.
      boolean getDisableAllTriggers()
      Returns whether all triggers are disabled or not.
      java.lang.Object put(java.lang.String key, java.lang.Object value)
      Associates the specified value with the specified key in this context.
      void setDisableAllTriggers(boolean value)
      Sets whether disables (or enables) all triggers.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Context

        public Context()
        Class constructor.
      • Context

        public Context(Context context)
        Copy constructor.
    • Method Detail

      • get

        public java.lang.Object get(java.lang.String key)
        Returns the value to which the specified key is mapped, or null if this context contains no mapping for the key.
        Parameters:
        key - the key whose associated value is to be returned
        Returns:
        the value to which the specified key is mapped, or null if this context contains no mapping for the key
      • put

        public java.lang.Object put(java.lang.String key,
                                    java.lang.Object value)
        Associates the specified value with the specified key in this context. If the context previously contained a mapping for the key, the old value is replaced by the specified value.
        Parameters:
        key - the key with which the specified value is to be associated
        value - the value to be associated with the specified key
        Returns:
        the previous value associated with key, or null if there was no mapping for key
      • clear

        public void clear()
        Removes all of the mappings from this context.
      • getDisableAllTriggers

        public boolean getDisableAllTriggers()
        Returns whether all triggers are disabled or not.
        Returns:
        true to all triggers are disabled, otherwise false
      • setDisableAllTriggers

        public void setDisableAllTriggers(boolean value)

        Sets whether disables (or enables) all triggers.

        Example:
         // Disable all triggers within a trigger event action
         event.getContext().setDisableAllTriggers(true);
         ...
         // Enable all triggers
         event.getContext().setDisableAllTriggers(false);
         
        Parameters:
        value - true to disable all triggers, otherwise false

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2021. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.