From fc3827712ba17feec4f49cb7ee1ae812d2874084 Mon Sep 17 00:00:00 2001 From: j2blake Date: Wed, 10 Dec 2014 15:02:15 -0500 Subject: [PATCH] VIVO-695 VIVO-699 Refactor and optimize the PropertyRestrictionBean Formerly the PropertyRestrictionPolicyHelper. --- productMods/WEB-INF/resources/startup_listeners.txt | 2 +- .../vivo/auth/policy/SelfEditorRelationshipPolicyTest.java | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/productMods/WEB-INF/resources/startup_listeners.txt b/productMods/WEB-INF/resources/startup_listeners.txt index 0e84a98b..98717856 100644 --- a/productMods/WEB-INF/resources/startup_listeners.txt +++ b/productMods/WEB-INF/resources/startup_listeners.txt @@ -47,7 +47,7 @@ edu.cornell.mannlib.vitro.webapp.auth.permissions.PermissionRegistry$Setup edu.cornell.mannlib.vitro.webapp.auth.permissions.PermissionSetsSmokeTest -edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionPolicyHelper$Setup +edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionBean$Setup edu.cornell.mannlib.vitro.webapp.auth.policy.setup.CommonPolicyFamilySetup diff --git a/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java b/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java index 72644d8b..6c911b71 100644 --- a/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java +++ b/test/edu/cornell/mannlib/vivo/auth/policy/SelfEditorRelationshipPolicyTest.java @@ -17,7 +17,7 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import stubs.edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionPolicyHelperStub; +import stubs.edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionBeanStub; import stubs.javax.servlet.ServletContextStub; import com.hp.hpl.jena.ontology.OntModel; @@ -31,7 +31,6 @@ import edu.cornell.mannlib.vitro.testing.AbstractTestClass; import edu.cornell.mannlib.vitro.webapp.auth.identifier.ArrayIdentifierBundle; import edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle; import edu.cornell.mannlib.vitro.webapp.auth.identifier.common.HasProfile; -import edu.cornell.mannlib.vitro.webapp.auth.policy.bean.PropertyRestrictionPolicyHelper; import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.Authorization; import edu.cornell.mannlib.vitro.webapp.auth.policy.ifaces.PolicyDecision; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.RequestedAction; @@ -123,9 +122,7 @@ public class SelfEditorRelationshipPolicyTest extends AbstractTestClass { @Before public void setupPolicy() { ServletContextStub ctx = new ServletContextStub(); - PropertyRestrictionPolicyHelper prph = PropertyRestrictionPolicyHelperStub - .getInstance(new String[] { NS_RESTRICTED }); - PropertyRestrictionPolicyHelper.setBean(ctx, prph); + PropertyRestrictionBeanStub.getInstance(new String[] { NS_RESTRICTED }); policy = new SelfEditorRelationshipPolicy(ctx); }