NIHVIVO-336 Modify the listeners to use StartupStatus instead of AbortStartup
This commit is contained in:
parent
1fbf5b030a
commit
00ffd7ddb0
1 changed files with 4 additions and 16 deletions
|
@ -23,7 +23,6 @@ import edu.cornell.mannlib.vitro.webapp.auth.policy.specialrelationships.Abstrac
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.ifaces.RequestedAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AbstractDataPropertyAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AbstractDataPropertyAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AbstractObjectPropertyAction;
|
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.propstmt.AbstractObjectPropertyAction;
|
||||||
import edu.cornell.mannlib.vitro.webapp.servlet.setup.AbortStartup;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permit self-editors to edit the properties of classes with which they share a
|
* Permit self-editors to edit the properties of classes with which they share a
|
||||||
|
@ -366,22 +365,11 @@ public class SelfEditorRelationshipPolicy extends AbstractRelationshipPolicy
|
||||||
public void contextInitialized(ServletContextEvent sce) {
|
public void contextInitialized(ServletContextEvent sce) {
|
||||||
ServletContext ctx = sce.getServletContext();
|
ServletContext ctx = sce.getServletContext();
|
||||||
|
|
||||||
if (AbortStartup.isStartupAborted(ctx)) {
|
OntModel ontModel = (OntModel) sce.getServletContext()
|
||||||
return;
|
.getAttribute("jenaOntModel");
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
ServletPolicyList.addPolicy(ctx, new SelfEditorRelationshipPolicy(
|
||||||
OntModel ontModel = (OntModel) sce.getServletContext()
|
ctx, ontModel));
|
||||||
.getAttribute("jenaOntModel");
|
|
||||||
|
|
||||||
ServletPolicyList.addPolicy(ctx,
|
|
||||||
new SelfEditorRelationshipPolicy(ctx, ontModel));
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("could not run " + this.getClass().getSimpleName()
|
|
||||||
+ ": " + e);
|
|
||||||
AbortStartup.abortStartup(ctx);
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue