Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WebGUI
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kieker
WebGUI
Commits
52d48ae5
Commit
52d48ae5
authored
13 years ago
by
Nils Christian Ehmke
Browse files
Options
Downloads
Patches
Plain Diff
Code modifications for checkstyle & pmd.
parent
68bdc5ba
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/SelectedProjectBean.java
+32
-14
32 additions, 14 deletions
...java/kieker/webgui/beans/session/SelectedProjectBean.java
with
32 additions
and
14 deletions
Kieker.WebGUI/src/main/java/kieker/webgui/beans/session/SelectedProjectBean.java
+
32
−
14
View file @
52d48ae5
...
...
@@ -51,6 +51,15 @@ import org.primefaces.model.TreeNode;
@SessionScoped
public
class
SelectedProjectBean
{
/**
* This constant is used as the host for the dependencies.
*/
private
static
final
String
URL_LOCALHOST
=
"localhost"
;
/**
* This constant is used as a protocol for the dependencies.
*/
private
static
final
String
URL_PROTOCOL_FILE
=
"file"
;
/**
* The currently selected node of the current user.
*/
...
...
@@ -161,23 +170,27 @@ public class SelectedProjectBean {
}
}
/**
* This method delivers the available reader-plugins for the current main project. The delivered plugins are never abstract.
*
* @return A list with all readers.
*/
public
final
List
<
Class
<?>>
getAvailableReaders
()
{
final
List
<
Class
<?>>
list
=
new
ArrayList
<
Class
<?>>();
if
(
this
.
mainProject
!=
null
)
{
for
(
final
MIDependency
lib
:
this
.
mainProject
.
getDependencies
())
{
try
{
PluginClassLoader
.
getInstance
().
addURL
(
new
URL
(
"file"
,
"localhost"
,
lib
.
getFilePath
()));
PluginClassLoader
.
getInstance
().
addURL
(
new
URL
(
SelectedProjectBean
.
URL_PROTOCOL_FILE
,
SelectedProjectBean
.
URL_LOCALHOST
,
lib
.
getFilePath
()));
}
catch
(
final
MalformedURLException
ex
)
{
// TODO Log exception
}
try
{
final
List
<
Class
<?>>
plugins
=
PluginFinder
.
getAllPluginsWithinJar
(
new
URL
(
"file"
,
"localhost"
,
lib
.
getFilePath
()));
final
List
<
Class
<?>>
plugins
=
PluginFinder
.
getAllPluginsWithinJar
(
new
URL
(
SelectedProjectBean
.
URL_PROTOCOL_FILE
,
SelectedProjectBean
.
URL_LOCALHOST
,
lib
.
getFilePath
()));
for
(
final
Class
<?>
plugin
:
plugins
)
{
if
(!
Modifier
.
isAbstract
(
plugin
.
getModifiers
()))
{
if
(
AbstractReaderPlugin
.
class
.
isAssignableFrom
(
plugin
))
{
list
.
add
(
plugin
);
}
if
(!
Modifier
.
isAbstract
(
plugin
.
getModifiers
())
&&
AbstractReaderPlugin
.
class
.
isAssignableFrom
(
plugin
))
{
list
.
add
(
plugin
);
}
}
}
catch
(
final
MalformedURLException
ex
)
{
...
...
@@ -190,23 +203,27 @@ public class SelectedProjectBean {
return
list
;
}
/**
* This method delivers the available filter-plugins for the current main project. The delivered plugins are never abstract.
*
* @return A list with all filter.
*/
public
final
List
getAvailableFilters
()
{
final
List
<
Class
<?>>
list
=
new
ArrayList
<
Class
<?>>();
if
(
this
.
mainProject
!=
null
)
{
for
(
final
MIDependency
lib
:
this
.
mainProject
.
getDependencies
())
{
try
{
PluginClassLoader
.
getInstance
().
addURL
(
new
URL
(
"file"
,
"localhost"
,
lib
.
getFilePath
()));
PluginClassLoader
.
getInstance
().
addURL
(
new
URL
(
SelectedProjectBean
.
URL_PROTOCOL_FILE
,
SelectedProjectBean
.
URL_LOCALHOST
,
lib
.
getFilePath
()));
}
catch
(
final
MalformedURLException
ex
)
{
// TODO Log exception
}
try
{
final
List
<
Class
<?>>
plugins
=
PluginFinder
.
getAllPluginsWithinJar
(
new
URL
(
"file"
,
"localhost"
,
lib
.
getFilePath
()));
final
List
<
Class
<?>>
plugins
=
PluginFinder
.
getAllPluginsWithinJar
(
new
URL
(
SelectedProjectBean
.
URL_PROTOCOL_FILE
,
SelectedProjectBean
.
URL_LOCALHOST
,
lib
.
getFilePath
()));
for
(
final
Class
<?>
plugin
:
plugins
)
{
if
(!
Modifier
.
isAbstract
(
plugin
.
getModifiers
()))
{
if
(
AbstractAnalysisPlugin
.
class
.
isAssignableFrom
(
plugin
))
{
list
.
add
(
plugin
);
}
if
(!
Modifier
.
isAbstract
(
plugin
.
getModifiers
())
&&
AbstractAnalysisPlugin
.
class
.
isAssignableFrom
(
plugin
))
{
list
.
add
(
plugin
);
}
}
}
catch
(
final
MalformedURLException
ex
)
{
...
...
@@ -234,12 +251,13 @@ public class SelectedProjectBean {
if
(
this
.
mainProject
!=
null
)
{
for
(
final
MIDependency
lib
:
this
.
mainProject
.
getDependencies
())
{
try
{
PluginClassLoader
.
getInstance
().
addURL
(
new
URL
(
"file"
,
"localhost"
,
lib
.
getFilePath
()));
PluginClassLoader
.
getInstance
().
addURL
(
new
URL
(
SelectedProjectBean
.
URL_PROTOCOL_FILE
,
SelectedProjectBean
.
URL_LOCALHOST
,
lib
.
getFilePath
()));
}
catch
(
final
MalformedURLException
ex
)
{
// TODO Log exception
}
try
{
final
List
<
Class
<?>>
plugins
=
PluginFinder
.
getAllPluginsWithinJar
(
new
URL
(
"file"
,
"localhost"
,
lib
.
getFilePath
()));
final
List
<
Class
<?>>
plugins
=
PluginFinder
.
getAllPluginsWithinJar
(
new
URL
(
SelectedProjectBean
.
URL_PROTOCOL_FILE
,
SelectedProjectBean
.
URL_LOCALHOST
,
lib
.
getFilePath
()));
for
(
final
Class
<?>
plugin
:
plugins
)
{
if
(!
Modifier
.
isAbstract
(
plugin
.
getModifiers
()))
{
if
(
AbstractReaderPlugin
.
class
.
isAssignableFrom
(
plugin
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment