Class Context


  • public class Context
    extends Object
    A Context contains operation chain execution information, such as the user who executed the operation chain and a map of Exporters.
    • Constructor Detail

      • Context

        public Context()
      • Context

        public Context​(User user)
      • Context

        public Context​(Context context)
        Create a new Context based on the provided context. A shallow clone of the context is carried out and a new job ID is created.
        Parameters:
        context - the context to shallow clone.
    • Method Detail

      • shallowClone

        public Context shallowClone()
        Creates a clone of the current Context and returns it with a new job ID.
        Returns:
        cloned Context
      • getUser

        public User getUser()
      • getJobId

        public final String getJobId()
      • setVariables

        public void setVariables​(Map<String,​Object> variables)
      • setVariable

        public void setVariable​(String key,
                                Object value)
      • addVariables

        public void addVariables​(Map<String,​Object> variables)
      • addExporter

        public void addExporter​(Exporter exporter)
      • getExporter

        public <E> E getExporter​(Class<? extends E> exporterClass)
      • setConfig

        public void setConfig​(String key,
                              Object value)
      • getOriginalOpChain

        public OperationChain<?> getOriginalOpChain()
        Gets the original operation chain. This should not be modified.
        Returns:
        the original operation chain.
      • setOriginalOpChain

        public void setOriginalOpChain​(OperationChain<?> originalOpChain)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • createJobId

        public static String createJobId()