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

Modifications for checkstyle.

parent f4bb6115
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,7 @@ ...@@ -19,11 +19,7 @@
***************************************************************************/ ***************************************************************************/
package kieker.webgui.beans.application; package kieker.webgui.beans.application;
import java.io.File;
import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.application.FacesMessage; import javax.faces.application.FacesMessage;
import javax.faces.bean.ApplicationScoped; import javax.faces.bean.ApplicationScoped;
...@@ -34,10 +30,9 @@ import kieker.analysis.model.analysisMetaModel.MIDependency; ...@@ -34,10 +30,9 @@ import kieker.analysis.model.analysisMetaModel.MIDependency;
import kieker.analysis.model.analysisMetaModel.MIPlugin; import kieker.analysis.model.analysisMetaModel.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory; import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory;
import kieker.common.logging.LogFactory;
import kieker.webgui.common.FileManager; import kieker.webgui.common.FileManager;
import org.primefaces.context.RequestContext;
import org.primefaces.context.RequestContext;
import org.primefaces.model.DefaultTreeNode; import org.primefaces.model.DefaultTreeNode;
import org.primefaces.model.TreeNode; import org.primefaces.model.TreeNode;
......
...@@ -24,14 +24,23 @@ import javax.faces.bean.ManagedBean; ...@@ -24,14 +24,23 @@ import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped; import javax.faces.bean.RequestScoped;
/** /**
* * This is a simple helper bean which can be used to rewrite a given string as an ID.
*
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
* @version 1.0
*/ */
@ManagedBean @ManagedBean
@RequestScoped @RequestScoped
public class StringToIDBean { public class StringToIDBean {
public String stringToID(final String string) { /**
return string.replace(" ", ""); * Modified the given string so that it can be used as an ID. In other words: It removes all space characters.
} *
* @param string
* The string to be modified.
* @return The given string without space characters.
*/
public String stringToID(final String string) {
return string.replace(" ", "");
}
} }
...@@ -28,10 +28,13 @@ import javax.faces.bean.SessionScoped; ...@@ -28,10 +28,13 @@ import javax.faces.bean.SessionScoped;
import kieker.analysis.AnalysisController; import kieker.analysis.AnalysisController;
import kieker.analysis.exception.AnalysisConfigurationException; import kieker.analysis.exception.AnalysisConfigurationException;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.common.logging.*; import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
import kieker.common.logging.LogImplWebguiLogging;
import kieker.webgui.common.PluginClassLoader; import kieker.webgui.common.PluginClassLoader;
/** /**
* This bean contains an instance of {@link AnalysisController} and supplies methods to control the instance.
* *
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
* @version 1.0 * @version 1.0
...@@ -52,9 +55,7 @@ public class AnalysisControllerBean { ...@@ -52,9 +55,7 @@ public class AnalysisControllerBean {
* Creates a new instance of this class. * Creates a new instance of this class.
*/ */
public AnalysisControllerBean() { public AnalysisControllerBean() {
/* // No code necessary.
* No code necessary.
*/
} }
/** /**
...@@ -135,8 +136,13 @@ public class AnalysisControllerBean { ...@@ -135,8 +136,13 @@ public class AnalysisControllerBean {
}; };
thread.start(); thread.start();
} }
public String[] getLogEntries() { /**
return LogImplWebguiLogging.getEntries(AnalysisController.class.getName()); * This method delivers all log entries of the class {@link AnalysisController}.
} *
* @return All log entries of the analysis controller.
*/
public String[] getLogEntries() {
return LogImplWebguiLogging.getEntries(AnalysisController.class.getName());
}
} }
...@@ -23,34 +23,38 @@ import javax.faces.bean.ManagedBean; ...@@ -23,34 +23,38 @@ import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped; import javax.faces.bean.SessionScoped;
/** /**
* * This bean stores the current workspace size of the current user.
*
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
*/ */
@ManagedBean @ManagedBean
@SessionScoped @SessionScoped
public class CurrentWorkspaceSizeBean { public class CurrentWorkspaceSizeBean {
private int sizeX; private int sizeX;
private int sizeY; private int sizeY;
public CurrentWorkspaceSizeBean() { /**
this.sizeX = 1000; * Creates a new instance of this class.
this.sizeY = 1000; */
} public CurrentWorkspaceSizeBean() {
this.sizeX = 1000;
public int getSizeX() { this.sizeY = 1000;
return sizeX; }
}
public int getSizeX() {
public void setSizeX(int sizeX) { return this.sizeX;
this.sizeX = sizeX; }
}
public void setSizeX(final int sizeX) {
public int getSizeY() { this.sizeX = sizeX;
return sizeY; }
}
public int getSizeY() {
public void setSizeY(int sizeY) { return this.sizeY;
this.sizeY = sizeY; }
}
public void setSizeY(final int sizeY) {
this.sizeY = sizeY;
}
} }
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
package kieker.webgui.beans.session; package kieker.webgui.beans.session;
import java.awt.Point;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.net.MalformedURLException; import java.net.MalformedURLException;
...@@ -29,7 +28,6 @@ import java.util.ArrayList; ...@@ -29,7 +28,6 @@ import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.faces.application.FacesMessage; import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedBean;
...@@ -97,14 +95,11 @@ public class SelectedMainProjectBean { ...@@ -97,14 +95,11 @@ public class SelectedMainProjectBean {
*/ */
private List<Connection> connections; private List<Connection> connections;
private final ConcurrentHashMap<MIPlugin, Point> positions;
/** /**
* Creates a new instance of this class. * Creates a new instance of this class.
*/ */
public SelectedMainProjectBean() { public SelectedMainProjectBean() {
this.connections = new ArrayList<Connection>(); this.connections = new ArrayList<Connection>();
this.positions = new ConcurrentHashMap<MIPlugin, Point>();
} }
/** /**
......
...@@ -80,7 +80,7 @@ public final class PluginClassLoader extends ClassLoader { ...@@ -80,7 +80,7 @@ public final class PluginClassLoader extends ClassLoader {
public void addURL(final URL url) { public void addURL(final URL url) {
this.urlList.add(url); this.urlList.add(url);
this.classLoader = (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction() { this.classLoader = (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override @Override
public Object run() { public Object run() {
return new URLClassLoader(PluginClassLoader.this.urlList.toArray(new URL[PluginClassLoader.this.urlList.size()]), AnalysisController.class return new URLClassLoader(PluginClassLoader.this.urlList.toArray(new URL[PluginClassLoader.this.urlList.size()]), AnalysisController.class
...@@ -98,7 +98,7 @@ public final class PluginClassLoader extends ClassLoader { ...@@ -98,7 +98,7 @@ public final class PluginClassLoader extends ClassLoader {
public void removeURL(final URL url) { public void removeURL(final URL url) {
this.urlList.remove(url); this.urlList.remove(url);
this.classLoader = (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction() { this.classLoader = (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override @Override
public Object run() { public Object run() {
return new URLClassLoader(PluginClassLoader.this.urlList.toArray(new URL[PluginClassLoader.this.urlList.size()]), AnalysisController.class return new URLClassLoader(PluginClassLoader.this.urlList.toArray(new URL[PluginClassLoader.this.urlList.size()]), AnalysisController.class
...@@ -116,7 +116,7 @@ public final class PluginClassLoader extends ClassLoader { ...@@ -116,7 +116,7 @@ public final class PluginClassLoader extends ClassLoader {
/* Create the singleton instance if necessary and use a doPrivileged-block. */ /* Create the singleton instance if necessary and use a doPrivileged-block. */
synchronized (PluginClassLoader.class) { synchronized (PluginClassLoader.class) {
if (PluginClassLoader.instance == null) { if (PluginClassLoader.instance == null) {
PluginClassLoader.instance = (PluginClassLoader) AccessController.doPrivileged(new PrivilegedAction() { PluginClassLoader.instance = (PluginClassLoader) AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override @Override
public Object run() { public Object run() {
return new PluginClassLoader(); return new PluginClassLoader();
......
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