Class StochasticNetUtils.FakePluginContext

  • All Implemented Interfaces:
    org.processmining.framework.plugin.GlobalContext, org.processmining.framework.plugin.ObjectConstructor, org.processmining.framework.plugin.PluginContext
    Enclosing class:
    StochasticNetUtils

    public static class StochasticNetUtils.FakePluginContext
    extends org.processmining.contexts.uitopia.UIPluginContext
    Created by andreas on 25/01/2017.
    • Field Summary

      • Fields inherited from class org.processmining.framework.plugin.impl.AbstractPluginContext

        progress
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected FakePluginContext​(org.processmining.contexts.uitopia.UIPluginContext context, java.lang.String label)  
        FakePluginContext​(org.processmining.framework.plugin.PluginContext context)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends org.processmining.framework.connections.Connection>
      T
      addConnection​(T c)
      Registers the given connection in the global context.
      void clear()  
      org.processmining.framework.connections.ConnectionManager getConnectionManager()
      Returns the connection manager.
      org.processmining.framework.plugin.ProMFuture<?> getFutureResult​(int i)
      This method should only be used by a plugin, in the body of that plugin.
      org.processmining.framework.plugin.Progress getProgress()
      Returns the progress object corresponding to this context
      org.processmining.framework.plugin.PluginExecutionResult getResult()
      This method returns the PluginExecutionResult of the plugin which is invoked in this context.
      void log​(java.lang.String message)
      Same as calling log(message, MessageLevel.NORMAL);
      void log​(java.lang.String message, org.processmining.framework.plugin.events.Logger.MessageLevel level)
      The provided String is provided to the context for information.
      void log​(java.lang.Throwable exception)
      The provided Exception is provided to the context.
      void setFuture​(org.processmining.framework.plugin.PluginExecutionResult futureToBe)  
      • Methods inherited from class org.processmining.contexts.uitopia.UIPluginContext

        createChildContext, createTypedChildContext, getExecutor, getGlobalContext, getRootContext, getTask, openFile, openFiles, saveFile, setTask, showConfiguration, showWizard
      • Methods inherited from class org.processmining.framework.plugin.impl.AbstractPluginContext

        createNewPluginContextID, deleteChild, equals, getChildContexts, getID, getLabel, getLoggingListeners, getParentContext, getPluginContextType, getPluginDescriptor, getPluginLifeCycleEventListeners, getPluginManager, getProgressEventListeners, getProvidedObjectManager, hasPluginDescriptorInPath, invokeBinding, invokePlugin, isDistantChildOf, setPluginDescriptor, toString, tryToFindOrConstructAllObjects, tryToFindOrConstructFirstNamedObject, tryToFindOrConstructFirstObject
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • FakePluginContext

        protected FakePluginContext​(org.processmining.contexts.uitopia.UIPluginContext context,
                                    java.lang.String label)
      • FakePluginContext

        public FakePluginContext​(org.processmining.framework.plugin.PluginContext context)
    • Method Detail

      • getConnectionManager

        public org.processmining.framework.connections.ConnectionManager getConnectionManager()
        Description copied from interface: org.processmining.framework.plugin.GlobalContext
        Returns the connection manager. The connection manager can be used to query for connections which are registered in ProM.
        Specified by:
        getConnectionManager in interface org.processmining.framework.plugin.GlobalContext
        Overrides:
        getConnectionManager in class org.processmining.framework.plugin.impl.AbstractPluginContext
        Returns:
        the connection manager
      • addConnection

        public <T extends org.processmining.framework.connections.Connection> T addConnection​(T c)
        Description copied from interface: org.processmining.framework.plugin.PluginContext
        Registers the given connection in the global context. The implementation is addConnection(this,c);
        Specified by:
        addConnection in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        addConnection in class org.processmining.framework.plugin.impl.AbstractPluginContext
      • clear

        public void clear()
        Specified by:
        clear in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        clear in class org.processmining.framework.plugin.impl.AbstractPluginContext
      • getProgress

        public org.processmining.framework.plugin.Progress getProgress()
        Description copied from interface: org.processmining.framework.plugin.PluginContext
        Returns the progress object corresponding to this context
        Specified by:
        getProgress in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        getProgress in class org.processmining.contexts.uitopia.UIPluginContext
        Returns:
        the progress object corresponding to this context
      • getFutureResult

        public org.processmining.framework.plugin.ProMFuture<?> getFutureResult​(int i)
        Description copied from interface: org.processmining.framework.plugin.PluginContext
        This method should only be used by a plugin, in the body of that plugin. That is the only location, where it is guaranteed that each result object in getResults() can safely be cast to a ProMFuture.
        Specified by:
        getFutureResult in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        getFutureResult in class org.processmining.framework.plugin.impl.AbstractPluginContext
        Returns:
      • setFuture

        public void setFuture​(org.processmining.framework.plugin.PluginExecutionResult futureToBe)
        Specified by:
        setFuture in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        setFuture in class org.processmining.framework.plugin.impl.AbstractPluginContext
      • getResult

        public org.processmining.framework.plugin.PluginExecutionResult getResult()
        Description copied from class: org.processmining.framework.plugin.impl.AbstractPluginContext
        This method returns the PluginExecutionResult of the plugin which is invoked in this context. This future result is set by PluginManager.invoke() and will not be available (will be null) until the invoke() method is called.
        Specified by:
        getResult in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        getResult in class org.processmining.framework.plugin.impl.AbstractPluginContext
        Returns:
        The PluginExecutionResult that represents the result of this plugin invocation
      • log

        public void log​(java.lang.String message,
                        org.processmining.framework.plugin.events.Logger.MessageLevel level)
        Description copied from class: org.processmining.framework.plugin.impl.AbstractPluginContext
        The provided String is provided to the context for information. It can for example signal a state change of a plugin. Note that some contexts can completely ignore this message.
        Specified by:
        log in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        log in class org.processmining.framework.plugin.impl.AbstractPluginContext
        Parameters:
        message - the message to log
        level - the message level
      • log

        public void log​(java.lang.String message)
        Description copied from class: org.processmining.framework.plugin.impl.AbstractPluginContext
        Same as calling log(message, MessageLevel.NORMAL);
        Specified by:
        log in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        log in class org.processmining.framework.plugin.impl.AbstractPluginContext
        Parameters:
        message - The message
      • log

        public void log​(java.lang.Throwable exception)
        Description copied from class: org.processmining.framework.plugin.impl.AbstractPluginContext
        The provided Exception is provided to the context. It signals the context about an error in the plugin, that specifically lead to abnormal termination. The plugin signaling the exception is no longer executing!
        Specified by:
        log in interface org.processmining.framework.plugin.PluginContext
        Overrides:
        log in class org.processmining.framework.plugin.impl.AbstractPluginContext
        Parameters:
        exception - the exception thrown