diff --git a/Kieker.WebGUI/lib/kieker-1.7-SNAPSHOT_emf.jar b/Kieker.WebGUI/lib/kieker-1.7-SNAPSHOT_emf.jar index d3a6d2112a9064d37e53677be3931ff21a1f755b..d747ec03fcdc7d74074bba69c7b3241e5fef17fb 100644 Binary files a/Kieker.WebGUI/lib/kieker-1.7-SNAPSHOT_emf.jar and b/Kieker.WebGUI/lib/kieker-1.7-SNAPSHOT_emf.jar differ diff --git a/Kieker.WebGUI/pom.xml b/Kieker.WebGUI/pom.xml index 727644d07784f5ad86d11b381e0ab7237a79888b..6faaf7a9cb090a6d7355205ec4b3ef68e8de5ab5 100644 --- a/Kieker.WebGUI/pom.xml +++ b/Kieker.WebGUI/pom.xml @@ -147,7 +147,7 @@ <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> - <version>3.4.1</version> + <version>3.4.2</version> </dependency> <dependency> <groupId>org.primefaces.themes</groupId> diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/persistence/impl/FSProjectDAOImpl.java b/Kieker.WebGUI/src/main/java/kieker/webgui/persistence/impl/FSProjectDAOImpl.java index 6813a20f4644833d9f79055f0d20e755f08b4ddf..18dc09930b2d27482b9382843018b27c55d9c004 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/persistence/impl/FSProjectDAOImpl.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/persistence/impl/FSProjectDAOImpl.java @@ -57,6 +57,7 @@ import org.springframework.util.WeakReferenceMonitor.ReleaseListener; import com.google.common.io.Files; import kieker.analysis.AnalysisController; +import kieker.analysis.model.analysisMetaModel.MIAnalysisComponent; import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory; import kieker.analysis.model.analysisMetaModel.MIDisplay; import kieker.analysis.model.analysisMetaModel.MIFilter; @@ -86,8 +87,6 @@ import kieker.webgui.persistence.impl.util.PluginFinder; import org.primefaces.model.UploadedFile; -import org.eclipse.emf.ecore.EObject; - /** * This is an implementation of the {@link IProjectDAO} interface, which uses the file system to store the available projects and everything. * @@ -487,7 +486,7 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener { * @throws ComponentInitializationException * If the properties could not be loaded. */ - private static void fillProperties(final Class<?> clazz, final EObject component, final ClassAndMethodContainer classAndMethodContainer, + private static void fillProperties(final Class<?> clazz, final MIAnalysisComponent component, final ClassAndMethodContainer classAndMethodContainer, final Map<String, String> propertyDescriptions) throws ComponentInitializationException { try { // Get the default configuration and use it to initialize the model repository diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentAnalysisEditorBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentAnalysisEditorBean.java index a072e809c09dc7b8ef080d57094e3438f06cd0e9..af0251644d2ff51081e9ce600d0b0c2734c8d0a9 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentAnalysisEditorBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentAnalysisEditorBean.java @@ -29,6 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import kieker.analysis.model.analysisMetaModel.MIAnalysisComponent; import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory; import kieker.analysis.model.analysisMetaModel.MIDependency; import kieker.analysis.model.analysisMetaModel.MIFilter; @@ -59,8 +60,6 @@ import org.primefaces.context.RequestContext; import org.primefaces.event.FileUploadEvent; import org.primefaces.model.UploadedFile; -import org.eclipse.emf.ecore.EObject; - /** * The {@link CurrentAnalysisEditorBean} contains the necessary data behind an instance of the analysis editor. It provides various methods to manipulate the current * project, as the analysis editor is the most important part of the whole application. The connection to the graph within the editor is done via another bean (the @@ -78,7 +77,7 @@ public final class CurrentAnalysisEditorBean { private static final MIAnalysisMetaModelFactory FACTORY = MAnalysisMetaModelFactory.eINSTANCE; private ComponentListContainer availableComponents; - private EObject selectedComponent; + private MIAnalysisComponent selectedComponent; private MIProject project; private String projectName; private long timeStamp; @@ -274,7 +273,7 @@ public final class CurrentAnalysisEditorBean { * * @return The currently selected plugin or repository. */ - public synchronized EObject getSelectedPlugin() { + public synchronized MIAnalysisComponent getSelectedPlugin() { return this.selectedComponent; } @@ -394,7 +393,7 @@ public final class CurrentAnalysisEditorBean { * The property name. * @return A human readable description and a substitution if there is no description. */ - public synchronized String getDescription(final EObject component, final String property) { + public synchronized String getDescription(final MIAnalysisComponent component, final String property) { IComponentContainer container = null; // Find the container which contains the component @@ -519,7 +518,7 @@ public final class CurrentAnalysisEditorBean { * @param node * The new node to be selected. */ - public synchronized void nodeSelected(final EObject node) { + public synchronized void nodeSelected(final MIAnalysisComponent node) { this.selectedComponent = node; } @@ -529,7 +528,7 @@ public final class CurrentAnalysisEditorBean { * @param node * The new node to be removed. */ - public synchronized void nodeRemoved(final EObject node) { + public synchronized void nodeRemoved(final MIAnalysisComponent node) { // Remove the component from the project if (node instanceof MIPlugin) { this.project.getPlugins().remove(node); diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentAnalysisEditorGraphBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentAnalysisEditorGraphBean.java index 84dc7506bf8cb418472c24cad17048e0e89423a9..1301504c830b143428045c144a3e18219a973e76 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentAnalysisEditorGraphBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentAnalysisEditorGraphBean.java @@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import kieker.analysis.model.analysisMetaModel.MIAnalysisComponent; import kieker.analysis.model.analysisMetaModel.MIFilter; import kieker.analysis.model.analysisMetaModel.MIInputPort; import kieker.analysis.model.analysisMetaModel.MIOutputPort; @@ -43,7 +44,6 @@ import kieker.webgui.web.beans.session.UserBean; import org.primefaces.context.RequestContext; import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; /** * The {@link CurrentAnalysisEditorGraphBean} contains the necessary data behind an graph of the analysis editor. It provides various methods to manipulate the @@ -107,7 +107,9 @@ public final class CurrentAnalysisEditorGraphBean { private static final Object REPOSITORY_INPUT_PORT = "R"; - private final Registry<EObject> componentMap = new Registry<EObject>(); + private final Registry<MIRepositoryConnector> repositoryPortMap = new Registry<MIRepositoryConnector>(); + private final Registry<MIPort> portMap = new Registry<MIPort>(); + private final Registry<MIAnalysisComponent> componentMap = new Registry<MIAnalysisComponent>(); private CurrentAnalysisEditorBean currentAnalysisEditorBean; private boolean gridEnabled = false; @@ -280,7 +282,7 @@ public final class CurrentAnalysisEditorGraphBean { } builder.append(String.format(CurrentAnalysisEditorGraphBean.JS_CMD_PORT, CurrentAnalysisEditorGraphBean.simpleEscape(port.getName()), - this.componentMap.get(port), CurrentAnalysisEditorGraphBean.simpleEscape(port.getName()))); + this.portMap.get(port), CurrentAnalysisEditorGraphBean.simpleEscape(port.getName()))); } return builder.toString(); @@ -306,7 +308,7 @@ public final class CurrentAnalysisEditorGraphBean { } builder.append(String.format(CurrentAnalysisEditorGraphBean.JS_CMD_PORT, CurrentAnalysisEditorGraphBean.simpleEscape(port.getName()), - this.componentMap.get(port), CurrentAnalysisEditorGraphBean.simpleEscape(port.getName()))); + this.repositoryPortMap.get(port), CurrentAnalysisEditorGraphBean.simpleEscape(port.getName()))); } return builder.toString(); @@ -344,7 +346,7 @@ public final class CurrentAnalysisEditorGraphBean { * @return The ID for the port within the graph */ private synchronized String assembleGraphPortID(final MIPlugin plugin, final MIPort port) { - return this.componentMap.get(plugin) + "." + this.componentMap.get(port); + return this.componentMap.get(plugin) + "." + this.portMap.get(port); } /** @@ -357,7 +359,7 @@ public final class CurrentAnalysisEditorGraphBean { * @return The ID for the port within the graph */ private synchronized Object assembleGraphPortID(final MIPlugin plugin, final MIRepositoryConnector port) { - return this.componentMap.get(plugin) + "." + this.componentMap.get(port); + return this.componentMap.get(plugin) + "." + this.repositoryPortMap.get(port); } /** @@ -378,23 +380,10 @@ public final class CurrentAnalysisEditorGraphBean { * The component whose ID should be delivered. * @return A human readable ID. */ - private synchronized String assembleGraphString(final EObject component) { - final String name; - final String className; - final String shortName; - - // Extract the names - if (component instanceof MIPlugin) { - className = ((MIPlugin) component).getClassname(); - name = ((MIPlugin) component).getName(); - } else if (component instanceof MIRepository) { - className = ((MIRepository) component).getClassname(); - name = ((MIRepository) component).getName(); - } else { - // This should not happen - return ""; - } - shortName = className.substring(className.lastIndexOf('.') + 1); + private synchronized String assembleGraphString(final MIAnalysisComponent component) { + final String name = component.getName(); + final String className = component.getClassname(); + final String shortName = className.substring(className.lastIndexOf('.') + 1); return String.format(CurrentAnalysisEditorGraphBean.JS_CMD_NODE, this.componentMap.get(component), CurrentAnalysisEditorGraphBean.simpleEscape(name), CurrentAnalysisEditorGraphBean.simpleEscape(shortName), @@ -412,7 +401,7 @@ public final class CurrentAnalysisEditorGraphBean { // Now search the correct node try { - final EObject selectedNode = this.componentMap.get(Integer.parseInt(clickedNodeID)); + final MIAnalysisComponent selectedNode = this.componentMap.get(Integer.parseInt(clickedNodeID)); if ((selectedNode != null) && (this.currentAnalysisEditorBean != null)) { this.currentAnalysisEditorBean.nodeSelected(selectedNode); } @@ -432,7 +421,7 @@ public final class CurrentAnalysisEditorGraphBean { final String clickedNodeID = paramMap.get(CurrentAnalysisEditorGraphBean.PARAM_NAME_ID); // Now search the correct node try { - final EObject selectedNode = this.componentMap.get(Integer.parseInt(clickedNodeID)); + final MIAnalysisComponent selectedNode = this.componentMap.get(Integer.parseInt(clickedNodeID)); if ((selectedNode != null) && (this.currentAnalysisEditorBean != null)) { this.currentAnalysisEditorBean.nodeRemoved(selectedNode); } @@ -455,18 +444,19 @@ public final class CurrentAnalysisEditorGraphBean { // Now search the correct components try { - final EObject sourcePort = this.componentMap.get(Integer.parseInt(sourcePortID)); if (CurrentAnalysisEditorGraphBean.REPOSITORY_INPUT_PORT.equals(targetPortID)) { // This is a special case: An edge between a filter and a repository + final MIRepositoryConnector sourcePort = this.repositoryPortMap.get(Integer.parseInt(sourcePortID)); final String targetID = paramMap.get(CurrentAnalysisEditorGraphBean.PARAM_NAME_TARGET_PORT_ID).split("\\.")[0]; - final EObject targetRepo = this.componentMap.get(Integer.parseInt(targetID)); + final MIAnalysisComponent targetRepo = this.componentMap.get(Integer.parseInt(targetID)); - if ((sourcePort instanceof MIRepositoryConnector) && (targetRepo instanceof MIRepository) && (this.currentAnalysisEditorBean != null)) { - this.currentAnalysisEditorBean.edgeCreated((MIRepositoryConnector) sourcePort, (MIRepository) targetRepo); + if ((sourcePort != null) && (targetRepo instanceof MIRepository) && (this.currentAnalysisEditorBean != null)) { + this.currentAnalysisEditorBean.edgeCreated(sourcePort, (MIRepository) targetRepo); } } else { // This is the normal case: An edge between two filters - final EObject targetPort = this.componentMap.get(Integer.parseInt(targetPortID)); + final MIPort sourcePort = this.portMap.get(Integer.parseInt(sourcePortID)); + final MIPort targetPort = this.portMap.get(Integer.parseInt(targetPortID)); if ((sourcePort != null) && (targetPort != null) && (this.currentAnalysisEditorBean != null)) { this.currentAnalysisEditorBean.edgeCreated((MIOutputPort) sourcePort, (MIInputPort) targetPort); @@ -491,17 +481,18 @@ public final class CurrentAnalysisEditorGraphBean { // Now search the correct components try { - final EObject sourcePort = this.componentMap.get(Integer.parseInt(sourcePortID)); if (CurrentAnalysisEditorGraphBean.REPOSITORY_INPUT_PORT.equals(targetPortID)) { // This is a special case: An edge between a filter and a repository + final MIRepositoryConnector sourcePort = this.repositoryPortMap.get(Integer.parseInt(sourcePortID)); final String targetID = paramMap.get(CurrentAnalysisEditorGraphBean.PARAM_NAME_TARGET_PORT_ID).split("\\.")[0]; - final EObject targetRepo = this.componentMap.get(Integer.parseInt(targetID)); - if ((sourcePort instanceof MIRepositoryConnector) && (targetRepo instanceof MIRepository) && (this.currentAnalysisEditorBean != null)) { - this.currentAnalysisEditorBean.edgeRemoved((MIRepositoryConnector) sourcePort, (MIRepository) targetRepo); + final MIAnalysisComponent targetRepo = this.componentMap.get(Integer.parseInt(targetID)); + if ((sourcePort != null) && (targetRepo instanceof MIRepository) && (this.currentAnalysisEditorBean != null)) { + this.currentAnalysisEditorBean.edgeRemoved(sourcePort, (MIRepository) targetRepo); } } else { // This is the normal case: An edge between two filters - final EObject targetPort = this.componentMap.get(Integer.parseInt(targetPortID)); + final MIPort sourcePort = this.portMap.get(Integer.parseInt(sourcePortID)); + final MIPort targetPort = this.portMap.get(Integer.parseInt(targetPortID)); if ((sourcePort != null) && (targetPort != null) && (this.currentAnalysisEditorBean != null)) { this.currentAnalysisEditorBean.edgeRemoved((MIOutputPort) sourcePort, (MIInputPort) targetPort); @@ -576,7 +567,7 @@ public final class CurrentAnalysisEditorGraphBean { * @param newName * The new name of the node. */ - public synchronized void renameNode(final EObject node, final String newName) { + public synchronized void renameNode(final MIAnalysisComponent node, final String newName) { final String cmd = String.format(CurrentAnalysisEditorGraphBean.JS_CMD_RENAME_NODE, this.componentMap.get(node), CurrentAnalysisEditorGraphBean.simpleEscape(newName)); RequestContext.getCurrentInstance().execute(cmd); diff --git a/Kieker.WebGUI/src/main/resources/kieker-1.7-SNAPSHOT_emf.jar b/Kieker.WebGUI/src/main/resources/kieker-1.7-SNAPSHOT_emf.jar index d3a6d2112a9064d37e53677be3931ff21a1f755b..d747ec03fcdc7d74074bba69c7b3241e5fef17fb 100644 Binary files a/Kieker.WebGUI/src/main/resources/kieker-1.7-SNAPSHOT_emf.jar and b/Kieker.WebGUI/src/main/resources/kieker-1.7-SNAPSHOT_emf.jar differ diff --git a/Kieker.WebGUI/src/main/resources/log4j.properties b/Kieker.WebGUI/src/main/resources/log4j.properties index 2c271ba16f9479b1fb05c569dac1ff68f6ac4d28..d0a89e6f6777f99eb4660ef3894cd8055c678e96 100644 --- a/Kieker.WebGUI/src/main/resources/log4j.properties +++ b/Kieker.WebGUI/src/main/resources/log4j.properties @@ -17,7 +17,7 @@ # FATAL, ERROR, WARN, INFO, DEBUG # #------------------------------------------------------------------------------ -log4j.rootCategory=INFO, S +log4j.rootCategory=WARN, S log4j.logger.com.dappit.Dapper.parser=ERROR log4j.logger.org.w3c.tidy=FATAL