diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java index 65ce5bdc23b639390cda2cfb0cda269508d4d1dc..5094db99b1645843c0abe346d5550819d6a2a698 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/beans/application/ProjectsBean.java @@ -31,10 +31,10 @@ import kieker.common.logging.Log; import kieker.common.logging.LogFactory; import kieker.webgui.beans.view.CurrentProjectOverviewBean; import kieker.webgui.common.IProjectManagerFacade; -import kieker.webgui.common.ProjectManagerFacade; import kieker.webgui.common.exception.ProjectAlreadyExistingException; import kieker.webgui.common.exception.ProjectLoadException; import kieker.webgui.common.exception.ProjectNotExistingException; +import kieker.webgui.common.impl.ProjectManagerFacadeImpl; /** * The {@link ProjectsBean} is a Spring managed bean to manage a list with all application wide available projects. It provides methods to receive this list as well @@ -148,7 +148,7 @@ public final class ProjectsBean { /** * This method can be used to open an already existing project. This means that the current state of the project on the file system is loaded into an instance of - * {@link MIProject}. This instance can be modified at will and for example later saved by the {@link ProjectManagerFacade}. + * {@link MIProject}. This instance can be modified at will and for example later saved by the {@link ProjectManagerFacadeImpl}. * * @param project * The name of the project to be opened. diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ProjectManagerFacade.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/ProjectManagerFacadeImpl.java similarity index 94% rename from Kieker.WebGUI/src/main/java/kieker/webgui/common/ProjectManagerFacade.java rename to Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/ProjectManagerFacadeImpl.java index 40653c130f0208fe34b446f708c7e04e612fee65..06a0505c91ec817628af994429e661974684c41b 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/ProjectManagerFacade.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/ProjectManagerFacadeImpl.java @@ -14,7 +14,7 @@ * limitations under the License. ***************************************************************************/ -package kieker.webgui.common; +package kieker.webgui.common.impl; import java.io.IOException; import java.net.MalformedURLException; @@ -29,6 +29,8 @@ import kieker.analysis.model.analysisMetaModel.MIDependency; import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.plugin.AbstractPlugin; import kieker.analysis.repository.AbstractRepository; +import kieker.webgui.common.ClassAndMethodContainer; +import kieker.webgui.common.IProjectManagerFacade; import kieker.webgui.common.exception.AnalysisInitializationException; import kieker.webgui.common.exception.AnalysisStateException; import kieker.webgui.common.exception.DisplayNotFoundException; @@ -48,7 +50,7 @@ import org.primefaces.model.UploadedFile; * * @author Nils Christian Ehmke */ -public final class ProjectManagerFacade implements IProjectManagerFacade { +public final class ProjectManagerFacadeImpl implements IProjectManagerFacade { private final ConcurrentHashMap<String, Object> fileSystemLocks = new ConcurrentHashMap<String, Object>(); private final ConcurrentHashMap<String, Object> analysesLocks = new ConcurrentHashMap<String, Object>(); @@ -62,12 +64,12 @@ public final class ProjectManagerFacade implements IProjectManagerFacade { /** * Default constructor. <b>Do not use this constructor. This bean is Spring managed.</b> */ - public ProjectManagerFacade() { + public ProjectManagerFacadeImpl() { // No code necessary. } /** - * The setter for the property {@link ProjectManagerFacade#acManager}. <b>Do not use this method. This property is Spring managed.</b> + * The setter for the property {@link ProjectManagerFacadeImpl#acManager}. <b>Do not use this method. This property is Spring managed.</b> * * @param acManager */ @@ -76,7 +78,7 @@ public final class ProjectManagerFacade implements IProjectManagerFacade { } /** - * The setter for the property {@link ProjectManagerFacade#fsManager}. <b>Do not use this method. This property is Spring managed.</b> + * The setter for the property {@link ProjectManagerFacadeImpl#fsManager}. <b>Do not use this method. This property is Spring managed.</b> * * @param fsManager */ @@ -85,7 +87,7 @@ public final class ProjectManagerFacade implements IProjectManagerFacade { } /** - * The setter for the property {@link ProjectManagerFacade#pluginFinder}. <b>Do not use this method. This property is Spring managed.</b> + * The setter for the property {@link ProjectManagerFacadeImpl#pluginFinder}. <b>Do not use this method. This property is Spring managed.</b> * * @param pluginFinder */ diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/UserManagerFacade.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/UserManagerFacadeImpl.java similarity index 87% rename from Kieker.WebGUI/src/main/java/kieker/webgui/common/UserManagerFacade.java rename to Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/UserManagerFacadeImpl.java index 075aee8385b7ea5d169c238814e3be1b757da907..34c3d71ebb03e51ab45140dec1d27dcc705978b1 100644 --- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/UserManagerFacade.java +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/UserManagerFacadeImpl.java @@ -14,7 +14,7 @@ * limitations under the License. ***************************************************************************/ -package kieker.webgui.common; +package kieker.webgui.common.impl; import java.sql.Connection; import java.sql.PreparedStatement; @@ -32,11 +32,13 @@ import org.springframework.security.access.prepost.PreAuthorize; import kieker.common.logging.Log; import kieker.common.logging.LogFactory; +import kieker.webgui.common.IUserManagerFacade; +import kieker.webgui.common.Role; +import kieker.webgui.common.User; -// FIXME @PreAuthorize annotations are not used as it seems! -public class UserManagerFacade implements IUserManagerFacade { +public class UserManagerFacadeImpl implements IUserManagerFacade { - private static final Log LOG = LogFactory.getLog(UserManagerFacade.class); + private static final Log LOG = LogFactory.getLog(UserManagerFacadeImpl.class); @Autowired private DataSource dataSource; private Connection connection; @@ -44,7 +46,7 @@ public class UserManagerFacade implements IUserManagerFacade { /** * Default constructor. <b>Do not use this constructor. This bean is Spring managed.</b> */ - public UserManagerFacade() { + public UserManagerFacadeImpl() { // No code necessary } @@ -55,7 +57,7 @@ public class UserManagerFacade implements IUserManagerFacade { try { this.connection = this.dataSource.getConnection(); } catch (final SQLException ex) { - UserManagerFacade.LOG.error("Could not establish database connection.", ex); + UserManagerFacadeImpl.LOG.error("Could not establish database connection.", ex); } } @@ -80,7 +82,7 @@ public class UserManagerFacade implements IUserManagerFacade { roleCmd.execute(); } } catch (final SQLException ex) { - UserManagerFacade.LOG.error("Could not add user to the database.", ex); + UserManagerFacadeImpl.LOG.error("Could not add user to the database.", ex); } } @@ -132,14 +134,14 @@ public class UserManagerFacade implements IUserManagerFacade { // Now convert the map to the list result.addAll(tempMap.values()); } catch (final SQLException ex) { - UserManagerFacade.LOG.error("Could not receive user list.", ex); + UserManagerFacadeImpl.LOG.error("Could not receive user list.", ex); } finally { try { if (queryResult != null) { queryResult.close(); } } catch (final SQLException ex) { - UserManagerFacade.LOG.error("Could not close query result.", ex); + UserManagerFacadeImpl.LOG.error("Could not close query result.", ex); } } diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/package-info.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..54cf3cb2fc0edf4f032f6c6df549ea4dbb97ca49 --- /dev/null +++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/impl/package-info.java @@ -0,0 +1,21 @@ +/*************************************************************************** + * Copyright 2012 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. + ***************************************************************************/ + +/** + * @author Nils Christian Ehmke + * + */ +package kieker.webgui.common.impl; \ No newline at end of file diff --git a/Kieker.WebGUI/src/main/webapp/WEB-INF/spring-config.xml b/Kieker.WebGUI/src/main/webapp/WEB-INF/spring-config.xml index 5123f93215b8b2ae9bfb84119401be7e216e36b4..c2a0d8f256657f20681bb28e991cf3aac8f03934 100644 --- a/Kieker.WebGUI/src/main/webapp/WEB-INF/spring-config.xml +++ b/Kieker.WebGUI/src/main/webapp/WEB-INF/spring-config.xml @@ -69,7 +69,7 @@ <bean id="acManager" class="kieker.webgui.common.util.ACManager"> <property name="fsManager" ref="fsManager" /> </bean> - <bean id="projectManagerFacade" class="kieker.webgui.common.ProjectManagerFacade"> + <bean id="projectManagerFacade" class="kieker.webgui.common.impl.ProjectManagerFacadeImpl"> <property name="fsManager" ref="fsManager" /> <property name="acManager" ref="acManager" /> <property name="pluginFinder" ref="pluginFinder" /> @@ -124,7 +124,7 @@ </map> </property> </bean> - <bean init-method="initialize" id="userManagerFacade" class="kieker.webgui.common.UserManagerFacade"> + <bean init-method="initialize" id="userManagerFacade" class="kieker.webgui.common.impl.UserManagerFacadeImpl"> <property name="dataSource" ref="userDataSource" /> </bean>