import aaf.v2_0.Perms;
public class List extends BaseCmd<Perm> {
-// private static final String LIST_PERM_DETAILS = "list permission details";
-
+ private static final String permFormat = "%-30s %-30s %-10s\n";
+ private static final Comparator<aaf.v2_0.Perm> permCompare = new Comparator<aaf.v2_0.Perm>() {
+ @Override
+ public int compare(aaf.v2_0.Perm a, aaf.v2_0.Perm b) {
+ int rc;
+ if ((rc=a.getType().compareTo(b.getType()))!=0) {
+ return rc;
+ }
+ if ((rc=a.getInstance().compareTo(b.getInstance()))!=0) {
+ return rc;
+ }
+ return a.getAction().compareTo(b.getAction());
+ }
+ };
public List(Perm parent) {
super(parent,"list");
}
// Package Level on purpose
abstract class ListPerms extends Retryable<Integer> {
- protected int list(Future<Perms> fp,String header, String parentPerm) throws CadiException, APIException {
+ protected int list(Future<Perms> fp,String header, String parentPerm) throws CadiException {
if (fp.get(AAFcli.timeout())) {
report(fp,header, parentPerm);
} else {
return fp.code();
}
}
-
- private static final Comparator<aaf.v2_0.Perm> permCompare = new Comparator<aaf.v2_0.Perm>() {
- @Override
- public int compare(aaf.v2_0.Perm a, aaf.v2_0.Perm b) {
- int rc;
- if ((rc=a.getType().compareTo(b.getType()))!=0) {
- return rc;
- }
- if ((rc=a.getInstance().compareTo(b.getInstance()))!=0) {
- return rc;
- }
- return a.getAction().compareTo(b.getAction());
- }
- };
-
- private static final String permFormat = "%-30s %-30s %-10s\n";
void report(Future<Perms> fp, String ... str) {
reportHead(str);