Class ProvidedObjectHelper


  • public class ProvidedObjectHelper
    extends java.lang.Object
    Author:
    michael, F. Mannhardt
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void changeProvidedObjectName​(org.processmining.framework.plugin.PluginContext context, java.lang.Object obj, java.lang.String newName)
      Rename the provided object
      static java.lang.String getProvidedObjectLabel​(org.processmining.framework.plugin.PluginContext context, java.lang.Object obj)
      Returns the label of the provided object
      static <T> java.util.Collection<T> getProvidedObjects​(org.processmining.framework.plugin.PluginContext context, java.lang.Class<T> clazz)
      List all the provided objects of the type
      static <T> void publish​(org.processmining.framework.plugin.PluginContext context, java.lang.String name, T object, java.lang.Class<? super T> clazz, boolean favorite)
      Will publish object as a provided object with the class specified by clazz.
      static void raise​(org.processmining.framework.plugin.PluginContext context, java.lang.Object object)
      Show the visualizer for the provided object
      static void setFavorite​(org.processmining.framework.plugin.PluginContext context, java.lang.Object object)  
      static void setFavorite​(org.processmining.framework.plugin.PluginContext context, java.lang.Object object, boolean favorite)  
      • Methods inherited from class java.lang.Object

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

      • ProvidedObjectHelper

        public ProvidedObjectHelper()
    • Method Detail

      • publish

        public static <T> void publish​(org.processmining.framework.plugin.PluginContext context,
                                       java.lang.String name,
                                       T object,
                                       java.lang.Class<? super T> clazz,
                                       boolean favorite)
        Will publish object as a provided object with the class specified by clazz. If the context is a UIPluginContext and favorite is true, it will be marked as a favorite object as well. Finally, if it is marked as favorite, it will also be show and ProM will switch to the Views tab. Encapsulation is for scared little boys/girls who still believe in the invisible pink unicorn (IPU).
        Type Parameters:
        T -
        Parameters:
        context -
        name -
        object -
        clazz -
        favorite -
      • raise

        public static void raise​(org.processmining.framework.plugin.PluginContext context,
                                 java.lang.Object object)
        Show the visualizer for the provided object
        Parameters:
        context -
        object -
      • setFavorite

        public static void setFavorite​(org.processmining.framework.plugin.PluginContext context,
                                       java.lang.Object object)
        Parameters:
        context -
        object -
      • setFavorite

        public static void setFavorite​(org.processmining.framework.plugin.PluginContext context,
                                       java.lang.Object object,
                                       boolean favorite)
        Parameters:
        context -
        object -
        favorite -
      • getProvidedObjects

        public static <T> java.util.Collection<T> getProvidedObjects​(org.processmining.framework.plugin.PluginContext context,
                                                                     java.lang.Class<T> clazz)
        List all the provided objects of the type
        Parameters:
        context -
        clazz -
        Returns:
      • changeProvidedObjectName

        public static void changeProvidedObjectName​(org.processmining.framework.plugin.PluginContext context,
                                                    java.lang.Object obj,
                                                    java.lang.String newName)
        Rename the provided object
        Parameters:
        context -
        obj - the object instance
        newName -
      • getProvidedObjectLabel

        public static java.lang.String getProvidedObjectLabel​(org.processmining.framework.plugin.PluginContext context,
                                                              java.lang.Object obj)
        Returns the label of the provided object
        Parameters:
        context -
        obj -
        Returns: