NIHVIVO-2254 Remove VisitingPolicyIface - fix a bug

This commit is contained in:
j2blake 2011-04-06 20:51:26 +00:00
parent 7133857bb9
commit 4d1ec35fc9
2 changed files with 15 additions and 15 deletions

View file

@ -177,17 +177,17 @@ public class JenaNetidPolicy extends DefaultInconclusivePolicy implements Policy
if (netid == null)
return pd.setMessage("Unable to get netid from IdBundle");
if (whoToAuth instanceof AddResource) {
if (whatToAuth instanceof AddResource) {
return visit(whoToAuth, (AddResource) whatToAuth);
} else if (whoToAuth instanceof DropResource) {
} else if (whatToAuth instanceof DropResource) {
return visit(whoToAuth, (DropResource) whatToAuth);
} else if (whoToAuth instanceof AddObjectPropStmt) {
} else if (whatToAuth instanceof AddObjectPropStmt) {
return visit(whoToAuth, (AddObjectPropStmt) whatToAuth);
} else if (whoToAuth instanceof DropObjectPropStmt) {
} else if (whatToAuth instanceof DropObjectPropStmt) {
return visit(whoToAuth, (DropObjectPropStmt) whatToAuth);
} else if (whoToAuth instanceof AddDataPropStmt) {
} else if (whatToAuth instanceof AddDataPropStmt) {
return visit(whoToAuth, (AddDataPropStmt) whatToAuth);
} else if (whoToAuth instanceof DropDataPropStmt) {
} else if (whatToAuth instanceof DropDataPropStmt) {
return visit(whoToAuth, (DropDataPropStmt) whatToAuth);
} else {
return UNAUTH;

View file

@ -107,23 +107,23 @@ public class SparqlPolicy extends DefaultInconclusivePolicy implements PolicyIfa
return new BasicPolicyDecision(Authorization.INCONCLUSIVE,
"no queryies found for action" + whatToAuth.getClass().getName());
if (whoToAuth instanceof AddObjectPropStmt) {
if (whatToAuth instanceof AddObjectPropStmt) {
return visit(whoToAuth, (AddObjectPropStmt) whatToAuth);
} else if (whoToAuth instanceof DropResource) {
} else if (whatToAuth instanceof DropResource) {
return visit(whoToAuth, (DropResource) whatToAuth);
} else if (whoToAuth instanceof DropDataPropStmt) {
} else if (whatToAuth instanceof DropDataPropStmt) {
return visit(whoToAuth, (DropDataPropStmt) whatToAuth);
} else if (whoToAuth instanceof DropObjectPropStmt) {
} else if (whatToAuth instanceof DropObjectPropStmt) {
return visit(whoToAuth, (DropObjectPropStmt) whatToAuth);
} else if (whoToAuth instanceof AddResource) {
} else if (whatToAuth instanceof AddResource) {
return visit(whoToAuth, (AddResource) whatToAuth);
} else if (whoToAuth instanceof AddDataPropStmt) {
} else if (whatToAuth instanceof AddDataPropStmt) {
return visit(whoToAuth, (AddDataPropStmt) whatToAuth);
} else if (whoToAuth instanceof UploadFile) {
} else if (whatToAuth instanceof UploadFile) {
return visit(whoToAuth, (UploadFile) whatToAuth);
} else if (whoToAuth instanceof EditDataPropStmt) {
} else if (whatToAuth instanceof EditDataPropStmt) {
return visit(whoToAuth, (EditDataPropStmt) whatToAuth);
} else if (whoToAuth instanceof EditObjPropStmt) {
} else if (whatToAuth instanceof EditObjPropStmt) {
return visit(whoToAuth, (EditObjPropStmt) whatToAuth);
} else {
return UNAUTH;