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 @@
***************************************************************************/
package kieker.webgui.beans.application;
import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ApplicationScoped;
......@@ -34,10 +30,9 @@ import kieker.analysis.model.analysisMetaModel.MIDependency;
import kieker.analysis.model.analysisMetaModel.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.impl.MAnalysisMetaModelFactory;
import kieker.common.logging.LogFactory;
import kieker.webgui.common.FileManager;
import org.primefaces.context.RequestContext;
import org.primefaces.context.RequestContext;
import org.primefaces.model.DefaultTreeNode;
import org.primefaces.model.TreeNode;
......
......@@ -24,14 +24,23 @@ import javax.faces.bean.ManagedBean;
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
* @version 1.0
*/
@ManagedBean
@RequestScoped
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;
import kieker.analysis.AnalysisController;
import kieker.analysis.exception.AnalysisConfigurationException;
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;
/**
* This bean contains an instance of {@link AnalysisController} and supplies methods to control the instance.
*
* @author Nils Christian Ehmke
* @version 1.0
......@@ -52,9 +55,7 @@ public class AnalysisControllerBean {
* Creates a new instance of this class.
*/
public AnalysisControllerBean() {
/*
* No code necessary.
*/
// No code necessary.
}
/**
......@@ -135,8 +136,13 @@ public class AnalysisControllerBean {
};
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;
import javax.faces.bean.SessionScoped;
/**
*
* This bean stores the current workspace size of the current user.
*
* @author Nils Christian Ehmke
*/
@ManagedBean
@SessionScoped
public class CurrentWorkspaceSizeBean {
private int sizeX;
private int sizeY;
public CurrentWorkspaceSizeBean() {
this.sizeX = 1000;
this.sizeY = 1000;
}
public int getSizeX() {
return sizeX;
}
public void setSizeX(int sizeX) {
this.sizeX = sizeX;
}
public int getSizeY() {
return sizeY;
}
public void setSizeY(int sizeY) {
this.sizeY = sizeY;
}
private int sizeX;
private int sizeY;
/**
* Creates a new instance of this class.
*/
public CurrentWorkspaceSizeBean() {
this.sizeX = 1000;
this.sizeY = 1000;
}
public int getSizeX() {
return this.sizeX;
}
public void setSizeX(final int sizeX) {
this.sizeX = sizeX;
}
public int getSizeY() {
return this.sizeY;
}
public void setSizeY(final int sizeY) {
this.sizeY = sizeY;
}
}
......@@ -20,7 +20,6 @@
package kieker.webgui.beans.session;
import java.awt.Point;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.net.MalformedURLException;
......@@ -29,7 +28,6 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
......@@ -97,14 +95,11 @@ public class SelectedMainProjectBean {
*/
private List<Connection> connections;
private final ConcurrentHashMap<MIPlugin, Point> positions;
/**
* Creates a new instance of this class.
*/
public SelectedMainProjectBean() {
this.connections = new ArrayList<Connection>();
this.positions = new ConcurrentHashMap<MIPlugin, Point>();
}
/**
......
......@@ -80,7 +80,7 @@ public final class PluginClassLoader extends ClassLoader {
public void addURL(final URL url) {
this.urlList.add(url);
this.classLoader = (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
this.classLoader = (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
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 {
public void removeURL(final URL url) {
this.urlList.remove(url);
this.classLoader = (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
this.classLoader = (URLClassLoader) AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
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 {
/* Create the singleton instance if necessary and use a doPrivileged-block. */
synchronized (PluginClassLoader.class) {
if (PluginClassLoader.instance == null) {
PluginClassLoader.instance = (PluginClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
PluginClassLoader.instance = (PluginClassLoader) AccessController.doPrivileged(new PrivilegedAction<Object>() {
@Override
public Object run() {
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