Skip to content
Snippets Groups Projects
Commit 698261ff authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Merge branch 'refactoring'

parents 076c9df7 255d6163
No related branches found
No related tags found
No related merge requests found
Showing
with 988 additions and 872 deletions
...@@ -7,3 +7,5 @@ ...@@ -7,3 +7,5 @@
/Kieker.WebGUI/data /Kieker.WebGUI/data
/Kieker.WebGUI/user /Kieker.WebGUI/user
/Kieker.WebGUI/derby.log /Kieker.WebGUI/derby.log
/Kieker.WebGUI/bin/derby.log
/Kieker.WebGUI/bin/user
This diff is collapsed.
...@@ -58,7 +58,7 @@ formatter_settings_version=12 ...@@ -58,7 +58,7 @@ formatter_settings_version=12
org.eclipse.jdt.ui.exception.name=ex org.eclipse.jdt.ui.exception.name=ex
org.eclipse.jdt.ui.gettersetter.use.is=true org.eclipse.jdt.ui.gettersetter.use.is=true
org.eclipse.jdt.ui.ignorelowercasenames=true org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=java;javax;junit;org;com;kieker;org.primefaces;org.eclipse;de.cau.cs.kieler; org.eclipse.jdt.ui.importorder=java;javax;junit;org;com;kieker;org.primefaces;org.eclipse;de.cau.cs.kieler;net.vidageek;org.springframework;
org.eclipse.jdt.ui.keywordthis=false org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99 org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=true org.eclipse.jdt.ui.overrideannotation=true
......
...@@ -668,7 +668,7 @@ ...@@ -668,7 +668,7 @@
<!-- See http://checkstyle.sf.net/config_import.html !--> <!-- See http://checkstyle.sf.net/config_import.html !-->
<module name="ImportOrder"> <module name="ImportOrder">
<property name="option" value="under"/> <property name="option" value="under"/>
<property name="groups" value="java,javax,junit,org,com,kieker,kieker,org.primefaces,org.eclipse"/> <property name="groups" value="java,javax,junit,org,com,kieker,kieker,org.primefaces,org.eclipse,de.cau.cs.kieler,net.vidageek,org.springframework"/>
<property name="ordered" value="true"/> <property name="ordered" value="true"/>
<property name="separated" value="true"/> <property name="separated" value="true"/>
<property name="caseSensitive" value="true"/> <property name="caseSensitive" value="true"/>
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<exclude name="UnnecessaryConstructor"/> <exclude name="UnnecessaryConstructor"/>
<exclude name="UseConcurrentHashMap"/> <exclude name="UseConcurrentHashMap"/>
<exclude name="AssignmentInOperand"/> <exclude name="AssignmentInOperand"/>
<exclude name="NullAssignment"/>
</rule> </rule>
<!--<rule ref="rulesets/coupling.xml">--> <!--<rule ref="rulesets/coupling.xml">-->
......
...@@ -45,6 +45,11 @@ ...@@ -45,6 +45,11 @@
</repositories> </repositories>
<dependencies> <dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>2.0.1</version>
</dependency>
<dependency> <dependency>
<groupId>net.vidageek</groupId> <groupId>net.vidageek</groupId>
<artifactId>mirror</artifactId> <artifactId>mirror</artifactId>
......
...@@ -45,10 +45,14 @@ import kieker.common.logging.LogImplWebguiLogging; ...@@ -45,10 +45,14 @@ import kieker.common.logging.LogImplWebguiLogging;
import kieker.webgui.common.exception.ProjectLoadException; import kieker.webgui.common.exception.ProjectLoadException;
/** /**
* The {@link ClassAndMethodContainer} is a container which contains - as the name already suggests - various classes and methods. To be more precisely, it uses a * The {@link ClassAndMethodContainer} is a container which contains - as the name already tells - various classes and methods. To be more precisely, it uses a
* given class loader to load the equivalence of specific classes within this application to ensure that comparisons, assignments and the use of specific methods * given class loader to load the equivalence of specific classes via reflection within this application to ensure that comparisons, assignments and the use of
* will be done correctly. This is necessary as for every project within this application there will be a number of libraries which will be combined in one class * specific methods will be done correctly. This is necessary as for every project within this application there will be a number of libraries which will be combined
* loader. This will result in multiple version of one and the same class and therefore in problems, if one doesn't use the correct class version. * in one class loader. This will result in multiple version of one and the same class and therefore in problems, if one doesn't use the correct class version.<br>
* </br>
*
* As we use the Mirror framework in this project (which simplifies some accesses to the Java reflection API) not all methods and classes have to be loaded in this
* class.
* *
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
*/ */
...@@ -75,32 +79,17 @@ public class ClassAndMethodContainer { ...@@ -75,32 +79,17 @@ public class ClassAndMethodContainer {
private Class<?> imageClass; private Class<?> imageClass;
private Class<?> plainTextClass; private Class<?> plainTextClass;
private Class<?> htmlTextClass; private Class<?> htmlTextClass;
private Method pluginDescriptionMethod;
private Method repositoryDescriptionMethod;
private Method pluginConfigurationMethod;
private Method repositoryConfigurationMethod; private Method repositoryConfigurationMethod;
private Method pluginOutputPortsMethod;
private Method pluginRepositoryPortsMethod;
private Method displayNameMethod;
private Method inputPortNameMethod;
private Method outputPortNameMethod;
private Method repositoryPortNameMethod;
private Method propertyNameMethod;
private Method propertyDefaultValueMethod;
private Method plainTextgetTextMethod; private Method plainTextgetTextMethod;
private Method analysisControllerWithMappingGetController; private Method analysisControllerWithMappingGetController;
private Method analysisControllerWithMappingGetMapping; private Method analysisControllerWithMappingGetMapping;
private Method analysisControllerCreateAnalysisController; private Method analysisControllerCreateAnalysisController;
private Method analysisControllerThreadStart;
private Method analysisControllerThreadTerminate;
private Method analysisControllerThreadJoin; private Method analysisControllerThreadJoin;
private Method analysisControllerGetState; private Method analysisControllerGetState;
private Method propertyDescriptionMethod;
private Method analysisControllerLoadFromFile; private Method analysisControllerLoadFromFile;
private Method displayDescriptionMethod;
private Method pluginDependenciesMethod;
private Method repositoryDependenciesMethod;
private Method pluginProgrammaticOnlyMethod; private Method pluginProgrammaticOnlyMethod;
private Method repositoryProgrammaticOnlyMethod; private Method repositoryProgrammaticOnlyMethod;
private Method logImplWebguiLoggingClassGetEntriesMethod; private Method logImplWebguiLoggingClassGetEntriesMethod;
...@@ -167,28 +156,11 @@ public class ClassAndMethodContainer { ...@@ -167,28 +156,11 @@ public class ClassAndMethodContainer {
private void loadMethods() throws SecurityException, NoSuchMethodException { private void loadMethods() throws SecurityException, NoSuchMethodException {
// The following part has to be done carefully: The methods will be loaded via the name // The following part has to be done carefully: The methods will be loaded via the name
this.pluginDescriptionMethod = this.pluginAnnotationClass.getMethod("description", new Class<?>[0]);
this.repositoryDescriptionMethod = this.repositoryAnnotationClass.getMethod("description", new Class<?>[0]);
this.pluginConfigurationMethod = this.pluginAnnotationClass.getMethod("configuration", new Class<?>[0]);
this.repositoryConfigurationMethod = this.repositoryAnnotationClass.getMethod("configuration", new Class<?>[0]); this.repositoryConfigurationMethod = this.repositoryAnnotationClass.getMethod("configuration", new Class<?>[0]);
this.pluginOutputPortsMethod = this.pluginAnnotationClass.getMethod("outputPorts", new Class<?>[0]);
this.pluginRepositoryPortsMethod = this.pluginAnnotationClass.getMethod("repositoryPorts", new Class<?>[0]);
this.displayNameMethod = this.displayAnnotationClass.getMethod("name", new Class<?>[0]);
this.inputPortNameMethod = this.inputPortAnnotationClass.getMethod("name", new Class<?>[0]);
this.outputPortNameMethod = this.outputPortAnnotationClass.getMethod("name", new Class<?>[0]);
this.repositoryPortNameMethod = this.repositoryPortAnnotationClass.getMethod("name", new Class<?>[0]);
this.propertyNameMethod = this.propertyAnnotationClass.getMethod("name", new Class<?>[0]);
this.propertyDefaultValueMethod = this.propertyAnnotationClass.getMethod("defaultValue", new Class<?>[0]);
this.plainTextgetTextMethod = this.plainTextClass.getMethod("getText", new Class<?>[0]); this.plainTextgetTextMethod = this.plainTextClass.getMethod("getText", new Class<?>[0]);
this.analysisControllerWithMappingGetController = this.analysisControllerWithMappingClass.getMethod("getController", new Class<?>[0]); this.analysisControllerWithMappingGetController = this.analysisControllerWithMappingClass.getMethod("getController", new Class<?>[0]);
this.analysisControllerWithMappingGetMapping = this.analysisControllerWithMappingClass.getMethod("getPluginMap", new Class<?>[0]); this.analysisControllerWithMappingGetMapping = this.analysisControllerWithMappingClass.getMethod("getPluginMap", new Class<?>[0]);
this.analysisControllerThreadStart = this.analysisControllerThreadClass.getMethod("start", new Class<?>[0]);
this.analysisControllerThreadTerminate = this.analysisControllerThreadClass.getMethod("terminate", new Class<?>[0]);
this.analysisControllerGetState = this.analysisControllerClass.getMethod("getState", new Class<?>[0]); this.analysisControllerGetState = this.analysisControllerClass.getMethod("getState", new Class<?>[0]);
this.propertyDescriptionMethod = this.propertyAnnotationClass.getMethod("description", new Class<?>[0]);
this.displayDescriptionMethod = this.displayAnnotationClass.getMethod("description", new Class<?>[0]);
this.pluginDependenciesMethod = this.pluginAnnotationClass.getMethod("dependencies", new Class<?>[0]);
this.repositoryDependenciesMethod = this.repositoryAnnotationClass.getMethod("dependencies", new Class<?>[0]);
this.pluginProgrammaticOnlyMethod = this.pluginAnnotationClass.getMethod("programmaticOnly", new Class<?>[0]); this.pluginProgrammaticOnlyMethod = this.pluginAnnotationClass.getMethod("programmaticOnly", new Class<?>[0]);
this.repositoryProgrammaticOnlyMethod = this.repositoryAnnotationClass.getMethod("programmaticOnly", new Class<?>[0]); this.repositoryProgrammaticOnlyMethod = this.repositoryAnnotationClass.getMethod("programmaticOnly", new Class<?>[0]);
this.logImplWebguiLoggingClassGetEntriesMethod = this.logImplWebguiLoggingClass.getMethod("getEntries", String.class); this.logImplWebguiLoggingClassGetEntriesMethod = this.logImplWebguiLoggingClass.getMethod("getEntries", String.class);
...@@ -257,34 +229,10 @@ public class ClassAndMethodContainer { ...@@ -257,34 +229,10 @@ public class ClassAndMethodContainer {
return this.displayAnnotationClass; return this.displayAnnotationClass;
} }
public Method getPluginDescriptionMethod() {
return this.pluginDescriptionMethod;
}
public Method getRepositoryDescriptionMethod() {
return this.repositoryDescriptionMethod;
}
public Method getPluginConfigurationMethod() {
return this.pluginConfigurationMethod;
}
public Method getRepositoryConfigurationMethod() { public Method getRepositoryConfigurationMethod() {
return this.repositoryConfigurationMethod; return this.repositoryConfigurationMethod;
} }
public Method getPluginOutputPortsMethod() {
return this.pluginOutputPortsMethod;
}
public Method getPluginRepositoryPortsMethod() {
return this.pluginRepositoryPortsMethod;
}
public Method getDisplayNameMethod() {
return this.displayNameMethod;
}
public Class<?> getAbstractRepositoryClass() { public Class<?> getAbstractRepositoryClass() {
return this.abstractRepositoryClass; return this.abstractRepositoryClass;
} }
...@@ -293,26 +241,6 @@ public class ClassAndMethodContainer { ...@@ -293,26 +241,6 @@ public class ClassAndMethodContainer {
return this.abstractPluginClass; return this.abstractPluginClass;
} }
public Method getInputPortNameMethod() {
return this.inputPortNameMethod;
}
public Method getOutputPortNameMethod() {
return this.outputPortNameMethod;
}
public Method getRepositoryPortNameMethod() {
return this.repositoryPortNameMethod;
}
public Method getPropertyNameMethod() {
return this.propertyNameMethod;
}
public Method getPropertyDefaultValueMethod() {
return this.propertyDefaultValueMethod;
}
public Class<?> getImageClass() { public Class<?> getImageClass() {
return this.imageClass; return this.imageClass;
} }
...@@ -353,14 +281,6 @@ public class ClassAndMethodContainer { ...@@ -353,14 +281,6 @@ public class ClassAndMethodContainer {
return this.analysisControllerWithMappingGetController; return this.analysisControllerWithMappingGetController;
} }
public Method getAnalysisControllerThreadStart() {
return this.analysisControllerThreadStart;
}
public Method getAnalysisControllerThreadTerminate() {
return this.analysisControllerThreadTerminate;
}
public Method getAnalysisControllerThreadJoin() { public Method getAnalysisControllerThreadJoin() {
return this.analysisControllerThreadJoin; return this.analysisControllerThreadJoin;
} }
...@@ -369,10 +289,6 @@ public class ClassAndMethodContainer { ...@@ -369,10 +289,6 @@ public class ClassAndMethodContainer {
return this.analysisControllerGetState; return this.analysisControllerGetState;
} }
public Method getPropertyDescriptionMethod() {
return this.propertyDescriptionMethod;
}
public Constructor<?> getAnalysisControllerThreadConstructor() { public Constructor<?> getAnalysisControllerThreadConstructor() {
return this.analysisControllerThreadConstructor; return this.analysisControllerThreadConstructor;
} }
...@@ -381,18 +297,6 @@ public class ClassAndMethodContainer { ...@@ -381,18 +297,6 @@ public class ClassAndMethodContainer {
return this.analysisControllerLoadFromFile; return this.analysisControllerLoadFromFile;
} }
public Method getPluginDependenciesMethod() {
return this.pluginDependenciesMethod;
}
public Method getDisplayDescriptionMethod() {
return this.displayDescriptionMethod;
}
public Method getRepositoryDependenciesMethod() {
return this.repositoryDependenciesMethod;
}
public Method getPluginProgrammaticOnlyMethod() { public Method getPluginProgrammaticOnlyMethod() {
return this.pluginProgrammaticOnlyMethod; return this.pluginProgrammaticOnlyMethod;
} }
...@@ -461,23 +365,6 @@ public class ClassAndMethodContainer { ...@@ -461,23 +365,6 @@ public class ClassAndMethodContainer {
return null; return null;
} }
/**
* This method can be used to invoke a given method with no parameters, without having to mind about the exceptions. If an exception occurs, the given default
* value will be returned. A call to this method is the same as {@link ClassAndMethodContainer#invokeMethod(Method, Object, Object, Object...)} with
* {@code new Object[0]} as parameters.
*
* @param method
* The method to be invoked.
* @param obj
* The object on which the method will be invoked.
* @param defaultReturn
* The default return value in case of an exception.
* @return The result of the invoked method if everything went well, the default value otherwise.
*/
public static Object invokeMethod(final Method method, final Object obj, final Object defaultReturn) {
return ClassAndMethodContainer.invokeMethod(method, obj, defaultReturn, new Object[0]);
}
/** /**
* This method can be used to invoke a given <b>class</b>-method with no parameters, without having to mind about the exceptions. If an exception occurs, the * This method can be used to invoke a given <b>class</b>-method with no parameters, without having to mind about the exceptions. If an exception occurs, the
* given default value will be returned. A call to this method is the same as {@link ClassAndMethodContainer#invokeMethod(Method, Object, Object, Object...)} * given default value will be returned. A call to this method is the same as {@link ClassAndMethodContainer#invokeMethod(Method, Object, Object, Object...)}
......
...@@ -39,24 +39,13 @@ public class EnvironmentLoaderListener implements ServletContextListener { ...@@ -39,24 +39,13 @@ public class EnvironmentLoaderListener implements ServletContextListener {
// No code necessary // No code necessary
} }
/*
* (non-Javadoc)
*
* @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
*/
@Override @Override
public void contextDestroyed(final ServletContextEvent event) { public void contextDestroyed(final ServletContextEvent event) {
// No code necessary // No code necessary
} }
/*
* (non-Javadoc)
*
* @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
*/
@Override @Override
public void contextInitialized(final ServletContextEvent event) { public void contextInitialized(final ServletContextEvent event) {
// Before setting the logging property, use the log factory to make sure that the log entries of the WebGUI itself will be shown in the terminal
EnvironmentLoaderListener.LOG.info("Starting Kieker.WebGUI environment initialization."); EnvironmentLoaderListener.LOG.info("Starting Kieker.WebGUI environment initialization.");
final long tin = System.currentTimeMillis(); final long tin = System.currentTimeMillis();
......
...@@ -24,7 +24,7 @@ import org.springframework.beans.factory.ObjectFactory; ...@@ -24,7 +24,7 @@ import org.springframework.beans.factory.ObjectFactory;
import org.springframework.beans.factory.config.Scope; import org.springframework.beans.factory.config.Scope;
/** /**
* The class {@link ViewScope} is necessary as Spring doesn't provide a view scope like JSF. Therefore the view scope has to be implemented by us. * The class {@link ViewScope} is necessary as Spring doesn't provide a view scope like JSF does. Therefore the view scope has to be implemented by us.
* *
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
*/ */
...@@ -37,9 +37,8 @@ public class ViewScope implements Scope { ...@@ -37,9 +37,8 @@ public class ViewScope implements Scope {
// No code necessary. // No code necessary.
} }
@SuppressWarnings("rawtypes")
@Override @Override
public Object get(final String name, final ObjectFactory objectFactory) { public Object get(final String name, final ObjectFactory<?> objectFactory) {
final Map<String, Object> viewMap = FacesContext.getCurrentInstance().getViewRoot().getViewMap(); final Map<String, Object> viewMap = FacesContext.getCurrentInstance().getViewRoot().getViewMap();
if (viewMap.containsKey(name)) { if (viewMap.containsKey(name)) {
...@@ -52,41 +51,21 @@ public class ViewScope implements Scope { ...@@ -52,41 +51,21 @@ public class ViewScope implements Scope {
} }
} }
/*
* (non-Javadoc)
*
* @see org.springframework.beans.factory.config.Scope#remove(java.lang.String)
*/
@Override @Override
public Object remove(final String name) { public Object remove(final String name) {
return FacesContext.getCurrentInstance().getViewRoot().getViewMap().remove(name); return FacesContext.getCurrentInstance().getViewRoot().getViewMap().remove(name);
} }
/*
* (non-Javadoc)
*
* @see org.springframework.beans.factory.config.Scope#getConversationId()
*/
@Override @Override
public String getConversationId() { public String getConversationId() {
return null; return null;
} }
/*
* (non-Javadoc)
*
* @see org.springframework.beans.factory.config.Scope#registerDestructionCallback(java.lang.String, java.lang.Runnable)
*/
@Override @Override
public void registerDestructionCallback(final String name, final Runnable callback) { // NOPMD (Threads are not used) public void registerDestructionCallback(final String name, final Runnable callback) { // NOPMD (Threads are not used here)
// Not supported // Not supported
} }
/*
* (non-Javadoc)
*
* @see org.springframework.beans.factory.config.Scope#resolveContextualObject(java.lang.String)
*/
@Override @Override
public Object resolveContextualObject(final String key) { public Object resolveContextualObject(final String key) {
return null; return null;
......
...@@ -17,18 +17,18 @@ ...@@ -17,18 +17,18 @@
package kieker.webgui.common.exception; package kieker.webgui.common.exception;
/** /**
* This class represents an exception occurring when the analysis is in an invalid state for the ordered method. * This class represents an exception occurring when the analysis is in an invalid state for the ordered action.
* *
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
*/ */
public class AnalysisStateException extends AbstractKiekerWebGUIException { public class InvalidAnalysisStateException extends AbstractKiekerWebGUIException {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* Creates a new instance of this class. * Creates a new instance of this class.
*/ */
public AnalysisStateException() { public InvalidAnalysisStateException() {
super(); super();
} }
...@@ -38,7 +38,7 @@ public class AnalysisStateException extends AbstractKiekerWebGUIException { ...@@ -38,7 +38,7 @@ public class AnalysisStateException extends AbstractKiekerWebGUIException {
* @param msg * @param msg
* The message used for the exception. * The message used for the exception.
*/ */
public AnalysisStateException(final String msg) { public InvalidAnalysisStateException(final String msg) {
super(msg); super(msg);
} }
...@@ -50,7 +50,7 @@ public class AnalysisStateException extends AbstractKiekerWebGUIException { ...@@ -50,7 +50,7 @@ public class AnalysisStateException extends AbstractKiekerWebGUIException {
* @param cause * @param cause
* The cause for the exception. * The cause for the exception.
*/ */
public AnalysisStateException(final String msg, final Throwable cause) { public InvalidAnalysisStateException(final String msg, final Throwable cause) {
super(msg, cause); super(msg, cause);
} }
} }
...@@ -17,18 +17,22 @@ package kieker.webgui.domain; ...@@ -17,18 +17,22 @@ package kieker.webgui.domain;
import java.util.List; import java.util.List;
import kieker.webgui.domain.pluginDecorators.FilterDecorator;
import kieker.webgui.domain.pluginDecorators.ReaderDecorator;
import kieker.webgui.domain.pluginDecorators.RepositoryDecorator;
/** /**
* This class is a container for multiple {@link PluginContainer} or {@link RepositoryContainer} instances. For each of the component type (reader, filter, * This class is a container for multiple {@link ReaderDecorator}, {@link FilterDecorator} or {@link RepositoryDecorator} instances. For each of the component type
* repository) there is exactly one list available. This class will mostly be used to deliver a set of available components for a project. A bean using them could * (reader, filter, repository) there is exactly one list available. This class will mostly be used to deliver a set of available components for a project. A bean
* for example copy the available instances. * can, for example, use the components as a prototype to copy new model instances.
* *
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
*/ */
public class ComponentListContainer { public class ComponentListContainer {
private final List<PluginContainer> readers; private final List<ReaderDecorator> readers;
private final List<PluginContainer> filters; private final List<FilterDecorator> filters;
private final List<RepositoryContainer> repositories; private final List<RepositoryDecorator> repositories;
/** /**
* Creates a new instance of this class using the given parameters. * Creates a new instance of this class using the given parameters.
...@@ -40,21 +44,21 @@ public class ComponentListContainer { ...@@ -40,21 +44,21 @@ public class ComponentListContainer {
* @param repositories * @param repositories
* The list containing the repositories. * The list containing the repositories.
*/ */
public ComponentListContainer(final List<PluginContainer> readers, final List<PluginContainer> filters, final List<RepositoryContainer> repositories) { public ComponentListContainer(final List<ReaderDecorator> readers, final List<FilterDecorator> filters, final List<RepositoryDecorator> repositories) {
this.readers = readers; this.readers = readers;
this.filters = filters; this.filters = filters;
this.repositories = repositories; this.repositories = repositories;
} }
public List<PluginContainer> getReaders() { public List<ReaderDecorator> getReaders() {
return this.readers; return this.readers;
} }
public List<PluginContainer> getFilters() { public List<FilterDecorator> getFilters() {
return this.filters; return this.filters;
} }
public List<RepositoryContainer> getRepositories() { public List<RepositoryDecorator> getRepositories() {
return this.repositories; return this.repositories;
} }
......
/***************************************************************************
* Copyright 2013 Kieker Project (http://kieker-monitoring.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
package kieker.webgui.domain;
import java.util.Map;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIDisplay;
import kieker.analysis.model.analysisMetaModel.MIFilter;
import kieker.analysis.model.analysisMetaModel.MIInputPort;
import kieker.analysis.model.analysisMetaModel.MIOutputPort;
import kieker.analysis.model.analysisMetaModel.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIProperty;
import kieker.analysis.model.analysisMetaModel.MIReader;
import kieker.analysis.model.analysisMetaModel.MIRepositoryConnector;
/**
* This is a container to wrap a single instance of {@link MIPlugin} together with different meta information.
*
* @author Nils Christian Ehmke
*/
public class PluginContainer implements IComponentContainer {
private final Map<String, String> propertyDescriptions;
private final Map<String, String> displayDescriptions;
private final boolean fullyInitialized;
private final MIPlugin plugin;
private final String description;
private final String dependency;
/**
* Creates a new instance of this class using the given parameters.
*
* @param plugin
* The plugin to be stored in this container.
* @param description
* The description of the plugin.
* @param dependency
* The dependency description of the plugin.
* @param fullyInitialized
* A flag to determine whether the plugin has been initialized fully or whether there was an error during the class loading.
* @param propertyDescriptions
* A map containing the descriptions of the properties of the plugin.
* @param displayDescriptions
* A map containing the display descriptions of the properties of the plugin.
*/
public PluginContainer(final MIPlugin plugin, final String description, final String dependency, final boolean fullyInitialized,
final Map<String, String> propertyDescriptions, final Map<String, String> displayDescriptions) {
this.plugin = plugin;
this.description = description;
this.dependency = dependency;
this.fullyInitialized = fullyInitialized;
this.propertyDescriptions = propertyDescriptions;
this.displayDescriptions = displayDescriptions;
}
public String getDescription() {
return this.description;
}
public String getDependency() {
return this.dependency;
}
public boolean isFullyInitialized() {
return this.fullyInitialized;
}
public boolean isReader() {
return this.plugin instanceof MIReader;
}
public boolean isFilter() {
return this.plugin instanceof MIFilter;
}
/**
* Delivers the description of the given display.
*
* @param display
* The name of the display.
* @return The human readable description of the given display.
*/
public String getDisplayDescription(final String display) {
return this.displayDescriptions.get(display);
}
/**
* {@inheritDoc}
*/
@Override
public String getPropertyDescription(final String property) {
return this.propertyDescriptions.get(property);
}
/**
* Getter for the property {@link PluginContainer#plugin}. <b>DO NOT MODIFIY THIS OBJECT!</b> Use {@link PluginContainer#newInstance(MIAnalysisMetaModelFactory)}
* instead to get a copy.
*
* @return The current value of the property.
*/
public MIPlugin getPlugin() {
return this.plugin;
}
/**
* Delivers a copy of the plugin instance within this container.
*
* @param factory
* The factory to be used to create the copy.
* @return A deep copy of the plugin.
*/
public MIPlugin newInstance(final MIAnalysisMetaModelFactory factory) {
final MIPlugin pluginCopy;
if (this.plugin instanceof MIReader) {
pluginCopy = factory.createReader();
} else if (this.plugin instanceof MIFilter) {
pluginCopy = factory.createFilter();
// Copy the input ports of the plugin instance
for (final MIInputPort inputPort : ((MIFilter) this.plugin).getInputPorts()) {
final MIInputPort inputPortCopy = factory.createInputPort();
inputPortCopy.setName(inputPort.getName());
inputPortCopy.setParent((MIFilter) pluginCopy);
((MIFilter) pluginCopy).getInputPorts().add(inputPortCopy);
}
} else {
// This should not happen
return null;
}
// Copy the output ports of the plugin instance
for (final MIOutputPort outputPort : this.plugin.getOutputPorts()) {
final MIOutputPort outputPortCopy = factory.createOutputPort();
outputPortCopy.setName(outputPort.getName());
outputPortCopy.setParent(pluginCopy);
pluginCopy.getOutputPorts().add(outputPortCopy);
}
// Copy the repository "ports"
for (final MIRepositoryConnector repositoryConnector : this.plugin.getRepositories()) {
final MIRepositoryConnector repositoryConnectorCopy = factory.createRepositoryConnector();
repositoryConnectorCopy.setName(repositoryConnector.getName());
pluginCopy.getRepositories().add(repositoryConnectorCopy);
}
// Copy the displays
for (final MIDisplay display : this.plugin.getDisplays()) {
final MIDisplay displayCopy = factory.createDisplay();
displayCopy.setName(display.getName());
displayCopy.setParent(pluginCopy);
pluginCopy.getDisplays().add(displayCopy);
}
// Copy the properties
for (final MIProperty property : this.plugin.getProperties()) {
final MIProperty propertyCopy = factory.createProperty();
propertyCopy.setName(property.getName());
propertyCopy.setValue(property.getValue());
pluginCopy.getProperties().add(propertyCopy);
}
// Copy the remaining attributes
pluginCopy.setClassname(this.plugin.getClassname());
pluginCopy.setName(this.plugin.getName());
return pluginCopy;
}
}
/***************************************************************************
* Copyright 2013 Kieker Project (http://kieker-monitoring.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
package kieker.webgui.domain;
import java.util.Map;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIProperty;
import kieker.analysis.model.analysisMetaModel.MIRepository;
/**
* This is a container to wrap a single instance of {@link MIRepository} together with different meta information.
*
* @author Nils Christian Ehmke
*/
public class RepositoryContainer implements IComponentContainer {
private final Map<String, String> propertyDescriptions;
private final boolean fullyInitialized;
private final MIRepository repository;
private final String description;
private final String dependency;
/**
* Creates a new instance of this class using the given parameters.
*
* @param repository
* The repository to be stored in this container.
* @param description
* The description of the repository.
* @param dependency
* The dependency description of the repository.
* @param fullyInitialized
* A flag to determine whether the repository has been initialized fully or whether there was an error during the class loading.
* @param propertyDescriptions
* A map containing the descriptions of the properties of the repository.
*/
public RepositoryContainer(final MIRepository repository, final String description, final String dependency, final boolean fullyInitialized,
final Map<String, String> propertyDescriptions) {
this.repository = repository;
this.description = description;
this.dependency = dependency;
this.fullyInitialized = fullyInitialized;
this.propertyDescriptions = propertyDescriptions;
}
public String getDescription() {
return this.description;
}
public String getDependency() {
return this.dependency;
}
public boolean isFullyInitialized() {
return this.fullyInitialized;
}
/*
* (non-Javadoc)
*
* @see kieker.webgui.common.IComponentContainer#getPropertyDescription(java.lang.String)
*/
@Override
public String getPropertyDescription(final String property) {
return this.propertyDescriptions.get(property);
}
/**
* Getter for the property {@link RepositoryContainer#repository}. <b>DO NOT MODIFIY THIS OBJECT!</b> Use
* {@link RepositoryContainer#newInstance(MIAnalysisMetaModelFactory)} instead to get a copy.
*
* @return The current value of the property.
*/
public MIRepository getRepository() {
return this.repository;
}
/**
* Delivers a copy of the repository instance within this container.
*
* @param factory
* The factory to be used to create the copy.
* @return A deep copy of the repository.
*/
public MIRepository newInstance(final MIAnalysisMetaModelFactory factory) {
final MIRepository repositoryCopy;
repositoryCopy = factory.createRepository();
// Copy the properties
for (final MIProperty property : this.repository.getProperties()) {
final MIProperty propertyCopy = factory.createProperty();
propertyCopy.setName(property.getName());
propertyCopy.setValue(property.getValue());
repositoryCopy.getProperties().add(propertyCopy);
}
// Copy the remaining attributes
repositoryCopy.setClassname(this.repository.getClassname());
repositoryCopy.setName(this.repository.getName());
return repositoryCopy;
}
}
...@@ -80,7 +80,7 @@ public class User { ...@@ -80,7 +80,7 @@ public class User {
} }
/** /**
* This enum represents the available roles within this systen. * This enum represents the available roles within this system.
* *
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
*/ */
...@@ -108,29 +108,5 @@ public class User { ...@@ -108,29 +108,5 @@ public class User {
public int getID() { public int getID() {
return this.id; return this.id;
} }
/**
* Delivers the corresponding role to the given id. if the id cannot be recognized the value {@link Role#ROLE_GUEST} will be returned.
*
* @param id
* The id to be recognized.
*
* @return The corresponding role.
*/
public static Role fromID(final int id) {
final Role role;
if (id == 2) {
role = Role.ROLE_ADMIN;
} else {
if (id == 1) {
role = Role.ROLE_USER;
} else {
role = Role.ROLE_GUEST;
}
}
return role;
}
} }
} }
/***************************************************************************
* Copyright 2013 Kieker Project (http://kieker-monitoring.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
package kieker.webgui.domain.pluginDecorators;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;
import kieker.analysis.model.analysisMetaModel.MIAnalysisComponent;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIProperty;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.resource.Resource;
/**
* This is the abstract base for all other decorators which decorate the components from the analysis meta model. It adds some properties and methods to an
* {@link MIAnalysisComponent} instance. The already existing behavior of the {@link MIAnalysisComponent} instance is not modified.
*
* @author Nils Christian Ehmke
*
* @param <T>
* The type of the decorator. This can be specified by inheriting classes in order to provide a more specific interface to access the class.
*/
public abstract class AbstractAnalysisComponentDecorator<T extends MIAnalysisComponent> implements MIAnalysisComponent {
/** The component wrapped by this decorator. */
protected final T analysisComponent;
private final Map<String, String> propertiesDescriptions;
private final String description;
private final String dependency;
private final boolean fullyInitialized;
/**
* Constructor to instantiate the fields of this class.
*
* @param analysisComponent
* The component wrapped by this decorator.
* @param propertiesDescriptions
* The descriptions of the properties.
* @param description
* The description of the wrapped component.
* @param dependency
* The dependency description of the wrapped component.
* @param fullyInitialized
* A flag to show whether the component has been fully initialized or not.
*/
public AbstractAnalysisComponentDecorator(final T analysisComponent, final Map<String, String> propertiesDescriptions, final String description,
final String dependency, final boolean fullyInitialized) {
this.analysisComponent = analysisComponent;
this.propertiesDescriptions = propertiesDescriptions;
this.description = description;
this.dependency = dependency;
this.fullyInitialized = fullyInitialized;
}
public final String getDescription() {
return this.description;
}
public final String getDependency() {
return this.dependency;
}
public final boolean isFullyInitialized() {
return this.fullyInitialized;
}
/**
* Delivers the description for the given property.
*
* @param property
* The property whose description should be delivered.
*
* @return The description.
*/
public final String getPropertyDescription(final String property) {
return this.propertiesDescriptions.get(property);
}
/**
* Delivers a new copy of the wrapped component.
*
* @param factory
* The factory which is used to create the component.
*
* @return A (deep) copy of the wrapped component.
*/
public final T newCopy(final MIAnalysisMetaModelFactory factory) {
final T componentCopy = this.createComponent(factory);
this.refineComponentCopy(factory, componentCopy);
return componentCopy;
}
/**
* Inheriting classes should implement this method to deliver the actual copy (without further properties) of the wrapped component.
*
* @param factory
* The factory which should be used to create the component.
*
* @return A (non-deep) copy of the wrapped component.
*/
protected abstract T createComponent(final MIAnalysisMetaModelFactory factory);
/**
* Inheriting classes should overwrite this method in order to refine the copy of the wrapped component. The new method should call
* {@code super.refineComponentCopy(factory, componentCopy)} though, in order to make sure that the other properties will be copied as well.
*
* @param factory
* The factory which should be used to create the new sub components.
* @param componentCopy
* The copy of the wrapped component, which can be refined by inheriting classes.
*/
protected void refineComponentCopy(final MIAnalysisMetaModelFactory factory, final T componentCopy) {
// Copy the properties
for (final MIProperty property : this.analysisComponent.getProperties()) {
final MIProperty propertyCopy = factory.createProperty();
propertyCopy.setName(property.getName());
propertyCopy.setValue(property.getValue());
componentCopy.getProperties().add(propertyCopy);
}
// Copy the remaining attributes
componentCopy.setClassname(this.analysisComponent.getClassname());
componentCopy.setName(this.analysisComponent.getName());
}
@Override
public final TreeIterator<EObject> eAllContents() {
return this.analysisComponent.eAllContents();
}
@Override
public final EClass eClass() {
return this.analysisComponent.eClass();
}
@Override
public final EObject eContainer() {
return this.analysisComponent.eContainer();
}
@Override
public final EStructuralFeature eContainingFeature() {
return this.analysisComponent.eContainingFeature();
}
@Override
public final EReference eContainmentFeature() {
return this.analysisComponent.eContainmentFeature();
}
@Override
public final EList<EObject> eContents() {
return this.analysisComponent.eContents();
}
@Override
public final EList<EObject> eCrossReferences() {
return this.analysisComponent.eCrossReferences();
}
@Override
public final Object eGet(final EStructuralFeature arg0) {
return this.analysisComponent.eGet(arg0);
}
@Override
public final Object eGet(final EStructuralFeature arg0, final boolean arg1) {
return this.analysisComponent.eGet(arg0, arg1);
}
@Override
public final Object eInvoke(final EOperation arg0, final EList<?> arg1) throws InvocationTargetException {
return this.analysisComponent.eInvoke(arg0, arg1);
}
@Override
public final boolean eIsProxy() {
return this.analysisComponent.eIsProxy();
}
@Override
public final boolean eIsSet(final EStructuralFeature arg0) {
return this.analysisComponent.eIsSet(arg0);
}
@Override
public final Resource eResource() {
return this.analysisComponent.eResource();
}
@Override
public final void eSet(final EStructuralFeature arg0, final Object arg1) {
this.analysisComponent.eSet(arg0, arg1);
}
@Override
public final void eUnset(final EStructuralFeature arg0) {
this.analysisComponent.eUnset(arg0);
}
@Override
public final EList<Adapter> eAdapters() {
return this.analysisComponent.eAdapters();
}
@Override
public final boolean eDeliver() {
return this.analysisComponent.eDeliver();
}
@Override
public final void eNotify(final Notification arg0) {
this.analysisComponent.eNotify(arg0);
}
@Override
public final void eSetDeliver(final boolean arg0) {
this.analysisComponent.eSetDeliver(arg0);
}
@Override
public final String getName() {
return this.analysisComponent.getName();
}
@Override
public final void setName(final String value) {
this.analysisComponent.setName(value);
}
@Override
public final String getClassname() {
return this.analysisComponent.getClassname();
}
@Override
public final void setClassname(final String value) {
this.analysisComponent.setClassname(value);
}
@Override
public final EList<MIProperty> getProperties() {
return this.analysisComponent.getProperties();
}
}
/***************************************************************************
* Copyright 2013 Kieker Project (http://kieker-monitoring.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
package kieker.webgui.domain.pluginDecorators;
import java.util.Map;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIDisplay;
import kieker.analysis.model.analysisMetaModel.MIOutputPort;
import kieker.analysis.model.analysisMetaModel.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIRepositoryConnector;
import org.eclipse.emf.common.util.EList;
/**
* This is the abstract base for all other decorators which decorate the plugins from the analysis meta model. It adds some properties and methods to an
* {@link MIPlugin} instance. The already existing behavior of the {@link MIPlugin} instance is not modified.
*
* @author Nils Christian Ehmke
*
* @param <T>
* The type of the decorator. This can be specified by inheriting classes in order to provide a more specific interface to access the class.
*/
public abstract class AbstractPluginDecorator<T extends MIPlugin> extends AbstractAnalysisComponentDecorator<T> implements MIPlugin {
private final Map<String, String> displaysDescriptions;
/**
* Constructor to instantiate the fields of this class.
*
* @param analysisComponent
* The component wrapped by this decorator.
* @param propertiesDescriptions
* The descriptions of the properties.
* @param description
* The description of the wrapped component.
* @param dependency
* The dependency description of the wrapped component.
* @param fullyInitialized
* A flag to show whether the component has been fully initialized or not.
* @param displaysDescriptions
* The descriptions of the displays.
*/
public AbstractPluginDecorator(final T analysisComponent, final Map<String, String> propertiesDescriptions, final String description, final String dependency,
final boolean fullyInitialized, final Map<String, String> displaysDescriptions) {
super(analysisComponent, propertiesDescriptions, description, dependency, fullyInitialized);
this.displaysDescriptions = displaysDescriptions;
}
/**
* Delivers the description for the given display.
*
* @param display
* The display whose description should be delivered.
*
* @return The description.
*/
public final String getDisplayDescription(final String display) {
return this.displaysDescriptions.get(display);
}
@Override
protected void refineComponentCopy(final MIAnalysisMetaModelFactory factory, final T componentCopy) {
super.refineComponentCopy(factory, componentCopy);
// Copy the output ports of the plugin instance
for (final MIOutputPort outputPort : super.analysisComponent.getOutputPorts()) {
final MIOutputPort outputPortCopy = factory.createOutputPort();
outputPortCopy.setName(outputPort.getName());
outputPortCopy.setParent(componentCopy);
componentCopy.getOutputPorts().add(outputPortCopy);
}
// Copy the repository "ports"
for (final MIRepositoryConnector repositoryConnector : super.analysisComponent.getRepositories()) {
final MIRepositoryConnector repositoryConnectorCopy = factory.createRepositoryConnector();
repositoryConnectorCopy.setName(repositoryConnector.getName());
componentCopy.getRepositories().add(repositoryConnectorCopy);
}
// Copy the displays
for (final MIDisplay display : super.analysisComponent.getDisplays()) {
final MIDisplay displayCopy = factory.createDisplay();
displayCopy.setName(display.getName());
displayCopy.setParent(componentCopy);
componentCopy.getDisplays().add(displayCopy);
}
}
@Override
public final EList<MIRepositoryConnector> getRepositories() {
return super.analysisComponent.getRepositories();
}
@Override
public final EList<MIOutputPort> getOutputPorts() {
return super.analysisComponent.getOutputPorts();
}
@Override
public final EList<MIDisplay> getDisplays() {
return super.analysisComponent.getDisplays();
}
}
/***************************************************************************
* Copyright 2013 Kieker Project (http://kieker-monitoring.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
package kieker.webgui.domain.pluginDecorators;
import java.util.Map;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIFilter;
import kieker.analysis.model.analysisMetaModel.MIInputPort;
import org.eclipse.emf.common.util.EList;
/**
* This is the actual decorator which decorates an {@link MIFilter} instance with some more properties and methods. The already existing behavior of the
* {@link MIFilter} instance is not modified.
*
* @author Nils Christian Ehmke
*/
public class FilterDecorator extends AbstractPluginDecorator<MIFilter> implements MIFilter {
/**
* Constructor to instantiate the fields of this class.
*
* @param analysisComponent
* The component wrapped by this decorator.
* @param propertiesDescriptions
* The descriptions of the properties.
* @param description
* The description of the wrapped component.
* @param dependency
* The dependency description of the wrapped component.
* @param fullyInitialized
* A flag to show whether the component has been fully initialized or not.
* @param displaysDescriptions
* The descriptions of the displays.
*/
public FilterDecorator(final MIFilter analysisComponent, final Map<String, String> propertiesDescriptions, final String description, final String dependency,
final boolean fullyInitialized, final Map<String, String> displaysDescriptions) {
super(analysisComponent, propertiesDescriptions, description, dependency, fullyInitialized, displaysDescriptions);
}
@Override
protected final MIFilter createComponent(final MIAnalysisMetaModelFactory factory) {
return factory.createFilter();
}
@Override
protected final void refineComponentCopy(final MIAnalysisMetaModelFactory factory, final MIFilter componentCopy) {
super.refineComponentCopy(factory, componentCopy);
// Copy the input ports of the plugin instance
for (final MIInputPort inputPort : super.analysisComponent.getInputPorts()) {
final MIInputPort inputPortCopy = factory.createInputPort();
inputPortCopy.setName(inputPort.getName());
inputPortCopy.setParent(componentCopy);
componentCopy.getInputPorts().add(inputPortCopy);
}
}
@Override
public final EList<MIInputPort> getInputPorts() {
return super.analysisComponent.getInputPorts();
}
}
/***************************************************************************
* Copyright 2013 Kieker Project (http://kieker-monitoring.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
package kieker.webgui.domain.pluginDecorators;
import java.util.Map;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIReader;
/**
* This is the actual decorator which decorates an {@link MIReader} instance with some more properties and methods. The already existing behavior of the
* {@link MIReader} instance is not modified.
*
* @author Nils Christian Ehmke
*/
public class ReaderDecorator extends AbstractPluginDecorator<MIReader> implements MIReader {
/**
* Constructor to instantiate the fields of this class.
*
* @param analysisComponent
* The component wrapped by this decorator.
* @param propertiesDescriptions
* The descriptions of the properties.
* @param description
* The description of the wrapped component.
* @param dependency
* The dependency description of the wrapped component.
* @param fullyInitialized
* A flag to show whether the component has been fully initialized or not.
* @param displaysDescriptions
* The descriptions of the displays.
*/
public ReaderDecorator(final MIReader analysisComponent, final Map<String, String> propertiesDescriptions, final String description, final String dependency,
final boolean fullyInitialized, final Map<String, String> displaysDescriptions) {
super(analysisComponent, propertiesDescriptions, description, dependency, fullyInitialized, displaysDescriptions);
}
@Override
protected final MIReader createComponent(final MIAnalysisMetaModelFactory factory) {
return factory.createReader();
}
}
/***************************************************************************
* Copyright 2013 Kieker Project (http://kieker-monitoring.net)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
***************************************************************************/
package kieker.webgui.domain.pluginDecorators;
import java.util.Map;
import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
import kieker.analysis.model.analysisMetaModel.MIRepository;
/**
* This is the actual decorator which decorates an {@link MIRepository} instance with some more properties and methods. The already existing behavior of the
* {@link MIRepository} instance is not modified.
*
* @author Nils Christian Ehmke
*/
public class RepositoryDecorator extends AbstractAnalysisComponentDecorator<MIRepository> implements MIRepository {
/**
* Constructor to instantiate the fields of this class.
*
* @param analysisComponent
* The component wrapped by this decorator.
* @param propertiesDescriptions
* The descriptions of the properties.
* @param description
* The description of the wrapped component.
* @param dependency
* The dependency description of the wrapped component.
* @param fullyInitialized
* A flag to show whether the component has been fully initialized or not.
*/
public RepositoryDecorator(final MIRepository analysisComponent, final Map<String, String> propertiesDescriptions, final String description,
final String dependency, final boolean fullyInitialized) {
super(analysisComponent, propertiesDescriptions, description, dependency, fullyInitialized);
}
@Override
protected final MIRepository createComponent(final MIAnalysisMetaModelFactory factory) {
return factory.createRepository();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment