diff --git a/app/aem/actions.main/src/main/java/com/cognifide/apm/main/permissions/Restrictions.java b/app/aem/actions.main/src/main/java/com/cognifide/apm/main/permissions/Restrictions.java index 703cd3d7..4f3b3d10 100644 --- a/app/aem/actions.main/src/main/java/com/cognifide/apm/main/permissions/Restrictions.java +++ b/app/aem/actions.main/src/main/java/com/cognifide/apm/main/permissions/Restrictions.java @@ -40,12 +40,12 @@ public class Restrictions { private static final String REP_GLOB_PROPERTY = "rep:glob"; - private static final String REP_NTNAMES_PROPERTY = "rep:ntNames"; + private static final String REP_NT_NAMES_PROPERTY = "rep:ntNames"; - private static final String REP_ITEMNAMES_PROPERTY = "rep:itemNames"; + private static final String REP_ITEM_NAMES_PROPERTY = "rep:itemNames"; - private static final Set MULTIVALUE_REP_PROPERTIES = ImmutableSet.of( - REP_NTNAMES_PROPERTY, REP_ITEMNAMES_PROPERTY, "rep:prefixes", "rep:current", "rep:globs", + private static final Set MULTI_VALUE_REP_PROPERTIES = ImmutableSet.of( + REP_NT_NAMES_PROPERTY, REP_ITEM_NAMES_PROPERTY, "rep:prefixes", "rep:current", "rep:globs", "rep:subtrees", "sling:resourceTypes", "sling:resourceTypesWithDescendants" ); @@ -76,7 +76,7 @@ public Map getSingleValueRestrictions(ValueFactory valueFactory) Map result = new HashMap<>(); addRestriction(valueFactory, result, REP_GLOB_PROPERTY, glob); for (Map.Entry entry : customRestrictions.entrySet()) { - if (!isMultivalue(entry)) { + if (!isMultiValue(entry)) { String value; if (entry.getValue() instanceof String) { value = (String) entry.getValue(); @@ -108,10 +108,10 @@ private Value normalizeGlob(ValueFactory valueFactory) { public Map getMultiValueRestrictions(ValueFactory valueFactory) throws ValueFormatException { Map result = new HashMap<>(); - addRestrictions(valueFactory, result, REP_NTNAMES_PROPERTY, ntNames); - addRestrictions(valueFactory, result, REP_ITEMNAMES_PROPERTY, itemNames); + addRestrictions(valueFactory, result, REP_NT_NAMES_PROPERTY, ntNames); + addRestrictions(valueFactory, result, REP_ITEM_NAMES_PROPERTY, itemNames); for (Map.Entry entry : customRestrictions.entrySet()) { - if (isMultivalue(entry)) { + if (isMultiValue(entry)) { List values; if (entry.getValue() instanceof String) { values = Collections.singletonList((String) entry.getValue()); @@ -146,11 +146,11 @@ private int determinePropertyType(String key) { } } - private boolean isMultivalue(Map.Entry entry) { + private boolean isMultiValue(Map.Entry entry) { boolean result; if (REP_GLOB_PROPERTY.equals(entry.getKey())) { result = false; - } else if (MULTIVALUE_REP_PROPERTIES.contains(entry.getKey())) { + } else if (MULTI_VALUE_REP_PROPERTIES.contains(entry.getKey())) { result = true; } else { result = entry.getValue() instanceof List;