Class ProMResourceManager

  • All Implemented Interfaces:
    java.util.EventListener, org.deckfour.uitopia.api.event.Listenable<org.deckfour.uitopia.api.event.UpdateListener>, org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>, org.processmining.framework.plugin.events.ConnectionObjectListener, org.processmining.framework.plugin.events.PluginLifeCycleEventListener, org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener

    public class ProMResourceManager
    extends UpdateSignaller
    implements org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>, org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener, org.processmining.framework.plugin.events.PluginLifeCycleEventListener, org.processmining.framework.plugin.events.ConnectionObjectListener
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.processmining.framework.plugin.events.ConnectionObjectListener

        org.processmining.framework.plugin.events.ConnectionObjectListener.ListenerList
      • Nested classes/interfaces inherited from interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener

        org.processmining.framework.plugin.events.PluginLifeCycleEventListener.List
      • Nested classes/interfaces inherited from interface org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener

        org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener.ListenerList
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addedImportPlugins()  
      <R extends ProMResource<?>>
      R
      addResource​(org.processmining.framework.providedobjects.ProvidedObjectID id, R res)  
      org.deckfour.uitopia.api.model.ResourceType addType​(java.lang.Class<?> type)  
      void connectionCreated​(org.processmining.framework.connections.ConnectionID id)
      This method signals the creation of a connection with the given ID.
      void connectionDeleted​(org.processmining.framework.connections.ConnectionID id)
      This method signals the deletion of a connection with the given ID.
      void connectionUpdated​(org.processmining.framework.connections.ConnectionID id)
      This method signals that the connection with the given ID was updated.
      boolean exportResource​(org.deckfour.uitopia.api.model.Resource resource)  
      java.util.List<ProMResource<?>> getAllResources()  
      java.util.List<ProMResource<?>> getAllResources​(org.deckfour.uitopia.api.model.ResourceFilter filter)  
      java.util.List<org.deckfour.uitopia.api.model.ResourceType> getAllSupportedResourceTypes()  
      java.util.List<ProMResource<?>> getChildrenOf​(org.deckfour.uitopia.api.model.Resource parent)  
      java.util.List<ProMResource<?>> getChildrenOf​(org.deckfour.uitopia.api.model.Resource parent, org.deckfour.uitopia.api.model.ResourceFilter filter)  
      java.util.Collection<javax.swing.filechooser.FileFilter> getExportFilters​(org.deckfour.uitopia.api.model.Resource resource)  
      java.util.List<ProMResource<?>> getFavoriteResources()  
      java.util.List<ProMResource<?>> getFavoriteResources​(org.deckfour.uitopia.api.model.ResourceFilter filter)  
      java.util.List<ProMResource<?>> getImportedResources()  
      java.util.List<ProMResource<?>> getImportedResources​(org.deckfour.uitopia.api.model.ResourceFilter filter)  
      java.util.List<ProMResource<?>> getParentsOf​(org.deckfour.uitopia.api.model.Resource child)  
      java.util.List<ProMResource<?>> getParentsOf​(org.deckfour.uitopia.api.model.Resource child, org.deckfour.uitopia.api.model.ResourceFilter filter)  
      ProMResource<?> getResourceForInstance​(java.lang.Object o)  
      org.deckfour.uitopia.api.model.ResourceType getResourceTypeFor​(java.lang.Class<?> type)  
      java.util.List<org.deckfour.uitopia.api.model.ResourceType> getResourceTypes​(java.util.List<? extends org.deckfour.uitopia.api.model.Resource> res)  
      boolean importResource()
      Start the import dialog for a resource.
      boolean importResource​(org.processmining.framework.plugin.PluginParameterBinding binding, java.io.File... files)
      Can be called from the EDT or any other thread.
      boolean importResources​(java.io.File... files)
      Can be called from the EDT or any other thread.
      static ProMResourceManager initialize​(UIContext context)  
      boolean isResourceType​(java.lang.Class<?> type)  
      void pluginCancelled​(org.processmining.framework.plugin.PluginContext context)
      This method is invoked on a context, if it is cancelled
      void pluginCompleted​(org.processmining.framework.plugin.PluginContext pluginContext)
      This method is invoked on a context, if it is completed
      void pluginCreated​(org.processmining.framework.plugin.PluginContext context)
      This method is invoked on a parent context, if a child context of that parent is created.
      void pluginDeleted​(org.processmining.framework.plugin.PluginContext context)
      This method is invoked on a context, if it's deleted from its parent
      void pluginFutureCreated​(org.processmining.framework.plugin.PluginContext context)
      This method is invoked on a context, if it's future was set.
      void pluginResumed​(org.processmining.framework.plugin.PluginContext context)
      This method is invoked on a context, if it is resumed
      void pluginStarted​(org.processmining.framework.plugin.PluginContext context)
      This method is invoked on a context, if it is started
      void pluginSuspended​(org.processmining.framework.plugin.PluginContext context)
      This method is invoked on a context, if it is suspended
      void pluginTerminatedWithError​(org.processmining.framework.plugin.PluginContext context, java.lang.Throwable t)
      This method is invoked on a context, if it throws an exception
      void providedObjectCreated​(org.processmining.framework.providedobjects.ProvidedObjectID objectID, org.processmining.framework.plugin.PluginContext context)  
      void providedObjectDeleted​(org.processmining.framework.providedobjects.ProvidedObjectID id)  
      void providedObjectFutureReady​(org.processmining.framework.providedobjects.ProvidedObjectID id)  
      void providedObjectNameChanged​(org.processmining.framework.providedobjects.ProvidedObjectID id)  
      void providedObjectObjectChanged​(org.processmining.framework.providedobjects.ProvidedObjectID id)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.deckfour.uitopia.api.event.Listenable

        addListener, getListeners, removeAllListeners, removeListener
    • Method Detail

      • addType

        public org.deckfour.uitopia.api.model.ResourceType addType​(java.lang.Class<?> type)
      • getExportFilters

        public java.util.Collection<javax.swing.filechooser.FileFilter> getExportFilters​(org.deckfour.uitopia.api.model.Resource resource)
        Specified by:
        getExportFilters in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • exportResource

        public boolean exportResource​(org.deckfour.uitopia.api.model.Resource resource)
                               throws java.io.IOException
        Specified by:
        exportResource in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
        Throws:
        java.io.IOException
      • getAllResources

        public java.util.List<ProMResource<?>> getAllResources()
        Specified by:
        getAllResources in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getAllResources

        public java.util.List<ProMResource<?>> getAllResources​(org.deckfour.uitopia.api.model.ResourceFilter filter)
        Specified by:
        getAllResources in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getAllSupportedResourceTypes

        public java.util.List<org.deckfour.uitopia.api.model.ResourceType> getAllSupportedResourceTypes()
        Specified by:
        getAllSupportedResourceTypes in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getChildrenOf

        public java.util.List<ProMResource<?>> getChildrenOf​(org.deckfour.uitopia.api.model.Resource parent)
        Specified by:
        getChildrenOf in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getChildrenOf

        public java.util.List<ProMResource<?>> getChildrenOf​(org.deckfour.uitopia.api.model.Resource parent,
                                                             org.deckfour.uitopia.api.model.ResourceFilter filter)
        Specified by:
        getChildrenOf in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getFavoriteResources

        public java.util.List<ProMResource<?>> getFavoriteResources()
        Specified by:
        getFavoriteResources in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getFavoriteResources

        public java.util.List<ProMResource<?>> getFavoriteResources​(org.deckfour.uitopia.api.model.ResourceFilter filter)
        Specified by:
        getFavoriteResources in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getImportedResources

        public java.util.List<ProMResource<?>> getImportedResources()
        Specified by:
        getImportedResources in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getImportedResources

        public java.util.List<ProMResource<?>> getImportedResources​(org.deckfour.uitopia.api.model.ResourceFilter filter)
        Specified by:
        getImportedResources in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getParentsOf

        public java.util.List<ProMResource<?>> getParentsOf​(org.deckfour.uitopia.api.model.Resource child)
        Specified by:
        getParentsOf in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • getParentsOf

        public java.util.List<ProMResource<?>> getParentsOf​(org.deckfour.uitopia.api.model.Resource child,
                                                            org.deckfour.uitopia.api.model.ResourceFilter filter)
        Specified by:
        getParentsOf in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • importResource

        public boolean importResource()
        Start the import dialog for a resource. Can be called from the EDT or any other thread. Makes sure that the dialog-part of the actual import is run in the EDT.
        Specified by:
        importResource in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • importResources

        public boolean importResources​(java.io.File... files)
        Can be called from the EDT or any other thread.
        Specified by:
        importResources in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • importResource

        public boolean importResource​(org.processmining.framework.plugin.PluginParameterBinding binding,
                                      java.io.File... files)
        Can be called from the EDT or any other thread. Makes sure that the dialog-par tof the actual import is run in the EDT.
      • getResourceTypeFor

        public org.deckfour.uitopia.api.model.ResourceType getResourceTypeFor​(java.lang.Class<?> type)
      • isResourceType

        public boolean isResourceType​(java.lang.Class<?> type)
      • getResourceTypes

        public java.util.List<org.deckfour.uitopia.api.model.ResourceType> getResourceTypes​(java.util.List<? extends org.deckfour.uitopia.api.model.Resource> res)
        Specified by:
        getResourceTypes in interface org.deckfour.uitopia.api.hub.ResourceManager<ProMResource<?>>
      • providedObjectCreated

        public void providedObjectCreated​(org.processmining.framework.providedobjects.ProvidedObjectID objectID,
                                          org.processmining.framework.plugin.PluginContext context)
        Specified by:
        providedObjectCreated in interface org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener
      • providedObjectDeleted

        public void providedObjectDeleted​(org.processmining.framework.providedobjects.ProvidedObjectID id)
        Specified by:
        providedObjectDeleted in interface org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener
      • providedObjectFutureReady

        public void providedObjectFutureReady​(org.processmining.framework.providedobjects.ProvidedObjectID id)
        Specified by:
        providedObjectFutureReady in interface org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener
      • providedObjectNameChanged

        public void providedObjectNameChanged​(org.processmining.framework.providedobjects.ProvidedObjectID id)
        Specified by:
        providedObjectNameChanged in interface org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener
      • providedObjectObjectChanged

        public void providedObjectObjectChanged​(org.processmining.framework.providedobjects.ProvidedObjectID id)
        Specified by:
        providedObjectObjectChanged in interface org.processmining.framework.plugin.events.ProvidedObjectLifeCycleListener
      • addResource

        public <R extends ProMResource<?>> R addResource​(org.processmining.framework.providedobjects.ProvidedObjectID id,
                                                         R res)
      • getResourceForInstance

        public ProMResource<?> getResourceForInstance​(java.lang.Object o)
      • pluginCancelled

        public void pluginCancelled​(org.processmining.framework.plugin.PluginContext context)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a context, if it is cancelled
        Specified by:
        pluginCancelled in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        context - the context
      • pluginCompleted

        public void pluginCompleted​(org.processmining.framework.plugin.PluginContext pluginContext)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a context, if it is completed
        Specified by:
        pluginCompleted in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        pluginContext - the context
      • pluginCreated

        public void pluginCreated​(org.processmining.framework.plugin.PluginContext context)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a parent context, if a child context of that parent is created.
        Specified by:
        pluginCreated in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        context - the new Child context
      • pluginDeleted

        public void pluginDeleted​(org.processmining.framework.plugin.PluginContext context)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a context, if it's deleted from its parent
        Specified by:
        pluginDeleted in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        context - the context
      • pluginFutureCreated

        public void pluginFutureCreated​(org.processmining.framework.plugin.PluginContext context)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a context, if it's future was set.
        Specified by:
        pluginFutureCreated in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        context - the context
      • pluginResumed

        public void pluginResumed​(org.processmining.framework.plugin.PluginContext context)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a context, if it is resumed
        Specified by:
        pluginResumed in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        context - the context
      • pluginStarted

        public void pluginStarted​(org.processmining.framework.plugin.PluginContext context)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a context, if it is started
        Specified by:
        pluginStarted in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        context - the context
      • pluginSuspended

        public void pluginSuspended​(org.processmining.framework.plugin.PluginContext context)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a context, if it is suspended
        Specified by:
        pluginSuspended in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        context - the context
      • pluginTerminatedWithError

        public void pluginTerminatedWithError​(org.processmining.framework.plugin.PluginContext context,
                                              java.lang.Throwable t)
        Description copied from interface: org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        This method is invoked on a context, if it throws an exception
        Specified by:
        pluginTerminatedWithError in interface org.processmining.framework.plugin.events.PluginLifeCycleEventListener
        Parameters:
        context - the context
      • addedImportPlugins

        public void addedImportPlugins()
      • connectionCreated

        public void connectionCreated​(org.processmining.framework.connections.ConnectionID id)
        Description copied from interface: org.processmining.framework.plugin.events.ConnectionObjectListener
        This method signals the creation of a connection with the given ID. For access to the actual connection, the connectionManager should be used.
        Specified by:
        connectionCreated in interface org.processmining.framework.plugin.events.ConnectionObjectListener
      • connectionDeleted

        public void connectionDeleted​(org.processmining.framework.connections.ConnectionID id)
        Description copied from interface: org.processmining.framework.plugin.events.ConnectionObjectListener
        This method signals the deletion of a connection with the given ID. For access to the actual connection, the connectionManager should be used.
        Specified by:
        connectionDeleted in interface org.processmining.framework.plugin.events.ConnectionObjectListener
      • connectionUpdated

        public void connectionUpdated​(org.processmining.framework.connections.ConnectionID id)
        Description copied from interface: org.processmining.framework.plugin.events.ConnectionObjectListener
        This method signals that the connection with the given ID was updated. For access to the actual connection, the connectionManager should be used. Be aware, that the actual pointers to the objects connected by the Connection with the given ID are not changed. Furthermore, it is wise not to update connections too often.
        Specified by:
        connectionUpdated in interface org.processmining.framework.plugin.events.ConnectionObjectListener