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);
return individuals;
}
@Override
public String toString() {
return this.getClass().getSimpleName() + " - " + hashCode();
}
}

View file

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

View file

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

View file

@ -163,4 +163,9 @@ public class DisplayRestrictedDataByRoleLevelPolicy implements PolicyIface {
.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;
}
@Override
public String toString() {
return this.getClass().getSimpleName() + " - " + hashCode();
}
}

View file

@ -140,4 +140,8 @@ public class EditRestrictedDataByRoleLevelPolicy implements PolicyIface {
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);
}
@Override
public String toString() {
return this.getClass().getSimpleName() + " - " + hashCode();
}
}

View file

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

View file

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