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

Minor quality modifications.

parent 9453b869
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,6 @@ import javax.faces.bean.ApplicationScoped; ...@@ -34,7 +34,6 @@ import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import kieker.analysis.AnalysisController;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.common.logging.Log; import kieker.common.logging.Log;
import kieker.common.logging.LogFactory; import kieker.common.logging.LogFactory;
...@@ -179,7 +178,7 @@ public final class ProjectsBean { ...@@ -179,7 +178,7 @@ public final class ProjectsBean {
* *
* @param project * @param project
* The project whose state should be delivered. * The project whose state should be delivered.
* @return The current state of the corresponding {@link AnalysisController} as defined by {@link ACManager#getAnalysisControllerStateString(String)}. * @return The current state of the corresponding AnalysisController as defined by {@link ACManager#getAnalysisControllerStateString(String)}.
*/ */
public String getAnalysisControllerState(final String project) { public String getAnalysisControllerState(final String project) {
return ACManager.getInstance().getAnalysisControllerStateString(project); return ACManager.getInstance().getAnalysisControllerStateString(project);
......
...@@ -29,15 +29,12 @@ import javax.faces.context.FacesContext; ...@@ -29,15 +29,12 @@ import javax.faces.context.FacesContext;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import kieker.webgui.beans.application.ThemeSwitcherBean;
/** /**
* This bean contains the current user theme (look and feel) of the (session) user. The default value is the "glass-x"-theme, if no other value can be find within * This bean contains the current user theme (look and feel) of the (session) user. The default value is the "glass-x"-theme, if no other value can be find within
* the parameters of the faces context or in the cookies of the user. * the parameters of the faces context or in the cookies of the user.
* *
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
* *
* @see ThemeSwitcherBean
* @version 1.0 * @version 1.0
*/ */
@ManagedBean @ManagedBean
......
...@@ -41,14 +41,14 @@ public final class UserBean implements Serializable { ...@@ -41,14 +41,14 @@ public final class UserBean implements Serializable {
* The serial version UID. * The serial version UID.
*/ */
private static final long serialVersionUID = 3942693805646862667L; private static final long serialVersionUID = 3942693805646862667L;
/**
* This field contains the name of the user.
*/
private final String userName;
/** /**
* The counter to get a number for the current user and to differ the sessions in test purposes. * The counter to get a number for the current user and to differ the sessions in test purposes.
*/ */
private static final AtomicLong GUEST_COUNTER = new AtomicLong(); private static final AtomicLong GUEST_COUNTER = new AtomicLong();
/**
* This field contains the name of the user.
*/
private final String userName;
/** /**
* Creates a new instance of this class. The user name is set to "Guest". * Creates a new instance of this class. The user name is set to "Guest".
...@@ -57,6 +57,9 @@ public final class UserBean implements Serializable { ...@@ -57,6 +57,9 @@ public final class UserBean implements Serializable {
this.userName = "Guest #" + UserBean.GUEST_COUNTER.getAndIncrement(); this.userName = "Guest #" + UserBean.GUEST_COUNTER.getAndIncrement();
} }
/**
* This method should only be called automatically by the JVM just before the object is destroyed.
*/
@PreDestroy @PreDestroy
protected void destroy() { protected void destroy() {
UserBean.GUEST_COUNTER.decrementAndGet(); UserBean.GUEST_COUNTER.decrementAndGet();
......
...@@ -76,11 +76,17 @@ public class CurrentProjectOverviewBean { ...@@ -76,11 +76,17 @@ public class CurrentProjectOverviewBean {
this.projectName = projectName; this.projectName = projectName;
} }
/**
* This method should only be called automatically by the JVM to update the projects list.
*/
@PostConstruct @PostConstruct
protected void init() { protected void init() {
this.updateLists(); this.updateLists();
} }
/**
* Updates the list containing the available projects name.
*/
public void updateLists() { public void updateLists() {
final ELResolver el = FacesContext.getCurrentInstance().getApplication().getELResolver(); final ELResolver el = FacesContext.getCurrentInstance().getApplication().getELResolver();
final ProjectsBean bean = (ProjectsBean) el.getValue(FacesContext.getCurrentInstance().getELContext(), null, "projectsBean"); final ProjectsBean bean = (ProjectsBean) el.getValue(FacesContext.getCurrentInstance().getELContext(), null, "projectsBean");
......
...@@ -58,7 +58,7 @@ import kieker.webgui.common.exception.ProjectStillRunningException; ...@@ -58,7 +58,7 @@ import kieker.webgui.common.exception.ProjectStillRunningException;
* @version 1.0 * @version 1.0
*/ */
// TODO How to differ between views and displays with same names? // TODO How to differ between views and displays with same names?
public final class ACManager { public final class ACManager { // NOCS (Class Data Abstraction Coupling)
/** /**
* This is the log for errors, exceptions etc. * This is the log for errors, exceptions etc.
*/ */
......
...@@ -60,7 +60,7 @@ import org.primefaces.model.UploadedFile; ...@@ -60,7 +60,7 @@ import org.primefaces.model.UploadedFile;
*/ */
// TODO Projects have to check their lock once they entered the synchronized block in order to make sure that they have still the valid one (and not a removed one // TODO Projects have to check their lock once they entered the synchronized block in order to make sure that they have still the valid one (and not a removed one
// from an older project) // from an older project)
public final class FSManager { public final class FSManager { // NOCS (Class Data Abstraction Coupling, Class Fan-Out Complexity)
/** /**
* This is the log object used to log messages, warnings etc. * This is the log object used to log messages, warnings etc.
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment