diff --git a/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar b/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar index 3df59e0e658e1a8ebc17f2211ec41a0c8dc4c55e..16506330416aca9510d1f05dbfd405bb776b31bd 100644 Binary files a/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar and b/Kieker.WebGUI/lib/kieker-1.6-SNAPSHOT_emf.jar differ diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentControllerBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentControllerBean.java index a3bf7c1e568d43e5c05dcc5c3ef55278a684c0ff..9e84b72ebf8f6a0a53587ab4c176d25fb7f4493d 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentControllerBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/view/CurrentControllerBean.java @@ -34,11 +34,7 @@ import kieker.common.logging.LogFactory; import kieker.webgui.beans.application.ProjectsBean; import kieker.webgui.common.ACManager; import kieker.webgui.common.Global; -import kieker.webgui.common.exception.AnalysisAlreadyInstantiatedException; -import kieker.webgui.common.exception.AnalysisAlreadyStartedException; -import kieker.webgui.common.exception.AnalysisInstantiationException; -import kieker.webgui.common.exception.AnalysisNotInstantiatedException; -import kieker.webgui.common.exception.AnalysisNotStartedException; +import kieker.webgui.common.exception.AnalysisStateException; import kieker.webgui.common.exception.ProjectLoadException; /** @@ -170,12 +166,9 @@ public class CurrentControllerBean { synchronized (this) { ACManager.getInstance().startAnalysisController(this.projectName); } - } catch (final AnalysisAlreadyStartedException ex) { + } catch (final AnalysisStateException ex) { CurrentControllerBean.LOG.info("The analysis has already been started.", ex); CurrentControllerBean.showMessage(FacesMessage.SEVERITY_WARN, "The analysis has already been started."); - } catch (final AnalysisNotInstantiatedException ex) { - CurrentControllerBean.LOG.info("The analysis has not been instantiated yet.", ex); - CurrentControllerBean.showMessage(FacesMessage.SEVERITY_WARN, "The analysis has not been instantiated yet."); } } @@ -187,7 +180,7 @@ public class CurrentControllerBean { synchronized (this) { ACManager.getInstance().stopAnalysisController(this.projectName); } - } catch (final AnalysisNotStartedException ex) { + } catch (final AnalysisStateException ex) { CurrentControllerBean.LOG.info("The analysis has not been started yet.", ex); CurrentControllerBean.showMessage(FacesMessage.SEVERITY_WARN, "The analysis has not been started yet."); } @@ -201,12 +194,9 @@ public class CurrentControllerBean { synchronized (this) { ACManager.getInstance().instantiateAnalysisController(this.projectName); } - } catch (final AnalysisAlreadyInstantiatedException ex) { + } catch (final AnalysisStateException ex) { CurrentControllerBean.LOG.error("The analysis has already been instantiated.", ex); CurrentControllerBean.showMessage(FacesMessage.SEVERITY_ERROR, "The analysis has already been instantiated."); - } catch (final AnalysisInstantiationException ex) { - CurrentControllerBean.LOG.error("An error occurred while instantiating the analysis.", ex); - CurrentControllerBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occurred while instantiating the analysis."); } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java index d4d764f07b2265976ef12e99bf69e7ac9ad3239e..1b996cfd99aebe316e9e5bc45c380729e38a2387 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ACManager.java @@ -26,12 +26,7 @@ import java.util.concurrent.ConcurrentHashMap; import kieker.analysis.AnalysisController; import kieker.common.logging.Log; import kieker.common.logging.LogFactory; -import kieker.webgui.common.exception.AnalysisAlreadyInstantiatedException; -import kieker.webgui.common.exception.AnalysisAlreadyStartedException; -import kieker.webgui.common.exception.AnalysisInstantiationException; -import kieker.webgui.common.exception.AnalysisNotInstantiatedException; -import kieker.webgui.common.exception.AnalysisNotStartedException; -import kieker.webgui.common.exception.ProjectAlreadyStartedException; +import kieker.webgui.common.exception.AnalysisStateException; /** * This manager is responsible for the currently used and running instances of {@code AnalysisController}. It supplies methods to check the states of analysis, @@ -82,13 +77,13 @@ public final class ACManager { * @throws InterruptedException * If the current thread has somehow been interrupted while waiting for the existing analysis thread. */ - public void stopAnalysisController(final String project) throws AnalysisNotStartedException { + public void stopAnalysisController(final String project) throws AnalysisStateException { final Analysis analysis = this.analyses.get(project); if (analysis != null) { analysis.stop(); } else { - throw new AnalysisNotStartedException("The analysis has not been started yet."); + throw new AnalysisStateException("The analysis has not been started yet."); } } @@ -102,13 +97,13 @@ public final class ACManager { * @throws AnalysisNotInstantiatedException * If the analysis has not yet been initialized. */ - public void startAnalysisController(final String project) throws AnalysisAlreadyStartedException, AnalysisNotInstantiatedException { + public void startAnalysisController(final String project) throws AnalysisStateException { final Analysis analysis = this.analyses.get(project); if (analysis != null) { analysis.start(); } else { - throw new AnalysisNotInstantiatedException("The analysis has not been initialized yet."); + throw new AnalysisStateException("The analysis has not been initialized yet."); } } @@ -135,7 +130,7 @@ public final class ACManager { * The project whose analysis controller should be instantiated. * @throws AnalysisInstantiationException */ - public void instantiateAnalysisController(final String project) throws AnalysisAlreadyInstantiatedException, AnalysisInstantiationException { + public void instantiateAnalysisController(final String project) throws AnalysisStateException { try { if (!this.analyses.containsKey(project)) { FSManager.getInstance().openProject(project); @@ -144,10 +139,10 @@ public final class ACManager { // TODO // this.analyses.put(project, new Analysis(classLoader, modelProject)); } else { - throw new AnalysisAlreadyInstantiatedException("The analysis has already been initialized."); + throw new AnalysisStateException("The analysis has already been initialized."); } } catch (final IOException ex) { - throw new AnalysisInstantiationException("An IO-error occured while instantiating the analysis.", ex); + throw new AnalysisStateException("An IO-error occured while instantiating the analysis.", ex); } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/Analysis.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/Analysis.java index 78a0f65bb7a5c36a253a83cc732bc6d0041642cd..92addd1e5ebb488f50a92d790f0c8b7d240ec122 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/Analysis.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/Analysis.java @@ -12,8 +12,7 @@ import javax.annotation.PostConstruct; import kieker.analysis.plugin.AbstractPlugin; import kieker.common.logging.Log; import kieker.common.logging.LogFactory; -import kieker.webgui.common.exception.AnalysisAlreadyStartedException; -import kieker.webgui.common.exception.AnalysisInstantiationException; +import kieker.webgui.common.exception.AnalysisStateException; import kieker.webgui.common.exception.ProjectLoadException; // TODO AnalysisController, Thread etc. have to be initialized via the class loader as well @@ -29,7 +28,7 @@ public class Analysis { private final Object analysisControllerThread; private final UpdateDisplaysThread updateDisplaysThread; - public Analysis(final ClassLoader classLoader, final File projectFile) throws AnalysisInstantiationException { + public Analysis(final ClassLoader classLoader, final File projectFile) throws AnalysisStateException { try { this.classAndMethodContainer = new ClassAndMethodContainer(classLoader); @@ -43,28 +42,28 @@ public class Analysis { this.updateDisplaysThread = new UpdateDisplaysThread(ClassAndMethodContainer.invokeMethod( this.classAndMethodContainer.getAnalysisControllerWithMappingGetMapping(), controllerAndMapping, null)); if ((this.analysisController == null) || (this.analysisControllerThread == null)) { - throw new AnalysisInstantiationException("An error occured while instantiating the analysis."); + throw new AnalysisStateException("An error occured while instantiating the analysis."); } } catch (final ProjectLoadException ex) { - throw new AnalysisInstantiationException("An error occured while instantiating the analysis.", ex); + throw new AnalysisStateException("An error occured while instantiating the analysis.", ex); } catch (final NullPointerException ex) { - throw new AnalysisInstantiationException("An error occured while instantiating the analysis.", ex); + throw new AnalysisStateException("An error occured while instantiating the analysis.", ex); } } - public void start() throws AnalysisAlreadyStartedException { + public void start() throws AnalysisStateException { synchronized (this) { try { this.classAndMethodContainer.getAnalysisControllerThreadStart().invoke(this.analysisControllerThread, new Object[0]); this.updateDisplaysThread.start(); } catch (final IllegalThreadStateException ex) { - throw new AnalysisAlreadyStartedException("The analysis has already been started once. It has to be reinitialized to be runnable again.", ex); + throw new AnalysisStateException("The analysis has already been started once. It has to be reinitialized to be runnable again.", ex); } catch (final IllegalAccessException ex) { Analysis.LOG.error("An error occured during a reflection method call.", ex); } catch (final IllegalArgumentException ex) { Analysis.LOG.error("An error occured during a reflection method call.", ex); } catch (final InvocationTargetException ex) { - throw new AnalysisAlreadyStartedException("The analysis has already been started once. It has to be reinitialized to be runnable again.", ex); + throw new AnalysisStateException("The analysis has already been started once. It has to be reinitialized to be runnable again.", ex); } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/IProjectManagerFacade.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/IProjectManagerFacade.java new file mode 100644 index 0000000000000000000000000000000000000000..a4c4d33c09c365c0e8c0e37c27b9cbb2505abf72 --- /dev/null +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/IProjectManagerFacade.java @@ -0,0 +1,262 @@ +/*************************************************************************** + * Copyright 2012 by + * + Christian-Albrechts-University of Kiel + * + Department of Computer Science + * + Software Engineering Group + * and others. + * + * 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.common; + +import java.io.IOException; +import java.util.Collection; + +import kieker.analysis.AnalysisController.STATE; +import kieker.analysis.model.analysisMetaModel.MIProject; +import kieker.webgui.common.exception.AnalysisStateException; +import kieker.webgui.common.exception.DisplayNotFoundException; +import kieker.webgui.common.exception.NewerProjectException; +import kieker.webgui.common.exception.ProjectAlreadyExistingException; +import kieker.webgui.common.exception.ProjectNotExistingException; + +import org.primefaces.model.UploadedFile; + +/** + * This is the interface for a component which is responsible for managing all projects. This means that this interface can be used to create, copy, delete projects + * as well as to start and stop the corresponding analyses and similar things. The facade should abstract from details like the (memory) locations and from + * synchronization. Latter should be guaranteed by the facade, which means that multiple requests for the same project do not go wrong. + * + * @author Nils Christian Ehmke + * @version 1.0 + */ +public interface IProjectManagerFacade { + + /** + * This method adds a new project to the application. It creates an empty, but nevertheless valid kax-file to the file system. If the method fails due to an + * {@link IOException}, it will make sure that the project-directories will be removed as if the method would never have been called. + * + * @param projectName + * The name of the new project. + * @throws ProjectAlreadyExistingException + * If a project with the same name exists already. + * @throws IOException + * If something went wrong during the creation of the project. + */ + public void addProject(final String projectName) throws ProjectAlreadyExistingException, IOException; + + /** + * This method makes a copy of a project and saves it under another name. If the method fails due to an {@link IOException}, it will make sure that the + * project-directories of the destination-project will be removed as if the method would never have been called. + * + * @param originalProjectName + * The name of the source project. + * @param newProjectName + * The name of the target project. + * @throws ProjectNotExistingException + * If a project with the given (source) name doesn't exist. + * @throws ProjectAlreadyExistingException + * If a project with the same (target) name exists already. + * @throws IOException + * If something went wrong during the creation of the target-project or during the loading of the source-project. + */ + public void copyProject(final String originalProjectName, final String newProjectName) throws ProjectNotExistingException, ProjectAlreadyExistingException, + IOException; + + /** + * This method loads the kax-file for the given project name and delivers an initializes instance of {@link MIProject}. + * + * @param projectName + * The name of the project to be loaded. + * @return The model instance as defined by the corresponding kax-file. + * @throws ProjectNotExistingException + * If a project with the given (source) name doesn't exist. + * @throws IOException + * If something went wrong during the opening of the project. + */ + public MIProject openProject(final String projectName) throws ProjectNotExistingException, IOException; + + /** + * This method loads the kax-file for the given project name and delivers an initializes instance of {@link MIProject} - but instead of using the "normal" class + * loader, it uses the methods and classes stored in the given instance of {@link ClassAndMethodContainer}. This means that this method <b>does</b> return an + * instance of {@link MIProject}, but the one defined in the container. This is also the reason why this method has to return an {@link Object}-instance. + * + * @param projectName + * The name of the project to be loaded. + * @param classAndMethodContainer + * The container, which will be used to load the project instance. + * @return The model instance as defined by the corresponding kax-file. + * @throws ProjectNotExistingException + * If a project with the given (source) name doesn't exist. + * @throws IOException + * If something went wrong during the opening of the project. This can also mean that the given {@link ClassAndMethodContainer} is somehow invalid. + */ + public Object openProject(final String projectName, final ClassAndMethodContainer classAndMethodContainer) throws ProjectNotExistingException, IOException; + + /** + * This method tries to save the given model instance for the given project. The given time stamp will be compared (if the corresponding flag says so) with the + * current time stamp of the project. If the project on the file system has been modified in the meantime, a {@link NewerProjectException} will be thrown. If + * something goes wrong during the storage, it is <b>not</b> guaranteed that the resulting file will be valid. + * + * @param projectName + * The name of the project which has to be saved. + * @param project + * The model instance to be stored in the corresponding kax-file. + * @param timeStamp + * The time stamp which has to be compared with the "real" time stamp of the project. + * @param overwriteNewerProject + * Determines whether a newer project file will be overwritten without further warning or not- + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + * @throws IOException + * If something went wrong during the storage of the model instance. + * @throws NewerProjectException + * If the project on the file system is newer and the overwriteNewerProject-flag has not been set. + */ + public void saveProject(final String projectName, final MIProject project, final long timeStamp, final boolean overwriteNewerProject) throws + ProjectNotExistingException, IOException, NewerProjectException; + + /** + * Delivers the current time stamp of the given project. + * + * @param projectName + * The name of the project whose time stamp will be delivered. + * @return The current time stamp. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + */ + public long getCurrTimeStamp(final String projectName) throws ProjectNotExistingException; + + /** + * This method tries to upload a dependency to the given project. + * + * @param file + * The file to be uploaded to the project. + * @param projectName + * The name of the project. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + * @throws IOException + * If something went wrong during the uploading. + */ + public void uploadLibrary(final UploadedFile file, final String projectName) throws ProjectNotExistingException, IOException; + + /** + * This method delivers a class loader containing the currently available libraries of the given project. + * + * @param projectName + * The name of the project. + * @return A class loader for the given project. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + * @throws IOException + * If something went wrong during the initialization of the class loader. + */ + public ClassLoader getClassLoader(final String projectName) throws ProjectNotExistingException, IOException; + + /** + * This method lists all available libraries of the given project. + * + * @param projectName + * The name of the project whose libraries have to be delivered. + * @return A list containing all available library-names of the project. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + */ + public Collection<String> listAllLibraries(final String projectName) throws ProjectNotExistingException; + + /** + * This method lists all available projects on the file system. + * + * @return A list containing all available project names. + */ + public Collection<String> listAllProjects(); + + /** + * This method initializes the analysis of the given project. + * + * @param projectName + * The name of the project whose analysis should be initialized. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + * @throws AnalysisStateException + * If the analysis of the given project is in the wrong state to be initialized. This means that it has not been cleaned yet. + */ + public void initializeAnalysis(final String projectName) throws ProjectNotExistingException, AnalysisStateException; + + /** + * This method cleans the analysis of the given project. + * + * @param projectName + * The name of the project whose analysis should be cleaned. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + * @throws AnalysisStateException + * If the analysis of the given project is in the wrong state to be cleaned. This means that it has not been terminated yet. + */ + public void cleanAnalysis(final String projectName) throws ProjectNotExistingException, AnalysisStateException; + + /** + * This method starts the analysis of the given project. + * + * @param projectName + * The name of the project whose analysis should be started. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + * @throws AnalysisStateException + * If the analysis of the given project is in the wrong state to be started. This means that it has not been initialized yet. + */ + public void startAnalysis(final String projectName) throws ProjectNotExistingException, AnalysisStateException; + + /** + * This method stops the analysis of the given project. + * + * @param projectName + * The name of the project whose analysis should be stopped. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + * @throws AnalysisStateException + * If the analysis of the given project is in the wrong state to be stopped. This means that it has not been started yet or is no longer running. + */ + public void stopAnalysis(final String projectName) throws ProjectNotExistingException, AnalysisStateException; + + /** + * This method delivers the display object of the (currently running) analysis for the given project and the given parameters. Technically it is an instance of + * {@code AbstractDisplay}, but in fact the project specific class loader has been used. + * + * @param projectName + * The name of the project. + * @param viewName + * The name of the view. + * @param displayName + * The name of the display. + * @return A display object for the given parameters. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + * @throws DisplayNotFoundException + * If a view or a display within the given view does not exist. + */ + public Object getDisplay(final String projectName, final String viewName, final String displayName) throws ProjectNotExistingException, DisplayNotFoundException; + + /** + * This method delivers the current state of the given project. + * + * @param projectName + * The name of the project whose state have to be returned. + * @return The state of the given project, if available. {@code null} otherwise. + * @throws ProjectNotExistingException + * If a project with the given name does not exist. + */ + public STATE getCurrentState(final String projectName) throws ProjectNotExistingException; +} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ProjectManagerFacade.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ProjectManagerFacade.java new file mode 100644 index 0000000000000000000000000000000000000000..9913a4defb708bebf45910fb1cca61fe3e6135eb --- /dev/null +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/ProjectManagerFacade.java @@ -0,0 +1,157 @@ +/*************************************************************************** + * Copyright 2012 by + * + Christian-Albrechts-University of Kiel + * + Department of Computer Science + * + Software Engineering Group + * and others. + * + * 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.common; + +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; + +import kieker.analysis.AnalysisController.STATE; +import kieker.analysis.model.analysisMetaModel.MIProject; +import kieker.webgui.common.exception.AnalysisStateException; +import kieker.webgui.common.exception.DisplayNotFoundException; +import kieker.webgui.common.exception.NewerProjectException; +import kieker.webgui.common.exception.ProjectAlreadyExistingException; +import kieker.webgui.common.exception.ProjectNotExistingException; + +import org.primefaces.model.UploadedFile; + +/** + * This is an implemented facade for the project management. For technical reasons it is a singleton class. + * + * @author Nils Christian Ehmke + * @version 1.0 + */ +public final class ProjectManagerFacade implements IProjectManagerFacade { + + private final HashMap<String, Object> fileSystemLocks = new HashMap<String, Object>(); + private final HashMap<String, Object> analysesLocks = new HashMap<String, Object>(); + + /** + * This is the private constructor for this class, as this class is a singleton. + */ + private ProjectManagerFacade() { + // No code necessary. + } + + public static ProjectManagerFacade getInstance() { + return null; + } + + @Override + public void addProject(final String projectName) throws ProjectAlreadyExistingException, IOException { + // TODO Auto-generated method stub + + } + + @Override + public void copyProject(final String originalProjectName, final String newProjectName) throws ProjectNotExistingException, ProjectAlreadyExistingException, + IOException { + // TODO Auto-generated method stub + + } + + @Override + public MIProject openProject(final String projectName) throws ProjectNotExistingException, IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Object openProject(final String projectName, final ClassAndMethodContainer classAndMethodContainer) throws ProjectNotExistingException, IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public void saveProject(final String projectName, final MIProject project, final long timeStamp, final boolean overwriteNewerProject) + throws ProjectNotExistingException, IOException, NewerProjectException { + // TODO Auto-generated method stub + + } + + @Override + public long getCurrTimeStamp(final String projectName) throws ProjectNotExistingException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void uploadLibrary(final UploadedFile file, final String projectName) throws ProjectNotExistingException, IOException { + // TODO Auto-generated method stub + + } + + @Override + public ClassLoader getClassLoader(final String projectName) throws ProjectNotExistingException, IOException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Collection<String> listAllLibraries(final String projectName) throws ProjectNotExistingException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Collection<String> listAllProjects() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void initializeAnalysis(final String projectName) throws ProjectNotExistingException, AnalysisStateException { + // TODO Auto-generated method stub + + } + + @Override + public void cleanAnalysis(final String projectName) throws ProjectNotExistingException, AnalysisStateException { + // TODO Auto-generated method stub + + } + + @Override + public void startAnalysis(final String projectName) throws ProjectNotExistingException, AnalysisStateException { + // TODO Auto-generated method stub + + } + + @Override + public void stopAnalysis(final String projectName) throws ProjectNotExistingException, AnalysisStateException { + // TODO Auto-generated method stub + + } + + @Override + public Object getDisplay(final String projectName, final String viewName, final String displayName) throws ProjectNotExistingException, DisplayNotFoundException { + // TODO Auto-generated method stub + return null; + } + + @Override + public STATE getCurrentState(final String projectName) throws ProjectNotExistingException { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisAlreadyInstantiatedException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisAlreadyInstantiatedException.java deleted file mode 100644 index e86ef258d1b55a40fc45e2c38ffad8758a3ddb94..0000000000000000000000000000000000000000 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisAlreadyInstantiatedException.java +++ /dev/null @@ -1,51 +0,0 @@ -/*************************************************************************** - * Copyright 2012 by - * + Christian-Albrechts-University of Kiel - * + Department of Computer Science - * + Software Engineering Group - * and others. - * - * 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.common.exception; - -/** - * This exception shows that the analysis has not yet been instantiated. - * - * @author Nils Christian Ehmke - * @version 1.0 - */ -public class AnalysisAlreadyInstantiatedException extends Exception { - /** - * The serial version UID. - */ - private static final long serialVersionUID = 1L; - - /** - * Creates a new instance of this class. - */ - public AnalysisAlreadyInstantiatedException() { - // No code necessary - } - - /** - * Creates a new instance of this class using the given parameters. - * - * @param msg - * The message used for the exception. - */ - public AnalysisAlreadyInstantiatedException(final String msg) { - super(msg); - } -} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisAlreadyStartedException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisAlreadyStartedException.java deleted file mode 100644 index 8076da127c884a34f6fbd33bbf73b296aea0bc06..0000000000000000000000000000000000000000 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisAlreadyStartedException.java +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * Copyright 2012 by - * + Christian-Albrechts-University of Kiel - * + Department of Computer Science - * + Software Engineering Group - * and others. - * - * 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.common.exception; - -/** - * This exception shows that the given project has already been started. - * - * @author Nils Christian Ehmke - * @version 1.0 - */ -public class AnalysisAlreadyStartedException extends Exception { - /** - * The serial version UID. - */ - private static final long serialVersionUID = 1L; - - /** - * Creates a new instance of this class. - */ - public AnalysisAlreadyStartedException() { - // No code necessary - } - - /** - * Creates a new instance of this class using the given parameters. - * - * @param msg - * The message used for the exception. - */ - public AnalysisAlreadyStartedException(final String msg) { - super(msg); - } - - public AnalysisAlreadyStartedException(final String msg, final Throwable ex) { - super(msg, ex); - } -} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisInstantiationException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisInstantiationException.java deleted file mode 100644 index e0495a858b3b4580a9ea5ea4fe9843a28e00d199..0000000000000000000000000000000000000000 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisInstantiationException.java +++ /dev/null @@ -1,56 +0,0 @@ -/*************************************************************************** - * Copyright 2012 by - * + Christian-Albrechts-University of Kiel - * + Department of Computer Science - * + Software Engineering Group - * and others. - * - * 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.common.exception; - -public class AnalysisInstantiationException extends Exception { - /** - * The serial version UID. - */ - private static final long serialVersionUID = 1L; - - /** - * Creates a new instance of this class. - */ - public AnalysisInstantiationException() { - // No code necessary - } - - /** - * Creates a new instance of this class using the given parameters. - * - * @param msg - * The message used for the exception. - */ - public AnalysisInstantiationException(final String msg) { - super(msg); - } - - /** - * Creates a new instance of this class using the given parameters. - * - * @param msg - * The message used for the exception. - * @param The - * cause for the method. - */ - public AnalysisInstantiationException(final String msg, final Throwable cause) { - super(msg, cause); - } -} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotInstantiatedException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotInstantiatedException.java deleted file mode 100644 index 931a4a28bf5ffe31249e0dc06fb4d118ef6a921e..0000000000000000000000000000000000000000 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotInstantiatedException.java +++ /dev/null @@ -1,52 +0,0 @@ -/*************************************************************************** - * Copyright 2012 by - * + Christian-Albrechts-University of Kiel - * + Department of Computer Science - * + Software Engineering Group - * and others. - * - * 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.common.exception; - -/** - * This exception shows that the analysis has not yet been instantiated. - * - * @author Nils Christian Ehmke - * @version 1.0 - */ -public class AnalysisNotInstantiatedException extends Exception { - - /** - * The serial version UID. - */ - private static final long serialVersionUID = 1L; - - /** - * Creates a new instance of this class. - */ - public AnalysisNotInstantiatedException() { - // No code necessary - } - - /** - * Creates a new instance of this class using the given parameters. - * - * @param msg - * The message used for the exception. - */ - public AnalysisNotInstantiatedException(final String msg) { - super(msg); - } -} diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotStartedException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisStateException.java similarity index 84% rename from Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotStartedException.java rename to Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisStateException.java index 419d00c874f2dac05730c86ef4f4259399b2911b..e19ee9921daa6e6dbb220951e29f2980e56165c8 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisNotStartedException.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/AnalysisStateException.java @@ -21,12 +21,11 @@ package kieker.webgui.common.exception; /** - * This exception shows that the analysis has not yet been instantiated. * * @author Nils Christian Ehmke * @version 1.0 */ -public class AnalysisNotStartedException extends Exception { +public class AnalysisStateException extends Exception { /** * The serial version UID. */ @@ -35,7 +34,7 @@ public class AnalysisNotStartedException extends Exception { /** * Creates a new instance of this class. */ - public AnalysisNotStartedException() { + public AnalysisStateException() { // No code necessary } @@ -45,7 +44,11 @@ public class AnalysisNotStartedException extends Exception { * @param msg * The message used for the exception. */ - public AnalysisNotStartedException(final String msg) { + public AnalysisStateException(final String msg) { super(msg); } + + public AnalysisStateException(final String msg, final Throwable ex) { + super(msg, ex); + } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyStartedException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/DisplayNotFoundException.java similarity index 84% rename from Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyStartedException.java rename to Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/DisplayNotFoundException.java index 24206556cb1034fda48f44d45c805065af337abb..59818587a71042d4b8403813f5314af21c7d41a7 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectAlreadyStartedException.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/DisplayNotFoundException.java @@ -21,12 +21,11 @@ package kieker.webgui.common.exception; /** - * This exception shows that the given project has already been started. * * @author Nils Christian Ehmke * @version 1.0 */ -public class ProjectAlreadyStartedException extends Exception { +public class DisplayNotFoundException extends Exception { /** * The serial version UID. */ @@ -35,7 +34,7 @@ public class ProjectAlreadyStartedException extends Exception { /** * Creates a new instance of this class. */ - public ProjectAlreadyStartedException() { + public DisplayNotFoundException() { // No code necessary } @@ -45,7 +44,11 @@ public class ProjectAlreadyStartedException extends Exception { * @param msg * The message used for the exception. */ - public ProjectAlreadyStartedException(final String msg) { + public DisplayNotFoundException(final String msg) { super(msg); } + + public DisplayNotFoundException(final String msg, final Throwable ex) { + super(msg, ex); + } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectStillRunningException.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectNotExistingException.java similarity index 85% rename from Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectStillRunningException.java rename to Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectNotExistingException.java index a29d9468a749f45151abb5e29c5494651ff539a7..6a600fcbf92ac51a05b5369609b2327605234995 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectStillRunningException.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/exception/ProjectNotExistingException.java @@ -21,12 +21,10 @@ package kieker.webgui.common.exception; /** - * This exception shows that the project is still running. - * * @author Nils Christian Ehmke * @version 1.0 */ -public class ProjectStillRunningException extends Exception { +public class ProjectNotExistingException extends Exception { /** * The serial version UID. */ @@ -35,7 +33,7 @@ public class ProjectStillRunningException extends Exception { /** * Creates a new instance of this class. */ - public ProjectStillRunningException() { + public ProjectNotExistingException() { // No code necessary } @@ -45,7 +43,7 @@ public class ProjectStillRunningException extends Exception { * @param msg * The message used for the exception. */ - public ProjectStillRunningException(final String msg) { + public ProjectNotExistingException(final String msg) { super(msg); } } diff --git a/Kieker.WebGUI/src/main/resources/kieker-1.6-SNAPSHOT_emf.jar b/Kieker.WebGUI/src/main/resources/kieker-1.6-SNAPSHOT_emf.jar index 3df59e0e658e1a8ebc17f2211ec41a0c8dc4c55e..16506330416aca9510d1f05dbfd405bb776b31bd 100644 Binary files a/Kieker.WebGUI/src/main/resources/kieker-1.6-SNAPSHOT_emf.jar and b/Kieker.WebGUI/src/main/resources/kieker-1.6-SNAPSHOT_emf.jar differ diff --git a/Kieker.WebGUI/src/main/webapp/js/flowEditor.js b/Kieker.WebGUI/src/main/webapp/js/flowEditor.js index bd148963711bda33fa17820ffec36ad756e1237e..93fafe7bdc9cfdf616322ab7a2691d0f8d793ae4 100644 --- a/Kieker.WebGUI/src/main/webapp/js/flowEditor.js +++ b/Kieker.WebGUI/src/main/webapp/js/flowEditor.js @@ -601,7 +601,7 @@ function GraphFlow(){ // the classname may be longer than the diplayed name if( nodeFamily.nodeClass != undefined){ - width = Math.max(width, (nodeFamily.nodeClass.length+6+iconSpace)*(vertexLabelSize-4)); + width = Math.max(width, (nodeFamily.nodeClass.length+6+iconSpace)*(vertexLabelSize-2)); } // add big node box @@ -1429,6 +1429,7 @@ function GraphFlow(){ } // test data + function init(){ var graph = GraphFlow(); var nodecount=0;