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

Started with an improved version of the GUI, including a multi user mode;...

Started with an improved version of the GUI, including a multi user mode; Updated also the Kieker-jar.
parent b4b9f830
Branches
Tags
No related merge requests found
Showing
with 273 additions and 713 deletions
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/> <classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</buildCommand> </buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures> </natures>
</projectDescription> </projectDescription>
#FindBugs User Preferences
#Fri May 18 17:56:48 CEST 2012
cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud
detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
detectorAtomicityProblem=AtomicityProblem|true
detectorBadAppletConstructor=BadAppletConstructor|false
detectorBadResultSetAccess=BadResultSetAccess|true
detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
detectorBadUseOfReturnValue=BadUseOfReturnValue|true
detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
detectorBooleanReturnNull=BooleanReturnNull|true
detectorCallToUnsupportedMethod=CallToUnsupportedMethod|false
detectorCheckExpectedWarnings=CheckExpectedWarnings|false
detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
detectorCheckTypeQualifiers=CheckTypeQualifiers|true
detectorCloneIdiom=CloneIdiom|true
detectorComparatorIdiom=ComparatorIdiom|true
detectorConfusedInheritance=ConfusedInheritance|true
detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
detectorCrossSiteScripting=CrossSiteScripting|true
detectorDefaultEncodingDetector=DefaultEncodingDetector|true
detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
detectorDontIgnoreResultOfPutIfAbsent=DontIgnoreResultOfPutIfAbsent|true
detectorDontUseEnum=DontUseEnum|true
detectorDroppedException=DroppedException|true
detectorDumbMethodInvocations=DumbMethodInvocations|true
detectorDumbMethods=DumbMethods|true
detectorDuplicateBranches=DuplicateBranches|true
detectorEmptyZipFileEntry=EmptyZipFileEntry|true
detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
detectorExplicitSerialization=ExplicitSerialization|true
detectorFinalizerNullsFields=FinalizerNullsFields|true
detectorFindBadCast2=FindBadCast2|true
detectorFindBadForLoop=FindBadForLoop|true
detectorFindCircularDependencies=FindCircularDependencies|false
detectorFindDeadLocalStores=FindDeadLocalStores|true
detectorFindDoubleCheck=FindDoubleCheck|true
detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
detectorFindFinalizeInvocations=FindFinalizeInvocations|true
detectorFindFloatEquality=FindFloatEquality|true
detectorFindHEmismatch=FindHEmismatch|true
detectorFindInconsistentSync2=FindInconsistentSync2|true
detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
detectorFindMaskedFields=FindMaskedFields|true
detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
detectorFindNakedNotify=FindNakedNotify|true
detectorFindNonShortCircuit=FindNonShortCircuit|true
detectorFindNullDeref=FindNullDeref|true
detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
detectorFindOpenStream=FindOpenStream|true
detectorFindPuzzlers=FindPuzzlers|true
detectorFindRefComparison=FindRefComparison|true
detectorFindReturnRef=FindReturnRef|true
detectorFindRunInvocations=FindRunInvocations|true
detectorFindSelfComparison=FindSelfComparison|true
detectorFindSelfComparison2=FindSelfComparison2|true
detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
detectorFindSpinLoop=FindSpinLoop|true
detectorFindSqlInjection=FindSqlInjection|true
detectorFindTwoLockWait=FindTwoLockWait|true
detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
detectorFindUnconditionalWait=FindUnconditionalWait|true
detectorFindUninitializedGet=FindUninitializedGet|true
detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
detectorFindUnreleasedLock=FindUnreleasedLock|true
detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
detectorFindUnsyncGet=FindUnsyncGet|true
detectorFindUseOfNonSerializableValue=FindUseOfNonSerializableValue|true
detectorFindUselessControlFlow=FindUselessControlFlow|true
detectorFormatStringChecker=FormatStringChecker|true
detectorHugeSharedStringConstants=HugeSharedStringConstants|true
detectorIDivResultCastToDouble=IDivResultCastToDouble|true
detectorIncompatMask=IncompatMask|true
detectorInconsistentAnnotations=InconsistentAnnotations|true
detectorInefficientMemberAccess=InefficientMemberAccess|false
detectorInefficientToArray=InefficientToArray|true
detectorInfiniteLoop=InfiniteLoop|true
detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
detectorInitializationChain=InitializationChain|true
detectorInstantiateStaticClass=InstantiateStaticClass|true
detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true
detectorInvalidJUnitTest=InvalidJUnitTest|true
detectorIteratorIdioms=IteratorIdioms|true
detectorLazyInit=LazyInit|true
detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
detectorLostLoggerDueToWeakReference=LostLoggerDueToWeakReference|true
detectorMethodReturnCheck=MethodReturnCheck|true
detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
detectorMutableLock=MutableLock|true
detectorMutableStaticFields=MutableStaticFields|true
detectorNaming=Naming|true
detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
detectorNumberConstructor=NumberConstructor|true
detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
detectorPublicSemaphores=PublicSemaphores|false
detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true
detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
detectorRedundantInterfaces=RedundantInterfaces|true
detectorRepeatedConditionals=RepeatedConditionals|true
detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
detectorSerializableIdiom=SerializableIdiom|true
detectorStartInConstructor=StartInConstructor|true
detectorStaticCalendarDetector=StaticCalendarDetector|true
detectorStringConcatenation=StringConcatenation|true
detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
detectorSwitchFallthrough=SwitchFallthrough|true
detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
detectorURLProblems=URLProblems|true
detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
detectorUnnecessaryMath=UnnecessaryMath|true
detectorUnreadFields=UnreadFields|true
detectorUselessSubclassMethod=UselessSubclassMethod|false
detectorVarArgsProblems=VarArgsProblems|true
detectorVolatileUsage=VolatileUsage|true
detectorWaitInLoop=WaitInLoop|true
detectorWrongMapIterator=WrongMapIterator|true
detectorXMLFactoryBypass=XMLFactoryBypass|true
detector_threshold=2
effort=default
filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false|15
filter_settings_neg=MALICIOUS_CODE,NOISE,I18N,SECURITY,EXPERIMENTAL|
run_at_full_build=false
#Fri Feb 03 16:06:50 CET 2012
eclipse.preferences.version=1 eclipse.preferences.version=1
encoding//src/main/java=UTF-8 encoding//src/main/java=UTF-8
encoding/<project>=UTF-8 encoding/<project>=UTF-8
#Fri Feb 03 21:01:28 CET 2012
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
org.eclipse.jdt.core.codeComplete.fieldSuffixes=
org.eclipse.jdt.core.codeComplete.localPrefixes=
org.eclipse.jdt.core.codeComplete.localSuffixes=
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6 org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6 org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
......
#Fri Feb 03 21:03:00 CET 2012
cleanup.add_default_serial_version_id=true cleanup.add_default_serial_version_id=true
cleanup.add_generated_serial_version_id=false cleanup.add_generated_serial_version_id=false
cleanup.add_missing_annotations=true cleanup.add_missing_annotations=true
...@@ -56,6 +55,10 @@ eclipse.preferences.version=1 ...@@ -56,6 +55,10 @@ eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Kieker - Profile formatter_profile=_Kieker - Profile
formatter_settings_version=12 formatter_settings_version=12
org.eclipse.jdt.ui.exception.name=e
org.eclipse.jdt.ui.gettersetter.use.is=true
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.overrideannotation=true
sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true sp_cleanup.add_missing_annotations=true
...@@ -66,10 +69,10 @@ sp_cleanup.add_missing_override_annotations=true ...@@ -66,10 +69,10 @@ sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=true sp_cleanup.add_missing_override_annotations_interface_methods=true
sp_cleanup.add_serial_version_id=false sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_parentheses_in_expressions=true
sp_cleanup.always_use_this_for_non_static_field_access=true sp_cleanup.always_use_this_for_non_static_field_access=true
sp_cleanup.always_use_this_for_non_static_method_access=true sp_cleanup.always_use_this_for_non_static_method_access=true
sp_cleanup.convert_to_enhanced_for_loop=false sp_cleanup.convert_to_enhanced_for_loop=true
sp_cleanup.correct_indentation=true sp_cleanup.correct_indentation=true
sp_cleanup.format_source_code=true sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false sp_cleanup.format_source_code_changes_only=false
...@@ -79,7 +82,7 @@ sp_cleanup.make_private_fields_final=true ...@@ -79,7 +82,7 @@ sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=true sp_cleanup.make_variable_declarations_final=true
sp_cleanup.never_use_blocks=false sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true sp_cleanup.never_use_parentheses_in_expressions=false
sp_cleanup.on_save_use_additional_actions=true sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=true sp_cleanup.qualify_static_field_accesses_with_declaring_class=true
...@@ -88,22 +91,22 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class= ...@@ -88,22 +91,22 @@ sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=
sp_cleanup.qualify_static_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
sp_cleanup.qualify_static_method_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=true
sp_cleanup.remove_private_constructors=true sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=false sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=false sp_cleanup.remove_unnecessary_nls_tags=false
sp_cleanup.remove_unused_imports=true sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false sp_cleanup.remove_unused_local_variables=true
sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false sp_cleanup.remove_unused_private_members=true
sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false sp_cleanup.sort_members_all=true
sp_cleanup.use_blocks=false sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false sp_cleanup.use_parentheses_in_expressions=true
sp_cleanup.use_this_for_non_static_field_access=true sp_cleanup.use_this_for_non_static_field_access=true
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false
sp_cleanup.use_this_for_non_static_method_access=true sp_cleanup.use_this_for_non_static_method_access=true
......
#Sat Jan 21 18:45:30 CET 2012
activeProfiles= activeProfiles=
eclipse.preferences.version=1 eclipse.preferences.version=1
resolveWorkspaceProjects=true resolveWorkspaceProjects=true
......
The project "Kieker.WebGUI" can be started via Maven (3). Just use the command
mvn jetty:run
to pack the war-file, deploy it on jetty and start jetty. The web tool is then available at
http://localhost:8080/Kieker.WebGUI/main
\ No newline at end of file
No preview for this file type
...@@ -13,8 +13,6 @@ You can copy and paste the single properties, into the pom.xml file and the IDE ...@@ -13,8 +13,6 @@ You can copy and paste the single properties, into the pom.xml file and the IDE
That way multiple projects can share the same settings (useful for formatting rules for example). That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project. Any value defined here will override the pom.xml file value but is only applicable to the current project.
--> -->
<netbeans.checkstyle.format>true</netbeans.checkstyle.format> <netbeans.compile.on.save>all</netbeans.compile.on.save>
<netbeans.hint.jdkPlatform>JDK_1.6</netbeans.hint.jdkPlatform>
<org-netbeans-modules-projectapi.jsf_2e_language>Facelets</org-netbeans-modules-projectapi.jsf_2e_language>
</properties> </properties>
</project-shared-configuration> </project-shared-configuration>
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<goals> <goals>
<goal>jetty:run</goal> <goal>jetty:run</goal>
</goals> </goals>
</action> </action>
</actions> </actions>
...@@ -16,6 +16,15 @@ ...@@ -16,6 +16,15 @@
<kieker.jar>kieker-1.6-SNAPSHOT_emf.jar</kieker.jar> <kieker.jar>kieker-1.6-SNAPSHOT_emf.jar</kieker.jar>
</properties> </properties>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
</repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.ocpsoft</groupId> <groupId>com.ocpsoft</groupId>
...@@ -201,7 +210,7 @@ ...@@ -201,7 +210,7 @@
<dependency> <dependency>
<groupId>kieker</groupId> <groupId>kieker</groupId>
<artifactId>kieker</artifactId> <artifactId>kieker</artifactId>
<version>1.5-SNAPSHOT</version> <version>1.6-SNAPSHOT</version>
<scope>system</scope> <scope>system</scope>
<systemPath>${project.basedir}/lib/${kieker.jar}</systemPath> <systemPath>${project.basedir}/lib/${kieker.jar}</systemPath>
</dependency> </dependency>
...@@ -217,15 +226,6 @@ ...@@ -217,15 +226,6 @@
</dependency> </dependency>
</dependencies> </dependencies>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
</repositories>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
...@@ -373,6 +373,4 @@ ...@@ -373,6 +373,4 @@
</plugins> </plugins>
</build> </build>
</project> </project>
/***************************************************************************
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* and others.
*
* 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.
***************************************************************************/
package kieker.webgui.beans.application;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import kieker.analysis.model.analysisMetaModel.MIDependency;
import kieker.common.logging.Log;
import kieker.common.logging.LogFactory;
import kieker.webgui.common.FileManager;
import kieker.webgui.common.PluginClassLoader;
import org.primefaces.model.UploadedFile;
/**
* This bean manages all dependencies (libraries) within the application. The bean can be used to add and remove dependencies as well as to get all available
* dependencies. This bean doesn't modify other beans directly.
*
* @author Nils Christian Ehmke
* @version 1.0
*/
@ManagedBean
@ApplicationScoped
public class DependenciesBean {
/**
* The logger within this class.
*/
private static final Log LOG = LogFactory.getLog(DependenciesBean.class);
/**
* The list containing the depenencies.
*/
private final List<MIDependency> dependencies;
/**
* Creates a new instance of this class.
*/
public DependenciesBean() {
this.dependencies = FileManager.getInstance().loadAllDependencies();
}
/**
* Delivers the currently available dependencies as a list. The list must <b>not</b> be modified.
*
* @return All available dependencies.
*/
public List<MIDependency> getDependencies() {
return this.dependencies;
}
/**
* Tries to upload a given file as a new dependency. If the dependency does already exist, it will be overwritten. If the dependencies has been uploaded
* successfully, the plugin class loader will get the lib as well.
*
* @param file
* The file to be uploaded.
*/
public void uploadDependency(final UploadedFile file) {
synchronized (this) {
final MIDependency dependency = FileManager.getInstance().uploadDependency(file);
if (dependency != null) {
// Is is possible that we already have a dependency with the same name and have to remove it first.
for (final MIDependency dep : this.dependencies) {
if (dep.getFilePath().equals(dependency.getFilePath())) {
this.dependencies.remove(dep);
break;
}
}
try {
PluginClassLoader.getInstance().addURL(new URL("file", "localhost", FileManager.getInstance().getFullPath(dependency)));
this.dependencies.add(dependency);
} catch (final MalformedURLException ex) {
DependenciesBean.LOG.error("Could not add the dependency to the ClassLoader.", ex);
}
}
}
}
/**
* Tries to delete a given dependency. Once this has been done, the class loader cannot use the dependency any longer.
*
* @param dependency
* The dependency to be removed.
*/
public void deleteDependency(final MIDependency dependency) {
synchronized (this) {
final boolean result = FileManager.getInstance().deleteDependency(dependency);
if (result) {
this.dependencies.remove(dependency);
try {
PluginClassLoader.getInstance().removeURL(new URL("file", "localhost", dependency.getFilePath()));
this.dependencies.remove(dependency);
} catch (final MalformedURLException ex) {
DependenciesBean.LOG.error("Could not remove the dependency from the ClassLoader.", ex);
}
}
}
}
}
...@@ -17,279 +17,160 @@ ...@@ -17,279 +17,160 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
***************************************************************************/ ***************************************************************************/
package kieker.webgui.beans.application; package kieker.webgui.beans.application;
import java.lang.reflect.Method; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Observable; import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.PostConstruct;
import javax.faces.application.FacesMessage; import javax.faces.application.FacesMessage;
import javax.faces.application.FacesMessage.Severity;
import javax.faces.bean.ApplicationScoped; 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.display.HtmlText; import kieker.analysis.AnalysisController;
import kieker.analysis.display.Image;
import kieker.analysis.display.PlainText;
import kieker.analysis.display.annotation.Display;
import kieker.analysis.model.analysisMetaModel.MIDependency;
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.webgui.common.FSManager;
import kieker.analysis.plugin.AbstractPlugin; import kieker.webgui.common.exception.ProjectAlreadyExistingException;
import kieker.analysis.plugin.annotation.Plugin;
import kieker.analysis.repository.AbstractRepository;
import kieker.webgui.common.FileManager;
import org.primefaces.context.RequestContext;
import org.primefaces.model.DefaultTreeNode;
import org.primefaces.model.TreeNode;
/** /**
* This bean can be used to handle all available projects within the program. It is like a blackboard for all other components when it comes to the actual projects * This bean contains all project and - for example - their corresponding instances of {@link AnalysisController}. It should be used to create new projects and
* <b>stored</b> on the file system. The properties of the projects, like the adding of dependencies the an actual existing project, can be done otherwise, but the * similar things. The synchronization for the projects is done in the {@link FSManager} though.
* storage is done via this bean. Other beans (like for the currently selected main project) are not modified directly by this bean. If the user removes the main
* project, the bean for the main project has to handle this.
* *
* @author Nils Christian Ehmke * @author Nils Christian Ehmke
* @version 1.0 * @version 1.0
*/ */
@ManagedBean @ManagedBean
@ApplicationScoped @ApplicationScoped
public class ProjectsBean extends Observable { public final class ProjectsBean {
/** /**
* A list containing all available projects. * This is the list containing all projects.
*/ */
private final List<MIProject> projects; private final List<String> projects = Collections.synchronizedList(new ArrayList<String>());
/** /**
* The factory used to create new projects. * This list contains the current analysis controllers. Not every project does have a controller, but every project can have maximal one.
*/ */
private final MAnalysisMetaModelFactory factory; private final ConcurrentHashMap<String, AnalysisController> analysisController = new ConcurrentHashMap<String, AnalysisController>();
/** /**
* Creates a new instance of this class. * Creates a new instance of this class.
*/ */
public ProjectsBean() { public ProjectsBean() {
// Load all projects from the file system. // No code necessary
this.projects = FileManager.getInstance().loadAllProjects();
this.factory = new MAnalysisMetaModelFactory();
}
/**
* Uses the given name to create a new project. If a project with the
* same name does already exist, nothing happens, but a message will inform the user.
*
* @param projectName
* The name of the new project.
*/
public final void addProject(final String projectName) {
// Create a new project.
final MIProject project = this.factory.createProject();
project.setName(projectName);
// The check for an existing project and the potential storage within our list has to be done atomically.
synchronized (this) {
// Try to save the project. If this fails, the project exists already.
if (FileManager.getInstance().saveNewProject(project)) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "New Project: " + projectName));
this.projects.add(project);
RequestContext.getCurrentInstance().addPartialUpdateTarget("projectsForm");
} else {
// Inform the user about the fail.
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "", "A project with this name exists already."));
}
}
}
/**
* Delivers the currently available projects as a tree root.
*
* @return The root of the currently available projects.
*/
public final TreeNode getProjectsRoot() {
synchronized (this) {
final TreeNode root = new DefaultTreeNode("Root", null);
for (final MIProject project : this.projects) {
final TreeNode projectNode = new DefaultTreeNode("project", project, root);
final TreeNode dependenciesNode = new DefaultTreeNode("dependencies", "Dependencies", projectNode);
final TreeNode usedPluginsNode = new DefaultTreeNode("usedPlugins", "Used Plugins", projectNode);
// Append the used plugins and dependencies.
for (final MIPlugin plugin : project.getPlugins()) {
new DefaultTreeNode("usedPlugin", plugin.getName(), usedPluginsNode);
}
for (final MIDependency dependency : project.getDependencies()) {
new DefaultTreeNode("dependencies", dependency.getFilePath(), dependenciesNode);
}
} }
return root; @SuppressWarnings("unused")
} @PostConstruct
private void init() {
// Load a list with all available projects on the FS
this.projects.addAll(FSManager.getInstance().getAllProjects());
} }
/** /**
* This method saved a given project on the file system. The project * Adds a new project to this application if possible. It informs the current user (via the growl-component of PrimeFaces) whether the creation was successful or
* should already exist. * not.
* *
* @param project * @param project
* The project to be saved. * The name of the project to be added.
*/ */
public void saveProject(final MIProject project) { public void addProject(final String project) {
synchronized (this) { try {
FileManager.getInstance().saveProject(project); // Try and use the FS-Manager to create the project atomically.
FSManager.getInstance().addProject(project);
// If there were no exception, everything went well. We can add the project to our list.
this.projects.add(project);
// Inform the user
ProjectsBean.showMessage(FacesMessage.SEVERITY_INFO, "Project created.");
} catch (final IOException ex) {
ProjectsBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while creating the project.");
} catch (final ProjectAlreadyExistingException ex) {
ProjectsBean.showMessage(FacesMessage.SEVERITY_WARN, "A project with the same name exists already.");
} }
} }
/** /**
* Deletes a given project from the file system. * This method can be used to open an 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 FSManager}.
* *
* @param project * @param project
* The project to be removed. * The name of the project to be saved.
* @return Either the model instance if the loading was successful, null otherwise. In the latter case, the user will be informed via the growl-component.
*/ */
public void deleteProject(final MIProject project) { public MIProject openProject(final String project) {
synchronized (this) { try {
final boolean result = FileManager.getInstance().deleteProject(project); return FSManager.getInstance().openProject(project);
if (result) { } catch (final IOException ex) {
this.projects.remove(project); ProjectsBean.showMessage(FacesMessage.SEVERITY_ERROR, "An error occured while loading the project.");
// Notify the observers return null;
this.setChanged();
this.notifyObservers(new MsgProjectRemoved(project));
}
} }
} }
/** /**
* Reloads a given project from the file system. In other words: The * This method can be used to get the current time stamp of a given project as a human readable date. If the project doesn't exist or the time stamp would be
* state of the project is restored from the file system. * invalid, the date of 0 is returned.
* *
* @param project * @param project
* The project to be reloaded. * The project whose time stamp should be collected.
* @return The hum readable time stamp of the project.
*/ */
public void resetProject(final MIProject project) { public String getCurrTimeStamp(final String project) {
synchronized (this) { // Get the current time stamp of the project...
final MIProject result = FileManager.getInstance().reloadProject(project); final long timeStamp = FSManager.getInstance().getCurrTimeStamp(project);
if (result != null) { // ...and make sure the user can read it.
this.projects.remove(project); final String dStr = new Date(timeStamp).toString();
this.projects.add(result); return dStr;
}
}
} }
/** /**
* This method can be used to get the description of an {@link AbstractPlugin}- or an {@link AbstractRepository}-class. The description is read via the * This method delivers all available projects as a list of string.
* annotation.
* *
* @param clazz * @return All currently available projects.
* The class whose description should be extracted.
* @return The description for the class or a substitute if none is available.
*/ */
public String getDescription(final Class<?> clazz) { public List<String> getProjects() {
final Plugin annotation = clazz.getAnnotation(Plugin.class); return this.projects;
if (annotation == null || annotation.description().isEmpty()) {
return "No description available";
} else {
return annotation.description();
}
}
public List<Widget> getWidgets(final Class<?> clazz) {
// TODO Cache
final List<Widget> widgets = new ArrayList<ProjectsBean.Widget>();
if (clazz != null) {
// Run through all methods and check them
final Method[] methods = clazz.getMethods();
for (final Method method : methods) {
// If the method does have the right annotation, we use it.
final Display displayAnnot = method.getAnnotation(Display.class);
if (displayAnnot != null) {
// Get the correct type of the method
final Class<?> returnType = method.getReturnType();
final Widget.WidgetType type;
// TODO This should be done better.
if (returnType.isAssignableFrom(PlainText.class) && PlainText.class.isAssignableFrom(returnType)) {
type = Widget.WidgetType.PlainText;
} else {
if (returnType.isAssignableFrom(HtmlText.class) && HtmlText.class.isAssignableFrom(returnType)) {
type = Widget.WidgetType.HtmlText;
} else {
if (returnType.isAssignableFrom(Image.class) && Image.class.isAssignableFrom(returnType)) {
type = Widget.WidgetType.Image;
} else {
// Unknown type!
continue;
}
}
}
final Widget widget = new Widget(method, type, displayAnnot.name());
widgets.add(widget);
}
}
}
return widgets;
}
public static class Widget {
private final Method widgetMethod;
private final WidgetType type;
private final String name;
public static enum WidgetType {
PlainText, HtmlText, Image
}
public Widget(final Method widgetMethod, final WidgetType type, final String name) {
this.widgetMethod = widgetMethod;
this.type = type;
this.name = name;
}
public Method getWidgetMethod() {
return this.widgetMethod;
}
public WidgetType getType() {
return this.type;
}
public String getName() {
return this.name;
}
} }
/** /**
* This helper class is a wrapper for a project and can be send to the observers as a message that a project just has been removed. It contains * This method delivers the corresponding analysis controller of the given project.
* the removed project.
* *
* @author Nils Christian Ehmke * @param project
*/ * The project whose analysis controller should be delivered.
public static class MsgProjectRemoved { * @return The corresponding instance of {@link AnalysisController} if it exists, null otherwise.
/**
* The stored project.
*/ */
private final MIProject project; public AnalysisController getAnalysisController(final String project) {
return this.analysisController.get(project);
}
/** /**
* Creates a new instance of this class using the given parameters. * This method can be used to deliver the state of the analysis controller of the given project as a human readable string.
* *
* @param project * @param project
* The project to be stored within this class. * The project whose state should be delivered.
* @return The current state of the corresponding {@link AnalysisController} if it exists, 'N/A' otherwise.
*/ */
public MsgProjectRemoved(final MIProject project) { public String getAnalysisControllerState(final String project) {
this.project = project; final AnalysisController controller = this.analysisController.get(project);
return (controller == null) ? "N/A" : controller.getState().toString();
} }
/** /**
* Delivers the stored project within this class. * This method shows the current user a message by using the growl-component of PrimeFaces.
* *
* @return The instance of {@link MIProject}. * @param severity
* The severity of the message.
* @param msg
* The message itself.
*/ */
public MIProject getProject() { private static void showMessage(final Severity severity, final String msg) {
return this.project; FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(severity, "", msg));
}
} }
} }
...@@ -36,18 +36,18 @@ import javax.faces.bean.ManagedBean; ...@@ -36,18 +36,18 @@ import javax.faces.bean.ManagedBean;
*/ */
@ManagedBean @ManagedBean
@ApplicationScoped @ApplicationScoped
public class ThemeSwitcherBean { public final class ThemeSwitcherBean {
/** /**
* A map containing all available themes. * A map containing all available themes.
*/ */
private final Map<String, String> themes; private final Map<String, String> themes = new TreeMap<String, String>();
/** /**
* Creates a new instance of this class. * Creates a new instance of this class.
*/ */
public ThemeSwitcherBean() { public ThemeSwitcherBean() {
this.themes = new TreeMap<String, String>(); // No code necessary
} }
/** /**
...@@ -55,7 +55,7 @@ public class ThemeSwitcherBean { ...@@ -55,7 +55,7 @@ public class ThemeSwitcherBean {
* *
* @return A map containing the user readable names of the themes as a key and the actual theme-names as the corresponding value. * @return A map containing the user readable names of the themes as a key and the actual theme-names as the corresponding value.
*/ */
public final Map<String, String> getThemes() { public Map<String, String> getThemes() {
return this.themes; return this.themes;
} }
...@@ -63,7 +63,7 @@ public class ThemeSwitcherBean { ...@@ -63,7 +63,7 @@ public class ThemeSwitcherBean {
* Initializes the bean. If one wants to add new themes to the program, this is the right place. * Initializes the bean. If one wants to add new themes to the program, this is the right place.
*/ */
@PostConstruct @PostConstruct
public final void init() { public void init() {
this.themes.put("Aristo", "aristo"); this.themes.put("Aristo", "aristo");
this.themes.put("Black-Tie", "black-tie"); this.themes.put("Black-Tie", "black-tie");
this.themes.put("Blitzer", "blitzer"); this.themes.put("Blitzer", "blitzer");
......
/***************************************************************************
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* and others.
*
* 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.
***************************************************************************/
/**
* This package contains all beans with application scope.
*/
package kieker.webgui.beans.application;
/***************************************************************************
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* and others.
*
* 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.
***************************************************************************/
package kieker.webgui.beans.request;
import java.util.ArrayList;
import java.util.List;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.faces.context.FacesContext;
import kieker.analysis.model.analysisMetaModel.MIDependency;
import kieker.analysis.model.analysisMetaModel.MIProject;
import kieker.webgui.beans.application.DependenciesBean;
import kieker.webgui.beans.session.SelectedProjectBean;
/**
* This bean contains the currently chosen dependencies. This has to be request scoped, because the bean fetches the currently selected project when created.
*
* @author Nils Christian Ehmke
* @version 1.0
*/
@ManagedBean
@RequestScoped
public class SelectedDependenciesBean {
/**
* This list contains the currently selected dependencies.
*/
private List<MIDependency> dependencies;
/**
* This field contains the corresponding project, which will be modified by this bean.
*/
private final MIProject project;
/**
* Creates a new instance of this class.
*/
public SelectedDependenciesBean() {
this.dependencies = new ArrayList<MIDependency>();
/* Try to get the currently selected project. */
final FacesContext context = FacesContext.getCurrentInstance();
final SelectedProjectBean selProjBean = context.getApplication().evaluateExpressionGet(context, "#{selectedProjectBean}",
SelectedProjectBean.class);
final DependenciesBean depBean = context.getApplication().evaluateExpressionGet(context, "#{dependenciesBean}",
DependenciesBean.class);
if (selProjBean != null) {
this.project = selProjBean.getSelectedProject();
} else {
this.project = null;
}
/*
* The adding of the already existing dependencies within the project is troublesome. As the names cannot be compared, we have to do this manually and
* use our "own" dependencies which we have to compare with the dependencies in the project.
*/
if (selProjBean != null && depBean != null) {
final List<MIDependency> availableDependencies = depBean.getDependencies();
for (final MIDependency dependency : this.project.getDependencies()) {
for (final MIDependency actDependency : availableDependencies) {
if (actDependency.getFilePath().equals(dependency.getFilePath())) {
this.dependencies.add(actDependency);
continue;
}
}
}
}
}
/**
* Delivers the currently selected dependencies.
*
* @return The selected dependencies.
*/
public List<MIDependency> getDependencies() {
return this.dependencies;
}
/**
* Sets the currently selected dependencies to a new value.
*
* @param dependencies
* The newly selected dependencies.
*/
public void setDependencies(final List<MIDependency> dependencies) {
this.dependencies = dependencies;
}
/**
* This method should be called as an action. It clears the project's dependencies and adds all currently selected dependencies to this project.
*/
public void submit() {
if (this.project != null) {
this.project.getDependencies().clear();
this.project.getDependencies().addAll(this.dependencies);
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "Dependencies saved."));
} else {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "", "No project selected."));
}
}
}
...@@ -65,7 +65,8 @@ public class StringBean { ...@@ -65,7 +65,8 @@ public class StringBean {
} }
/** /**
* This method verifies whether the given object is an instance of {@link java.lang.String} or not. * This method verifies whether the given object is an instance of {@link java.lang.String} or not. This is necessary due to the fact that the
* 'instanceof'-command has not yet been implemented in JSF.
* *
* @param object * @param object
* The object to be verified. * The object to be verified.
...@@ -74,4 +75,16 @@ public class StringBean { ...@@ -74,4 +75,16 @@ public class StringBean {
public boolean checkString(final Object object) { public boolean checkString(final Object object) {
return object instanceof String; return object instanceof String;
} }
/**
* Modifies the given string so that it can be used as an ID. In other words: It removes all space characters. It is usually used to convert the 'address' of an
* object into an unique ID. It is not guaranteed that the result will be a valid ID in other cases.
*
* @param string
* The string to be modified.
* @return The given string without space characters.
*/
public String stringToID(final String string) {
return string.replace(" ", "");
}
} }
/***************************************************************************
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* and others.
*
* 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.
***************************************************************************/
/**
* This package contains all beans with request scope.
*/
package kieker.webgui.beans.request;
/***************************************************************************
* Copyright 2012 by
* + Christian-Albrechts-University of Kiel
* + Department of Computer Science
* + Software Engineering Group
* and others.
*
* 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.
***************************************************************************/
package kieker.webgui.beans.session;
import java.util.HashMap;
import java.util.Map;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import kieker.analysis.AnalysisController;
import kieker.analysis.exception.AnalysisConfigurationException;
import kieker.analysis.model.analysisMetaModel.MIPlugin;
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.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
*/
@ManagedBean
@SessionScoped
public class AnalysisControllerBean {
/**
* The logger within this class.
*/
private static final Log LOG = LogFactory.getLog(AnalysisControllerBean.class);
/**
* The controller instance stored within this bean.
*/
private AnalysisController controller;
private Map<MIPlugin, AbstractPlugin> pluginMap;
private Map<MIRepository, AbstractRepository> repositoryMap;
/**
* Creates a new instance of this class.
*/
public AnalysisControllerBean() {
// No code necessary.
}
public Map<MIPlugin, AbstractPlugin> getPluginMap() {
return this.pluginMap;
}
public Map<MIRepository, AbstractRepository> getRepositoryMap() {
return this.repositoryMap;
}
/**
* Delivers the controller stored within this bean.
*
* @return The current controller in this bean.
*/
public AnalysisController getController() {
return this.controller;
}
/**
* Sets the controller stored within this bean to a new value.
*
* @param controller
* The new controller.
*/
public void setController(final AnalysisController controller) {
this.controller = controller;
}
/**
* This method tries to instantiate a new controller using the given project. If the project is null, nothing happens.
*
* @param mProject
* The project used to create a new analysis controller.
*/
public void instantiate(final MIProject mProject) {
if (mProject != null) {
try {
// Try to create the controller.
final AnalysisController.AnalysisControllerWithMapping controllerAndMapping = AnalysisController.createAnalysisController(mProject,
PluginClassLoader.getInstance());
// Extract everything that is necessary.
this.controller = controllerAndMapping.getController();
this.pluginMap = controllerAndMapping.getPluginMap();
this.repositoryMap = controllerAndMapping.getRepositoryMap();
} catch (final NullPointerException ex) {
AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex);
} catch (final AnalysisConfigurationException ex) {
AnalysisControllerBean.LOG.error("Could not create analysis controller.", ex);
}
}
}
/**
* Starts asynchronously the analysis controller within this bean.
*/
public void start() {
final Thread thread = new Thread() {
@Override
public void run() {
try {
AnalysisControllerBean.this.controller.run();
} catch (final IllegalStateException ex) {
AnalysisControllerBean.LOG.error("Could not start the analysis controller.", ex);
} catch (final AnalysisConfigurationException ex) {
AnalysisControllerBean.LOG.error("Could not start the analysis controller.", ex);
}
}
};
thread.start();
}
/**
* Stops asynchronously the analysis controller within this bean.
*/
public void stop() {
final Thread thread = new Thread() {
@Override
public void run() {
AnalysisControllerBean.this.controller.terminate();
}
};
thread.start();
}
/**
* 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());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment