username can be stored as setting and the find boolean is set based on this name.

plugins have only access to DAOs and not to jdbcTemplate directly
This commit is contained in:
Andreas Billmann
2015-03-29 10:27:38 +02:00
parent 4056b97c16
commit 488ead53f8
15 changed files with 381 additions and 41 deletions

View File

@@ -17,7 +17,7 @@ class BasicListStatisticsPlugin implements Plugin {
@Override
void run(final Map context) {
showDialog(createContent(context.cacheService))
showDialog(createContent(context.cacheDAO))
}
/**
@@ -25,10 +25,10 @@ class BasicListStatisticsPlugin implements Plugin {
* @param sessionContext context with the cache list in it
* @return
*/
private javafx.scene.Node createContent(cacheService) {
private javafx.scene.Node createContent(cacheDAO) {
// get the cache list from service
def cacheList = cacheService.getAllCaches()
def cacheList = cacheDAO.getAllCaches()
// create a vbox as layout container
VBox contenPane = new VBox()

View File

@@ -29,7 +29,7 @@ class OwnStatisticsPlugin implements Plugin {
@Override
void run(final Map context) {
calculateStats(context.cacheService)
calculateStats(context.cacheDAO)
}
/**
@@ -37,9 +37,9 @@ class OwnStatisticsPlugin implements Plugin {
* @param sessionContext context with the cache list in it
* @return
*/
private void calculateStats(cacheService) {
private void calculateStats(cacheDAO) {
// get the cache list from service
def cacheList = cacheService.getAllCaches()
def cacheList = cacheDAO.getAllCaches("found=true")
service.cacheList = cacheList;
service.restart();
}