Add or improve toString() methods.

This commit is contained in:
j2blake 2011-06-05 23:34:00 +00:00
parent 7cd1467786
commit 0b8127ea11
9 changed files with 37 additions and 4 deletions

View file

@ -145,4 +145,10 @@ public class CommonIdentifierBundleFactory implements IdentifierBundleFactory {
individuals.add(ind); individuals.add(ind);
return individuals; return individuals;
} }
@Override
public String toString() {
return this.getClass().getSimpleName() + " - " + hashCode();
}
} }

View file

@ -43,6 +43,6 @@ public class HasAssociatedIndividual extends AbstractCommonIdentifier implements
@Override @Override
public String toString() { public String toString() {
return "HasAssociatedIndividual['" + associatedIndividualUri + "']"; return "HasAssociatedIndividual[" + associatedIndividualUri + "]";
} }
} }

View file

@ -224,7 +224,8 @@ public class IsBlacklisted extends AbstractCommonIdentifier implements
@Override @Override
public String toString() { public String toString() {
return "IsBlacklisted['" + reasonForBlacklisting + "']"; return "IsBlacklisted[" + associatedIndividualUri + ", "
+ reasonForBlacklisting + "]";
} }
} }

View file

@ -163,4 +163,9 @@ public class DisplayRestrictedDataByRoleLevelPolicy implements PolicyIface {
.canDisplayPredicate(uri, userRole); .canDisplayPredicate(uri, userRole);
} }
@Override
public String toString() {
return this.getClass().getSimpleName() + " - " + hashCode();
}
} }

View file

@ -175,4 +175,9 @@ public class DisplayRestrictedDataToSelfPolicy implements PolicyIface {
return false; return false;
} }
@Override
public String toString() {
return this.getClass().getSimpleName() + " - " + hashCode();
}
} }

View file

@ -140,4 +140,8 @@ public class EditRestrictedDataByRoleLevelPolicy implements PolicyIface {
uri, userRole); uri, userRole);
} }
@Override
public String toString() {
return this.getClass().getSimpleName() + " - " + hashCode();
}
} }

View file

@ -144,4 +144,8 @@ public class UseRestrictedPagesByRoleLevelPolicy implements PolicyIface {
return new BasicPolicyDecision(Authorization.INCONCLUSIVE, message); return new BasicPolicyDecision(Authorization.INCONCLUSIVE, message);
} }
@Override
public String toString() {
return this.getClass().getSimpleName() + " - " + hashCode();
}
} }

View file

@ -16,6 +16,7 @@ public class DefaultInconclusivePolicy implements PolicyIface {
Authorization.INCONCLUSIVE, Authorization.INCONCLUSIVE,
"This is the default decision defined in DefaultInconclusivePolicy"); "This is the default decision defined in DefaultInconclusivePolicy");
@Override
public PolicyDecision isAuthorized(IdentifierBundle whoToAuth, public PolicyDecision isAuthorized(IdentifierBundle whoToAuth,
RequestedAction whatToAuth) { RequestedAction whatToAuth) {
if (whoToAuth == null) if (whoToAuth == null)
@ -29,7 +30,7 @@ public class DefaultInconclusivePolicy implements PolicyIface {
@Override @Override
public String toString() { public String toString() {
return "DefaultInconclusivePolicy"; return this.getClass().getSimpleName() + " - " + hashCode();
} }
} }

View file

@ -195,6 +195,13 @@ public class SelfEditorRelationshipPolicy extends AbstractRelationshipPolicy
return userNotAuthorizedToStatement(); return userNotAuthorizedToStatement();
} }
@Override
public String toString() {
return this.getClass().getSimpleName()
+ ": information resources, grants, projects, etc. - "
+ hashCode();
}
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------
// methods for InformationResource // methods for InformationResource
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------