kieker.webgui.web.beans.view
Class AnalysisEditorGraphBean

java.lang.Object
  extended by kieker.webgui.web.beans.view.AnalysisEditorGraphBean

@Component
@Scope(value="view")
public final class AnalysisEditorGraphBean
extends Object

This bean contains the necessary data behind an graph of the analysis editor. It provides various methods to manipulate the current graph.

The class is a Spring managed bean with view scope to make sure that one user (even in one session) can open multiple projects at a time without causing any problems.

Author:
Nils Christian Ehmke

Constructor Summary
AnalysisEditorGraphBean()
          Creates a new instance of this class.
 
Method Summary
 void addComponent(kieker.analysis.model.analysisMetaModel.MIFilter filter)
          Adds a filter to the graph.
 void addComponent(kieker.analysis.model.analysisMetaModel.MIReader reader)
          Adds a reader to the graph.
 void addComponent(kieker.analysis.model.analysisMetaModel.MIRepository repository)
          Adds a repository to the graph.
 void addConnection(kieker.analysis.model.analysisMetaModel.MIPlugin source, kieker.analysis.model.analysisMetaModel.MIPlugin target, kieker.analysis.model.analysisMetaModel.MIOutputPort outputPort, kieker.analysis.model.analysisMetaModel.MIInputPort inputPort)
          Adds a connection between two components to the graph.
 void addConnection(kieker.analysis.model.analysisMetaModel.MIPlugin source, kieker.analysis.model.analysisMetaModel.MIRepository target, kieker.analysis.model.analysisMetaModel.MIRepositoryConnector repositoryPort)
          Adds a connection between two components to the graph.
 void addGlobalConfigurationInstance(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent globalConfigurationInstance)
          Adds a non removable node for the global configuration of the project.
 void addGraphListener(IGraphListener graphListener)
          Adds a listener to the graph.
 void addProject(kieker.analysis.model.analysisMetaModel.MIProject project)
          Adds a project to the graph.
 void declareGraph()
          Declares the graph.
 void deleteComponent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent component)
          Deletes a component from the graph.
 void deleteConnection(kieker.analysis.model.analysisMetaModel.MIPlugin source, kieker.analysis.model.analysisMetaModel.MIPlugin target, kieker.analysis.model.analysisMetaModel.MIOutputPort outputPort, kieker.analysis.model.analysisMetaModel.MIInputPort inputPort)
          Deletes a connection between two components within the graph.
 void deleteConnection(kieker.analysis.model.analysisMetaModel.MIPlugin source, kieker.analysis.model.analysisMetaModel.MIRepository target, kieker.analysis.model.analysisMetaModel.MIRepositoryConnector repositoryPort)
          Deletes a connection between two components within the graph.
 void initializeListeners()
          Initializes the listener for the graph.
 boolean isGridEnabled()
           
 boolean isSnapEnabled()
           
 void jsAddConnectionEvent()
          This method is called from JavaScript.
 void jsAutoLayoutEvent()
          This method is called from JavaScript.
 void jsDeleteComponentEvent()
          This method is called from JavaScript.
 void jsDeleteConnectionEvent()
          This method is called from JavaScript.
 void jsSelectComponentEvent()
          This method is called from JavaScript.
 void loadLayout(String layout)
          Loads a layout for the graph.
 void renameComponent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent component, String newName)
          Renames a component within the graph.
 void scaleToFit()
          Scales the graph to fit into the window.
 void selectComponent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent analysisComponent)
          Selects a given component.
 void setGridColor(String color)
          Sets the color of the grid to a new value.
 void setGridSize(int size)
          Sets the size of the grid to a new value.
 void startAutoLayout()
          Starts the auto layout of the graph.
 void switchGrid()
          Switches the visibility of the grid.
 void switchSnap()
          Switches the state of the snap mode.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalysisEditorGraphBean

public AnalysisEditorGraphBean()
Creates a new instance of this class. Do not call this constructor manually. It will only be accessed by Spring.

Method Detail

declareGraph

public void declareGraph()
Declares the graph.


initializeListeners

public void initializeListeners()
Initializes the listener for the graph.


addGraphListener

public void addGraphListener(IGraphListener graphListener)
Adds a listener to the graph. The listeners will be informed for javascript events.

Parameters:
graphListener - The new listener.

addProject

public void addProject(kieker.analysis.model.analysisMetaModel.MIProject project)
Adds a project to the graph. All components (plugins and repositories) and their connections from the given project are added to the graph.

Parameters:
project - The project to add to the graph.

