Author: sohil.shah(a)jboss.com
Date: 2009-02-03 12:30:45 -0500 (Tue, 03 Feb 2009)
New Revision: 12768
Modified:
modules/authorization/trunk/.classpath
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java
Log:
fixing compilation error
Modified: modules/authorization/trunk/.classpath
===================================================================
--- modules/authorization/trunk/.classpath 2009-02-03 17:24:30 UTC (rev 12767)
+++ modules/authorization/trunk/.classpath 2009-02-03 17:30:45 UTC (rev 12768)
@@ -11,11 +11,7 @@
<classpathentry kind="src" path="enforcement/src/main/java"/>
<classpathentry kind="src"
path="enforcement/src/main/resources"/>
<classpathentry kind="src" path="enforcement/src/test/java"/>
- <classpathentry kind="src"
path="enforcement/src/test/resources"/>
- <classpathentry kind="src"
path="provisioning/src/main/java"/>
- <classpathentry kind="src"
path="provisioning/src/main/resources"/>
- <classpathentry kind="src"
path="provisioning/src/test/java"/>
- <classpathentry kind="src"
path="provisioning/src/test/resources"/>
+ <classpathentry kind="src"
path="enforcement/src/test/resources"/>
<classpathentry kind="src"
path="policy-server/src/main/java"/>
<classpathentry kind="src"
path="policy-server/src/main/resources"/>
<classpathentry kind="src"
path="policy-server/src/test/java"/>
Modified:
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java
===================================================================
---
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java 2009-02-03
17:24:30 UTC (rev 12767)
+++
modules/authorization/trunk/policy-server/src/main/java/org/jboss/security/authz/policy/server/PolicyServer.java 2009-02-03
17:30:45 UTC (rev 12768)
@@ -109,7 +109,7 @@
* @param request Authorization Request
* @return response which contains the Authorization Decision
*/
- public Response evaluate(Request request)
+ public Response evaluate(Request request) throws PolicyServerException
{
return this.policyDecisionPoint.evaluate(request);
}
@@ -123,7 +123,7 @@
* @param xml
* @return response in xml format confirming to the XACML spec
*/
- public String evaluate(String xml)
+ public String evaluate(String xml) throws PolicyServerException
{
return this.policyDecisionPoint.evaluate(xml);
}
@@ -133,11 +133,18 @@
*
* @param policyMetaData meta data for the policy to be created
*/
- public void newPolicy(PolicyMetaData policyMetaData) throws PolicyException
+ public void newPolicy(PolicyMetaData policyMetaData) throws PolicyServerException
{
- Policy policy = new HierarchialPolicy(GeneralTool.generateUniqueId(), policyMetaData);
- this.policyStore.savePolicy(policy);
- this.policyFinderModule.addPolicy(policy);
+ try
+ {
+ Policy policy = new HierarchialPolicy(GeneralTool.generateUniqueId(),
policyMetaData);
+ this.policyStore.savePolicy(policy);
+ this.policyFinderModule.addPolicy(policy);
+ }
+ catch(PolicyException pe)
+ {
+ throw new PolicyServerException(pe);
+ }
}
/**
@@ -146,9 +153,16 @@
* @param policyUri
* @return a stored Policy
*/
- public Policy readPolicy(String policyUri) throws PolicyException
+ public Policy readPolicy(String policyUri) throws PolicyServerException
{
- return this.policyStore.readPolicy(policyUri);
+ try
+ {
+ return this.policyStore.readPolicy(policyUri);
+ }
+ catch(PolicyException pe)
+ {
+ throw new PolicyServerException(pe);
+ }
}
/**
@@ -156,9 +170,16 @@
*
* @return all the stored Policies
*/
- public Policy[] readAllPolicies() throws PolicyException
+ public Policy[] readAllPolicies() throws PolicyServerException
{
- return this.policyStore.readAllPolicies();
+ try
+ {
+ return this.policyStore.readAllPolicies();
+ }
+ catch(PolicyException pe)
+ {
+ throw new PolicyServerException(pe);
+ }
}
/**
@@ -166,8 +187,15 @@
*
* @param policyUri unique identifier for the Policy
*/
- public void deletePolicy(String policyUri) throws PolicyException
+ public void deletePolicy(String policyUri) throws PolicyServerException
{
- this.policyStore.deletePolicy(policyUri);
+ try
+ {
+ this.policyStore.deletePolicy(policyUri);
+ }
+ catch(PolicyException pe)
+ {
+ throw new PolicyServerException(pe);
+ }
}
}
Show replies by date