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

Replaced the kieker-jar with a newer version; Made sure that the model mapping...

Replaced the kieker-jar with a newer version; Made sure that the model mapping is stored within the analysis controller bean.
parent 09cd500c
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -21,13 +21,18 @@ package kieker.webgui.beans.session; ...@@ -21,13 +21,18 @@ package kieker.webgui.beans.session;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap;
import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped; 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.MIPlugin;
import kieker.analysis.model.analysisMetaModel.MIProject; import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.analysis.model.analysisMetaModel.MIRepository;
import kieker.analysis.plugin.AbstractPlugin;
import kieker.analysis.repository.AbstractRepository;
import kieker.common.logging.Log; import kieker.common.logging.Log;
import kieker.common.logging.LogFactory; import kieker.common.logging.LogFactory;
import kieker.common.logging.LogImplWebguiLogging; import kieker.common.logging.LogImplWebguiLogging;
...@@ -50,6 +55,8 @@ public class AnalysisControllerBean { ...@@ -50,6 +55,8 @@ public class AnalysisControllerBean {
* The controller instance stored within this bean. * The controller instance stored within this bean.
*/ */
private AnalysisController controller; private AnalysisController controller;
private HashMap<MIPlugin, AbstractPlugin> pluginMap;
private HashMap<MIRepository, AbstractRepository> repositoryMap;
/** /**
* Creates a new instance of this class. * Creates a new instance of this class.
...@@ -86,17 +93,12 @@ public class AnalysisControllerBean { ...@@ -86,17 +93,12 @@ public class AnalysisControllerBean {
public void instantiate(final MIProject mProject) { public void instantiate(final MIProject mProject) {
if (mProject != null) { if (mProject != null) {
try { try {
// Create a temporary file and store the model instance in it.
final File tempFile = File.createTempFile("java", ".tmp");
AnalysisController.saveToFile(tempFile, mProject);
// Try to create the controller. // Try to create the controller.
this.controller = new AnalysisController(tempFile, PluginClassLoader.getInstance()); final AnalysisController.AnalysisControllerWithMapping controllerAndMapping = AnalysisController.createAnalysisController(mProject, PluginClassLoader.getInstance());
// Don't forget to remove the temporary file. // Extract everything that is necessary.
if (!tempFile.delete()) { this.controller = controllerAndMapping.getController();
AnalysisControllerBean.LOG.warn("Could not remove temporary file."); this.pluginMap = controllerAndMapping.getPluginMap();
} this.repositoryMap = controllerAndMapping.getRepositoryMap();
} catch (final IOException ex) {
AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex);
} catch (final NullPointerException ex) { } catch (final NullPointerException ex) {
AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex); AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex);
} catch (final AnalysisConfigurationException ex) { } catch (final AnalysisConfigurationException ex) {
......
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
</p:column> </p:column>
<p:column headerText="Value" style="width:125px"> <p:column headerText="Value" style="width:125px">
<p:cellEditor > <p:cellEditor>
<f:facet name="output"> <f:facet name="output">
<h:outputText value="#{property.value}" rendered="#{not stringBean.checkString(property)}"/> <h:outputText value="#{property.value}" rendered="#{not stringBean.checkString(property)}"/>
<h:outputText value="#{selectedPluginBean.plugin.name}" rendered="#{stringBean.checkString(property)}"/> <h:outputText value="#{selectedPluginBean.plugin.name}" rendered="#{stringBean.checkString(property)}"/>
......
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