Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## kieker.webgui.web.beans.view
Class AnalysisEditorBean

    java.lang.Object
      kieker.webgui.web.beans.view.AnalysisEditorBean

All Implemented Interfaces:
  IGraphListener

    @Component
    @Scope(value="view")
    public final class AnalysisEditorBean

extends Object
implements IGraphListener

This bean contains the necessary data behind an instance of the analysis editor. It provides various methods to manipulate the current project with respect to the analysis components. The connection to the graph within the editor is done with `AnalysisEditorGraphBean`.
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
`AnalysisEditorBean()` Creates a new instance of this class.

Method Summary
`void` | `addFilter(FilterDecorator container)` This method adds a new filter to the current model, using the given container to create it.
`void` | `addReader(ReaderDecorator container)` This method adds a new reader to the current model, using the given container to create it.
`void` | `addRepository(RepositoryDecorator container)` This method adds a new repository to the current model, using the given container to create it.
`void` | `componentDeletedEvent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent deletedComponent)` An event occurring when a component has been deleted.
`void` | `componentSelectedEvent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent newSelectedComponent)` An event occurring when a component has been selected.
`void` | `connectionAddedEvent(kieker.analysis.model.analysisMetaModel.MIOutputPort outputPort, kieker.analysis.model.analysisMetaModel.MIInputPort targetPort)` An event occurring when a connection has been created.
`void` | `connectionAddedEvent(kieker.analysis.model.analysisMetaModel.MIRepositoryConnector sourcePort, kieker.analysis.model.analysisMetaModel.MIRepository target)` An event occurring when a connection has been created.
`void` | `connectionDeletedEvent(kieker.analysis.model.analysisMetaModel.MIOutputPort sourcePort, kieker.analysis.model.analysisMetaModel.MIInputPort targetPort)` An event occurring when a connection has been deleted.
`void` | `connectionDeletedEvent(kieker.analysis.model.analysisMetaModel.MIRepositoryConnector sourcePort, kieker.analysis.model.analysisMetaModel.MIRepository targetRepo)` An event occurring when a connection has been deleted.
`void` | `deleteLibrary(String name)` Removes the library with the given name and reloads the available components.
`List<Object>` | `getAdvancedPluginProperties()` This method delivers the properties of the currently selected plugin, but it adds also the name- and the class-properties as a string to the list.
`ComponentListContainer` | `getAvailableComponents()`
`String` | `getDescription(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent component, String property)` Delivers a human readable description of the given property. The current implementation is not very fast, as it searches through all available components.
`List<String>` | `getLibraries()` This method delivers the available libraries of this project.
`kieker.analysis.model.analysisMetaModel.MIProject` | `getProject()`
`String` | `getProjectName()`
`kieker.analysis.model.analysisMetaModel.MIAnalysisComponent` | `getSelectedPlugin()`
`void` | `gridColorListener(javax.faces.event.ValueChangeEvent event)` This method should be called if the grid color has been modified.
`void` | `gridSizeListener(javax.faces.event.ValueChangeEvent event)` This method should be called if the grid size has been modified.
`void` | `handleLibraryFileUpload(org.primefaces.event.FileUploadEvent event)` This method is the handler for the file upload.
`void` | `initialize()` This method initializes the bean by using the current project name to load the project.
`void` | `initializeGraph()` This method initializes the graph by delivering the necessary JavaScript commands to the client.
`boolean` | `isGlobalConfigComponentSelected()`
`boolean` | `isUnsavedModification()`
`void` | `saveProject()` This method tries to save the current project and informs the user about success or fail.
`void` | `setProjectName(String projectName)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AnalysisEditorBean

    public AnalysisEditorBean()

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

Method Detail

### initialize

    public void initialize()

  This method initializes the bean by using the current project name to load the project. Do not call this method manually. It will only be accessed by Spring.

### initializeGraph

    public void initializeGraph()

  This method initializes the graph by delivering the necessary JavaScript commands to the client. It prints all current existing plugins, repositories and their connections.

### handleLibraryFileUpload

    public void handleLibraryFileUpload(org.primefaces.event.FileUploadEvent event)

  This method is the handler for the file upload. It tries to upload the given file as a library and informs the user via the growl-component.

  Parameters:
    `event` - The upload event.

### deleteLibrary

    public void deleteLibrary(String name)

  Removes the library with the given name and reloads the available components.

  Parameters:
    `name` - The name of the library to be removed.

### getLibraries

    public List<String> getLibraries()

  This method delivers the available libraries of this project. The first element is always the kieker-library.

  Returns:
    The available libraries.

### saveProject

    public void saveProject()

  This method tries to save the current project and informs the user about success or fail. There should be two parameters within the request parameter map (layoutString and overwriteNewerProject) as this method is called technically from JavaScript.

### addRepository

    public void addRepository(RepositoryDecorator container)

  This method adds a new repository to the current model, using the given container to create it.

  Parameters:
    `container` - The container which delivers the copy of the repository.

### addReader

    public void addReader(ReaderDecorator container)

  This method adds a new reader to the current model, using the given container to create it.

  Parameters:
    `container` - The container which delivers the copy of the reader.

### addFilter

    public void addFilter(FilterDecorator container)

  This method adds a new filter to the current model, using the given container to create it.

  Parameters:
    `container` - The container which delivers the copy of the filter.

### getAdvancedPluginProperties

    public List<Object> getAdvancedPluginProperties()

  This method delivers the properties of the currently selected plugin, but it adds also the name- and the class-properties as a string to the list. The first element is always the class name, the second one is always the plugin name. If the currently selected component is the global configuration instance though, those properties will not be added.

  Returns:
    A list with all properties of the plugin plus the name- and class-properties.

### getDescription

    public String getDescription(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent component,
                                 String property)

  Delivers a human readable description of the given property.
  The current implementation is not very fast, as it searches through all available components. If necessary this method can be modified in order to run faster (for example by using hash maps).

  Parameters:
    `component` - The parent of the property.
    `property` - The property name.
  Returns:
    A human readable description and a substitution if there is no description.

### componentSelectedEvent

    public void componentSelectedEvent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent newSelectedComponent)

  Description copied from interface: `IGraphListener`
  An event occurring when a component has been selected.

  Specified by:
    `componentSelectedEvent` in interface `IGraphListener`
  Parameters:
    `newSelectedComponent` - The selected component.

### componentDeletedEvent

    public void componentDeletedEvent(kieker.analysis.model.analysisMetaModel.MIAnalysisComponent deletedComponent)

  Description copied from interface: `IGraphListener`
  An event occurring when a component has been deleted.

  Specified by:
    `componentDeletedEvent` in interface `IGraphListener`
  Parameters:
    `deletedComponent` - The deleted component.

### connectionAddedEvent

    public void connectionAddedEvent(kieker.analysis.model.analysisMetaModel.MIRepositoryConnector sourcePort,
                                     kieker.analysis.model.analysisMetaModel.MIRepository target)

  Description copied from interface: `IGraphListener`
  An event occurring when a connection has been created.

  Specified by:
    `connectionAddedEvent` in interface `IGraphListener`
  Parameters:
    `sourcePort` - The source port.
    `target` - The target.

### connectionAddedEvent

    public void connectionAddedEvent(kieker.analysis.model.analysisMetaModel.MIOutputPort outputPort,
                                     kieker.analysis.model.analysisMetaModel.MIInputPort targetPort)

  Description copied from interface: `IGraphListener`
  An event occurring when a connection has been created.

  Specified by:
    `connectionAddedEvent` in interface `IGraphListener`
  Parameters:
    `outputPort` - The source port.
    `targetPort` - The target port.

### connectionDeletedEvent

    public void connectionDeletedEvent(kieker.analysis.model.analysisMetaModel.MIRepositoryConnector sourcePort,
                                       kieker.analysis.model.analysisMetaModel.MIRepository targetRepo)

  Description copied from interface: `IGraphListener`
  An event occurring when a connection has been deleted.

  Specified by:
    `connectionDeletedEvent` in interface `IGraphListener`
  Parameters:
    `sourcePort` - The source port.
    `targetRepo` - The target.

### connectionDeletedEvent

    public void connectionDeletedEvent(kieker.analysis.model.analysisMetaModel.MIOutputPort sourcePort,
                                       kieker.analysis.model.analysisMetaModel.MIInputPort targetPort)

  Description copied from interface: `IGraphListener`
  An event occurring when a connection has been deleted.

  Specified by:
    `connectionDeletedEvent` in interface `IGraphListener`
  Parameters:
    `sourcePort` - The source port.
    `targetPort` - The target port.

### gridColorListener

    public void gridColorListener(javax.faces.event.ValueChangeEvent event)

  This method should be called if the grid color has been modified.

  Parameters:
    `event` - The change event.

### gridSizeListener

    public void gridSizeListener(javax.faces.event.ValueChangeEvent event)

  This method should be called if the grid size has been modified.

  Parameters:
    `event` - The change event.

### isUnsavedModification

    public boolean isUnsavedModification()

### isGlobalConfigComponentSelected

    public boolean isGlobalConfigComponentSelected()

### getSelectedPlugin

    public kieker.analysis.model.analysisMetaModel.MIAnalysisComponent getSelectedPlugin()

### getProject

    public kieker.analysis.model.analysisMetaModel.MIProject getProject()

### setProjectName

    public void setProjectName(String projectName)

### getProjectName

    public String getProjectName()

### getAvailableComponents

    public ComponentListContainer getAvailableComponents()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2014. All rights reserved.