addGlobalConfigurationInstance

public void addGlobalConfigurationInstance(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent globalConfigurationInstance)
Adds a non removable node for the global configuration of the project.

Parameters:
globalConfigurationInstance - The non removable node to be added.

addComponent

public void addComponent(kieker.analysis.model.analysisMetaModel.MIReader reader)
Adds a reader to the graph.

Parameters:
reader - The reader to be added.

addComponent

public void addComponent(kieker.analysis.model.analysisMetaModel.MIFilter filter)
Adds a filter to the graph.

Parameters:
filter - The filter to be added.

addComponent

public void addComponent(kieker.analysis.model.analysisMetaModel.MIRepository repository)
Adds a repository to the graph.

Parameters:
repository - The repository to be added.

deleteComponent

public void deleteComponent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent component)
Deletes a component from the graph.

Parameters:
component - The component to be deleted.

renameComponent

public void renameComponent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent component,
                            String newName)
Renames a component within the graph.

Parameters:
component - The component to rename.
newName - The new name of the component.

addConnection

public void addConnection(kieker.analysis.model.analysisMetaModel.MIPlugin source,
                          kieker.analysis.model.analysisMetaModel.MIPlugin target,
                          kieker.analysis.model.analysisMetaModel.MIOutputPort outputPort,
                          kieker.analysis.model.analysisMetaModel.MIInputPort inputPort)
Adds a connection between two components to the graph.

Parameters:
source - The source node.
target - The target node.
outputPort - The output port of the source node.
inputPort - The input port of the target node.

addConnection

public void addConnection(kieker.analysis.model.analysisMetaModel.MIPlugin source,
                          kieker.analysis.model.analysisMetaModel.MIRepository target,
                          kieker.analysis.model.analysisMetaModel.MIRepositoryConnector repositoryPort)
Adds a connection between two components to the graph.

Parameters:
source - The source node.
target - The target node.
repositoryPort - The repository port of the source node.

deleteConnection

public void deleteConnection(kieker.analysis.model.analysisMetaModel.MIPlugin source,
                             kieker.analysis.model.analysisMetaModel.MIPlugin target,
                             kieker.analysis.model.analysisMetaModel.MIOutputPort outputPort,
                             kieker.analysis.model.analysisMetaModel.MIInputPort inputPort)
Deletes a connection between two components within the graph.

Parameters:
source - The source node.
target - The target node.
outputPort - The output port of the source node.
inputPort - The input port of the target node.

deleteConnection

public void deleteConnection(kieker.analysis.model.analysisMetaModel.MIPlugin source,
                             kieker.analysis.model.analysisMetaModel.MIRepository target,
                             kieker.analysis.model.analysisMetaModel.MIRepositoryConnector repositoryPort)
Deletes a connection between two components within the graph.

Parameters:
source - The source node.
target - The target node.
repositoryPort - The repository port of the source node.

selectComponent

public void selectComponent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent analysisComponent)
Selects a given component.

Parameters:
analysisComponent - The component to select.

switchGrid

public void switchGrid()
Switches the visibility of the grid.


switchSnap

public void switchSnap()
Switches the state of the snap mode.


isGridEnabled

public boolean isGridEnabled()

isSnapEnabled

public boolean isSnapEnabled()

setGridColor

public void setGridColor(String color)
Sets the color of the grid to a new value.

Parameters:
color - The new color of the grid.

setGridSize

public void setGridSize(int size)
Sets the size of the grid to a new value.

Parameters:
size - The new size of the grid.

scaleToFit

public void scaleToFit()
Scales the graph to fit into the window.


startAutoLayout

public void startAutoLayout()
Starts the auto layout of the graph.


loadLayout

public void loadLayout(String layout)
Loads a layout for the graph.

Parameters:
layout - The new layout of the graph.

jsSelectComponentEvent

public void jsSelectComponentEvent()
This method is called from JavaScript. It represents the event that a component has been selected.


jsDeleteComponentEvent

public void jsDeleteComponentEvent()
This method is called from JavaScript. It represents the event that a component has been deleted.


jsAddConnectionEvent

public void jsAddConnectionEvent()
This method is called from JavaScript. It represents the event that a connection has been added.


jsDeleteConnectionEvent

public void jsDeleteConnectionEvent()
This method is called from JavaScript. It represents the event that a connection has been deleted.


jsAutoLayoutEvent

public void jsAutoLayoutEvent()
This method is called from JavaScript. It represents the event that the auto layout has been started.



Copyright © 2015. All rights reserved.