Merge branch 'master' of github.com:apache/sling-org-apache-sling-repoinit-parser
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/AclLine.java b/src/main/java/org/apache/sling/repoinit/parser/operations/AclLine.java
index ad4c85d..0dd5baa 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/AclLine.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/AclLine.java
@@ -25,55 +25,57 @@
/** A single "set ACL" line */
public class AclLine {
-
+
private final Action action;
private static final List<String> EMPTY_LIST = Collections.unmodifiableList(new ArrayList<String>());
-
+
public static final String PROP_PATHS = "paths";
public static final String PROP_PRINCIPALS = "principals";
public static final String PROP_PRIVILEGES = "privileges";
public static final String PROP_NODETYPES = "nodetypes";
public enum Action {
- REMOVE,
- REMOVE_ALL,
- DENY,
- ALLOW
+ REMOVE, REMOVE_ALL, DENY, ALLOW
};
-
+
private final Map<String, List<String>> properties;
private List<RestrictionClause> restrictions;
-
+
public AclLine(Action a) {
action = a;
- properties = new TreeMap<String, List<String>>();
+ properties = new TreeMap<>();
}
-
+
public Action getAction() {
return action;
}
-
- /** Return the named multi-value property, or an empty list
- * if not found.
+
+ /**
+ * Return the named multi-value property, or an empty list if not found.
+ *
+ * @param name the property to get the value of
*/
public List<String> getProperty(String name) {
List<String> value = properties.get(name);
return value != null ? value : EMPTY_LIST;
}
-
+
public void setProperty(String name, List<String> values) {
properties.put(name, Collections.unmodifiableList(values));
}
- public void setRestrictions(List<RestrictionClause> restrictions){
+ public void setRestrictions(List<RestrictionClause> restrictions) {
this.restrictions = restrictions;
}
- public List<RestrictionClause> getRestrictions() { return this.restrictions; }
-
+ public List<RestrictionClause> getRestrictions() {
+ return this.restrictions;
+ }
+
@Override
public String toString() {
- return getClass().getSimpleName() + " " + action + " " + properties + (restrictions == null || restrictions.isEmpty() ? "" : " restrictions="+restrictions);
+ return getClass().getSimpleName() + " " + action + " " + properties
+ + (restrictions == null || restrictions.isEmpty() ? "" : " restrictions=" + restrictions);
}
}
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/CreateGroup.java b/src/main/java/org/apache/sling/repoinit/parser/operations/CreateGroup.java
index 7136c65..341dc38 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/CreateGroup.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/CreateGroup.java
@@ -21,16 +21,20 @@
private final String groupname;
private final String path;
- /** Operation that creates a group.
- * @param username the name of the user to create
+ /**
+ * Operation that creates a group.
+ *
+ * @param groupname the name of the group to create
*/
public CreateGroup(String groupname) {
- this(groupname, null);
+ this(groupname, null);
}
- /** Operation that creates a group.
- * @param username the name of the group to create
- * @param path optional path
+ /**
+ * Operation that creates a group.
+ *
+ * @param groupname the name of the group to create
+ * @param path optional path
*/
public CreateGroup(String groupname, String path) {
this.groupname = groupname;
@@ -45,7 +49,7 @@
@Override
protected String getParametersDescription() {
final StringBuilder sb = new StringBuilder(groupname);
- if(path != null) {
+ if (path != null) {
sb.append(" with path ").append(path);
}
return sb.toString();
diff --git a/src/main/java/org/apache/sling/repoinit/parser/operations/DeleteGroup.java b/src/main/java/org/apache/sling/repoinit/parser/operations/DeleteGroup.java
index be5552c..db0115e 100644
--- a/src/main/java/org/apache/sling/repoinit/parser/operations/DeleteGroup.java
+++ b/src/main/java/org/apache/sling/repoinit/parser/operations/DeleteGroup.java
@@ -20,8 +20,10 @@
public class DeleteGroup extends Operation {
private final String groupname;
- /** Operation that deletes a group.
- * @param username the name of the group to delete
+ /**
+ * Operation that deletes a group.
+ *
+ * @param groupname the name of the group to delete
*/
public DeleteGroup(String groupname) {
this.groupname = groupname;