use of com.zimbra.cs.account.accesscontrol.AttrRight in project zm-mailbox by Zimbra.
the class ProvUtil method dumpRight.
private void dumpRight(Right right, boolean expandComboRight) {
String tab = " ";
String indent = tab;
String indent2 = indent + indent;
console.println();
console.println("------------------------------");
console.println(right.getName());
console.println(indent + " description: " + right.getDesc());
console.println(indent + " right type: " + right.getRightType().name());
String targetType = right.getTargetTypeStr();
console.println(indent + " target type(s): " + (targetType == null ? "" : targetType));
String grantTargetType = right.getGrantTargetTypeStr();
console.println(indent + "grant target type: " + (grantTargetType == null ? "(default)" : grantTargetType));
console.println(indent + " right class: " + right.getRightClass().name());
if (right.isAttrRight()) {
AttrRight attrRight = (AttrRight) right;
console.println();
console.println(indent + "attributes:");
if (attrRight.allAttrs()) {
console.println(indent2 + "all attributes");
} else {
for (String attrName : attrRight.getAttrs()) {
console.println(indent2 + attrName);
}
}
} else if (right.isComboRight()) {
ComboRight comboRight = (ComboRight) right;
console.println();
console.println(indent + "rights:");
dumpComboRight(comboRight, expandComboRight, indent, new HashSet<String>());
}
console.println();
Help help = right.getHelp();
if (help != null) {
console.println(help.getDesc());
List<String> helpItems = help.getItems();
for (String helpItem : helpItems) {
// console.println(FileGenUtil.wrapComments(helpItem, 70, prefix) + "\n");
console.println("- " + helpItem.trim());
console.println();
}
}
console.println();
}
Aggregations