You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/04/26 19:05:29 UTC
[sling-org-apache-sling-repoinit-parser] 01/03: Fixing javadoc
issues
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-repoinit-parser.git
commit 78757619dac8460a94dc13db97b58f6380857967
Author: Dan Klco <dk...@apache.org>
AuthorDate: Fri Apr 26 15:01:36 2019 -0400
Fixing javadoc issues
---
.../sling/repoinit/parser/operations/AclLine.java | 38 ++++++++++++----------
.../repoinit/parser/operations/CreateGroup.java | 18 ++++++----
.../repoinit/parser/operations/DeleteGroup.java | 6 ++--
3 files changed, 35 insertions(+), 27 deletions(-)
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 @@ import java.util.TreeMap;
/** 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 @@ public class CreateGroup extends Operation {
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 @@ public class CreateGroup extends Operation {
@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 @@ package org.apache.sling.repoinit.parser.operations;
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;