/** @param other */ public void updateFrom(RangerPolicy other) { super.updateFrom(other); setService(other.getService()); setName(other.getName()); setPolicyType(other.getPolicyType()); setDescription(other.getDescription()); setResourceSignature(other.getResourceSignature()); setIsAuditEnabled(other.getIsAuditEnabled()); setResources(other.getResources()); setPolicyItems(other.getPolicyItems()); setDenyPolicyItems(other.getDenyPolicyItems()); setAllowExceptions(other.getAllowExceptions()); setDenyExceptions(other.getDenyExceptions()); }
public StringBuilder toString(StringBuilder sb) { sb.append("RangerPolicy={"); super.toString(sb); sb.append("service={").append(service).append("} "); sb.append("name={").append(name).append("} "); sb.append("policyType={").append(policyType).append("} "); sb.append("description={").append(description).append("} "); sb.append("resourceSignature={").append(resourceSignature).append("} "); sb.append("isAuditEnabled={").append(isAuditEnabled).append("} "); sb.append("resources={"); if (resources != null) { for (Map.Entry<String, RangerPolicyResource> e : resources.entrySet()) { sb.append(e.getKey()).append("={"); e.getValue().toString(sb); sb.append("} "); } } sb.append("} "); sb.append("policyItems={"); if (policyItems != null) { for (RangerPolicyItem policyItem : policyItems) { if (policyItem != null) { policyItem.toString(sb); } } } sb.append("} "); sb.append("denyPolicyItems={"); if (denyPolicyItems != null) { for (RangerPolicyItem policyItem : denyPolicyItems) { if (policyItem != null) { policyItem.toString(sb); } } } sb.append("} "); sb.append("allowExceptions={"); if (allowExceptions != null) { for (RangerPolicyItem policyItem : allowExceptions) { if (policyItem != null) { policyItem.toString(sb); } } } sb.append("} "); sb.append("denyExceptions={"); if (denyExceptions != null) { for (RangerPolicyItem policyItem : denyExceptions) { if (policyItem != null) { policyItem.toString(sb); } } } sb.append("} "); sb.append("}"); return sb; }