diff --git a/Kieker.WebGUI/bin/data/Advanced Example/meta.dat b/Kieker.WebGUI/bin/data/Advanced Example/meta.dat index b70565bdfe67056a7e677a4c35d65ef4489b1207..a812c29a0991b4ff12996dc990c94fa32c3f7c3b 100644 --- a/Kieker.WebGUI/bin/data/Advanced Example/meta.dat +++ b/Kieker.WebGUI/bin/data/Advanced Example/meta.dat @@ -1,5 +1,5 @@ # -#Thu Apr 11 15:35:42 CEST 2013 +#Fri Apr 12 21:00:01 CEST 2013 owner=Kieker-Administrator -layout=id0 -567 -144 192 72;id1 -271 -144 312 72;id2 87 -155 276 132;id3 395 -143 252 108;id4 1091 -155 468 96;id5 1949 -108 816 144;id6 1023 104 876 84;id7 1945 92 840 120;id8 2613 122 288 72;id9 2607 -180 360 72;id10 3025 -180 348 72;\#id1.2 id2.6 -83.5 -132.5 -83.5 -107.5;id1.2 id2.5 -83.5 -132.5 -83.5 -131.5;id3.12 id6.20 552.5 -143.5 552.5 115.5;id4.0 id10.R 1492.5 -161.5 1492.5 -262.5 2818.5 -262.5 2818.5 -168.5;id4.15 id5.16 1492.5 -125.5 1492.5 -96.5;id5.1 id10.R 2396.5 -138.5 2396.5 -262.5 2818.5 -262.5 2818.5 -168.5;id5.17 id8.26 2406.5 -102.5 2406.5 133.5;id7.2 id10.R 2396.5 73.5 2396.5 -99.5 2818.5 -99.5 2818.5 -168.5;id8.3 id10.R 2818.5 133.5 2818.5 -168.5; last\ user=Kieker-Administrator +analysis\ layout=id0 -567 -144 192 72;id1 -271 -144 312 72;id2 87 -155 276 132;id3 395 -143 252 108;id4 1091 -155 468 96;id5 1949 -108 816 144;id6 1023 104 876 84;id7 1945 92 840 120;id8 2613 122 288 72;id9 2607 -180 360 72;id10 3025 -180 348 72;\#id1.2 id2.6 -83.5 -132.5 -83.5 -107.5;id1.2 id2.5 -83.5 -132.5 -83.5 -131.5;id3.12 id6.20 552.5 -143.5 552.5 115.5;id4.0 id10.R 1492.5 -161.5 1492.5 -262.5 2818.5 -262.5 2818.5 -168.5;id4.15 id5.16 1492.5 -125.5 1492.5 -96.5;id5.1 id10.R 2396.5 -138.5 2396.5 -262.5 2818.5 -262.5 2818.5 -168.5;id5.17 id8.26 2406.5 -102.5 2406.5 133.5;id7.2 id10.R 2396.5 73.5 2396.5 -99.5 2818.5 -99.5 2818.5 -168.5;id8.3 id10.R 2818.5 133.5 2818.5 -168.5; diff --git a/Kieker.WebGUI/bin/data/Bookstore-Example/meta.dat b/Kieker.WebGUI/bin/data/Bookstore-Example/meta.dat index 4f7ca6273d4fd54d971faf446f101fbe80fbebcf..79b300af414f999d42f425be18d5c0f11375b27a 100644 --- a/Kieker.WebGUI/bin/data/Bookstore-Example/meta.dat +++ b/Kieker.WebGUI/bin/data/Bookstore-Example/meta.dat @@ -1,5 +1,5 @@ # -#Thu Apr 11 15:36:17 CEST 2013 +#Fri Apr 12 20:59:13 CEST 2013 owner=Kieker-Administrator -layout=id0 -1933 -617 192 72;id1 -1317 -629 336 84;id2 -607 -531 276 72;id3 -947 -519 276 84;id4 -947 -659 252 84;id5 -1661 -617 264 84;id6 -619 -663 252 72;\#id1.2 id4.8 -1118.5 -630.5 -1118.5 -648.5;id1.3 id3.5 -1118.5 -606.5 -1118.5 -508.5;id4.9 id6.14 -778.5 -660.5 -778.5 -652.5; last\ user=Kieker-Administrator +analysis\ layout=id0 -567 -161 192 72;id1 49 -173 336 84;id2 759 -75 276 72;id3 419 -63 276 84;id4 419 -203 252 84;id5 -295 -161 264 84;id6 747 -207 252 72;\#id1.2 id4.8 248.5 -173.5 248.5 -191.5;id1.3 id3.5 248.5 -149.5 248.5 -51.5;id4.9 id6.14 588.5 -203.5 588.5 -195.5; diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/persistence/IProjectDAO.java b/Kieker.WebGUI/src/main/java/kieker/webgui/persistence/IProjectDAO.java index 7b6494a53402aee1b2b7459fba0794ef9514e1d5..d65ce62f9a58c23a5867c53c40b8fef775ba09cf 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/persistence/IProjectDAO.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/persistence/IProjectDAO.java @@ -152,7 +152,7 @@ public interface IProjectDAO { * Determines whether a newer project file will be overwritten without further warning or not. * @param username * The name of the user who saves the project. - * @param layout + * @param analysisLayout * The current layout of the analysis graph. It is valid if this parameter is null. * * @throws ProjectNotExistingException @@ -163,8 +163,8 @@ public interface IProjectDAO { * If the project on the file system is newer and the overwriteNewerProject-flag has not been set. */ @PreAuthorize("hasAnyRole('User', 'Administrator')") - public abstract void saveProject(String projectName, MIProject project, long timeStamp, boolean overwriteNewerProject, String username, final String layout) - throws ProjectNotExistingException, IOException, NewerProjectException; + public abstract void saveProject(String projectName, MIProject project, long timeStamp, boolean overwriteNewerProject, String username, + final String analysisLayout, final String cockpitLayout) throws ProjectNotExistingException, IOException, NewerProjectException; /** * Delivers the current time stamp of the given project. @@ -285,10 +285,6 @@ public interface IProjectDAO { @PreAuthorize("isAuthenticated()") public abstract String getLastUser(final String projectName); - /** - * @param projectName - * @return - */ /** * Delivers the stored layout for the given project. * @@ -298,6 +294,9 @@ public interface IProjectDAO { * @return The layout string as it is stored within the meta data. If this isn't available, null will be returned. */ @PreAuthorize("isAuthenticated()") - public abstract String getLayout(String projectName); + public abstract String getAnalysisLayout(String projectName); + + @PreAuthorize("isAuthenticated()") + public abstract String getCockpitLayout(String projectName); } 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 6ee0d3cff9850dcaffcf43668db368e88911acab..38efda16b55585302c930314bccecb7fe5ef6a61 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 @@ -91,7 +91,8 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener { private static final String PROPERTY_KEY_LAST_USER = "last user"; private static final String PROPERTY_KEY_OWNER = "owner"; - private static final String PROPERTY_KEY_LAYOUT = "layout"; + private static final String PROPERTY_KEY_ANALYSIS_LAYOUT = "analysis layout"; + private static final String PROPERTY_KEY_COCKPIT_LAYOUT = "cockpit layout"; @Autowired private PluginFinder pluginFinder; @@ -289,7 +290,7 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener { // Now load the kax file and use the resulting MIProject to overwrite the existing (newly created) kax file final MIProject project = AnalysisController.loadFromFile(tempFile); - this.saveProject(projectName, project, 0, true, username, null); + this.saveProject(projectName, project, 0, true, username, null, null); } /* @@ -385,7 +386,7 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener { @Override @PreAuthorize("hasAnyRole('User', 'Administrator')") public void saveProject(final String projectName, final MIProject project, final long timeStamp, final boolean overwriteNewerProject, - final String username, final String layout) throws ProjectNotExistingException, IOException, NewerProjectException { + final String username, final String analysisLayout, final String cockpitLayout) throws ProjectNotExistingException, IOException, NewerProjectException { // Check whether the project exists if (!this.projectExists(projectName)) { throw new ProjectNotExistingException("A project with the name '" + projectName + "' does not exist."); @@ -403,8 +404,11 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener { // Store the new meta data final Properties properties = FSProjectDAOImpl.loadPropertiesFile(projectName); properties.put(FSProjectDAOImpl.PROPERTY_KEY_LAST_USER, username); - if (layout != null) { - properties.put(FSProjectDAOImpl.PROPERTY_KEY_LAYOUT, layout); + if (analysisLayout != null) { + properties.put(FSProjectDAOImpl.PROPERTY_KEY_ANALYSIS_LAYOUT, analysisLayout); + } + if (cockpitLayout != null) { + properties.put(FSProjectDAOImpl.PROPERTY_KEY_COCKPIT_LAYOUT, cockpitLayout); } FSProjectDAOImpl.savePropertiesFile(properties, projectName); } @@ -721,11 +725,21 @@ public class FSProjectDAOImpl implements IProjectDAO, ReleaseListener { /* * (non-Javadoc) * - * @see kieker.webgui.persistence.IProjectDAO#getLayout(java.lang.String) + * @see kieker.webgui.persistence.IProjectDAO#getAnalysisLayout(java.lang.String) + */ + @Override + public String getAnalysisLayout(final String projectName) { + return FSProjectDAOImpl.getProperty(projectName, FSProjectDAOImpl.PROPERTY_KEY_ANALYSIS_LAYOUT, null); + } + + /* + * (non-Javadoc) + * + * @see kieker.webgui.persistence.IProjectDAO#getCockpitLayout(java.lang.String) */ @Override - public String getLayout(final String projectName) { - return FSProjectDAOImpl.getProperty(projectName, FSProjectDAOImpl.PROPERTY_KEY_LAYOUT, null); + public String getCockpitLayout(final String projectName) { + return FSProjectDAOImpl.getProperty(projectName, FSProjectDAOImpl.PROPERTY_KEY_COCKPIT_LAYOUT, null); } /* diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/service/IProjectService.java b/Kieker.WebGUI/src/main/java/kieker/webgui/service/IProjectService.java index 9b371f5d93a74c70344676eaff564d807828fc2a..2927a8e37fd38776737de59acc15aac584a241c9 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/service/IProjectService.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/service/IProjectService.java @@ -162,7 +162,7 @@ public interface IProjectService { * Determines whether a newer project file will be overwritten without further warning or not. * @param username * The name of the user who saves the project. - * @param layout + * @param analysisLayout * The current layout of the analysis graph. It is valid if this parameter is null. * * @throws ProjectNotExistingException @@ -174,7 +174,7 @@ public interface IProjectService { */ @PreAuthorize("hasAnyRole('User', 'Administrator')") public void saveProject(final String projectName, final MIProject project, final long timeStamp, final boolean overwriteNewerProject, - final String username, final String layout) throws ProjectNotExistingException, IOException, NewerProjectException; + final String username, final String analysisLayout, final String cockpitLayout) throws ProjectNotExistingException, IOException, NewerProjectException; /** * Delivers the current time stamp of the given project. @@ -396,5 +396,8 @@ public interface IProjectService { * @return The layout string as it is stored within the meta data. If this isn't available, null will be returned. */ @PreAuthorize("isAuthenticated()") - public String getLayout(String projectName); + public abstract String getAnalysisLayout(String projectName); + + @PreAuthorize("isAuthenticated()") + public abstract String getCockpitLayout(String projectName); } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/ProjectServiceImpl.java b/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/ProjectServiceImpl.java index dc9f4e5bdddd12bd0b4dc2a9a5f119ad923d1e62..d227b2320150c9f7e988bfcf12ec0259ac83915f 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/ProjectServiceImpl.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/service/impl/ProjectServiceImpl.java @@ -149,15 +149,15 @@ public final class ProjectServiceImpl implements IProjectService { /* * (non-Javadoc) * - * @see kieker.webgui.service.IProjectService#saveProject(java.lang.String, kieker.analysis.model.analysisMetaModel.MIProject, long, boolean, String) + * @see kieker.webgui.service.IProjectService#saveProject(java.lang.String, kieker.analysis.model.analysisMetaModel.MIProject, long, boolean, String, String) */ @Override public void saveProject(final String projectName, final MIProject project, final long timeStamp, final boolean overwriteNewerProject, - final String username, final String layout) throws ProjectNotExistingException, IOException, NewerProjectException { + final String username, final String analysisLayout, final String cockpitLayout) throws ProjectNotExistingException, IOException, NewerProjectException { final Object projectLock = this.getLock(projectName, this.fileSystemLocks); synchronized (projectLock) { - this.projectDAO.saveProject(projectName, project, timeStamp, overwriteNewerProject, username, layout); + this.projectDAO.saveProject(projectName, project, timeStamp, overwriteNewerProject, username, analysisLayout, cockpitLayout); } } @@ -424,14 +424,28 @@ public final class ProjectServiceImpl implements IProjectService { /* * (non-Javadoc) * - * @see kieker.webgui.service.IProjectService#getLayout(java.lang.String) + * @see kieker.webgui.service.IProjectService#getAnalysisLayout(java.lang.String) */ @Override - public String getLayout(final String projectName) { + public String getAnalysisLayout(final String projectName) { final Object projectLock = this.getLock(projectName, this.fileSystemLocks); synchronized (projectLock) { - return this.projectDAO.getLayout(projectName); + return this.projectDAO.getAnalysisLayout(projectName); + } + } + + /* + * (non-Javadoc) + * + * @see kieker.webgui.service.IProjectService#getCockpitLayout(java.lang.String) + */ + @Override + public String getCockpitLayout(final String projectName) { + final Object projectLock = this.getLock(projectName, this.fileSystemLocks); + + synchronized (projectLock) { + return this.projectDAO.getCockpitLayout(projectName); } } } 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 e43eaac16b9b65e992d54f08043575aad331787c..fa593a5bb9529c8bdd8bae4e36a224e8011a7bda 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 @@ -290,7 +290,8 @@ public final class CurrentAnalysisEditorBean { final boolean overwriteNewerProject = Boolean.parseBoolean(paramMap.get("overwriteNewerProject")); try { - this.projectService.saveProject(this.projectName, this.project, this.timeStamp, overwriteNewerProject, this.userBean.getUsername(), this.currentLayout); + this.projectService.saveProject(this.projectName, this.project, this.timeStamp, overwriteNewerProject, this.userBean.getUsername(), this.currentLayout, + null); GlobalPropertiesBean.showMessage(FacesMessage.SEVERITY_INFO, this.globalPropertiesBean.getMsgProjectSaved()); // Update the time stamp! this.resetTimeStamp(); @@ -518,7 +519,7 @@ public final class CurrentAnalysisEditorBean { this.currentAnalysisEditorGraphBean.setGridSize(this.userBean.getGridSize()); // Perform either an initial auto layout or use the saved layout - if it exists - final String layout = this.projectService.getLayout(this.projectName); + final String layout = this.projectService.getAnalysisLayout(this.projectName); if (layout != null) { this.currentAnalysisEditorGraphBean.loadLayout(layout); diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentCockpitEditorBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentCockpitEditorBean.java index 94d56c450bae09047b88d7fc5a092a510da34d50..905cc5bc2dba13da609b23ef20777753757f0540 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentCockpitEditorBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/web/beans/view/CurrentCockpitEditorBean.java @@ -299,7 +299,8 @@ public final class CurrentCockpitEditorBean { */ public synchronized void saveProject(final boolean overwriteNewerProject) { try { - this.projectService.saveProject(this.projectName, this.project, this.timeStamp, overwriteNewerProject, this.userBean.getUsername(), null); + this.projectService.saveProject(this.projectName, this.project, this.timeStamp, overwriteNewerProject, this.userBean.getUsername(), null, + this.projectService.getCockpitLayout(this.projectName)); GlobalPropertiesBean.showMessage(FacesMessage.SEVERITY_INFO, this.globalPropertiesBean.getMsgProjectSaved()); // Update the time stamp! this.resetTimeStamp();