VIVO-224 Get rid of REBUILD_VCLASS_GROUP_CACHE.
Since we build the cache from Solr, we no longer provide the option to rebuild it.
This commit is contained in:
parent
3c59098525
commit
03dfbfc2c5
6 changed files with 1 additions and 35 deletions
|
@ -35,7 +35,6 @@ log4j.rootLogger=INFO, AllAppender
|
||||||
|
|
||||||
# These classes are too chatty to display INFO messages.
|
# These classes are too chatty to display INFO messages.
|
||||||
log4j.logger.edu.cornell.mannlib.vitro.webapp.startup.StartupStatus=WARN
|
log4j.logger.edu.cornell.mannlib.vitro.webapp.startup.StartupStatus=WARN
|
||||||
log4j.logger.edu.cornell.mannlib.vitro.webapp.controller.freemarker.BrowseController=WARN
|
|
||||||
log4j.logger.edu.cornell.mannlib.vitro.webapp.dao.jena.pellet.PelletListener=WARN
|
log4j.logger.edu.cornell.mannlib.vitro.webapp.dao.jena.pellet.PelletListener=WARN
|
||||||
log4j.logger.edu.cornell.mannlib.vitro.webapp.dao.jena.RDBGraphGenerator=WARN
|
log4j.logger.edu.cornell.mannlib.vitro.webapp.dao.jena.RDBGraphGenerator=WARN
|
||||||
log4j.logger.edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase=DEBUG
|
log4j.logger.edu.cornell.mannlib.vitro.webapp.servlet.setup.UpdateKnowledgeBase=DEBUG
|
||||||
|
|
|
@ -18,7 +18,6 @@ auth:ADMIN
|
||||||
auth:hasPermission simplePermission:ManageProxies ;
|
auth:hasPermission simplePermission:ManageProxies ;
|
||||||
auth:hasPermission simplePermission:ManageSearchIndex ;
|
auth:hasPermission simplePermission:ManageSearchIndex ;
|
||||||
auth:hasPermission simplePermission:ManageUserAccounts ;
|
auth:hasPermission simplePermission:ManageUserAccounts ;
|
||||||
auth:hasPermission simplePermission:RebuildVClassGroupCache ;
|
|
||||||
auth:hasPermission simplePermission:RefreshVisualizationCache ;
|
auth:hasPermission simplePermission:RefreshVisualizationCache ;
|
||||||
auth:hasPermission simplePermission:SeeConfiguration ;
|
auth:hasPermission simplePermission:SeeConfiguration ;
|
||||||
auth:hasPermission simplePermission:SeeStartupStatus ;
|
auth:hasPermission simplePermission:SeeStartupStatus ;
|
||||||
|
|
|
@ -78,11 +78,6 @@ action:QueryUserAccountsModel
|
||||||
rdfs:label "QUERY_USER_ACCOUNTS_MODEL" .
|
rdfs:label "QUERY_USER_ACCOUNTS_MODEL" .
|
||||||
|
|
||||||
|
|
||||||
action:RebuildVClassGroupCache
|
|
||||||
a display:RequiredAction ;
|
|
||||||
rdfs:label "REBUILD_VCLASS_GROUP_CACHE" .
|
|
||||||
|
|
||||||
|
|
||||||
action:RefreshVisualizationCache
|
action:RefreshVisualizationCache
|
||||||
a display:RequiredAction ;
|
a display:RequiredAction ;
|
||||||
rdfs:label "REFRESH_VISUALIZATION_CACHE" .
|
rdfs:label "REFRESH_VISUALIZATION_CACHE" .
|
||||||
|
|
|
@ -56,8 +56,6 @@ public class SimplePermission extends Permission {
|
||||||
NAMESPACE + "QueryFullModel");
|
NAMESPACE + "QueryFullModel");
|
||||||
public static final SimplePermission QUERY_USER_ACCOUNTS_MODEL = new SimplePermission(
|
public static final SimplePermission QUERY_USER_ACCOUNTS_MODEL = new SimplePermission(
|
||||||
NAMESPACE + "QueryUserAccountsModel");
|
NAMESPACE + "QueryUserAccountsModel");
|
||||||
public static final SimplePermission REBUILD_VCLASS_GROUP_CACHE = new SimplePermission(
|
|
||||||
NAMESPACE + "RebuildVClassGroupCache");
|
|
||||||
public static final SimplePermission REFRESH_VISUALIZATION_CACHE = new SimplePermission(
|
public static final SimplePermission REFRESH_VISUALIZATION_CACHE = new SimplePermission(
|
||||||
NAMESPACE + "RefreshVisualizationCache");
|
NAMESPACE + "RefreshVisualizationCache");
|
||||||
public static final SimplePermission SEE_CONFIGURATION = new SimplePermission(
|
public static final SimplePermission SEE_CONFIGURATION = new SimplePermission(
|
||||||
|
|
|
@ -66,7 +66,6 @@ public class BaseSiteAdminController extends FreemarkerHttpServlet {
|
||||||
|
|
||||||
if (PolicyHelper.isAuthorizedForActions(vreq, SimplePermission.USE_MISCELLANEOUS_ADMIN_PAGES.ACTIONS)) {
|
if (PolicyHelper.isAuthorizedForActions(vreq, SimplePermission.USE_MISCELLANEOUS_ADMIN_PAGES.ACTIONS)) {
|
||||||
urls.put("recomputeInferences", UrlBuilder.getUrl("/RecomputeInferences"));
|
urls.put("recomputeInferences", UrlBuilder.getUrl("/RecomputeInferences"));
|
||||||
urls.put("rebuildClassGroupCache", UrlBuilder.getUrl("/browse?clearcache=1"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PolicyHelper.isAuthorizedForActions(vreq, IndexController.REQUIRED_ACTIONS)) {
|
if (PolicyHelper.isAuthorizedForActions(vreq, IndexController.REQUIRED_ACTIONS)) {
|
||||||
|
|
|
@ -10,9 +10,6 @@ import java.util.Map;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.permissions.SimplePermission;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.policy.PolicyHelper;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.Actions;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.VClassGroup;
|
import edu.cornell.mannlib.vitro.webapp.beans.VClassGroup;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.responsevalues.ResponseValues;
|
||||||
|
@ -33,29 +30,12 @@ public class BrowseController extends FreemarkerHttpServlet {
|
||||||
return "Index of Contents";
|
return "Index of Contents";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected Actions requiredActions(VitroRequest vreq) {
|
|
||||||
if ( vreq.getParameter("clearcache") != null )
|
|
||||||
return SimplePermission.REBUILD_VCLASS_GROUP_CACHE.ACTIONS;
|
|
||||||
else
|
|
||||||
return Actions.AUTHORIZED;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ResponseValues processRequest(VitroRequest vreq) {
|
protected ResponseValues processRequest(VitroRequest vreq) {
|
||||||
|
|
||||||
Map<String, Object> body = new HashMap<String, Object>();
|
Map<String, Object> body = new HashMap<String, Object>();
|
||||||
String templateName = TEMPLATE_DEFAULT;
|
String templateName = TEMPLATE_DEFAULT;
|
||||||
|
|
||||||
if ( vreq.getParameter("clearcache") != null ) {
|
|
||||||
//mainly for debugging
|
|
||||||
if( PolicyHelper.isAuthorizedForActions(vreq, SimplePermission.REBUILD_VCLASS_GROUP_CACHE.ACTIONS) ){
|
|
||||||
clearGroupCache();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<VClassGroup> groups = null;
|
List<VClassGroup> groups = null;
|
||||||
VClassGroupsForRequest vcgc = VClassGroupCache.getVClassGroups(vreq);
|
VClassGroupsForRequest vcgc = VClassGroupCache.getVClassGroups(vreq);
|
||||||
groups =vcgc.getGroups();
|
groups =vcgc.getGroups();
|
||||||
|
@ -67,8 +47,4 @@ public class BrowseController extends FreemarkerHttpServlet {
|
||||||
|
|
||||||
return new TemplateResponseValues(templateName, body);
|
return new TemplateResponseValues(templateName, body);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
protected void clearGroupCache(){
|
|
||||||
VClassGroupCache.getVClassGroupCache(getServletContext()).doSynchronousRebuild();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue