You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/03/15 00:20:06 UTC
[1/5] karaf git commit: KARAF-4392 - Upgrade to maven-javadoc-plugin
2.10.3 and clean javadoc comments
Repository: karaf
Updated Branches:
refs/heads/master 9d136eb44 -> 8a1e7574d
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/console/standalone/Main.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/standalone/Main.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/standalone/Main.java
index 681f6ac..dd9ed00 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/standalone/Main.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/standalone/Main.java
@@ -62,8 +62,8 @@ public class Main {
/**
* Use this method when the shell is being executed as a top level shell.
*
- * @param args
- * @throws Exception
+ * @param args the arguments.
+ * @throws Exception in case of a failure.
*/
public void run(String args[]) throws Exception {
@@ -171,13 +171,13 @@ public class Main {
/**
* Allow sub classes of main to change the ConsoleImpl implementation used.
*
- * @param sessionFactory
- * @param in
- * @param out
- * @param err
- * @param terminal
- * @return
- * @throws Exception
+ * @param sessionFactory the session factory.
+ * @param in the input stream (console std in).
+ * @param out the output stream (console std out).
+ * @param err the error stream (console std err).
+ * @param terminal the terminal.
+ * @return the created session.
+ * @throws Exception if something goes wrong during session creation.
*/
protected Session createSession(SessionFactory sessionFactory, InputStream in, PrintStream out, PrintStream err, Terminal terminal) throws Exception {
return sessionFactory.create(in, out, err, terminal, null, null);
@@ -192,6 +192,8 @@ public class Main {
/**
* Sub classes can override so that their registered commands do not conflict with the default shell
* implementation.
+ *
+ * @return the location of the discovery resource.
*/
public String getDiscoveryResource() {
return "META-INF/services/org/apache/karaf/shell/commands";
@@ -233,10 +235,12 @@ public class Main {
}
/**
- * Returns whether or not we are in multi-scope mode.
- * <p/>
- * The default mode is multi-scoped where we prefix commands by their scope. If we are in single
- * scoped mode then we don't use scope prefixes when registering or tab completing commands.
+ * <p>Returns whether or not we are in multi-scope mode.</p>
+ *
+ * <p>The default mode is multi-scoped where we prefix commands by their scope. If we are in single
+ * scoped mode then we don't use scope prefixes when registering or tab completing commands.</p>
+ *
+ * @return true if the console is multi-scope, false else.
*/
public boolean isMultiScopeMode() {
return true;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/support/NameScoping.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/support/NameScoping.java b/shell/core/src/main/java/org/apache/karaf/shell/support/NameScoping.java
index fc3c5ed..4249fed 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/support/NameScoping.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/support/NameScoping.java
@@ -17,7 +17,6 @@
*/
package org.apache.karaf.shell.support;
-
import org.apache.karaf.shell.api.console.Session;
/**
@@ -28,8 +27,12 @@ public class NameScoping {
public static final String MULTI_SCOPE_MODE_KEY = "MULTI_SCOPE_MODE";
/**
- * Returns the name of the command which can omit the global scope prefix if the command starts with the
- * same prefix as the current application
+ * Return the name of the command which can omit the global scope prefix if the command starts with the
+ * same prefix as the current application.
+ *
+ * @param session the command session.
+ * @param key the command key.
+ * @return the command without the prefix.
*/
public static String getCommandNameWithoutGlobalPrefix(Session session, String key) {
if (!isMultiScopeMode(session)) {
@@ -47,7 +50,11 @@ public class NameScoping {
}
/**
- * Returns true if the given scope is the global scope so that it can be hidden from help messages
+ * Return true if the given scope is the global scope so that it can be hidden from help messages.
+ *
+ * @param session the command session.
+ * @param scope the command scope.
+ * @return true if the command scope is global, false else.
*/
public static boolean isGlobalScope(Session session, String scope) {
if (session == null)
@@ -63,8 +70,11 @@ public class NameScoping {
}
/**
- * Returns true if we are in multi-scope mode (the default) or if we are in single scope mode which means we
- * avoid prefixing commands with their scope
+ * Return true if we are in multi-scope mode (the default) or if we are in single scope mode which means we
+ * avoid prefixing commands with their scope.
+ *
+ * @param session the command session.
+ * @return true if the command is multi-scoped, false else.
*/
public static boolean isMultiScopeMode(Session session) {
if (session == null)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/support/ShellUtil.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/support/ShellUtil.java b/shell/core/src/main/java/org/apache/karaf/shell/support/ShellUtil.java
index 405f608..3a9ba0e 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/support/ShellUtil.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/support/ShellUtil.java
@@ -101,11 +101,11 @@ public class ShellUtil {
}
/**
- * Check if a bundle is a system bundle (start level < 50)
+ * Check if a bundle is a system bundle (start level minor than 50).
*
- * @param bundleContext
- * @param bundle
- * @return true if the bundle has start level minor than 50
+ * @param bundleContext the current bundle context.
+ * @param bundle the bundle to check.
+ * @return true if the bundle has start level minor than 50.
*/
public static boolean isASystemBundle(BundleContext bundleContext, Bundle bundle) {
int level = bundle.adapt(BundleStartLevel.class).getStartLevel();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/support/completers/FileCompleter.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/support/completers/FileCompleter.java b/shell/core/src/main/java/org/apache/karaf/shell/support/completers/FileCompleter.java
index c200f4c..4a96d52 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/support/completers/FileCompleter.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/support/completers/FileCompleter.java
@@ -24,15 +24,14 @@ import org.apache.karaf.shell.api.console.CommandLine;
import org.apache.karaf.shell.api.console.Completer;
import org.apache.karaf.shell.api.console.Session;
-
/**
- * A file name completer takes the buffer and issues a list of
- * potential completions.
- * <p/>
- * This completer tries to behave as similar as possible to
+ * <p>A file name completer takes the buffer and issues a list of
+ * potential completions.</p>
+ *
+ * <p>This completer tries to behave as similar as possible to
* <i>bash</i>'s file name completion (using GNU readline)
- * with the following exceptions:
- * <p/>
+ * with the following exceptions:</p>
+ *
* <ul>
* <li>Candidates that are directories will end with "/"</li>
* <li>Wildcard regular expressions are not evaluated or replaced</li>
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/support/converter/ReifiedType.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/support/converter/ReifiedType.java b/shell/core/src/main/java/org/apache/karaf/shell/support/converter/ReifiedType.java
index 6f89857..5a692ef 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/support/converter/ReifiedType.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/support/converter/ReifiedType.java
@@ -30,10 +30,8 @@ package org.apache.karaf.shell.support.converter;
* a subclass that provide type arguments should be respected. Blueprint
* extender implementations can subclass this class and provide access to the
* generics type graph if used in a conversion. Such a subclass must
- * <em>reify<em> the different Java 5 <code>Type</code> instances into the
+ * <em>reify</em> the different Java 5 <code>Type</code> instances into the
* reified form. That is, a form where the raw Class is available with its optional type arguments as Reified Types.
- *
- * @Immutable
*/
public class ReifiedType {
final static ReifiedType ALL = new ReifiedType(Object.class);
@@ -80,7 +78,7 @@ public class ReifiedType {
* object is assignable to Object and therefore no conversion is then
* necessary, this is compatible with older Javas than 5. For this reason,
* the implementation in this class always returns the
- * <code>Object<code> class, regardless of the given index.
+ * <code>Object</code> class, regardless of the given index.
*
* This method should be overridden by a subclass that provides access to
* the generic information.
@@ -96,7 +94,7 @@ public class ReifiedType {
*
* @param i
* The index of the type argument
- * @return <code>ReifiedType(Object.class)<code>, subclasses must override this and return the generic argument at index <code>i</code>
+ * @return <code>ReifiedType</code>, subclasses must override this and return the generic argument at index <code>i</code>
*/
public ReifiedType getActualTypeArgument(int i) {
return ALL;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/support/table/HAlign.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/support/table/HAlign.java b/shell/core/src/main/java/org/apache/karaf/shell/support/table/HAlign.java
index 9869a2c..5893c5d 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/support/table/HAlign.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/support/table/HAlign.java
@@ -62,9 +62,9 @@ public enum HAlign {
/**
* Calculate text position.
*
- * @param text Text
- * @param colWidth
- * @return
+ * @param text the text to align.
+ * @param colWidth the column width.
+ * @return the string at the given position.
*/
public abstract String position(String text, int colWidth);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java b/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java
index 2cb6899..a5f0f02 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java
@@ -67,9 +67,10 @@ public class ShellTable {
}
/**
- * Set text to display if there are no rows in the table
- * @param text
- * @return
+ * Set text to display if there are no rows in the table.
+ *
+ * @param text the text to display when the table is empty.
+ * @return the shell table.
*/
public ShellTable emptyTableText(String text) {
this.emptyTableText = text;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/UserAuthFactoriesFactory.java
----------------------------------------------------------------------
diff --git a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/UserAuthFactoriesFactory.java b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/UserAuthFactoriesFactory.java
index a7bd297..b31ab93 100644
--- a/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/UserAuthFactoriesFactory.java
+++ b/shell/ssh/src/main/java/org/apache/karaf/shell/ssh/UserAuthFactoriesFactory.java
@@ -37,12 +37,9 @@ import java.util.Set;
*
* <p>Currently, the following methods are supported:</p>
* <ul>
- * <li><code>password</code>
- * Password authentication against a given JAAS domain.</p></li>
- * <li><code>publickey</code>
- * Public key authentication against an OpenSSH <code>authorized_keys</code> file.</p></li>
+ * <li><code>password</code> Password authentication against a given JAAS domain.</li>
+ * <li><code>publickey</code> Public key authentication against an OpenSSH <code>authorized_keys</code> file.</li>
* </ul>
- * </p>
*/
public class UserAuthFactoriesFactory {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/table/src/main/java/org/apache/karaf/shell/table/HAlign.java
----------------------------------------------------------------------
diff --git a/shell/table/src/main/java/org/apache/karaf/shell/table/HAlign.java b/shell/table/src/main/java/org/apache/karaf/shell/table/HAlign.java
index 032d745..b47a186 100644
--- a/shell/table/src/main/java/org/apache/karaf/shell/table/HAlign.java
+++ b/shell/table/src/main/java/org/apache/karaf/shell/table/HAlign.java
@@ -61,9 +61,9 @@ public enum HAlign {
/**
* Calculate text position.
*
- * @param text Text
- * @param colWidth
- * @return
+ * @param text The text to align.
+ * @param colWidth The width of the column.
+ * @return The aligned string.
*/
public abstract String position(String text, int colWidth);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/table/src/main/java/org/apache/karaf/shell/table/ShellTable.java
----------------------------------------------------------------------
diff --git a/shell/table/src/main/java/org/apache/karaf/shell/table/ShellTable.java b/shell/table/src/main/java/org/apache/karaf/shell/table/ShellTable.java
index e9e936a..955e70a 100644
--- a/shell/table/src/main/java/org/apache/karaf/shell/table/ShellTable.java
+++ b/shell/table/src/main/java/org/apache/karaf/shell/table/ShellTable.java
@@ -67,9 +67,10 @@ public class ShellTable {
}
/**
- * Set text to display if there are no rows in the table
- * @param text
- * @return
+ * Set text to display if there are no rows in the table.
+ *
+ * @param text The text to display when the table is empty.
+ * @return The shell table.
*/
public ShellTable emptyTableText(String text) {
this.emptyTableText = text;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/system/src/main/java/org/apache/karaf/system/SystemService.java
----------------------------------------------------------------------
diff --git a/system/src/main/java/org/apache/karaf/system/SystemService.java b/system/src/main/java/org/apache/karaf/system/SystemService.java
index 2f53946..ce4d9ef 100644
--- a/system/src/main/java/org/apache/karaf/system/SystemService.java
+++ b/system/src/main/java/org/apache/karaf/system/SystemService.java
@@ -35,96 +35,106 @@ public interface SystemService {
/**
* Halt the Karaf container.
+ *
+ * @throws Exception If the halt fails.
*/
void halt() throws Exception;
/**
* Halt the Karaf container.
*
- * @param time shutdown delay. The time argument can have different formats.
+ * @param time Shutdown delay. The time argument can have different formats.
* First, it can be an absolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm
* is the minute of the hour (in two digits). Second, it can be in the format +m, in which m is the number of minutes
* to wait. The word now is an alias for +0.
+ * @throws Exception If the halt fails.
*/
void halt(String time) throws Exception;
/**
* Reboot the Karaf container.
*
- * @throws Exception
+ * @throws Exception If the reboot fails.
*/
void reboot() throws Exception;
/**
* Reboot the Karaf container.
*
- * @param time reboot delay. The time argument can have different formats.
+ * @param time The reboot delay. The time argument can have different formats.
* First, it can be an absolute time in the format hh:mm, in which hh is the hour (1 or 2 digits) and mm
* is the minute of the hour (in two digits). Second, it can be in the format +m, in which m is the number of minutes
* to wait. The word now is an alias for +0.
- * @param clean Force a clean restart by deleting the working directory.
+ * @param clean Force a clean restart by deleting the working directory.
+ * @throws Exception If the reboot fails.
*/
void reboot(String time, Swipe clean) throws Exception;
/**
* Set the system start level.
*
- * @param startLevel the new system start level.
+ * @param startLevel The new system start level.
+ * @throws Exception If setting the start level fails.
*/
void setStartLevel(int startLevel) throws Exception;
/**
* Get the system start level.
*
- * @return the current system start level.
+ * @return The current system start level.
+ * @throws Exception If an error occurs while retrieving the start level.
*/
int getStartLevel() throws Exception;
/**
- * Get the version of the current Karaf instance
+ * Get the version of the current Karaf instance.
*
- * @return instance version
+ * @return The instance version.
*/
String getVersion();
/**
- * Get the name of the current Karaf instance
+ * Get the name of the current Karaf instance.
*
- * @return instance name
+ * @return The instance name.
*/
String getName();
/**
- * Set the name of the Karaf instance
+ * Set the name of the Karaf instance.
*
- * @param name new instance name
+ * @param name The new instance name.
*/
void setName(String name);
/**
* Get the current OSGi framework in use.
*
- * @return the name of the OSGi framework in use.
- * @throws Exception
+ * @return The {@link FrameworkType} representing the OSGi framework in use.
*/
FrameworkType getFramework();
/**
- * change OSGi framework
+ * Change OSGi framework to use.
*
- * @param framework to use.
+ * @param framework The new OSGi framework to use.
*/
void setFramework(FrameworkType framework);
/**
- * Enable or diable debgging
- * @param debug enable if true
+ * Enable or disable debugging.
+ *
+ * @param debug True to enable debugging, false else.
*/
void setFrameworkDebug(boolean debug);
/**
- * Set a system property and persist to etc/system.properties
- * @param key
+ * Set a system property and persist to etc/system.properties.
+ *
+ * @param key The system property key.
+ * @param value The system property value.
+ * @param persist True to persist the change in Karaf etc configuration file, false else.
+ * @return The system property value as set.
*/
String setSystemProperty(String key, String value, boolean persist);
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/system/src/main/java/org/apache/karaf/system/management/SystemMBean.java
----------------------------------------------------------------------
diff --git a/system/src/main/java/org/apache/karaf/system/management/SystemMBean.java b/system/src/main/java/org/apache/karaf/system/management/SystemMBean.java
index 5d9bdbc..e021ae7 100644
--- a/system/src/main/java/org/apache/karaf/system/management/SystemMBean.java
+++ b/system/src/main/java/org/apache/karaf/system/management/SystemMBean.java
@@ -25,9 +25,9 @@ import java.util.Map;
public interface SystemMBean {
/**
- * Stop the Karaf instance
+ * Stop the Karaf instance.
*
- * @throws Exception
+ * @throws MBeanException If a failure occurs.
*/
void halt() throws MBeanException;
@@ -35,14 +35,14 @@ public interface SystemMBean {
* Stop the Karaf instance at a given time.
*
* @param time the time when to stop the Karaf instance.
- * @throws Exception
+ * @throws MBeanException If a failure occurs.
*/
void halt(String time) throws MBeanException;
/**
* Reboot the Karaf instance.
*
- * @throws Exception
+ * @throws MBeanException If a failure occurs.
*/
void reboot() throws MBeanException;
@@ -50,7 +50,7 @@ public interface SystemMBean {
* Reboot the Karaf instance at a given time.
*
* @param time the time when to reboot the Karaf instance.
- * @throws Exception
+ * @throws MBeanException If a failure occurs.
*/
void reboot(String time) throws MBeanException;
@@ -58,7 +58,7 @@ public interface SystemMBean {
* Reboot the Karaf instance at a given time and clean the cache.
*
* @param time the time when to reboot the Karaf instance.
- * @throws Exception
+ * @throws MBeanException If a failure occurs.
*/
void rebootCleanCache(String time) throws MBeanException;
@@ -66,7 +66,7 @@ public interface SystemMBean {
* Reboot the Karaf instance at a given time and clean all working files.
*
* @param time the time when to reboot the Karaf instance.
- * @throws Exception
+ * @throws MBeanException If a failure occurs.
*/
void rebootCleanAll(String time) throws MBeanException;
@@ -74,7 +74,7 @@ public interface SystemMBean {
* Set the system bundle start level.
*
* @param startLevel the new system bundle start level.
- * @throws Exception
+ * @throws MBeanException If a failure occurs.
*/
void setStartLevel(int startLevel) throws MBeanException;
@@ -82,7 +82,7 @@ public interface SystemMBean {
* Get the current system bundle start level.
*
* @return the current system bundle start level.
- * @throws Exception
+ * @throws MBeanException If a failure occurs.
*/
int getStartLevel() throws MBeanException;
@@ -90,19 +90,19 @@ public interface SystemMBean {
* Get the current OSGi framework in use.
*
* @return the name of the OSGi framework in use.
- * @throws Exception
*/
String getFramework();
/**
- * change OSGi framework
+ * Change OSGi framework
*
- * @param framework to use.
+ * @param framework The framework to use.
*/
void setFramework(String framework);
/**
- * Enable or diable debgging
+ * Enable or disable debugging
+ *
* @param debug enable if true
*/
void setFrameworkDebug(boolean debug);
@@ -134,6 +134,7 @@ public interface SystemMBean {
* @param unset if true, display the OSGi properties even if they are not defined (with "undef" value).
* @param dumpToFile if true, dump the properties into a file in the data folder.
* @return the list of system properties.
+ * @throws MBeanException If a failure occurs.
*/
Map<String, String> getProperties(boolean unset, boolean dumpToFile) throws MBeanException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
index a2dcaa9..46c79dd 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/AssemblyMojo.java
@@ -51,7 +51,6 @@ import java.util.Map;
* from ${project.build.directory}/classes. Thus, a file in src/main/resources/etc
* will be copied by the resource plugin to ${project.build.directory}/classes/etc,
* and then added to the assembly by this goal.
- * <br>
*/
@Mojo(name = "assembly", defaultPhase = LifecyclePhase.PACKAGE, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true)
public class AssemblyMojo extends MojoSupport {
@@ -218,8 +217,8 @@ public class AssemblyMojo extends MojoSupport {
</edit>
</edits>
</property-edits>
- </pre>
}
+ </pre>
*/
@Parameter(defaultValue = "${project.basedir}/src/main/karaf/assembly-property-edits.xml")
protected String propertyFileEdits;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/commands/CommandHelpPrinter.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/commands/CommandHelpPrinter.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/commands/CommandHelpPrinter.java
index e5915d5..f7e24ea 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/commands/CommandHelpPrinter.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/commands/CommandHelpPrinter.java
@@ -27,19 +27,19 @@ import org.apache.karaf.shell.api.action.Action;
public interface CommandHelpPrinter {
/**
- * Print help for a single action to the out stream
+ * Print help for a single action to the out stream.
*
- * @param action
- * @param out stream to write to
- * @param includeHelpOption include the help option in the doc
+ * @param action The command {@link Action}.
+ * @param out The stream where to print the help.
+ * @param includeHelpOption True to include the help option in the doc, false else.
*/
void printHelp(Action action, PrintStream out, boolean includeHelpOption);
/**
- * Print the overview of all given commands to the out stream
+ * Print the overview of all given commands to the out stream.
*
- * @param commands
- * @param out
+ * @param commands The {@link Map} of commands to consider in the overview.
+ * @param out The stream where to write the overview.
*/
void printOverview(Map<String, Set<String>> commands, PrintStream out);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AbstractFeatureMojo.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AbstractFeatureMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AbstractFeatureMojo.java
index 93d823d..dda4350 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AbstractFeatureMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/AbstractFeatureMojo.java
@@ -137,8 +137,8 @@ public abstract class AbstractFeatureMojo extends MojoSupport {
* Resolves and copies the given artifact to the repository path.
* Prefers to resolve using the repository of the artifact if present.
*
- * @param artifact
- * @param remoteRepos
+ * @param artifact The artifact.
+ * @param remoteRepos The {@link List} of remote repositories to use for artifact resolution.
*/
@SuppressWarnings("deprecation")
protected void resolveArtifact(Artifact artifact, List<ArtifactRepository> remoteRepos) {
@@ -164,10 +164,10 @@ public abstract class AbstractFeatureMojo extends MojoSupport {
* Populate the features by traversing the listed features and their
* dependencies if transitive is true
*
- * @param featureNames
- * @param features
- * @param featuresMap
- * @param transitive
+ * @param featureNames The {@link List} of feature names.
+ * @param features The {@link Set} of features.
+ * @param featuresMap The {@link Map} of features.
+ * @param transitive True to add transitive features, false else.
*/
protected void addFeatures(List<String> featureNames, Set<Feature> features, Map<String, Feature> featuresMap, boolean transitive) {
for (String feature : featureNames) {
@@ -284,7 +284,7 @@ public abstract class AbstractFeatureMojo extends MojoSupport {
/**
* Maven ArtifactResolver leaves file handles around so need to clean up
- * or we will run out of file descriptors
+ * or we will run out of file descriptors.
*/
protected void checkDoGarbageCollect() {
if (this.resolveCount++ % 100 == 0) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelper.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelper.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelper.java
index ece73c4..e2e3bf7 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelper.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelper.java
@@ -54,16 +54,18 @@ public interface DependencyHelper {
/**
* Convert a Maven <code>Artifact</code> into a PAX URL mvn format.
*
- * @param artifact the Maven <code>Artifact</code>.
- * @return the corresponding PAX URL mvn format (mvn:groupId/artifactId/version/type/classifier)
+ * @param artifact The Maven <code>Artifact</code>.
+ * @return The corresponding PAX URL mvn format (mvn:groupId/artifactId/version/type/classifier)
+ * @throws MojoExecutionException If the plugin execution fails.
*/
public String artifactToMvn(Artifact artifact) throws MojoExecutionException;
/**
* Convert an Aether (Sonatype or Eclipse) artifact into a PAX URL mvn format.
*
- * @param object the Aether <code>org.sonatype|eclipse.aether.artifact.Artifact</code>.
- * @return the corresponding PAX URL mvn format (mvn:groupId/artifactId/version/type/classifier)
+ * @param object The Aether <code>org.sonatype|eclipse.aether.artifact.Artifact</code>.
+ * @return The corresponding PAX URL mvn format (mvn:groupId/artifactId/version/type/classifier).
+ * @throws MojoExecutionException If the plugin execution fails.
*/
public String artifactToMvn(Object object) throws MojoExecutionException;
@@ -73,15 +75,17 @@ public interface DependencyHelper {
* Convert a PAX URL mvn format into a filesystem path.
*
* @param name PAX URL mvn format (mvn:groupId/artifactId/version/type/classifier).
- * @return a filesystem path.
+ * @return The filesystem path.
+ * @throws MojoExecutionException If the plugin execution fails.
*/
public String pathFromMaven(String name) throws MojoExecutionException;
/**
* Convert an Aether coordinate format into a filesystem path.
*
- * @param name the Aether coordinate format (groupId:artifactId[:extension[:classifier]]:version).
- * @return the filesystem path.
+ * @param name The Aether coordinate format (groupId:artifactId[:extension[:classifier]]:version).
+ * @return The filesystem path.
+ * @throws MojoExecutionException If the plugin execution fails.
*/
public String pathFromAether(String name) throws MojoExecutionException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelperFactory.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelperFactory.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelperFactory.java
index f278e7b..e60edf9 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelperFactory.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/DependencyHelperFactory.java
@@ -42,12 +42,12 @@ public class DependencyHelperFactory {
*
* <p>When {@code karaf-maven-plugin} switches to {@code maven-core:3.1.0+}, reflection should be use for Sonatype variant of Aether.</p>
*
- * @param container
- * @param mavenProject
- * @param mavenSession
- * @param log
- * @return
- * @throws MojoExecutionException
+ * @param container The Maven Plexus container to use.
+ * @param mavenProject The Maven project to use.
+ * @param mavenSession The Maven session.
+ * @param log The log to use for the messages.
+ * @return The {@link DependencyHelper} depending of the Maven version used.
+ * @throws MojoExecutionException If the plugin execution fails.
*/
public static DependencyHelper createDependencyHelper(PlexusContainer container, MavenProject mavenProject, MavenSession mavenSession, Log log) throws MojoExecutionException {
try {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java
index f1eb4ec..4d11dd5 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MavenUtil.java
@@ -49,7 +49,7 @@ public class MavenUtil {
* N.B. version is required in mvn urls.
*
* @param name PAX URL mvn format: mvn-uri := [ 'wrap:' ] 'mvn:' [ repository-url '!' ] group-id '/' artifact-id [ '/' [version] [ '/' [type] [ '/' classifier ] ] ] ]
- * @return aether coordinate format: <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
+ * @return aether coordinate format: <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
*/
public static String mvnToAether(String name) {
Matcher m = mvnPattern.matcher(name);
@@ -86,7 +86,7 @@ public class MavenUtil {
* N.B. we do not handle repository-url in mvn urls.
* N.B. version is required in mvn urls.
*
- * @param name aether coordinate format: <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
+ * @param name aether coordinate format: <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
* @return PAX URL mvn format: mvn-uri := 'mvn:' [ repository-url '!' ] group-id '/' artifact-id [ '/' [version] [ '/' [type] [ '/' classifier ] ] ] ]
*/
public static String aetherToMvn(String name) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
----------------------------------------------------------------------
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
index 24a5fef..9910140 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/utils/MojoSupport.java
@@ -212,7 +212,9 @@ public abstract class MojoSupport extends AbstractMojo {
}
/**
- * Required because Maven 3 returns null in {@link ArtifactRepository#getProtocol()} (see KARAF-244)
+ * Required because Maven 3 returns null in {@link ArtifactRepository#getProtocol()} (see KARAF-244).
+ *
+ * @return The protocol extracted from the local Maven repository URL.
*/
private String extractProtocolFromLocalMavenRepo() {
try {
@@ -237,10 +239,10 @@ public abstract class MojoSupport extends AbstractMojo {
/**
* Convert a feature resourceLocation (bundle or configuration file) into an artifact.
*
- * @param resourceLocation the feature resource location (bundle or configuration file).
- * @param skipNonMavenProtocols flag to skip protocol different than mvn:
- * @return the artifact corresponding to the resource.
- * @throws MojoExecutionException
+ * @param resourceLocation The feature resource location (bundle or configuration file).
+ * @param skipNonMavenProtocols A flag to skip protocol different than mvn:
+ * @return The artifact corresponding to the resource.
+ * @throws MojoExecutionException If the plugin execution fails.
*/
protected Artifact resourceToArtifact(String resourceLocation, boolean skipNonMavenProtocols) throws MojoExecutionException {
resourceLocation = resourceLocation.replace("\r\n", "").replace("\n", "").replace(" ", "").replace("\t", "");
@@ -363,10 +365,10 @@ public abstract class MojoSupport extends AbstractMojo {
/**
- * Make sure the target directory exists and
- * that is actually a directory
- * @param targetDir
- * @throws IOException
+ * Make sure the target directory exists and that is actually a directory.
+ *
+ * @param targetDir The target directory.
+ * @throws IOException If the target directory is not actually a directory or can't be created.
*/
private static void ensureDirExists(File targetDir) {
if (!targetDir.exists()) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/util/src/main/java/org/apache/karaf/util/StringEscapeUtils.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/StringEscapeUtils.java b/util/src/main/java/org/apache/karaf/util/StringEscapeUtils.java
index ac0c984..f632a57 100644
--- a/util/src/main/java/org/apache/karaf/util/StringEscapeUtils.java
+++ b/util/src/main/java/org/apache/karaf/util/StringEscapeUtils.java
@@ -134,12 +134,11 @@ public class StringEscapeUtils {
* <p>The only difference between Java strings and JavaScript strings
* is that in JavaScript, a single quote must be escaped.</p>
*
- * <p>Example:
+ * Example:
* <pre>
* input string: He didn't say, "Stop!"
* output string: He didn't say, \"Stop!\"
* </pre>
- * </p>
*
* @param str String to escape values in, may be null
* @return String with escaped values, <code>null</code> if null string input
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/util/src/main/java/org/apache/karaf/util/collections/CopyOnWriteArrayIdentityList.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/collections/CopyOnWriteArrayIdentityList.java b/util/src/main/java/org/apache/karaf/util/collections/CopyOnWriteArrayIdentityList.java
index 9b34352..d9daa86 100644
--- a/util/src/main/java/org/apache/karaf/util/collections/CopyOnWriteArrayIdentityList.java
+++ b/util/src/main/java/org/apache/karaf/util/collections/CopyOnWriteArrayIdentityList.java
@@ -1151,6 +1151,7 @@ public class CopyOnWriteArrayIdentityList<E> implements List<E>, RandomAccess, C
*
* @param ois ObjectInputStream to read object from.
* @throws IOException if an I/O error occur.
+ * @throws ClassNotFoundException If the object class is not found.
*/
private void readObject(ObjectInputStream ois) throws IOException,
ClassNotFoundException {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/util/src/main/java/org/apache/karaf/util/config/PropertiesLoader.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/config/PropertiesLoader.java b/util/src/main/java/org/apache/karaf/util/config/PropertiesLoader.java
index 609957b..cf9a201 100644
--- a/util/src/main/java/org/apache/karaf/util/config/PropertiesLoader.java
+++ b/util/src/main/java/org/apache/karaf/util/config/PropertiesLoader.java
@@ -50,12 +50,13 @@ public class PropertiesLoader {
* The installation directory of Felix is assumed to be the parent
* directory of the <tt>felix.jar</tt> file as found on the system class
* path property. The precise file from which to load configuration
- * properties can be set by initializing the "<tt>felix.config.properties</tt>"
+ * properties can be set by initializing the "<code>felix.config.properties</code>"
* system property to an arbitrary URL.
* </p>
*
- * @return A <tt>Properties</tt> instance or <tt>null</tt> if there was an error.
- * @throws Exception if something wrong occurs
+ * @param file the config file where to load the properties.
+ * @return A <code>Properties</code> instance or <code>null</code> if there was an error.
+ * @throws Exception if something wrong occurs.
*/
public static Properties loadConfigProperties(File file) throws Exception {
// See if the property URL was specified as a property.
@@ -96,8 +97,8 @@ public class PropertiesLoader {
* arbitrary URL.
* </p>
*
- * @param karafBase the karaf base folder
- * @throws IOException
+ * @param file the Karaf base folder.
+ * @throws IOException if the system file can't be loaded.
*/
public static void loadSystemProperties(File file) throws IOException {
Properties props = new Properties(false);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/util/src/main/java/org/apache/karaf/util/maven/Parser.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/maven/Parser.java b/util/src/main/java/org/apache/karaf/util/maven/Parser.java
index 23644c7..289c238 100644
--- a/util/src/main/java/org/apache/karaf/util/maven/Parser.java
+++ b/util/src/main/java/org/apache/karaf/util/maven/Parser.java
@@ -22,7 +22,7 @@ import java.net.MalformedURLException;
import java.util.Map;
/**
- * Parser for mvn: protocol.<br/>
+ * Parser for mvn: protocol.
*
* @author Alin Dreghiciu
* @author Toni Menzel
@@ -122,7 +122,6 @@ public class Parser
* Creates a new protocol parser.
*
* @param path the path part of the url (without starting mvn:)
- *
* @throws MalformedURLException if provided path does not comply to expected syntax or an malformed repository URL
*/
public Parser( final String path )
@@ -151,10 +150,10 @@ public class Parser
}
/**
- * Returns the artifact path from the given maven uri.
- * @param uri the maven uri
- * @return the artifact path
- * @throws MalformedURLException
+ * Return the artifact path from the given maven uri.
+ * @param uri the Maven URI.
+ * @return the artifact actual path.
+ * @throws MalformedURLException in case of "bad" provided URL/URI.
*/
public static String pathFromMaven(String uri) throws MalformedURLException {
if (!uri.startsWith("mvn:")) {
@@ -211,10 +210,9 @@ public class Parser
}
/**
- * Parses the artifact part of the url ( without the repository).
+ * Parse the artifact part of the url (without the repository).
*
* @param part url part without protocol and repository.
- *
* @throws MalformedURLException if provided path does not comply to syntax.
*/
private void parseArtifactPart( final String part )
@@ -259,9 +257,9 @@ public class Parser
}
/**
- * Returns the repository URL if present, null otherwise
+ * Return the repository URL if present, null otherwise.
*
- * @return repository URL
+ * @return repository URL.
*/
public String getRepositoryURL()
{
@@ -269,9 +267,9 @@ public class Parser
}
/**
- * Returns the group id of the artifact.
+ * Return the group id of the artifact.
*
- * @return group Id
+ * @return group ID.
*/
public String getGroup()
{
@@ -279,9 +277,9 @@ public class Parser
}
/**
- * Returns the artifact id.
+ * Return the artifact id.
*
- * @return artifact id
+ * @return artifact id.
*/
public String getArtifact()
{
@@ -289,9 +287,9 @@ public class Parser
}
/**
- * Returns the artifact version.
+ * Return the artifact version.
*
- * @return version
+ * @return version.
*/
public String getVersion()
{
@@ -299,9 +297,9 @@ public class Parser
}
/**
- * Returns the artifact type.
+ * Return the artifact type.
*
- * @return type
+ * @return type.
*/
public String getType()
{
@@ -309,9 +307,9 @@ public class Parser
}
/**
- * Returns the artifact classifier.
+ * Return the artifact classifier.
*
- * @return classifier
+ * @return classifier.
*/
public String getClassifier()
{
@@ -319,9 +317,9 @@ public class Parser
}
/**
- * Returns the complete path to artifact as stated by Maven 2 repository layout.
+ * Return the complete path to artifact as stated by Maven 2 repository layout.
*
- * @return artifact path
+ * @return artifact path.
*/
public String getArtifactPath()
{
@@ -329,11 +327,10 @@ public class Parser
}
/**
- * Returns the complete path to artifact as stated by Maven 2 repository layout.
+ * Return the complete path to artifact as stated by Maven 2 repository layout.
*
* @param version The version of the artifact.
- *
- * @return artifact path
+ * @return artifact path.
*/
public String getArtifactPath( final String version )
{
@@ -354,13 +351,12 @@ public class Parser
}
/**
- * Returns the version for an artifact for a snapshot version.
+ * Return the version for an artifact for a snapshot version.
*
- * @param version The version of the snapshot.
- * @param timestamp The timestamp of the snapshot.
+ * @param version The version of the snapshot.
+ * @param timestamp The timestamp of the snapshot.
* @param buildnumber The buildnumber of the snapshot.
- *
- * @return artifact path
+ * @return artifact path.
*/
public String getSnapshotVersion( final String version, final String timestamp, final String buildnumber )
{
@@ -368,13 +364,12 @@ public class Parser
}
/**
- * Returns the complete path to artifact for a snapshot file.
+ * Return the complete path to artifact for a snapshot file.
*
- * @param version The version of the snapshot.
- * @param timestamp The timestamp of the snapshot.
+ * @param version The version of the snapshot.
+ * @param timestamp The timestamp of the snapshot.
* @param buildnumber The buildnumber of the snapshot.
- *
- * @return artifact path
+ * @return artifact path.
*/
public String getSnapshotPath( final String version, final String timestamp, final String buildnumber )
{
@@ -395,11 +390,10 @@ public class Parser
}
/**
- * Returns the path to metdata file corresponding to this artifact version.
+ * Return the path to metadata file corresponding to this artifact version.
*
* @param version The version of the the metadata.
- *
- * @return metadata file path
+ * @return metadata file path.
*/
public String getVersionMetadataPath( final String version )
{
@@ -415,11 +409,10 @@ public class Parser
}
/**
- * Returns the path to local metdata file corresponding to this artifact version.
+ * Return the path to local metadata file corresponding to this artifact version.
*
* @param version The version of the the metadata.
- *
- * @return metadata file path
+ * @return metadata file path.
*/
public String getVersionLocalMetadataPath( final String version )
{
@@ -435,9 +428,9 @@ public class Parser
}
/**
- * Returns the complete path to artifact local metadata file.
+ * Return the complete path to artifact local metadata file.
*
- * @return artifact path
+ * @return artifact path.
*/
public String getArtifactLocalMetdataPath()
{
@@ -451,9 +444,9 @@ public class Parser
}
/**
- * Returns the complete path to artifact metadata file.
+ * Return the complete path to artifact metadata file.
*
- * @return artifact path
+ * @return artifact path.
*/
public String getArtifactMetdataPath()
{
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/util/src/main/java/org/apache/karaf/util/process/PumpStreamHandler.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/process/PumpStreamHandler.java b/util/src/main/java/org/apache/karaf/util/process/PumpStreamHandler.java
index 76d09e6..6e2eeb2 100644
--- a/util/src/main/java/org/apache/karaf/util/process/PumpStreamHandler.java
+++ b/util/src/main/java/org/apache/karaf/util/process/PumpStreamHandler.java
@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package org.apache.karaf.util.process;
import java.io.InputStream;
@@ -26,8 +25,8 @@ import java.io.IOException;
/**
* Copies standard output and error of children streams to standard output and error of the parent.
*/
-public class PumpStreamHandler
-{
+public class PumpStreamHandler {
+
private final InputStream in;
private final OutputStream out;
@@ -72,6 +71,8 @@ public class PumpStreamHandler
/**
* Set the input stream from which to read the standard output of the child.
+ *
+ * @param in the the child output stream.
*/
public void setChildOutputStream(final InputStream in) {
assert in != null;
@@ -81,6 +82,8 @@ public class PumpStreamHandler
/**
* Set the input stream from which to read the standard error of the child.
+ *
+ * @param in set the child error stream.
*/
public void setChildErrorStream(final InputStream in) {
assert in != null;
@@ -92,6 +95,8 @@ public class PumpStreamHandler
/**
* Set the output stream by means of which input can be sent to the child.
+ *
+ * @param out set the child output stream.
*/
public void setChildInputStream(final OutputStream out) {
assert out != null;
@@ -109,7 +114,7 @@ public class PumpStreamHandler
/**
* Attach to a child streams from the given process.
*
- * @param p The process to attach to.
+ * @param p The process to attach to.
*/
public void attach(final Process p) {
assert p != null;
@@ -118,6 +123,7 @@ public class PumpStreamHandler
setChildOutputStream(p.getInputStream());
setChildErrorStream(p.getErrorStream());
}
+
/**
* Start pumping the streams.
*/
@@ -191,6 +197,9 @@ public class PumpStreamHandler
/**
* Create the pump to handle child output.
+ *
+ * @param in the child input stream.
+ * @param out the child output stream.
*/
protected void createChildOutputPump(final InputStream in, final OutputStream out) {
assert in != null;
@@ -201,6 +210,9 @@ public class PumpStreamHandler
/**
* Create the pump to handle error output.
+ *
+ * @param in the child input stream.
+ * @param out the child output stream.
*/
protected void createChildErrorPump(final InputStream in, final OutputStream out) {
assert in != null;
@@ -210,7 +222,11 @@ public class PumpStreamHandler
}
/**
- * Creates a stream pumper to copy the given input stream to the given output stream.
+ * Create a stream pumper to copy the given input stream to the given output stream.
+ *
+ * @param in the child input stream.
+ * @param out the child output stream.
+ * @return A thread object that does the pumping.
*/
protected StreamPumper createPump(final InputStream in, final OutputStream out) {
assert in != null;
@@ -220,13 +236,13 @@ public class PumpStreamHandler
}
/**
- * Creates a stream pumper to copy the given input stream to the
+ * Create a stream pumper to copy the given input stream to the
* given output stream.
*
- * @param in The input stream to copy from.
- * @param out The output stream to copy to.
- * @param closeWhenExhausted If true close the inputstream.
- * @return A thread object that does the pumping.
+ * @param in The input stream to copy from.
+ * @param out The output stream to copy to.
+ * @param closeWhenExhausted If true close the input stream.
+ * @return A thread object that does the pumping.
*/
protected StreamPumper createPump(final InputStream in, final OutputStream out, final boolean closeWhenExhausted) {
assert in != null;
@@ -237,8 +253,13 @@ public class PumpStreamHandler
}
/**
- * Creates a stream pumper to copy the given input stream to the
+ * Create a stream pumper to copy the given input stream to the
* given output stream. Used for standard input.
+ *
+ * @param in The input stream to copy from.
+ * @param out The output stream to copy to.
+ * @param closeWhenExhausted If true close the input stream.
+ * @return A thread object that does the pumping.
*/
protected StreamPumper createInputPump(final InputStream in, final OutputStream out, final boolean closeWhenExhausted) {
assert in != null;
@@ -257,4 +278,5 @@ public class PumpStreamHandler
public StreamPumper getErrorPump() {
return this.errorPump;
}
+
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java b/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java
index b49cdae..3001442 100644
--- a/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java
+++ b/util/src/main/java/org/apache/karaf/util/process/StreamPumper.java
@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package org.apache.karaf.util.process;
import java.io.InputStream;
@@ -26,8 +25,8 @@ import java.io.IOException;
/**
* Copies all data from an input stream to an output stream.
*/
-public class StreamPumper implements Runnable
-{
+public class StreamPumper implements Runnable {
+
private InputStream in;
private OutputStream out;
@@ -53,10 +52,9 @@ public class StreamPumper implements Runnable
/**
* Create a new stream pumper.
*
- * @param in Input stream to read data from
- * @param out Output stream to write data to.
- * @param closeWhenExhausted If true, the output stream will be closed when
- * the input is exhausted.
+ * @param in The input stream to read data from.
+ * @param out The output stream to write data to.
+ * @param closeWhenExhausted If true, the output stream will be closed when the input is exhausted.
*/
public StreamPumper(final InputStream in, final OutputStream out, final boolean closeWhenExhausted) {
assert in != null;
@@ -70,8 +68,8 @@ public class StreamPumper implements Runnable
/**
* Create a new stream pumper.
*
- * @param in Input stream to read data from
- * @param out Output stream to write data to.
+ * @param in The input stream to read data from.
+ * @param out The output stream to write data to.
*/
public StreamPumper(final InputStream in, final OutputStream out) {
this(in, out, false);
@@ -88,7 +86,7 @@ public class StreamPumper implements Runnable
/**
* Set whether data should be flushed through to the output stream.
*
- * @param autoflush If true, push through data; if false, let it be buffered
+ * @param autoflush If true, push through data; if false, let it be buffered.
*/
public void setAutoflush(boolean autoflush) {
this.autoflush = autoflush;
@@ -96,16 +94,17 @@ public class StreamPumper implements Runnable
/**
* Set whether data should be read in a non blocking way.
- * @param nonBlocking If true, data will be read in a non blocking mode
+ *
+ * @param nonBlocking If true, data will be read in a non blocking mode.
*/
public void setNonBlocking(boolean nonBlocking) {
this.nonBlocking = nonBlocking;
}
/**
- * Copies data from the input stream to the output stream.
+ * Copy data from the input stream to the output stream.
*
- * Terminates as soon as the input stream is closed or an error occurs.
+ * Terminate as soon as the input stream is closed or an error occurs.
*/
public void run() {
synchronized (this) {
@@ -175,9 +174,9 @@ public class StreamPumper implements Runnable
}
/**
- * Tells whether the end of the stream has been reached.
+ * Tell whether the end of the stream has been reached.
*
- * @return true If the stream has been exhausted.
+ * @return true if the stream has been exhausted.
*/
public synchronized boolean isFinished() {
return finished;
@@ -187,6 +186,7 @@ public class StreamPumper implements Runnable
* This method blocks until the stream pumper finishes.
*
* @see #isFinished()
+ * @throws InterruptedException if the stream pumper has been interrupted.
*/
public synchronized void waitFor() throws InterruptedException {
while (!isFinished()) {
@@ -198,7 +198,6 @@ public class StreamPumper implements Runnable
* Set the size in bytes of the read buffer.
*
* @param bufferSize the buffer size to use.
- * @throws IllegalStateException if the StreamPumper is already running.
*/
public synchronized void setBufferSize(final int bufferSize) {
if (started) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/util/src/main/java/org/apache/karaf/util/tracker/BaseActivator.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/tracker/BaseActivator.java b/util/src/main/java/org/apache/karaf/util/tracker/BaseActivator.java
index e3e39d4..a1e8a6d 100644
--- a/util/src/main/java/org/apache/karaf/util/tracker/BaseActivator.java
+++ b/util/src/main/java/org/apache/karaf/util/tracker/BaseActivator.java
@@ -129,7 +129,9 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doOpen()}
+ * Called in {@link #doOpen()}.
+ *
+ * @param pid The configuration PID to manage (ManagedService).
*/
protected void manage(String pid) {
Hashtable<String, Object> props = new Hashtable<>();
@@ -146,8 +148,13 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
protected Dictionary<String, ?> getConfiguration() {
return configuration;
}
+
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param key The configuration key
+ * @param def The default value.
+ * @return The value of the configuration key if found, the default value else.
*/
protected int getInt(String key, int def) {
if (configuration != null) {
@@ -162,7 +169,11 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param key The configuration key.
+ * @param def The default value.
+ * @return The value of the configuration key if found, the default value else.
*/
protected boolean getBoolean(String key, boolean def) {
if (configuration != null) {
@@ -177,7 +188,11 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param key The configuration key.
+ * @param def The default value.
+ * @return The value of the configuration key if found, the default value else.
*/
protected long getLong(String key, long def) {
if (configuration != null) {
@@ -192,7 +207,11 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param key The configuration key.
+ * @param def The default value.
+ * @return The value of the configuration key if found, the default value else.
*/
protected String getString(String key, String def) {
if (configuration != null) {
@@ -238,7 +257,10 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doOpen()}
+ * Called in {@link #doOpen()}.
+ *
+ * @param clazz The service interface to track.
+ * @throws InvalidSyntaxException If the tracker syntax is not correct.
*/
protected void trackService(Class<?> clazz) throws InvalidSyntaxException {
if (!trackers.containsKey(clazz.getName())) {
@@ -249,7 +271,11 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doOpen()}
+ * Called in {@link #doOpen()}.
+ *
+ * @param clazz The service interface to track.
+ * @param filter The filter to use to select the services to track.
+ * @throws InvalidSyntaxException If the tracker syntax is not correct (in the filter especially).
*/
protected void trackService(Class<?> clazz, String filter) throws InvalidSyntaxException {
if (!trackers.containsKey(clazz.getName())) {
@@ -271,7 +297,11 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param clazz The service interface to get.
+ * @param <T> The service type.
+ * @return The actual tracker service object.
*/
protected <T> T getTrackedService(Class<T> clazz) {
SingleServiceTracker tracker = trackers.get(clazz.getName());
@@ -282,7 +312,10 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param mbean The MBean to register.
+ * @param type The MBean type to register.
*/
protected void registerMBean(Object mbean, String type) {
Hashtable<String, Object> props = new Hashtable<>();
@@ -291,28 +324,44 @@ public class BaseActivator implements BundleActivator, SingleServiceTracker.Sing
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param clazz The service interface to register.
+ * @param <T> The service type.
+ * @param service The actual service instance to register.
*/
protected <T> void register(Class<T> clazz, T service) {
register(clazz, service, null);
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param clazz The service interface to register.
+ * @param <T> The service type.
+ * @param service The actual service instance to register.
+ * @param props The service properties to register.
*/
protected <T> void register(Class<T> clazz, T service, Dictionary<String, ?> props) {
trackRegistration(bundleContext.registerService(clazz, service, props));
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param clazz The service interfaces to register.
+ * @param service The actual service instance to register.
*/
protected void register(Class[] clazz, Object service) {
register(clazz, service, null);
}
/**
- * Called in {@link #doStart()}
+ * Called in {@link #doStart()}.
+ *
+ * @param clazz The service interfaces to register.
+ * @param service The actual service instance to register.
+ * @param props The service properties to register.
*/
protected void register(Class[] clazz, Object service, Dictionary<String, ?> props) {
String[] names = new String[clazz.length];
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/util/src/main/java/org/apache/karaf/util/tracker/SingleServiceTracker.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/karaf/util/tracker/SingleServiceTracker.java b/util/src/main/java/org/apache/karaf/util/tracker/SingleServiceTracker.java
index 890d44c..d46d829 100644
--- a/util/src/main/java/org/apache/karaf/util/tracker/SingleServiceTracker.java
+++ b/util/src/main/java/org/apache/karaf/util/tracker/SingleServiceTracker.java
@@ -16,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-
-
package org.apache.karaf.util.tracker;
import java.util.Arrays;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/web/src/main/java/org/apache/karaf/web/WebContainerService.java
----------------------------------------------------------------------
diff --git a/web/src/main/java/org/apache/karaf/web/WebContainerService.java b/web/src/main/java/org/apache/karaf/web/WebContainerService.java
index 7ec1ee7..791230a 100644
--- a/web/src/main/java/org/apache/karaf/web/WebContainerService.java
+++ b/web/src/main/java/org/apache/karaf/web/WebContainerService.java
@@ -57,10 +57,10 @@ public interface WebContainerService {
void stop(List<Long> bundleIds) throws Exception;
/**
- * Retrieves the Web-ContextPath of the corresponding bundle
+ * Retrieve the Web-ContextPath of the corresponding bundle.
*
- * @param id of the bundle.
- * @return
+ * @param id The ID of the bundle.
+ * @return The web context associated with the given bundle.
*/
String getWebContextPath(Long id);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/web/src/main/java/org/apache/karaf/web/management/WebMBean.java
----------------------------------------------------------------------
diff --git a/web/src/main/java/org/apache/karaf/web/management/WebMBean.java b/web/src/main/java/org/apache/karaf/web/management/WebMBean.java
index 5c6df22..b9a0b5c 100644
--- a/web/src/main/java/org/apache/karaf/web/management/WebMBean.java
+++ b/web/src/main/java/org/apache/karaf/web/management/WebMBean.java
@@ -29,7 +29,7 @@ public interface WebMBean {
* Return the list of web bundles.
*
* @return a tabular data of web bundles.
- * @throws Exception in case of lookup failure.
+ * @throws MBeanException in case of lookup failure.
*/
TabularData getWebBundles() throws MBeanException;
@@ -37,7 +37,7 @@ public interface WebMBean {
* Start web context of the given web bundle (identified by ID).
*
* @param bundleId the bundle ID.
- * @throws MBeanException
+ * @throws MBeanException in case of start failure.
*/
void start(Long bundleId) throws MBeanException;
@@ -46,7 +46,7 @@ public interface WebMBean {
*
* @param bundleIds the list of bundle IDs.
* TODO use a BundleSelector service
- * @throws Exception in case of start failure.
+ * @throws MBeanException in case of start failure.
*/
void start(List<Long> bundleIds) throws MBeanException;
@@ -54,7 +54,7 @@ public interface WebMBean {
* Stop web context of the given web bundle (identified by ID).
*
* @param bundleId the bundle ID.
- * @throws MBeanException
+ * @throws MBeanException in case of stop failure.
*/
void stop(Long bundleId) throws MBeanException;
@@ -63,7 +63,7 @@ public interface WebMBean {
*
* @param bundleIds the list of bundle IDs.
* TODO use a BundleSelector service
- * @throws Exception in case of stop failure
+ * @throws MBeanException in case of stop failure
*/
void stop(List<Long> bundleIds) throws MBeanException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/wrapper/src/main/java/org/apache/karaf/wrapper/WrapperService.java
----------------------------------------------------------------------
diff --git a/wrapper/src/main/java/org/apache/karaf/wrapper/WrapperService.java b/wrapper/src/main/java/org/apache/karaf/wrapper/WrapperService.java
index 78a0877..814e9a2 100644
--- a/wrapper/src/main/java/org/apache/karaf/wrapper/WrapperService.java
+++ b/wrapper/src/main/java/org/apache/karaf/wrapper/WrapperService.java
@@ -25,6 +25,8 @@ public interface WrapperService {
/**
* Install the Karaf container as a system service in the OS.
+ *
+ * @throws Exception If the wrapper install fails.
*/
public void install() throws Exception;
@@ -35,7 +37,8 @@ public interface WrapperService {
* @param displayName The display name of the service.
* @param description The description of the service.
* @param startType Mode in which the service is installed. AUTO_START or DEMAND_START.
- * @return an array containing the wrapper configuration file (index 0) and the service file (index 1)
+ * @return An array containing the wrapper configuration file (index 0) and the service file (index 1).
+ * @throws Exception If the wrapper install fails.
*/
public File[] install(String name, String displayName, String description, String startType) throws Exception;
@@ -48,7 +51,8 @@ public interface WrapperService {
* @param startType Mode in which the service is installed. AUTO_START or DEMAND_START.
* @param envs The environment variable and values
* @param includes The include statement for JSW wrapper conf
- * @return an array containing the wrapper configuration file (index 0) and the service file (index 1)
+ * @return An array containing the wrapper configuration file (index 0) and the service file (index 1).
+ * @throws Exception If the wrapper install fails.
*/
public File[] install(String name, String displayName, String description, String startType, String[] envs, String[] includes) throws Exception;
[4/5] karaf git commit: KARAF-4392 - Upgrade to maven-javadoc-plugin
2.10.3 and clean javadoc comments
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
index e5bb14e..b85b68c 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeaturesServiceImpl.java
@@ -989,6 +989,12 @@ public class FeaturesServiceImpl implements FeaturesService, Deployer.DeployCall
* The reason is that if the console is refreshed, the current thread which is running
* the command may be interrupted while waiting for the refresh to be done, leading
* to bundles not being started after the refresh.
+ *
+ * @param requirements the provided requirements to match.
+ * @param stateChanges the current features state.
+ * @param state the current provisioning state.
+ * @param options the provisioning options.
+ * @throws Exception in case of provisioning failure.
*/
public void doProvisionInThread(final Map<String, Set<String>> requirements,
final Map<String, Map<String, FeatureState>> stateChanges,
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/service/Overrides.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/Overrides.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/Overrides.java
index 4e171e1..c703fd0 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/Overrides.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/Overrides.java
@@ -50,23 +50,24 @@ public final class Overrides {
}
/**
- * Compute a list of bundles to install, taking into account overrides.
- * <p/>
- * The file containing the overrides will be loaded from the given url.
+ * <p>Compute a list of bundles to install, taking into account overrides</p>.
+ *
+ * <p>The file containing the overrides will be loaded from the given url.
* Blank lines and lines starting with a '#' will be ignored, all other lines
- * are considered as urls to override bundles.
- * <p/>
- * The list of resources to resolve will be scanned and for each bundle,
- * if a bundle override matches that resource, it will be used instead.
- * <p/>
- * Matching is done on bundle symbolic name (they have to be the same)
+ * are considered as urls to override bundles.</p>
+ *
+ * <p>The list of resources to resolve will be scanned and for each bundle,
+ * if a bundle override matches that resource, it will be used instead.</p>
+ *
+ * <p>Matching is done on bundle symbolic name (they have to be the same)
* and version (the bundle override version needs to be greater than the
* resource to be resolved, and less than the next minor version. A range
* directive can be added to the override url in which case, the matching
- * will succeed if the resource to be resolved is within the given range.
+ * will succeed if the resource to be resolved is within the given range.</p>
*
* @param resources the list of resources to resolve
* @param overrides list of bundle overrides
+ * @param <T> the resource type.
*/
public static <T extends Resource> void override(Map<String, T> resources, Collection<String> overrides) {
// Do override replacement
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/service/RequirementSort.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/RequirementSort.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/RequirementSort.java
index 99cb12f..7f32943 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/RequirementSort.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/RequirementSort.java
@@ -35,7 +35,11 @@ public final class RequirementSort<T extends Resource> {
}
/**
- * Sorts {@link Resource} based on their {@link Requirement}s and {@link Capability}s.
+ * Sort {@link Resource} based on their {@link Requirement}s and {@link Capability}s.
+ *
+ * @param resources the resource to sort.
+ * @param <T> the resources type.
+ * @return sorted collection of resources.
*/
public static <T extends Resource> Collection<T> sort(Collection<T> resources) {
Set<String> namespaces = new HashSet<String>();
@@ -58,7 +62,6 @@ public final class RequirementSort<T extends Resource> {
return sorted;
}
-
private static <T extends Resource> void visit(T resource, Set<T> visited, Set<T> sorted, CapabilitySet capSet) {
if (!visited.add(resource)) {
return;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/util/ChecksumUtils.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/util/ChecksumUtils.java b/features/core/src/main/java/org/apache/karaf/features/internal/util/ChecksumUtils.java
index 931d5dd..bcd3ca5 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/util/ChecksumUtils.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/util/ChecksumUtils.java
@@ -32,6 +32,7 @@ public final class ChecksumUtils {
*
* @param is the input stream
* @return a checksum identifying any change
+ * @throws IOException in case of checksum failure.
*/
public static long checksum(InputStream is) throws IOException {
CRC32 crc = new CRC32();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/http/src/main/java/org/apache/karaf/http/core/HttpMBean.java
----------------------------------------------------------------------
diff --git a/http/src/main/java/org/apache/karaf/http/core/HttpMBean.java b/http/src/main/java/org/apache/karaf/http/core/HttpMBean.java
index bebbd29..eddc647 100644
--- a/http/src/main/java/org/apache/karaf/http/core/HttpMBean.java
+++ b/http/src/main/java/org/apache/karaf/http/core/HttpMBean.java
@@ -27,8 +27,8 @@ public interface HttpMBean {
/**
* List details for servlets.
*
- * @return a tabular view of the servlets information.
- * @throws Exception
+ * @return A {@link TabularData} containing the servlets information.
+ * @throws MBeanException In case of MBean failure.
*/
TabularData getServlets() throws MBeanException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/instance/src/main/java/org/apache/karaf/jpm/Process.java
----------------------------------------------------------------------
diff --git a/instance/src/main/java/org/apache/karaf/jpm/Process.java b/instance/src/main/java/org/apache/karaf/jpm/Process.java
index 2bd3b36..4f04d1a 100644
--- a/instance/src/main/java/org/apache/karaf/jpm/Process.java
+++ b/instance/src/main/java/org/apache/karaf/jpm/Process.java
@@ -40,7 +40,7 @@ public interface Process extends Serializable {
/**
* Destroy the process.
*
- * @throws IOException
+ * @throws IOException If an error occurs.
*/
void destroy() throws IOException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/instance/src/main/java/org/apache/karaf/jpm/ProcessBuilder.java
----------------------------------------------------------------------
diff --git a/instance/src/main/java/org/apache/karaf/jpm/ProcessBuilder.java b/instance/src/main/java/org/apache/karaf/jpm/ProcessBuilder.java
index 2b6c612..7b81bf2 100644
--- a/instance/src/main/java/org/apache/karaf/jpm/ProcessBuilder.java
+++ b/instance/src/main/java/org/apache/karaf/jpm/ProcessBuilder.java
@@ -25,34 +25,35 @@ import java.io.IOException;
public interface ProcessBuilder {
/**
- * Specified the current directory to run the command from
+ * Specify the current directory to run the command from.
*
- * @param dir the directory to run the command from
- * @return the ProcessBuilder instance
+ * @param dir The directory to run the command from.
+ * @return The {@link ProcessBuilder} instance.
*/
ProcessBuilder directory(File dir);
/**
- * Set the command to execute
+ * Set the command to execute.
*
- * @param command the command to execute
- * @return the ProcessBuilder instance
+ * @param command The command to execute.
+ * @return The {@link ProcessBuilder} instance.
*/
ProcessBuilder command(String command);
/**
- * Create and start the process
+ * Create and start the process.
*
- * @return the process that has been started
- * @throws IOException if the process can not be created
+ * @return The process that has been started.
+ * @throws IOException If the process can not be created.
*/
org.apache.karaf.jpm.Process start() throws IOException;
/**
- * Attach to an existing process
+ * Attach to an existing process.
*
- * @return the process that has been attached
- * @throws IOException if the process can not be attached to
+ * @param pid The process PID to attach.
+ * @return The process that has been attached.
+ * @throws IOException if the process can not be attached to.
*/
org.apache.karaf.jpm.Process attach(int pid) throws IOException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleAddCommand.java
----------------------------------------------------------------------
diff --git a/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleAddCommand.java b/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleAddCommand.java
index f943be9..e5ad405 100644
--- a/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleAddCommand.java
+++ b/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleAddCommand.java
@@ -30,13 +30,6 @@ public class RoleAddCommand extends JaasCommandSupport {
@Argument(index = 1, name = "role", description = "Role", required = true, multiValued = false)
private String role;
- /**
- * Execute the RoleAddCommand in the given Excecution Context.
- *
- * @param engine
- * @return
- * @throws Exception
- */
@Override
protected Object doExecute(BackingEngine engine) throws Exception {
engine.addRole(username, role);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleDeleteCommand.java
----------------------------------------------------------------------
diff --git a/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleDeleteCommand.java b/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleDeleteCommand.java
index 8a9d223..845ef37 100644
--- a/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleDeleteCommand.java
+++ b/jaas/command/src/main/java/org/apache/karaf/jaas/command/RoleDeleteCommand.java
@@ -30,13 +30,6 @@ public class RoleDeleteCommand extends JaasCommandSupport {
@Argument(index = 1, name = "role", description = "Role", required = true, multiValued = false)
private String role;
- /**
- * Execute the RoleDeleteCommand in the given Excecution Context.
- *
- * @param engine
- * @return
- * @throws Exception
- */
@Override
protected Object doExecute(BackingEngine engine) throws Exception {
engine.deleteRole(username, role);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserAddCommand.java
----------------------------------------------------------------------
diff --git a/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserAddCommand.java b/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserAddCommand.java
index 3854f1d..0a0898c 100644
--- a/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserAddCommand.java
+++ b/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserAddCommand.java
@@ -30,13 +30,6 @@ public class UserAddCommand extends JaasCommandSupport {
@Argument(index = 1, name = "password", description = "Password", required = true, multiValued = false)
private String password;
- /**
- * Execute the RoleAddCommand in the given Excecution Context.
- *
- * @param engine
- * @return
- * @throws Exception
- */
@Override
protected Object doExecute(BackingEngine engine) throws Exception {
engine.addUser(username, password);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserDeleteCommand.java
----------------------------------------------------------------------
diff --git a/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserDeleteCommand.java b/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserDeleteCommand.java
index ba4631f..7bd8a92 100644
--- a/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserDeleteCommand.java
+++ b/jaas/command/src/main/java/org/apache/karaf/jaas/command/UserDeleteCommand.java
@@ -27,13 +27,6 @@ public class UserDeleteCommand extends JaasCommandSupport {
@Argument(index = 0, name = "username", description = "User Name", required = true, multiValued = false)
private String username;
- /**
- * Execute the RoleAddCommand in the given Excecution Context.
- *
- * @param engine
- * @return
- * @throws Exception
- */
@Override
protected Object doExecute(BackingEngine engine) throws Exception {
engine.deleteUser(username);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/config/src/main/java/org/apache/karaf/jaas/config/KeystoreManager.java
----------------------------------------------------------------------
diff --git a/jaas/config/src/main/java/org/apache/karaf/jaas/config/KeystoreManager.java b/jaas/config/src/main/java/org/apache/karaf/jaas/config/KeystoreManager.java
index 4086663..9742d8d 100644
--- a/jaas/config/src/main/java/org/apache/karaf/jaas/config/KeystoreManager.java
+++ b/jaas/config/src/main/java/org/apache/karaf/jaas/config/KeystoreManager.java
@@ -32,20 +32,21 @@ public interface KeystoreManager {
KeystoreInstance getKeystore(String name);
/**
- * Gets a SSLContext using one Keystore to access the private key
+ * Get a SSLContext using one Keystore to access the private key
* and another to provide the list of trusted certificate authorities.
- * @param provider
- * @param protocol The SSL protocol to use
- * @param algorithm The SSL algorithm to use
- * @param keyStore The key keystore name as provided by listKeystores. The
+ *
+ * @param provider the SSL provider to use.
+ * @param protocol the SSL protocol to use.
+ * @param algorithm the SSL algorithm to use.
+ * @param keyStore the key keystore name as provided by listKeystores. The
* KeystoreInstance for this keystore must be unlocked.
- * @param keyAlias The name of the private key in the keystore. The
+ * @param keyAlias the name of the private key in the keystore. The
* KeystoreInstance for this keystore must have unlocked
* this key.
* @param trustStore The trust keystore name as provided by listKeystores.
* The KeystoreInstance for this keystore must have
* unlocked this key.
- *
+ * @return the SSLContext.
* @throws KeystoreIsLocked Occurs when the requested key keystore cannot
* be used because it has not been unlocked.
* @throws KeyIsLocked Occurs when the requested private key in the key
@@ -57,9 +58,10 @@ public interface KeystoreManager {
String keyAlias, String trustStore) throws GeneralSecurityException;
/**
- * Gets a SSLContext using one Keystore to access the private key
+ * Get a SSLContext using one Keystore to access the private key
* and another to provide the list of trusted certificate authorities.
- * @param provider
+ *
+ * @param provider the SSL provider to use.
* @param protocol The SSL protocol to use
* @param algorithm The SSL algorithm to use
* @param keyStore The key keystore name as provided by listKeystores. The
@@ -71,12 +73,8 @@ public interface KeystoreManager {
* The KeystoreInstance for this keystore must have
* unlocked this key.
* @param timeout Amount of time waiting for the keyStore and keyAlias to be available.
- *
- * @throws KeystoreIsLocked Occurs when the requested key keystore cannot
- * be used because it has not been unlocked.
- * @throws KeyIsLocked Occurs when the requested private key in the key
- * keystore cannot be used because it has not been
- * unlocked.
+ * @return the SSLContext.
+ * @throws GeneralSecurityException General security failure.
*/
SSLContext createSSLContext(String provider, String protocol,
String algorithm, String keyStore,
@@ -84,36 +82,32 @@ public interface KeystoreManager {
long timeout) throws GeneralSecurityException;
/**
- * Gets a ServerSocketFactory using one Keystore to access the private key
+ * Get a ServerSocketFactory using one Keystore to access the private key
* and another to provide the list of trusted certificate authorities.
- * @param provider
- * @param protocol The SSL protocol to use
- * @param algorithm The SSL algorithm to use
- * @param keyStore The key keystore name as provided by listKeystores. The
+ * @param provider the SSL provider to use.
+ * @param protocol The SSL protocol to use.
+ * @param algorithm The SSL algorithm to use.
+ * @param keyStore The key keystore name as provided by listKeystores. The
* KeystoreInstance for this keystore must be unlocked.
- * @param keyAlias The name of the private key in the keystore. The
+ * @param keyAlias The name of the private key in the keystore. The
* KeystoreInstance for this keystore must have unlocked
* this key.
* @param trustStore The trust keystore name as provided by listKeystores.
* The KeystoreInstance for this keystore must have
* unlocked this key.
- *
- * @throws KeystoreIsLocked Occurs when the requested key keystore cannot
- * be used because it has not been unlocked.
- * @throws KeyIsLocked Occurs when the requested private key in the key
- * keystore cannot be used because it has not been
- * unlocked.
+ * @return the SSLServerSocketFactory.
+ * @throws GeneralSecurityException General security failure.
*/
SSLServerSocketFactory createSSLServerFactory(String provider, String protocol,
String algorithm, String keyStore,
String keyAlias, String trustStore) throws GeneralSecurityException;
/**
- * Gets a ServerSocketFactory using one Keystore to access the private key
+ * Get a ServerSocketFactory using one Keystore to access the private key
* and another to provide the list of trusted certificate authorities.
- * @param provider
- * @param protocol The SSL protocol to use
- * @param algorithm The SSL algorithm to use
+ * @param provider the SSL provider to use.
+ * @param protocol The SSL protocol to use.
+ * @param algorithm The SSL algorithm to use.
* @param keyStore The key keystore name as provided by listKeystores. The
* KeystoreInstance for this keystore must be unlocked.
* @param keyAlias The name of the private key in the keystore. The
@@ -123,12 +117,8 @@ public interface KeystoreManager {
* The KeystoreInstance for this keystore must have
* unlocked this key.
* @param timeout Amount of time to wait for keyStore and keyAlias to be available.
- *
- * @throws KeystoreIsLocked Occurs when the requested key keystore cannot
- * be used because it has not been unlocked.
- * @throws KeyIsLocked Occurs when the requested private key in the key
- * keystore cannot be used because it has not been
- * unlocked.
+ * @return the SSLServerSocketFactory.
+ * @throws GeneralSecurityException General security failure.
*/
SSLServerSocketFactory createSSLServerFactory(String provider, String protocol,
String algorithm, String keyStore,
@@ -136,33 +126,34 @@ public interface KeystoreManager {
long timeout) throws GeneralSecurityException;
/**
- * Gets a SocketFactory using one Keystore to access the private key
+ * Get a SocketFactory using one Keystore to access the private key
* and another to provide the list of trusted certificate authorities.
- * @param provider The SSL provider to use, or null for the default
- * @param protocol The SSL protocol to use
- * @param algorithm The SSL algorithm to use
- * @param keyStore The key keystore name as provided by listKeystores. The
+ *
+ * @param provider the SSL provider to use, or null for the default.
+ * @param protocol the SSL protocol to use.
+ * @param algorithm the SSL algorithm to use.
+ * @param keyStore the key keystore name as provided by listKeystores. The
* KeystoreInstance for this keystore must be unlocked.
- * @param keyAlias The name of the private key in the keystore. The
+ * @param keyAlias the name of the private key in the keystore. The
* KeystoreInstance for this keystore must have unlocked
* this key.
- * @param trustStore The trust keystore name as provided by listKeystores.
+ * @param trustStore the trust keystore name as provided by listKeystores.
* The KeystoreInstance for this keystore must have
* unlocked this key.
- *
+ * @return the SSLSocketFactory.
* @throws KeystoreIsLocked Occurs when the requested key keystore cannot
* be used because it has not been unlocked.
* @throws KeyIsLocked Occurs when the requested private key in the key
* keystore cannot be used because it has not been
* unlocked.
- * @throws GeneralSecurityException
+ * @throws GeneralSecurityException General security failure.
*/
SSLSocketFactory createSSLFactory(String provider, String protocol,
String algorithm, String keyStore,
String keyAlias, String trustStore) throws GeneralSecurityException;
/**
- * Gets a SocketFactory using one Keystore to access the private key
+ * Get a SocketFactory using one Keystore to access the private key
* and another to provide the list of trusted certificate authorities.
* @param provider The SSL provider to use, or null for the default
* @param protocol The SSL protocol to use
@@ -176,13 +167,13 @@ public interface KeystoreManager {
* The KeystoreInstance for this keystore must have
* unlocked this key.
* @param timeout Amount of time to wait for keyStore and keyAlias to be available.
- *
+ * @return the SSLSocketFactory.
* @throws KeystoreIsLocked Occurs when the requested key keystore cannot
* be used because it has not been unlocked.
* @throws KeyIsLocked Occurs when the requested private key in the key
* keystore cannot be used because it has not been
* unlocked.
- * @throws GeneralSecurityException
+ * @throws GeneralSecurityException General security failure.
*/
SSLSocketFactory createSSLFactory(String provider, String protocol,
String algorithm, String keyStore,
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
----------------------------------------------------------------------
diff --git a/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java b/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
index 9ced5fa..3c6223c 100644
--- a/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
+++ b/jaas/config/src/main/java/org/apache/karaf/jaas/config/impl/ResourceKeystoreInstance.java
@@ -46,9 +46,6 @@ import org.apache.karaf.jaas.config.KeystoreIsLocked;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-/**
- *
- */
public class ResourceKeystoreInstance implements KeystoreInstance {
private final Logger logger = LoggerFactory.getLogger(ResourceKeystoreInstance.class);
@@ -104,7 +101,8 @@ public class ResourceKeystoreInstance implements KeystoreInstance {
}
/**
- * @param keystorePath the keystorePath to set
+ * @param keystorePath the keystorePath to set.
+ * @throws IOException in case of failure while setting the path.
*/
public void setPath(URL keystorePath) throws IOException {
this.path = keystorePath;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngine.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngine.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngine.java
index 01ab8b0..f0aa084 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngine.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngine.java
@@ -27,99 +27,103 @@ public interface BackingEngine {
static final String GROUP_PREFIX = "_g_:";
/**
- * Create a new User.
+ * Create a new user.
*
- * @param username
- * @param password
+ * @param username the user name.
+ * @param password the user password.
*/
void addUser(String username, String password);
/**
- * Delete User
+ * Delete an user.
*
- * @param username
+ * @param username the user name.
*/
void deleteUser(String username);
/**
- * List Users
+ * List all users.
+ *
+ * @return the list of {@link UserPrincipal}.
*/
List<UserPrincipal> listUsers();
/**
- * List groups that a user is in.
+ * List groups that a user is member of.
*
- * @param user
- * @return
+ * @param user the {@link UserPrincipal}.
+ * @return the list of {@link GroupPrincipal}.
*/
List<GroupPrincipal> listGroups(UserPrincipal user);
/**
- * List groups in a certain realm
- * @return the groups in a certain realm
+ * List all groups.
+ *
+ * @return the groups.
*/
Map<GroupPrincipal, String> listGroups();
/**
- * Add a user to a group.
+ * Add a user into a given group.
*
- * @param username
- * @param group
+ * @param username the user name.
+ * @param group the group.
*/
void addGroup(String username, String group);
/**
* Create a group
- * @param group
+ *
+ * @param group the group.
*/
void createGroup(String group);
/**
* Remove a user from a group.
*
- * @param username
- * @param group
+ * @param username the user name.
+ * @param group the group.
*/
void deleteGroup(String username, String group);
/**
- * List Roles for {@param principal}. This could either be a
+ * List Roles for <code>principal</code>. This could either be a
* {@link UserPrincipal} or a {@link GroupPrincipal}.
*
- * @param principal
- * @return
+ * @param principal the principal.
+ * @return the list of roles.
*/
List<RolePrincipal> listRoles(Principal principal);
/**
- * Add a role to the user
+ * Add a role to the user.
*
- * @param username
- * @param role
+ * @param username the user name.
+ * @param role the role.
*/
void addRole(String username, String role);
/**
* Remove a role from a user.
*
- * @param username
- * @param role
+ * @param username the user name.
+ * @param role the role.
*/
void deleteRole(String username, String role);
/**
* Add a role in a group.
*
- * @param group
- * @param role
+ * @param group the group.
+ * @param role the role.
*/
void addGroupRole(String group, String role);
/**
* Remove a role from a group.
*
- * @param group
- * @param role
+ * @param group the group.
+ * @param role the role.
*/
void deleteGroupRole(String group, String role);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngineFactory.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngineFactory.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngineFactory.java
index c7bb2cf..b398361 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngineFactory.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/BackingEngineFactory.java
@@ -20,13 +20,18 @@ import java.util.Map;
public interface BackingEngineFactory {
/**
- * Returns the corresponding module class.
+ * Get the module class.
+ *
+ * @return the module class.
*/
String getModuleClass();
/**
* Backing engine factory method.
+ *
+ * @param options the factory options.
+ * @return the built backing engine.
*/
BackingEngine build(Map<String,?> options);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/EncryptionService.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/EncryptionService.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/EncryptionService.java
index 1a5d3e9..b82dc56 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/EncryptionService.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/EncryptionService.java
@@ -37,9 +37,9 @@ public interface EncryptionService {
* If the parameters are not supported, a <code>null</code> should
* be returned or an IllegalArgumentException thrown.
*
- * @param params
- * @return
- * @throws IllegalArgumentException
+ * @param params define the encryption configuration.
+ * @return the {@link Encryption}.
+ * @throws IllegalArgumentException if the {@link Encryption} can't be created.
*/
Encryption createEncryption(Map<String,String> params) throws IllegalArgumentException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/encryption/BasicEncryption.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/encryption/BasicEncryption.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/encryption/BasicEncryption.java
index c431db4..d66a42e 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/encryption/BasicEncryption.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/encryption/BasicEncryption.java
@@ -100,8 +100,9 @@ public class BasicEncryption implements Encryption {
}
/**
- * encode the input data producing a base 64 encoded byte array.
+ * Encode the input data producing a base 64 encoded byte array.
*
+ * @param input the String to encore as an array of byte.
* @return a byte array containing the base 64 encoded data.
*/
public static String base64Encode(byte[] input) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCBackingEngine.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCBackingEngine.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCBackingEngine.java
index 81a1c06..db0a8e8 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCBackingEngine.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCBackingEngine.java
@@ -51,9 +51,6 @@ public class JDBCBackingEngine implements BackingEngine {
private String selectUsersQuery = "SELECT USERNAME FROM USERS";
private String selectRolesQuery = "SELECT ROLE FROM ROLES WHERE USERNAME=?";
- /**
- * Constructor
- */
public JDBCBackingEngine(DataSource dataSource) {
this.dataSource = dataSource;
}
@@ -64,7 +61,10 @@ public class JDBCBackingEngine implements BackingEngine {
}
/**
- * Adds a new user.
+ * Add a new user.
+ *
+ * @param username the user name.
+ * @param password the user password.
*/
public void addUser(String username, String password) {
if (username.startsWith(GROUP_PREFIX)) {
@@ -91,6 +91,8 @@ public class JDBCBackingEngine implements BackingEngine {
/**
* Delete user by username.
+ *
+ * @param username the user name.
*/
public void deleteUser(String username) {
try {
@@ -107,7 +109,9 @@ public class JDBCBackingEngine implements BackingEngine {
}
/**
- * List all Users
+ * List all users.
+ *
+ * @return the list of {@link UserPrincipal}.
*/
public List<UserPrincipal> listUsers() {
try {
@@ -126,7 +130,10 @@ public class JDBCBackingEngine implements BackingEngine {
}
/**
- * List the roles of the {@param principal}.
+ * List the roles of the <code>principal</code>.
+ *
+ * @param principal the principal (user or group).
+ * @return the list of {@link RolePrincipal}.
*/
public List<RolePrincipal> listRoles(Principal principal) {
try {
@@ -156,6 +163,9 @@ public class JDBCBackingEngine implements BackingEngine {
/**
* Add a role to a user.
+ *
+ * @param username the user name.
+ * @param role the role.
*/
public void addRole(String username, String role) {
try {
@@ -172,6 +182,9 @@ public class JDBCBackingEngine implements BackingEngine {
/**
* Remove role from user.
+ *
+ * @param username the user name.
+ * @param role the role to remove.
*/
public void deleteRole(String username, String role) {
try {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java
index c782abe..6459a50 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/jdbc/JDBCUtils.java
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.karaf.jaas.modules.jdbc;
import java.sql.Connection;
@@ -36,12 +35,15 @@ public final class JDBCUtils {
public static final String JNDI = "jndi:";
public static final String OSGI = "osgi:";
- private JDBCUtils() {
-
- }
+ private JDBCUtils() { }
/**
- * Looks up a datasource from the url. The datasource can be passed either as jndi name or bundles ldap filter.
+ * Look up a datasource from the url. The datasource can be passed either as jndi name or bundles ldap filter.
+ *
+ * @param bc the bundle context.
+ * @param url the datasource URL.
+ * @return the {@link DataSource} object.
+ * @throws Exception in case of datasource creation failure.
*/
public static DataSource createDatasource(BundleContext bc, String url) throws Exception {
Object ds = doCreateDatasource(bc, url);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java
index 98e916a..77e9e2e 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/properties/PropertiesBackingEngine.java
@@ -30,20 +30,13 @@ import org.apache.karaf.jaas.modules.encryption.EncryptionSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
public class PropertiesBackingEngine implements BackingEngine {
private static final transient Logger LOGGER = LoggerFactory.getLogger(PropertiesBackingEngine.class);
-
private Properties users;
private EncryptionSupport encryptionSupport;
- /**
- * Constructor
- *
- * @param users
- */
public PropertiesBackingEngine(Properties users) {
this.users = users;
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngine.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngine.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngine.java
index e9a9181..cc5c079 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngine.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngine.java
@@ -34,21 +34,12 @@ public class PublickeyBackingEngine implements BackingEngine {
private static final transient Logger LOGGER = LoggerFactory.getLogger(PublickeyBackingEngine.class);
-
private Properties users;
-
- /**
- * Constructor
- *
- * @param users
- */
public PublickeyBackingEngine(Properties users) {
this.users = users;
}
-
-
@Override
public void addUser(String username, String publickey) {
if (username.startsWith(GROUP_PREFIX))
@@ -257,8 +248,6 @@ public class PublickeyBackingEngine implements BackingEngine {
deleteRole(GROUP_PREFIX + group, role);
}
-
-
public Map<GroupPrincipal, String> listGroups() {
Map<GroupPrincipal, String> result = new HashMap<GroupPrincipal, String>();
for (String name : users.keySet()) {
@@ -269,8 +258,6 @@ public class PublickeyBackingEngine implements BackingEngine {
return result;
}
-
-
public void createGroup(String group) {
String groupName = GROUP_PREFIX + group;
if (users.get(groupName) == null) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngineFactory.java
----------------------------------------------------------------------
diff --git a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngineFactory.java b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngineFactory.java
index 7ad70a1..990965a 100644
--- a/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngineFactory.java
+++ b/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/publickey/PublickeyBackingEngineFactory.java
@@ -31,12 +31,6 @@ public class PublickeyBackingEngineFactory implements BackingEngineFactory {
private static final String USER_FILE = "users";
- /**
- * Builds the Backing Engine
- *
- * @param options
- * @return
- */
public BackingEngine build(Map options) {
PublickeyBackingEngine engine = null;
String usersFile = (String) options.get(USER_FILE);
@@ -53,12 +47,8 @@ public class PublickeyBackingEngineFactory implements BackingEngineFactory {
}
}
- /**
- * Returns the login module class, that this factory can build.
- *
- * @return
- */
public String getModuleClass() {
return PublickeyLoginModule.class.getName();
}
+
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcMBean.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcMBean.java b/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcMBean.java
index 35a48cb..19c1226 100644
--- a/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcMBean.java
+++ b/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcMBean.java
@@ -29,39 +29,39 @@ public interface JdbcMBean {
/**
* Get the list of JDBC datasources.
*
- * @return a tabular data containing the list of JDBC datasources.
- * @throws MBeanException
+ * @return A {@link TabularData} containing the list of JDBC datasources.
+ * @throws MBeanException In case of MBean failure.
*/
TabularData getDatasources() throws MBeanException;
/**
* Create a JDBC datasource.
*
- * @param name the JDBC datasource name
- * @param driverName org.osgi.driver.name of the DataSourceFactory to use
- * @param driverClass org.osgi.driver.class of the DataSourceFactory to use
- * @param databaseName name of the database to access
- * @param url JDBC URL
- * @param user Database username
- * @param password Database password
- * @throws MBeanException
+ * @param name The JDBC datasource name.
+ * @param driverName The {@code org.osgi.driver.name} of the DataSourceFactory to use.
+ * @param driverClass The {@code org.osgi.driver.class} of the DataSourceFactory to use.
+ * @param databaseName The name of the database to access.
+ * @param url The JDBC URL.
+ * @param user The database username.
+ * @param password The database password.
+ * @throws MBeanException In case of MBean failure.
*/
void create(String name, String driverName, String driverClass, String databaseName, String url, String user, String password) throws MBeanException;
/**
* Delete a JDBC datasource.
*
- * @param name the JDBC datasource name (the one used at creation time).
- * @throws MBeanException
+ * @param name The JDBC datasource name (the one used at creation time).
+ * @throws MBeanException In case of MBean failure.
*/
void delete(String name) throws MBeanException;
/**
* Get details about a JDBC datasource.
*
- * @param datasource the JDBC datasource name.
- * @return a map (property/value) containing JDBC datasource details.
- * @throws MBeanException
+ * @param datasource The JDBC datasource name.
+ * @return A {@link Map} (property/value) containing JDBC datasource details.
+ * @throws MBeanException In case of MBean failure.
*/
Map<String, String> info(String datasource) throws MBeanException;
@@ -69,27 +69,27 @@ public interface JdbcMBean {
* Get the tables available on a JDBC datasource.
*
* @param datasource the JDBC datasource name.
- * @return a tabular data containg datasource tables.
- * @throws MBeanException
+ * @return A {@link TabularData} containing the datasource tables.
+ * @throws MBeanException In case of MBean failure.
*/
TabularData tables(String datasource) throws MBeanException;
/**
* Execute a SQL command on a JDBC datasource.
*
- * @param datasource the JDBC datasource name.
- * @param command the SQL command to execute.
- * @throws MBeanException
+ * @param datasource The JDBC datasource name.
+ * @param command The SQL command to execute.
+ * @throws MBeanException In case of MBean failure.
*/
void execute(String datasource, String command) throws MBeanException;
/**
* Execute a SQL query on a JDBC datasource.
*
- * @param datasource the JDBC datasource name.
- * @param query the SQL query to execute.
- * @return a tabular data with the result of execute (columns/values).
- * @throws MBeanException
+ * @param datasource The JDBC datasource name.
+ * @param query The SQL query to execute.
+ * @return A {@link TabularData} with the result of execute (columns/values).
+ * @throws MBeanException In case of MBean failure.
*/
TabularData query(String datasource, String query) throws MBeanException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcService.java
----------------------------------------------------------------------
diff --git a/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcService.java b/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcService.java
index 1f4b27b..a3f1724 100644
--- a/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcService.java
+++ b/jdbc/src/main/java/org/apache/karaf/jdbc/JdbcService.java
@@ -27,12 +27,14 @@ public interface JdbcService {
/**
* Create a JDBC datasource configuration.
*
- * @param name Datasource name
- * @param driverName Backend database type (osgi.jdbc.driver.name of DataSourceFactory)
- * @param url JDBC URL
- * @param user Database user name
- * @param password Database password
- * @param password2
+ * @param name The datasource name.
+ * @param driverName The backend database type (osgi.jdbc.driver.name of DataSourceFactory).
+ * @param driverClass The JDBC driver class.
+ * @param databaseName The database name.
+ * @param url The JDBC URL.
+ * @param user The database user name.
+ * @param password The database password.
+ * @throws Exception If the service fails.
*/
void create(String name, String driverName, String driverClass, String databaseName, String url, String user, String password) throws Exception;
@@ -40,38 +42,43 @@ public interface JdbcService {
* Delete a JDBC datasource identified by a name. Works only
* for datasources that have a corresponding configuration
*
- * @param name Datasource name
+ * @param name The datasource name to delete.
+ * @throws Exception If the service fails.
*/
void delete(String name) throws Exception;
/**
* List the JDBC DataSourceFactories available.
*
- * @return a list of DataSourceFactory names
+ * @return a {@link List} of DataSourceFactory names.
+ * @throws Exception If the service fails.
*/
List<String> factoryNames() throws Exception;
/**
* List the JDBC datasources available.
*
- * @return a list of datasources names
+ * @return A {@link List} of datasources names.
+ * @throws Exception If the service fails.
*/
List<String> datasources() throws Exception;
/**
* Execute a SQL query on a given JDBC datasource.
*
- * @param datasource the JDBC datasource name.
- * @param query the SQL query to execute.
- * @return the SQL query result (as a String).
+ * @param datasource The JDBC datasource name.
+ * @param query The SQL query to execute.
+ * @return The SQL query result (as a {@link Map}).
+ * @throws Exception If the service fails.
*/
Map<String, List<String>> query(String datasource, String query) throws Exception;
/**
* Execute a SQL command on a given JDBC datasource.
*
- * @param datasource the JDBC datasource name.
- * @param command the SQL command to execute.
+ * @param datasource The JDBC datasource name.
+ * @param command The SQL command to execute.
+ * @throws Exception If the service fails.
*/
void execute(String datasource, String command) throws Exception;
@@ -79,15 +86,17 @@ public interface JdbcService {
* List the tables available on a given JDBC datasource.
*
* @param datasource the JDBC datasource name.
- * @return the list of table names.
+ * @return A {@link Map} containing the tables.
+ * @throws Exception If the service fails.
*/
Map<String, List<String>> tables(String datasource) throws Exception;
/**
* Get detailed info about a JDBC datasource.
*
- * @param datasource the JDBC datasource name.
- * @return a map of info (name/value).
+ * @param datasource The JDBC datasource name.
+ * @return A {@link Map} of info (name/value).
+ * @throws Exception If the service fails.
*/
Map<String, String> info(String datasource) throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jms/src/main/java/org/apache/karaf/jms/JmsMBean.java
----------------------------------------------------------------------
diff --git a/jms/src/main/java/org/apache/karaf/jms/JmsMBean.java b/jms/src/main/java/org/apache/karaf/jms/JmsMBean.java
index 0e7a012..d62a9ba 100644
--- a/jms/src/main/java/org/apache/karaf/jms/JmsMBean.java
+++ b/jms/src/main/java/org/apache/karaf/jms/JmsMBean.java
@@ -29,136 +29,136 @@ public interface JmsMBean {
/**
* List the JMS connection factories.
*
- * @return the list of the JMS connection factories name.
- * @throws MBeanException
+ * @return The {@link List} of the JMS connection factories name.
+ * @throws MBeanException If the MBean fails.
*/
List<String> getConnectionfactories() throws MBeanException;
/**
* Create a JMS connection factory.
*
- * @param name the JMS connection factory name.
- * @param type the JMS connection factory type (ActiveMQ or WebsphereMQ).
- * @param url the JMS connection factory URL. NB: when type is WebsphereMQ, the URL has the format host/port/queuemanager/channel.
- * @throws MBeanException
+ * @param name The JMS connection factory name.
+ * @param type The JMS connection factory type (ActiveMQ or WebsphereMQ).
+ * @param url The JMS connection factory URL. NB: when type is WebsphereMQ, the URL has the format host/port/queuemanager/channel.
+ * @throws MBeanException If the MBean fails.
*/
void create(String name, String type, String url) throws MBeanException;
/**
* Create a JMS connection factory.
*
- * @param name the JMS connection factory name.
- * @param type the JMS connection factory type (ActiveMQ or WebsphereMQ).
- * @param url the JMS connection factory URL. NB: when type is WebsphereMQ, the URL has the format host/port/queuemanager/channel.
- * @param username the JMS connection factory authentication username.
- * @param password the JMS connection factory authentication password.
- * @throws MBeanException
+ * @param name The JMS connection factory name.
+ * @param type The JMS connection factory type (ActiveMQ or WebsphereMQ).
+ * @param url The JMS connection factory URL. NB: when type is WebsphereMQ, the URL has the format host/port/queuemanager/channel.
+ * @param username The JMS connection factory authentication username.
+ * @param password The JMS connection factory authentication password.
+ * @throws MBeanException If the MBean fails.
*/
void create(String name, String type, String url, String username, String password) throws MBeanException;
/**
* Delete a JMS connection factory.
*
- * @param name the JMS connection factory name.
- * @throws MBeanException
+ * @param name The JMS connection factory name.
+ * @throws MBeanException If the MBean fails.
*/
void delete(String name) throws MBeanException;
/**
* Get details about a JMS connection factory.
*
- * @param connectionFactory the JMS connection factory name.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return a map (property/value) containing details.
- * @throws MBeanException
+ * @param connectionFactory The JMS connection factory name.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return A {@link Map} (property/value) containing details.
+ * @throws MBeanException If the MBean fails.
*/
Map<String, String> info(String connectionFactory, String username, String password) throws MBeanException;
/**
* Count the messages on a given JMS queue.
*
- * @param connectionFactory the JMS connection factory name.
- * @param queue the JMS queue name.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return
- * @throws MBeanException
+ * @param connectionFactory The JMS connection factory name.
+ * @param queue The JMS queue name.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The number of messages in the queue.
+ * @throws MBeanException If the MBean fails.
*/
int count(String connectionFactory, String queue, String username, String password) throws MBeanException;
/**
* List the JMS queues.
*
- * @param connectionFactory the JMS connection factory name.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the list of JMS queues.
- * @throws MBeanException
+ * @param connectionFactory The JMS connection factory name.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The {@link List} of JMS queues.
+ * @throws MBeanException If the MBean fails.
*/
List<String> queues(String connectionFactory, String username, String password) throws MBeanException;
/**
* List the JMS topics.
*
- * @param connectionFactory the JMS connection factory name.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the list of JMS topics.
- * @throws MBeanException
+ * @param connectionFactory The JMS connection factory name.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The @link List} of JMS topics.
+ * @throws MBeanException If the MBean fails.
*/
List<String> topics(String connectionFactory, String username, String password) throws MBeanException;
/**
* Browse the messages in a JMS queue.
*
- * @param connectionFactory the JMS connection factory name.
- * @param queue the JMS queue name.
- * @param selector a selector to use to browse only certain messages.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return a tabular data with messages details.
- * @throws MBeanException
+ * @param connectionFactory The JMS connection factory name.
+ * @param queue The JMS queue name.
+ * @param selector A selector to use to browse only certain messages.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return A {@link TabularData} containing messages details.
+ * @throws MBeanException If the MBean fails.
*/
TabularData browse(String connectionFactory, String queue, String selector, String username, String password) throws MBeanException;
/**
* Send a JMS message to given queue.
*
- * @param connectionFactory the JMS connection factory name.
- * @param queue the JMS queue name.
- * @param content the message content.
- * @param replyTo the message ReplyTo.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @throws MBeanException
+ * @param connectionFactory The JMS connection factory name.
+ * @param queue The JMS queue name.
+ * @param content The message content.
+ * @param replyTo The message ReplyTo.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @throws MBeanException If the MBean fails.
*/
void send(String connectionFactory, String queue, String content, String replyTo, String username, String password) throws MBeanException;
/**
* Consume JMS messages from a given queue.
*
- * @param connectionFactory the JMS connection factory name.
- * @param queue the JMS queue name.
- * @param selector a selector to use to consume only certain messages.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the number of messages consumed.
- * @throws MBeanException
+ * @param connectionFactory The JMS connection factory name.
+ * @param queue The JMS queue name.
+ * @param selector A selector to use to consume only certain messages.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The number of messages consumed.
+ * @throws MBeanException If the MBean fails.
*/
int consume(String connectionFactory, String queue, String selector, String username, String password) throws MBeanException;
/**
* Move JMS messages from one queue to another.
*
- * @param connectionFactory the JMS connection factory name.
- * @param source the source JMS queue name.
- * @param destination the destination JMS queue name.
- * @param selector a selector to move only certain messages.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the number of messages moved.
- * @throws MBeanException
+ * @param connectionFactory The JMS connection factory name.
+ * @param source The source JMS queue name.
+ * @param destination The destination JMS queue name.
+ * @param selector A selector to move only certain messages.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The number of messages moved.
+ * @throws MBeanException If the MBean fails.
*/
int move(String connectionFactory, String source, String destination, String selector, String username, String password) throws MBeanException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jms/src/main/java/org/apache/karaf/jms/JmsService.java
----------------------------------------------------------------------
diff --git a/jms/src/main/java/org/apache/karaf/jms/JmsService.java b/jms/src/main/java/org/apache/karaf/jms/JmsService.java
index 73d9521..0902e33 100644
--- a/jms/src/main/java/org/apache/karaf/jms/JmsService.java
+++ b/jms/src/main/java/org/apache/karaf/jms/JmsService.java
@@ -27,144 +27,144 @@ public interface JmsService {
/**
* List the JMS connection factories.
*
- * @return the list of JMS connection factory names.
- * @throws Exception
+ * @return The {@link List} of JMS connection factory names.
+ * @throws Exception If the service fails.
*/
List<String> connectionFactories() throws Exception;
/**
- * List the JMS connecion factories file names.
+ * List the JMS connection factories file names.
*
- * @return the list of JMS connection factory file names.
- * @throws Exception
+ * @return The {@link List} of JMS connection factory file names.
+ * @throws Exception If the service fails.
*/
List<String> connectionFactoryFileNames() throws Exception;
/**
* Create a new JMS connection factory.
*
- * @param name the JMS connection factory name.
- * @param type the JMS connection factory type (ActiveMQ, WebsphereMQ, ...).
- * @param url the JMS URL to use.
- * @throws Exception
+ * @param name The JMS connection factory name.
+ * @param type The JMS connection factory type (ActiveMQ, WebsphereMQ, ...).
+ * @param url The JMS URL to use.
+ * @throws Exception If the service fails.
*/
void create(String name, String type, String url) throws Exception;
/**
* Create a new JMS connection factory.
*
- * @param name the JMS connection factory name.
- * @param type the JMS connection factory type (ActiveMQ, WebsphereMQ, ...).
- * @param url the JMS URL to use.
- * @param username the username to use.
- * @param password the password to use.
- * @throws Exception
+ * @param name The JMS connection factory name.
+ * @param type The JMS connection factory type (ActiveMQ, WebsphereMQ, ...).
+ * @param url The JMS URL to use.
+ * @param username The username to use.
+ * @param password The password to use.
+ * @throws Exception If the service fails.
*/
void create(String name, String type, String url, String username, String password) throws Exception;
/**
* Delete a JMS connection factory.
*
- * @param name the JMS connection factory name.
- * @throws Exception
+ * @param name The JMS connection factory name.
+ * @throws Exception If the service fails.
*/
void delete(String name) throws Exception;
/**
* Get details about a given JMS connection factory.
*
- * @param connectionFactory the JMS connection factory name.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return a map (property/value) containing details.
- * @throws Exception
+ * @param connectionFactory The JMS connection factory name.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return A {@link Map} (property/value) containing details.
+ * @throws Exception If the service fails.
*/
Map<String, String> info(String connectionFactory, String username, String password) throws Exception;
/**
* Count the number of messages in a JMS queue.
*
- * @param connectionFactory the JMS connection factory name.
- * @param queue the queue name.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the number of messages in a JMS queue.
- * @throws Exception
+ * @param connectionFactory The JMS connection factory name.
+ * @param queue The queue name.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The number of messages in a JMS queue.
+ * @throws Exception If the service fails.
*/
int count(String connectionFactory, String queue, String username, String password) throws Exception;
/**
* List the queues.
*
- * @param connectionFactory the JMS connection factory name.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the list of queues.
- * @throws Exception
+ * @param connectionFactory The JMS connection factory name.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The {@link List} of queues.
+ * @throws Exception If the service fails.
*/
List<String> queues(String connectionFactory, String username, String password) throws Exception;
/**
* List the topics.
*
- * @param connectionFactory the JMS connection factory name.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the list of topics.
- * @throws Exception
+ * @param connectionFactory The JMS connection factory name.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The {@link List} of topics.
+ * @throws Exception If the service fails.
*/
List<String> topics(String connectionFactory, String username, String password) throws Exception;
/**
* Browse a destination.
*
- * @param connectionFactory the JMS connection factory name.
- * @param queue the queue name.
- * @param selector the selector.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the list of messages.
- * @throws Exception
+ * @param connectionFactory The JMS connection factory name.
+ * @param queue The queue name.
+ * @param selector The selector.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The {@link List} of messages.
+ * @throws Exception If the service fails.
*/
List<JmsMessage> browse(String connectionFactory, String queue, String selector, String username, String password) throws Exception;
/**
* Send a message on the given queue.
*
- * @param connectionFactory the JMS connection factory name.
- * @param queue the queue name.
- * @param body the message body.
- * @param replyTo the message replyTo header.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @throws Exception
+ * @param connectionFactory The JMS connection factory name.
+ * @param queue The queue name.
+ * @param body The message body.
+ * @param replyTo The message replyTo header.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @throws Exception If the service fails.
*/
void send(String connectionFactory, String queue, String body, String replyTo, String username, String password) throws Exception;
/**
* Consume messages from a given destination.
*
- * @param connectionFactory the JMS connection factory name.
- * @param queue the queue name.
- * @param selector the messages selector.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the number of messages consumed.
- * @throws Exception
+ * @param connectionFactory The JMS connection factory name.
+ * @param queue The queue name.
+ * @param selector The messages selector.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The number of messages consumed.
+ * @throws Exception If the service fails.
*/
int consume(String connectionFactory, String queue, String selector, String username, String password) throws Exception;
/**
* Move messages from a destination to another.
*
- * @param connectionFactory the JMS connection factory name.
- * @param sourceQueue the source queue.
- * @param targetQueue the target queue.
- * @param selector the messages selector on the source queue.
- * @param username optional username to connect to the JMS broker.
- * @param password optional password to connect to the JMS broker.
- * @return the number of messages moved.
- * @throws Exception
+ * @param connectionFactory The JMS connection factory name.
+ * @param sourceQueue The source queue.
+ * @param targetQueue The target queue.
+ * @param selector The messages selector on the source queue.
+ * @param username The (optional) username to connect to the JMS broker.
+ * @param password The (optional) password to connect to the JMS broker.
+ * @return The number of messages moved.
+ * @throws Exception If the service fails.
*/
int move(String connectionFactory, String sourceQueue, String targetQueue, String selector, String username, String password) throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jndi/src/main/java/org/apache/karaf/jndi/JndiMBean.java
----------------------------------------------------------------------
diff --git a/jndi/src/main/java/org/apache/karaf/jndi/JndiMBean.java b/jndi/src/main/java/org/apache/karaf/jndi/JndiMBean.java
index 0b2be41..2a4f4f9 100644
--- a/jndi/src/main/java/org/apache/karaf/jndi/JndiMBean.java
+++ b/jndi/src/main/java/org/apache/karaf/jndi/JndiMBean.java
@@ -28,76 +28,76 @@ public interface JndiMBean {
/**
* Get a map of JNDI names/class names (as attribute).
*
- * @return the MBean attribute containing the map of names/class names.
- * @throws MBeanException
+ * @return The MBean attribute containing the {@link Map} of names/class names.
+ * @throws MBeanException If the MBean fails.
*/
public Map<String, String> getNames() throws MBeanException;
/**
* Get a list of JNDI sub-contexts (as attribute).
*
- * @return the MBean attribute containing the list of sub-contexts.
- * @throws MBeanException
+ * @return The MBean attribute containing the {@link List} of sub-contexts.
+ * @throws MBeanException If the MBean fails.
*/
public List<String> getContexts() throws MBeanException;
/**
- * Get a map of JNDI names/class names children of a given base context.
+ * Get a {@link Map} of JNDI names/class names children of a given base context.
*
- * @param context the base context.
- * @return the map of names/class names.
- * @throws MBeanException
+ * @param context The base context.
+ * @return The {@link Map} of names/class names.
+ * @throws MBeanException If the MBean fails.
*/
public Map<String, String> getNames(String context) throws MBeanException;
/**
- * Get a list of JNDI sub-contexts children of a given base context.
+ * Get a {@link List} of JNDI sub-contexts children of a given base context.
*
- * @param context the base context.
- * @return the list of sub-contexts.
- * @throws MBeanException
+ * @param context The base context.
+ * @return The {@link List} of sub-contexts.
+ * @throws MBeanException If the MBean fails.
*/
public List<String> getContexts(String context) throws MBeanException;
/**
* Create a JNDI sub-context.
*
- * @param context the JNDI sub-context name.
- * @throws MBeanException
+ * @param context The JNDI sub-context name.
+ * @throws MBeanException If the MBean fails.
*/
public void create(String context) throws MBeanException;
/**
* Delete a JNDI sub-context.
*
- * @param context the JNDI sub-context name.
- * @throws MBeanException
+ * @param context The JNDI sub-context name.
+ * @throws MBeanException If the MBean fails.
*/
public void delete(String context) throws MBeanException;
/**
* Create another JNDI name (alias) for a given one.
*
- * @param name the "source" JNDI name.
- * @param alias the JNDI alias name.
- * @throws MBeanException
+ * @param name The "source" JNDI name.
+ * @param alias The JNDI alias name.
+ * @throws MBeanException If the MBean fails.
*/
public void alias(String name, String alias) throws MBeanException;
/**
* Bind an OSGi service with a JNDI name.
*
- * @param serviceId the OSGi service id (service.id property on the service, created by the framework).
- * @param name the JNDI name.
- * @throws MBeanException
+ * @param serviceId The OSGi service id (service.id property on the service, created by the framework).
+ * @param name The JNDI name.
+ * @throws MBeanException If the MBean fails.
*/
public void bind(Long serviceId, String name) throws MBeanException;
/**
* Unbind a given JNDI name.
*
- * @param name the JNDI name.
- * @throws MBeanException
+ * @param name The JNDI name.
+ * @throws MBeanException If the MBean fails.
*/
public void unbind(String name) throws MBeanException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jndi/src/main/java/org/apache/karaf/jndi/JndiService.java
----------------------------------------------------------------------
diff --git a/jndi/src/main/java/org/apache/karaf/jndi/JndiService.java b/jndi/src/main/java/org/apache/karaf/jndi/JndiService.java
index c9f9c57..365b189 100644
--- a/jndi/src/main/java/org/apache/karaf/jndi/JndiService.java
+++ b/jndi/src/main/java/org/apache/karaf/jndi/JndiService.java
@@ -27,76 +27,76 @@ public interface JndiService {
/**
* List the current JNDI names (with the bound class name).
*
- * @return the JNDI names.
- * @throws Exception
+ * @return The JNDI names.
+ * @throws Exception If the service fails.
*/
Map<String, String> names() throws Exception;
/**
* List the current JNDI names in the given context.
*
- * @param context the JNDI context.
- * @return the JNDI names in the context.
- * @throws Exception
+ * @param context The JNDI context.
+ * @return The JNDI names in the context.
+ * @throws Exception If the service fails.
*/
Map<String, String> names(String context) throws Exception;
/**
* List all JNDI sub-contexts.
*
- * @return a list containing the sub-context names.
- * @throws Exception
+ * @return A {@link List} containing the sub-context names.
+ * @throws Exception If the service fails.
*/
List<String> contexts() throws Exception;
/**
* List the JNDI sub-context from a given context.
*
- * @param context the base JNDI context.
- * @return a list containing the sub-context names.
- * @throws Exception
+ * @param context The base JNDI context.
+ * @return A {@link List} containing the sub-context names.
+ * @throws Exception If the service fails.
*/
List<String> contexts(String context) throws Exception;
/**
* Create a sub-context.
*
- * @param context the new sub-context name to create.
- * @throws Exception
+ * @param context The new sub-context name to create.
+ * @throws Exception If the service fails.
*/
void create(String context) throws Exception;
/**
* Delete a sub-context.
*
- * @param context the sub-context name to delete.
- * @throws Exception
+ * @param context The sub-context name to delete.
+ * @throws Exception If the service fails.
*/
void delete(String context) throws Exception;
/**
* Create an alias on a given JNDI name.
*
- * @param name the JNDI name.
- * @param alias the alias.
- * @throws Exception
+ * @param name The JNDI name.
+ * @param alias The alias.
+ * @throws Exception If the service fails.
*/
void alias(String name, String alias) throws Exception;
/**
* Bind a given OSGi service to a JNDI name.
*
- * @param serviceId the OSGi service ID.
- * @param name the JNDI name.
- * @throws Exception
+ * @param serviceId The OSGi service ID.
+ * @param name The JNDI name.
+ * @throws Exception If the service fails.
*/
void bind(long serviceId, String name) throws Exception;
/**
* Unbind an existing name.
*
- * @param name the JNDI name to unbind.
- * @throws Exception
+ * @param name The JNDI name to unbind.
+ * @throws Exception If the service fails.
*/
void unbind(String name) throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/jpa/hibernate/src/main/java/org/apache/karaf/jpa/hibernate/impl/StatisticsPublisher.java
----------------------------------------------------------------------
diff --git a/jpa/hibernate/src/main/java/org/apache/karaf/jpa/hibernate/impl/StatisticsPublisher.java b/jpa/hibernate/src/main/java/org/apache/karaf/jpa/hibernate/impl/StatisticsPublisher.java
index 5d2706f..e347539 100644
--- a/jpa/hibernate/src/main/java/org/apache/karaf/jpa/hibernate/impl/StatisticsPublisher.java
+++ b/jpa/hibernate/src/main/java/org/apache/karaf/jpa/hibernate/impl/StatisticsPublisher.java
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
/**
* Track EntityManagerFactory services for the persistence units.
* Manage on StatisticsMXBean for each persistence unit named like:
- * org.hibernate.statistics:unitName=<name of persistence unit>
+ * org.hibernate.statistics:unitName=<name of persistence unit>
*/
public class StatisticsPublisher implements ServiceTrackerCustomizer<EntityManagerFactory, EntityManagerFactory> {
private static Logger LOG = LoggerFactory.getLogger(StatisticsPublisher.class);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/kar/src/main/java/org/apache/karaf/kar/KarService.java
----------------------------------------------------------------------
diff --git a/kar/src/main/java/org/apache/karaf/kar/KarService.java b/kar/src/main/java/org/apache/karaf/kar/KarService.java
index 60acb77..f2dbdc5 100644
--- a/kar/src/main/java/org/apache/karaf/kar/KarService.java
+++ b/kar/src/main/java/org/apache/karaf/kar/KarService.java
@@ -45,7 +45,7 @@ public interface KarService {
* @param karUri Uri of the kar to be installed
* @param repoDir destination for the repository contents of the kar
* @param resourceDir destination for the resource contents of the kar
- * @throws Exception
+ * @throws Exception in case of installation failure.
*/
void install(URI karUri, File repoDir, File resourceDir) throws Exception;
@@ -70,11 +70,10 @@ public interface KarService {
* Each named feature including all transitive deps will be added.
* For each named repo all features in the repo and their transitive deps will be added.
*
- * @param repoName
- * @param features
- * @param console
+ * @param repoName the feature repository to use to create the kar.
+ * @param features the list of features to include in the created kar.
+ * @param console the console stream where to print details.
*/
void create(String repoName, List<String> features, PrintStream console);
-
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/kar/src/main/java/org/apache/karaf/kar/KarsMBean.java
----------------------------------------------------------------------
diff --git a/kar/src/main/java/org/apache/karaf/kar/KarsMBean.java b/kar/src/main/java/org/apache/karaf/kar/KarsMBean.java
index b1a86c9..df8f3d9 100644
--- a/kar/src/main/java/org/apache/karaf/kar/KarsMBean.java
+++ b/kar/src/main/java/org/apache/karaf/kar/KarsMBean.java
@@ -25,7 +25,7 @@ public interface KarsMBean {
* List the installed KAR files.
*
* @return the list of KAR files.
- * @throws Exception in case of listing failure.
+ * @throws MBeanException in case of listing failure.
*/
List<String> getKars() throws MBeanException;
@@ -34,7 +34,6 @@ public interface KarsMBean {
*
* @param repoName the name of features repository
* @param features the features to include in the kar
- * @throws Exception in case of creation failure
*/
void create(String repoName, List<String> features);
@@ -42,7 +41,7 @@ public interface KarsMBean {
* Install a KAR file from the given URL.
*
* @param url the JAR URL.
- * @throws Exception in case of installation failure.
+ * @throws MBeanException in case of installation failure.
*/
void install(String url) throws MBeanException;
@@ -50,7 +49,7 @@ public interface KarsMBean {
* Uninstall a KAR file.
*
* @param name the name of the KAR file.
- * @throws Exception in case of uninstall failure.
+ * @throws MBeanException in case of uninstall failure.
*/
void uninstall(String name) throws MBeanException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternConverter.java
----------------------------------------------------------------------
diff --git a/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternConverter.java b/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternConverter.java
index 0d91e8c..984af9e 100644
--- a/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternConverter.java
+++ b/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternConverter.java
@@ -19,88 +19,92 @@ package org.apache.karaf.log.core.internal.layout;
import org.ops4j.pax.logging.spi.PaxLoggingEvent;
/**
- <p>PatternConverter is an abtract class that provides the
- formatting functionality that derived classes need.
-
- <p>Conversion specifiers in a conversion patterns are parsed to
- individual PatternConverters. Each of which is responsible for
- converting a logging event in a converter specific manner.
-
- @since 0.8.2
+ * <p>PatternConverter is an abtract class that provides the
+ * formatting functionality that derived classes need.</p>
+ *
+ * <p>Conversion specifiers in a conversion patterns are parsed to
+ * individual PatternConverters. Each of which is responsible for
+ * converting a logging event in a converter specific manner.</p>
+ *
+ * @since 0.8.2
*/
public abstract class PatternConverter {
- public PatternConverter next;
- int min = -1;
- int max = 0x7FFFFFFF;
- boolean leftAlign = false;
- protected
- PatternConverter() { }
+ public PatternConverter next;
+ int min = -1;
+ int max = 0x7FFFFFFF;
+ boolean leftAlign = false;
+
+ protected PatternConverter() {
+ }
- protected
- PatternConverter(FormattingInfo fi) {
- min = fi.min;
- max = fi.max;
- leftAlign = fi.leftAlign;
- }
+ protected PatternConverter(FormattingInfo fi) {
+ min = fi.min;
+ max = fi.max;
+ leftAlign = fi.leftAlign;
+ }
- /**
- Derived pattern converters must override this method in order to
- convert conversion specifiers in the correct way.
- */
- abstract
- protected
- String convert(PaxLoggingEvent event);
+ /**
+ * Derived pattern converters must override this method in order to
+ * convert conversion specifiers in the correct way.
+ *
+ * @param event The {@link PaxLoggingEvent} to convert.
+ * @return The {@link String} representing the {@link PaxLoggingEvent}.
+ */
+ abstract protected String convert(PaxLoggingEvent event);
- /**
- A template method for formatting in a converter specific way.
- */
- public
- void format(StringBuffer sbuf, PaxLoggingEvent e) {
- String s = convert(e);
+ /**
+ * A template method for formatting in a converter specific way.
+ *
+ * @param sbuf The {@link StringBuffer} used for formatting the {@link PaxLoggingEvent}.
+ * @param e The {@link PaxLoggingEvent} to format.
+ */
+ public void format(StringBuffer sbuf, PaxLoggingEvent e) {
+ String s = convert(e);
- if(s == null) {
- if(0 < min)
- spacePad(sbuf, min);
- return;
- }
+ if (s == null) {
+ if (0 < min)
+ spacePad(sbuf, min);
+ return;
+ }
- int len = s.length();
+ int len = s.length();
- if(len > max)
- sbuf.append(s.substring(len-max));
- else if(len < min) {
- if(leftAlign) {
- sbuf.append(s);
- spacePad(sbuf, min-len);
- }
- else {
- spacePad(sbuf, min-len);
- sbuf.append(s);
- }
+ if (len > max)
+ sbuf.append(s.substring(len - max));
+ else if (len < min) {
+ if (leftAlign) {
+ sbuf.append(s);
+ spacePad(sbuf, min - len);
+ } else {
+ spacePad(sbuf, min - len);
+ sbuf.append(s);
+ }
+ } else
+ sbuf.append(s);
}
- else
- sbuf.append(s);
- }
- static String[] SPACES = {" ", " ", " ", " ", //1,2,4,8 spaces
- " ", // 16 spaces
- " " }; // 32 spaces
+ static String[] SPACES = {" ", " ", " ", " ", //1,2,4,8 spaces
+ " ", // 16 spaces
+ " "}; // 32 spaces
- /**
- Fast space padding method.
- */
- public
- void spacePad(StringBuffer sbuf, int length) {
- while(length >= 32) {
- sbuf.append(SPACES[5]);
- length -= 32;
- }
+ /**
+ * Fast space padding method.
+ *
+ * @param sbuf The {@link StringBuffer} used for space padding.
+ * @param length The padding length.
+ */
+ public void spacePad(StringBuffer sbuf, int length) {
+ while (length >= 32) {
+ sbuf.append(SPACES[5]);
+ length -= 32;
+ }
- for(int i = 4; i >= 0; i--) {
- if((length & (1<<i)) != 0) {
- sbuf.append(SPACES[i]);
- }
+ for (int i = 4; i >= 0; i--) {
+ if ((length & (1 << i)) != 0) {
+ sbuf.append(SPACES[i]);
+ }
+ }
}
- }
+
}
[5/5] karaf git commit: KARAF-4392 - Upgrade to maven-javadoc-plugin
2.10.3 and clean javadoc comments
Posted by jb...@apache.org.
KARAF-4392 - Upgrade to maven-javadoc-plugin 2.10.3 and clean javadoc comments
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/8a1e7574
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/8a1e7574
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/8a1e7574
Branch: refs/heads/master
Commit: 8a1e7574da6796f7e7b4f6b31542ae3bb2c1788a
Parents: 9d136eb
Author: Jean-Baptiste Onofré <jb...@apache.org>
Authored: Thu Mar 10 10:18:08 2016 +0100
Committer: Jean-Baptiste Onofré <jb...@apache.org>
Committed: Tue Mar 15 00:19:50 2016 +0100
----------------------------------------------------------------------
.../karaf/bundle/command/bundletree/Node.java | 33 ++--
.../karaf/bundle/command/bundletree/Tree.java | 27 +--
.../apache/karaf/bundle/core/BundleInfo.java | 5 +-
.../karaf/bundle/core/BundleStateService.java | 9 +-
.../apache/karaf/bundle/core/BundleWatcher.java | 14 +-
.../bundle/core/internal/BundleWatcherImpl.java | 12 +-
.../command/ConfigPropertyCommandSupport.java | 18 +-
.../karaf/config/command/PropListCommand.java | 8 +-
.../apache/karaf/config/core/ConfigMBean.java | 23 ++-
.../karaf/config/core/ConfigRepository.java | 13 +-
.../karaf/diagnostic/core/DumpDestination.java | 4 +-
.../karaf/diagnostic/core/DumpProvider.java | 5 +-
.../core/providers/EnvironmentDumpProvider.java | 10 +-
.../management/DiagnosticDumpMBean.java | 6 +-
.../internal/DiagnosticDumpMBeanImpl.java | 11 +-
.../internal/download/DownloadManagers.java | 3 -
.../internal/download/impl/DefaultFuture.java | 10 +-
.../download/impl/DownloadManagerHelper.java | 3 +
.../karaf/features/internal/model/Bundle.java | 33 ++--
.../features/internal/model/Capability.java | 26 ++-
.../karaf/features/internal/model/Config.java | 26 ++-
.../features/internal/model/ConfigFile.java | 26 ++-
.../karaf/features/internal/model/Content.java | 104 +++++------
.../features/internal/model/Dependency.java | 24 ++-
.../karaf/features/internal/model/Feature.java | 174 +++++++++++--------
.../karaf/features/internal/model/Features.java | 130 +++++++-------
.../features/internal/model/ObjectFactory.java | 38 ++--
.../features/internal/model/Requirement.java | 22 +--
.../internal/resolver/ResourceBuilder.java | 1 +
.../internal/service/BootFeaturesInstaller.java | 5 +-
.../features/internal/service/Deployer.java | 3 +-
.../service/FeatureConfigInstaller.java | 4 +-
.../internal/service/FeaturesServiceImpl.java | 6 +
.../features/internal/service/Overrides.java | 21 +--
.../internal/service/RequirementSort.java | 7 +-
.../features/internal/util/ChecksumUtils.java | 1 +
.../org/apache/karaf/http/core/HttpMBean.java | 4 +-
.../main/java/org/apache/karaf/jpm/Process.java | 2 +-
.../org/apache/karaf/jpm/ProcessBuilder.java | 25 +--
.../karaf/jaas/command/RoleAddCommand.java | 7 -
.../karaf/jaas/command/RoleDeleteCommand.java | 7 -
.../karaf/jaas/command/UserAddCommand.java | 7 -
.../karaf/jaas/command/UserDeleteCommand.java | 7 -
.../karaf/jaas/config/KeystoreManager.java | 89 +++++-----
.../config/impl/ResourceKeystoreInstance.java | 6 +-
.../karaf/jaas/modules/BackingEngine.java | 62 +++----
.../jaas/modules/BackingEngineFactory.java | 7 +-
.../karaf/jaas/modules/EncryptionService.java | 6 +-
.../modules/encryption/BasicEncryption.java | 3 +-
.../jaas/modules/jdbc/JDBCBackingEngine.java | 25 ++-
.../karaf/jaas/modules/jdbc/JDBCUtils.java | 12 +-
.../properties/PropertiesBackingEngine.java | 7 -
.../publickey/PublickeyBackingEngine.java | 13 --
.../PublickeyBackingEngineFactory.java | 12 +-
.../java/org/apache/karaf/jdbc/JdbcMBean.java | 48 ++---
.../java/org/apache/karaf/jdbc/JdbcService.java | 43 +++--
.../java/org/apache/karaf/jms/JmsMBean.java | 128 +++++++-------
.../java/org/apache/karaf/jms/JmsService.java | 134 +++++++-------
.../java/org/apache/karaf/jndi/JndiMBean.java | 48 ++---
.../java/org/apache/karaf/jndi/JndiService.java | 44 ++---
.../jpa/hibernate/impl/StatisticsPublisher.java | 2 +-
.../java/org/apache/karaf/kar/KarService.java | 9 +-
.../java/org/apache/karaf/kar/KarsMBean.java | 7 +-
.../core/internal/layout/PatternConverter.java | 144 +++++++--------
.../log/core/internal/layout/PatternParser.java | 10 +-
.../main/java/org/apache/karaf/main/Main.java | 8 +-
.../org/apache/karaf/main/ShutdownCallback.java | 9 +-
.../main/java/org/apache/karaf/main/Status.java | 4 +-
.../main/java/org/apache/karaf/main/Stop.java | 6 +-
.../apache/karaf/main/lock/GenericJDBCLock.java | 109 ++++++------
.../karaf/main/lock/GenericStatements.java | 94 ++++++----
.../java/org/apache/karaf/main/lock/Lock.java | 12 +-
.../karaf/main/util/SimpleMavenResolver.java | 2 +-
.../management/ConnectorServerFactory.java | 4 +-
.../karaf/management/JMXSecurityMBean.java | 36 ++--
.../karaf/management/KarafMBeanServerGuard.java | 90 +++++-----
.../management/internal/BulkRequestContext.java | 18 +-
.../karaf/packages/core/PackageService.java | 16 +-
pom.xml | 4 +-
.../karaf/profile/PlaceholderResolver.java | 15 +-
.../java/org/apache/karaf/profile/Profile.java | 35 +++-
.../apache/karaf/profile/ProfileBuilder.java | 6 +-
.../apache/karaf/profile/ProfileService.java | 54 ++++--
.../profile/impl/PlaceholderResolvers.java | 12 +-
.../apache/karaf/scheduler/ScheduleOptions.java | 6 +-
.../org/apache/karaf/scheduler/Scheduler.java | 32 ++--
.../GreeterServiceComponentFactoryImpl.java | 4 +-
.../service/impl/ManagedGreeterServiceImpl.java | 4 +
.../karaf/scr/management/ScrServiceMBean.java | 30 ++--
.../internal/ScrServiceMBeanImpl.java | 6 +-
.../guard/tools/ACLConfigurationParser.java | 11 +-
.../felix/eventadmin/impl/Configuration.java | 44 +++--
.../eventadmin/impl/handler/EventAdminImpl.java | 48 +++--
.../karaf/shell/commands/impl/LessAction.java | 4 +-
.../karaf/shell/commands/impl/MoreAction.java | 4 +-
.../karaf/shell/commands/impl/WcAction.java | 10 +-
.../org/apache/felix/gogo/commands/Command.java | 17 +-
.../apache/felix/gogo/commands/SubShell.java | 12 +-
.../gogo/commands/converter/ReifiedType.java | 8 +-
.../apache/karaf/shell/commands/Command.java | 16 +-
.../shell/commands/basic/ActionPreparator.java | 14 +-
.../shell/commands/converter/ReifiedType.java | 8 +-
.../karaf/shell/compat/ArgumentCompleter.java | 48 ++---
.../shell/compat/OldArgumentCompleter.java | 46 ++---
.../karaf/shell/console/AbstractAction.java | 4 +-
.../apache/karaf/shell/console/NameScoping.java | 22 ++-
.../apache/karaf/shell/console/SubShell.java | 12 +-
.../console/completer/ArgumentCompleter.java | 60 ++++---
.../shell/console/completer/FileCompleter.java | 12 +-
.../console/completer/OldArgumentCompleter.java | 61 ++++---
.../apache/karaf/shell/console/impl/Main.java | 38 ++--
.../shell/console/impl/jline/ConsoleImpl.java | 2 +-
.../org/apache/karaf/shell/util/ShellUtil.java | 8 +-
.../apache/karaf/shell/api/action/Action.java | 18 +-
.../apache/karaf/shell/api/action/Argument.java | 12 ++
.../apache/karaf/shell/api/action/Command.java | 16 +-
.../karaf/shell/api/action/Completion.java | 6 +
.../apache/karaf/shell/api/action/Option.java | 30 +++-
.../apache/karaf/shell/api/action/Parsing.java | 2 +
.../shell/api/action/lifecycle/Destroy.java | 2 +-
.../karaf/shell/api/action/lifecycle/Init.java | 2 +-
.../shell/api/action/lifecycle/Manager.java | 14 +-
.../shell/api/action/lifecycle/Reference.java | 2 +-
.../apache/karaf/shell/api/console/Command.java | 8 +-
.../karaf/shell/api/console/CommandLine.java | 12 ++
.../apache/karaf/shell/api/console/History.java | 7 +
.../karaf/shell/api/console/Registry.java | 30 +++-
.../apache/karaf/shell/api/console/Session.java | 28 ++-
.../karaf/shell/api/console/SessionFactory.java | 2 +
.../karaf/shell/api/console/SignalListener.java | 3 +-
.../karaf/shell/api/console/Terminal.java | 36 ++--
.../impl/action/command/ArgumentCompleter.java | 22 ++-
.../impl/action/osgi/MultiServiceTracker.java | 2 +-
.../impl/action/osgi/SingleServiceTracker.java | 2 +-
.../shell/impl/console/ConsoleSessionImpl.java | 2 +-
.../shell/impl/console/standalone/Main.java | 30 ++--
.../apache/karaf/shell/support/NameScoping.java | 22 ++-
.../apache/karaf/shell/support/ShellUtil.java | 8 +-
.../shell/support/completers/FileCompleter.java | 13 +-
.../shell/support/converter/ReifiedType.java | 8 +-
.../karaf/shell/support/table/HAlign.java | 6 +-
.../karaf/shell/support/table/ShellTable.java | 7 +-
.../shell/ssh/UserAuthFactoriesFactory.java | 7 +-
.../org/apache/karaf/shell/table/HAlign.java | 6 +-
.../apache/karaf/shell/table/ShellTable.java | 7 +-
.../org/apache/karaf/system/SystemService.java | 50 +++---
.../karaf/system/management/SystemMBean.java | 27 +--
.../org/apache/karaf/tooling/AssemblyMojo.java | 3 +-
.../tooling/commands/CommandHelpPrinter.java | 14 +-
.../tooling/features/AbstractFeatureMojo.java | 14 +-
.../karaf/tooling/utils/DependencyHelper.java | 18 +-
.../tooling/utils/DependencyHelperFactory.java | 12 +-
.../apache/karaf/tooling/utils/MavenUtil.java | 4 +-
.../apache/karaf/tooling/utils/MojoSupport.java | 20 ++-
.../apache/karaf/util/StringEscapeUtils.java | 3 +-
.../CopyOnWriteArrayIdentityList.java | 1 +
.../karaf/util/config/PropertiesLoader.java | 11 +-
.../org/apache/karaf/util/maven/Parser.java | 83 ++++-----
.../karaf/util/process/PumpStreamHandler.java | 44 +++--
.../apache/karaf/util/process/StreamPumper.java | 31 ++--
.../karaf/util/tracker/BaseActivator.java | 75 ++++++--
.../util/tracker/SingleServiceTracker.java | 2 -
.../apache/karaf/web/WebContainerService.java | 6 +-
.../apache/karaf/web/management/WebMBean.java | 10 +-
.../apache/karaf/wrapper/WrapperService.java | 8 +-
165 files changed, 2056 insertions(+), 1660 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Node.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Node.java b/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Node.java
index fe4dc2a..7d0e5ad 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Node.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Node.java
@@ -23,7 +23,7 @@ import java.util.List;
import java.util.Set;
/**
- * Represents a node in a {@link Tree}
+ * Represent a node in a {@link Tree}
*/
public class Node<T> {
@@ -32,7 +32,7 @@ public class Node<T> {
private List<Node<T>> children = new LinkedList<Node<T>>();
/**
- * Creates a new node. Only meant for wrapper use,
+ * Create a new node. Only meant for wrapper use,
* new nodes should be added using the {@link #addChild(Object)} method
*
* @param value the node value
@@ -43,10 +43,11 @@ public class Node<T> {
}
/**
- * Creates a new node. Only meant for wrapper use,
- * new nodes should be added using the {@link #addChild(Object)} method
+ * Create a new node. Only meant for wrapper use,
+ * new nodes should be added using the {@link #addChild(Object)} method.
*
- * @param value the node value
+ * @param value the node value.
+ * @param parent the parent node.
*/
protected Node(T value, Node<T> parent) {
this(value);
@@ -54,24 +55,28 @@ public class Node<T> {
}
/**
- * Access the node's value
+ * Access the node's value.
+ *
+ * @return T the node's value.
*/
public T getValue() {
return value;
}
/**
- * Access the node's child nodes
+ * Access the node's child nodes.
+ *
+ * @return the list of node children.
*/
public List<Node<T>> getChildren() {
return children;
}
/**
- * Adds a child to this node
+ * Add a child to this node.
*
- * @param value the child's value
- * @return the child node
+ * @param value the child's value.
+ * @return the child node.
*/
public Node<T> addChild(T value) {
Node<T> node = new Node<T>(value, this);
@@ -82,7 +87,7 @@ public class Node<T> {
/**
* Give a set of values in the tree.
*
- * @return
+ * @return the set of values.
*/
public Set<T> flatten() {
Set<T> result = new HashSet<T>();
@@ -94,10 +99,10 @@ public class Node<T> {
}
/**
- * Check if the node has an ancestor that represents the given value
+ * Check if the node has an ancestor that represents the given value.
*
- * @param value the node value
- * @return <code>true</code> it there's an ancestor that represents the value
+ * @param value the node value.
+ * @return <code>true</code> if there's an ancestor that represents the value.
*/
public boolean hasAncestor(T value) {
if (parent == null) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java b/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
index 7a7b64e..9bb6501 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/command/bundletree/Tree.java
@@ -20,9 +20,10 @@ import java.io.PrintStream;
import java.io.PrintWriter;
/**
- * Represents a tree that can be written to the console.
+ * <p>Represent a tree that can be written to the console.</p>
*
* The output will look like this:
+ *
* <pre>
* root
* +- child1
@@ -33,7 +34,7 @@ import java.io.PrintWriter;
public class Tree<T> extends Node<T> {
/**
- * Creates a new tree with the given root node
+ * Create a new tree with the given root node.
*
* @param root the root node
*/
@@ -42,28 +43,28 @@ public class Tree<T> extends Node<T> {
}
/**
- * Write the tree to a PrintStream, using the default toString() method to output the node values
+ * Write the tree to a PrintStream, using the default toString() method to output the node values.
*
- * @param stream
+ * @param stream the stream where to write.
*/
public void write(PrintStream stream) {
write(new PrintWriter(stream));
}
/**
- * Write the tree to a PrintStream, using the provided converter to output the node values
+ * Write the tree to a PrintStream, using the provided converter to output the node values.
*
- * @param stream
- * @param converter
+ * @param stream the stream where to write.
+ * @param converter the converter to use.
*/
public void write(PrintStream stream, Converter<T> converter) {
write(new PrintWriter(stream), converter);
}
/**
- * Write the tree to a PrintWriter, using the default toString() method to output the node values
+ * Write the tree to a PrintWriter, using the default toString() method to output the node values.
*
- * @param writer
+ * @param writer the writer where to write.
*/
public void write(PrintWriter writer) {
write(writer, new Converter() {
@@ -74,10 +75,10 @@ public class Tree<T> extends Node<T> {
}
/**
- * Write the tree to a PrintWriter, using the provided converter to output the node values
+ * Write the tree to a PrintWriter, using the provided converter to output the node values.
*
- * @param writer
- * @param converter
+ * @param writer the writer where to write.
+ * @param converter the converter to use.
*/
public void write(PrintWriter writer, Converter<T> converter) {
writer.printf("%s%n", converter.toString(this));
@@ -88,7 +89,7 @@ public class Tree<T> extends Node<T> {
}
/**
- * Interface to convert node values to string
+ * Interface to convert node values to string.
*
* @param <T> the object type for the node value
*/
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleInfo.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleInfo.java b/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleInfo.java
index 962e802..ccd3c46 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleInfo.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleInfo.java
@@ -21,6 +21,7 @@ import java.util.List;
import org.osgi.framework.Bundle;
public interface BundleInfo {
+
long getBundleId();
String getSymbolicName();
String getName();
@@ -30,7 +31,8 @@ public interface BundleInfo {
/**
* Combined bundle state from OSGi and all BundleStateServices
- * @return
+ *
+ * @return the current {@link BundleState}.
*/
BundleState getState();
@@ -40,4 +42,5 @@ public interface BundleInfo {
List<Bundle> getFragments();
List<Bundle> getFragmentHosts();
+
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleStateService.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleStateService.java b/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleStateService.java
index 14d4907..f2c8158 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleStateService.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleStateService.java
@@ -23,6 +23,7 @@ import org.osgi.framework.Bundle;
* also reports on dependencies and status on the injection container level
*/
public interface BundleStateService {
+
public final static String NAME_BLUEPRINT = "Blueprint";
public final static String NAME_SPRING_DM = "Spring DM";
public final static String NAME_DS = "Declarative Services";
@@ -40,8 +41,8 @@ public interface BundleStateService {
* like missing namespace handlers or service dependencies.
* Should also give the details if there are config errors
*
- * @param bundle
- * @return diagnostic details
+ * @param bundle the bundle to get diag for.
+ * @return diagnostic details.
*/
String getDiag(Bundle bundle);
@@ -49,8 +50,8 @@ public interface BundleStateService {
* Report the bundle state from the framework point of view.
* If the framework is not active it should return Unknown.
*
- * @param bundle
- * @return status
+ * @param bundle the bundle to get state for.
+ * @return the current bundle state.
*/
BundleState getState(Bundle bundle);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleWatcher.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleWatcher.java b/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleWatcher.java
index 813fb21..1ecc9f4 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleWatcher.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/core/BundleWatcher.java
@@ -23,24 +23,24 @@ public interface BundleWatcher {
void bundleChanged(BundleEvent event);
/**
- * Adds a Bundle URLs to the watch list.
+ * Add a Bundle URLs to the watch list.
*
- * @param url
+ * @param url the URL to watch.
*/
void add(String url);
/**
- * Removes a bundle URLs from the watch list.
+ * Remove a bundle URLs from the watch list.
*
- * @param url
+ * @param url the URL to stop to watch.
*/
void remove(String url);
/**
- * Returns the bundles that match
+ * Return the bundles that match
*
- * @param url
- * @return
+ * @param url the bundles URL.
+ * @return the list of bundles.
*/
List<Bundle> getBundlesByURL(String url);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
----------------------------------------------------------------------
diff --git a/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java b/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
index e92c95f..104dcba 100644
--- a/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
+++ b/bundle/core/src/main/java/org/apache/karaf/bundle/core/internal/BundleWatcherImpl.java
@@ -59,9 +59,6 @@ public class BundleWatcherImpl implements Runnable, BundleListener, BundleWatche
private List<String> watchURLs = new CopyOnWriteArrayList<String>();
private AtomicInteger counter = new AtomicInteger(0);
- /**
- * Constructor
- */
@SuppressWarnings("deprecation")
public BundleWatcherImpl(BundleContext bundleContext, MavenConfigService mavenConfigService, BundleService bundleService) {
this.bundleContext = bundleContext;
@@ -213,10 +210,11 @@ public class BundleWatcherImpl implements Runnable, BundleListener, BundleWatche
}
/**
- * Returns the location of the Bundle inside the local maven repository.
+ * Return the location of the Bundle inside the local maven repository.
*
- * @param bundle
- * @return
+ * @param localRepository the repository where to look for bundle update.
+ * @param bundle the bundle to check update.
+ * @return the updated file.
*/
private File getBundleExternalLocation(File localRepository, Bundle bundle) {
try {
@@ -240,7 +238,7 @@ public class BundleWatcherImpl implements Runnable, BundleListener, BundleWatche
}
/**
- * Stops the execution of the thread and releases the singleton instance
+ * Stop the execution of the thread and releases the singleton instance.
*/
public void stop() {
running.set(false);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java b/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
index 619c224..2b17d48 100644
--- a/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
+++ b/config/src/main/java/org/apache/karaf/config/command/ConfigPropertyCommandSupport.java
@@ -51,16 +51,18 @@ public abstract class ConfigPropertyCommandSupport extends ConfigCommandSupport
/**
* Perform an action on the properties.
- * @param props
+ *
+ * @param props the dictionary where to apply the action.
*/
@SuppressWarnings("rawtypes")
protected abstract void propertyAction(Dictionary props);
/**
- * Checks if the configuration requires to be updated.
+ * Check if the configuration requires to be updated.
* The default behavior is to update if a valid pid has been passed to the method.
- * @param pid
- * @return
+ *
+ * @param pid the PID to check.
+ * @return <code>true</code> if the configuration requires an update, <code>false</code> else.
*/
protected boolean requiresUpdate(String pid) {
if (pid != null) {
@@ -70,11 +72,11 @@ public abstract class ConfigPropertyCommandSupport extends ConfigCommandSupport
}
}
-
/**
- * Retrieves confguration from the pid, if used or delegates to session from getting the configuration.
- * @return
- * @throws Exception
+ * Retrieve configuration from the pid, if used or delegates to session from getting the configuration.
+ *
+ * @return the edited dictionary.
+ * @throws Exception in case of configuration failure.
*/
@SuppressWarnings("rawtypes")
@Override
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java b/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java
index a0d3a61..015e118 100644
--- a/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java
+++ b/config/src/main/java/org/apache/karaf/config/command/PropListCommand.java
@@ -36,12 +36,14 @@ public class PropListCommand extends ConfigPropertyCommandSupport {
}
/**
- * List commands never requires an update, so it always returns false.
- * @param pid
- * @return
+ * Check if a configuration (identified by PID) requires an update or not.
+ *
+ * @param pid the configuration PID.
+ * @return true if the configuration requires an update, false else (always returns false).
*/
@Override
protected boolean requiresUpdate(String pid) {
return false;
}
+
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java b/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java
index 9cb9f7f..9c46677 100644
--- a/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java
+++ b/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java
@@ -26,7 +26,7 @@ public interface ConfigMBean {
* Get the list of all configuration PIDs.
*
* @return the list of all configuration PIDs.
- * @throws Exception
+ * @throws MBeanException in case of MBean failure.
*/
List<String> getConfigs() throws MBeanException;
@@ -34,7 +34,7 @@ public interface ConfigMBean {
* Create a new configuration for the given PID.
*
* @param pid the configuration PID.
- * @throws Exception
+ * @throws MBeanException in case of MBean failure.
*/
void create(String pid) throws MBeanException;
@@ -42,7 +42,7 @@ public interface ConfigMBean {
* Delete a configuration identified by the given PID.
*
* @param pid the configuration PID to delete.
- * @throws Exception
+ * @throws MBeanException in case of MBean failure.
*/
void delete(String pid) throws MBeanException;
@@ -51,7 +51,7 @@ public interface ConfigMBean {
*
* @param pid the configuration PID.
* @return the list of properties.
- * @throws Exception
+ * @throws MBeanException in case of MBean failure.
*/
Map<String, String> listProperties(String pid) throws MBeanException;
@@ -60,7 +60,7 @@ public interface ConfigMBean {
*
* @param pid the configuration PID.
* @param key the property key.
- * @throws Exception
+ * @throws MBeanException in case of MBean failure.
*/
void deleteProperty(String pid, String key) throws MBeanException;
@@ -70,7 +70,7 @@ public interface ConfigMBean {
* @param pid the configuration PID.
* @param key the property key.
* @param value the value to append to the current property value.
- * @throws Exception
+ * @throws MBeanException in case of MBean failure.
*/
void appendProperty(String pid, String key, String value) throws MBeanException;
@@ -80,7 +80,7 @@ public interface ConfigMBean {
* @param pid the configuration PID.
* @param key the property key.
* @param value the property value.
- * @throws Exception
+ * @throws MBeanException in case of MBean failure.
*/
void setProperty(String pid, String key, String value) throws MBeanException;
@@ -89,19 +89,18 @@ public interface ConfigMBean {
*
* @param pid the configuration PID.
* @param properties the new properties to set in the configuration.
- * @throws MBeanException
+ * @throws MBeanException in case of MBean failure.
*/
void update(String pid, Map<String, String> properties) throws MBeanException;
/**
* Create a factory based configuration.
*
- * @param factoryPid
+ * @param factoryPid the configuration factory PID.
* @param properties the new properties to set in the configuration.
- * @return created pid
- * @throws MBeanException
+ * @return the created PID.
+ * @throws MBeanException in case of MBean failure.
*/
String createFactoryConfiguration(String factoryPid, Map<String, String> properties) throws MBeanException;
-
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/config/src/main/java/org/apache/karaf/config/core/ConfigRepository.java
----------------------------------------------------------------------
diff --git a/config/src/main/java/org/apache/karaf/config/core/ConfigRepository.java b/config/src/main/java/org/apache/karaf/config/core/ConfigRepository.java
index 8121679..75a877b 100644
--- a/config/src/main/java/org/apache/karaf/config/core/ConfigRepository.java
+++ b/config/src/main/java/org/apache/karaf/config/core/ConfigRepository.java
@@ -25,10 +25,11 @@ import org.osgi.service.cm.ConfigurationAdmin;
public interface ConfigRepository {
/**
- * Saves config to storage or ConfigurationAdmin.
- * @param pid
- * @param props
- * @throws IOException
+ * Save config to storage or ConfigurationAdmin.
+ *
+ * @param pid the configuration PID.
+ * @param props the dictionary used to update the configuration.
+ * @throws IOException in case of update failure.
*/
@SuppressWarnings("rawtypes")
void update(String pid, Dictionary props) throws IOException;
@@ -43,9 +44,9 @@ public interface ConfigRepository {
/**
* Create a factory based configuration.
*
- * @param factoryPid
+ * @param factoryPid the configuration factory PID.
* @param properties the new properties to set in the configuration.
- * @return created pid
+ * @return the created configuration PID.
*/
String createFactoryConfiguration(String factoryPid, Dictionary<String, ?> properties);
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpDestination.java
----------------------------------------------------------------------
diff --git a/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpDestination.java b/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpDestination.java
index 39c4edc..0891222 100644
--- a/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpDestination.java
+++ b/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpDestination.java
@@ -23,7 +23,7 @@ import java.io.OutputStream;
public interface DumpDestination {
/**
- * Creates new entry in dump destination.
+ * Create new entry in dump destination.
*
* Destination does not close returned output stream by default, dump
* provider should do this after completing write operation.
@@ -36,6 +36,8 @@ public interface DumpDestination {
/**
* Complete creation of the dump.
+ *
+ * @throws Exception If the save operation fails.
*/
void save() throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpProvider.java
----------------------------------------------------------------------
diff --git a/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpProvider.java b/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpProvider.java
index ec7724c..3d898bd 100644
--- a/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpProvider.java
+++ b/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/DumpProvider.java
@@ -22,7 +22,10 @@ package org.apache.karaf.diagnostic.core;
public interface DumpProvider {
/**
- * Creates dump in given entry.
+ * Create dump in given entry.
+ *
+ * @param destination The destination where to create the dump.
+ * @throws Exception If the dump creation fails.
*/
void createDump(DumpDestination destination) throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/EnvironmentDumpProvider.java
----------------------------------------------------------------------
diff --git a/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/EnvironmentDumpProvider.java b/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/EnvironmentDumpProvider.java
index b86fb8d..662c693 100644
--- a/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/EnvironmentDumpProvider.java
+++ b/diagnostic/boot/src/main/java/org/apache/karaf/diagnostic/core/providers/EnvironmentDumpProvider.java
@@ -50,7 +50,9 @@ public class EnvironmentDumpProvider extends TextDumpProvider {
private final BundleContext bundleContext;
/**
- * Creates new dump entry which contains information about the runtime environment.
+ * Create new dump entry which contains information about the runtime environment.
+ *
+ * @param context The bundle context to use in the MBean.
*/
public EnvironmentDumpProvider(final BundleContext context) {
super("environment.txt");
@@ -247,10 +249,10 @@ public class EnvironmentDumpProvider extends TextDumpProvider {
}
/**
- * Prints the duration in a human readable format as X days Y hours Z minutes etc.
+ * Print the duration in a human readable format as X days Y hours Z minutes etc.
*
- * @param uptime the uptime in millis
- * @return the time used for displaying on screen or in logs
+ * @param uptime The uptime in millis.
+ * @return The time used for displaying on screen or in logs.
*/
private String printDuration(double uptime) {
// Code based on code taken from Karaf
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/DiagnosticDumpMBean.java
----------------------------------------------------------------------
diff --git a/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/DiagnosticDumpMBean.java b/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/DiagnosticDumpMBean.java
index e5dfc99..e6039f3 100644
--- a/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/DiagnosticDumpMBean.java
+++ b/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/DiagnosticDumpMBean.java
@@ -26,7 +26,7 @@ public interface DiagnosticDumpMBean {
* Creates dump over JMX.
*
* @param name Name of the dump.
- * @throws Exception In case of any problems.
+ * @throws MBeanException In case of any problems.
*/
void createDump(String name) throws MBeanException;
@@ -35,7 +35,9 @@ public interface DiagnosticDumpMBean {
*
* @param directory Should dump be created in directory.
* @param name Name of the dump.
- * @throws Exception In case of any problems.
+ * @param noThreadDump True to not include thread dump, false else.
+ * @param noHeapDump True to not include heap dump, false else.
+ * @throws MBeanException In case of any problems.
*/
void createDump(boolean directory, String name, boolean noThreadDump, boolean noHeapDump) throws MBeanException;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/internal/DiagnosticDumpMBeanImpl.java
----------------------------------------------------------------------
diff --git a/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/internal/DiagnosticDumpMBeanImpl.java b/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/internal/DiagnosticDumpMBeanImpl.java
index a7758e1..9a87f66 100644
--- a/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/internal/DiagnosticDumpMBeanImpl.java
+++ b/diagnostic/core/src/main/java/org/apache/karaf/diagnostic/management/internal/DiagnosticDumpMBeanImpl.java
@@ -42,16 +42,16 @@ public class DiagnosticDumpMBeanImpl extends StandardMBean implements Diagnostic
private final static Logger LOGGER = LoggerFactory.getLogger(DiagnosticDumpMBeanImpl.class);
/**
- * Creates new diagnostic mbean.
+ * Create new diagnostic MBean.
*
- * @throws NotCompliantMBeanException
+ * @throws NotCompliantMBeanException If the MBean is not valid.
*/
public DiagnosticDumpMBeanImpl() throws NotCompliantMBeanException {
super(DiagnosticDumpMBean.class);
}
/**
- * Creates dump witch given name
+ * Create dump witch given name.
*
* @param name Name of the dump.
*/
@@ -83,9 +83,12 @@ public class DiagnosticDumpMBeanImpl extends StandardMBean implements Diagnostic
}
/**
- * Sets the bundle context
+ * Set the bundle context.
+ *
+ * @param bundleContext The bundle context to use in the MBean.
*/
public void setBundleContext(BundleContext bundleContext) {
this.bundleContext = bundleContext;
}
+
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/download/DownloadManagers.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/download/DownloadManagers.java b/features/core/src/main/java/org/apache/karaf/features/internal/download/DownloadManagers.java
index b2bdfc0..59d37ea 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/download/DownloadManagers.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/download/DownloadManagers.java
@@ -25,9 +25,6 @@ public final class DownloadManagers {
private DownloadManagers() { }
- /**
- * Creates a DownloadManager
- */
public static DownloadManager createDownloadManager(MavenResolver resolver, ScheduledExecutorService executorService) {
return createDownloadManager(resolver, executorService, 0, 0);
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DefaultFuture.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DefaultFuture.java b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DefaultFuture.java
index 3460496..c641a03 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DefaultFuture.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DefaultFuture.java
@@ -52,6 +52,8 @@ public class DefaultFuture<T extends DefaultFuture> {
/**
* Creates a new instance.
+ *
+ * @param lock the future lock.
*/
public DefaultFuture(Object lock) {
this.lock = lock != null ? lock : this;
@@ -236,7 +238,9 @@ public class DefaultFuture<T extends DefaultFuture> {
}
/**
- * Sets the result of the asynchronous operation, and mark it as finished.
+ * Set the result of the asynchronous operation, and mark it as finished.
+ *
+ * @param newValue the result of the asynchronous operation.
*/
public void setValue(Object newValue) {
synchronized (lock) {
@@ -256,7 +260,9 @@ public class DefaultFuture<T extends DefaultFuture> {
}
/**
- * Returns the result of the asynchronous operation.
+ * Return the result of the asynchronous operation.
+ *
+ * @return the result of the asynchronous operation.
*/
protected Object getValue() {
synchronized (lock) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DownloadManagerHelper.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DownloadManagerHelper.java b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DownloadManagerHelper.java
index 531625f..29bbf2a 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DownloadManagerHelper.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/download/impl/DownloadManagerHelper.java
@@ -29,6 +29,9 @@ public final class DownloadManagerHelper {
/**
* Strips download urls from wrapper protocols.
+ *
+ * @param url the given url.
+ * @return the stripped URL for the wrapper protocols.
*/
public static String stripUrl(String url) {
String strippedUrl = url;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/Bundle.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Bundle.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Bundle.java
index e7a759a..1bd45ef 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Bundle.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Bundle.java
@@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.karaf.features.internal.model;
import javax.xml.bind.annotation.XmlAccessType;
@@ -26,25 +25,23 @@ import javax.xml.bind.annotation.XmlValue;
import org.apache.karaf.features.BundleInfo;
-
/**
- * Deployable element to install.
- * <p/>
- * <p/>
- * <p>Java class for bundle complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
+ * <p>Deployable element to install.</p>
+ *
+ * <p>Java class for bundle complex type.</p>
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.</p>
+ *
* <pre>
- * <complexType name="bundle">
- * <simpleContent>
- * <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
- * <attribute name="start-level" type="{http://www.w3.org/2001/XMLSchema}int" />
- * <attribute name="start" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- * <attribute name="dependency" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- * </extension>
- * </simpleContent>
- * </complexType>
+ * <complexType name="bundle">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>anyURI">
+ * <attribute name="start-level" type="{http://www.w3.org/2001/XMLSchema}int" />
+ * <attribute name="start" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * <attribute name="dependency" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * </extension>
+ * </simpleContent>
+ * </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/Capability.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Capability.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Capability.java
index c2ee7b7..aba425d 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Capability.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Capability.java
@@ -21,22 +21,20 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
-
/**
- * Additional capability for a feature.
- * <p/>
- * <p/>
- * <p>Java class for bundle complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
+ * <p>Additional capability for a feature.</p>
+ *
+ * <p>Java class for bundle complex type.</p>
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.</p>
+ *
* <pre>
- * <complexType name="capability">
- * <simpleContent>
- * <extension base="<http://www.w3.org/2001/XMLSchema>string">
- * </extension>
- * </simpleContent>
- * </complexType>
+ * <complexType name="capability">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ * </extension>
+ * </simpleContent>
+ * </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java
index a7cb405..816b595 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Config.java
@@ -31,24 +31,18 @@ import javax.xml.bind.annotation.XmlValue;
import org.apache.karaf.features.ConfigInfo;
-
/**
- * Configuration entries which should be created during feature installation. This
- * configuration may be used with OSGi Configuration Admin.
- * <p/>
- * <p/>
- * <p>Java class for config complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
+ * <p>Configuration entries which should be created during feature installation. This configuration may be used with OSGi Configuration Admin.</p>
+ * <p>Java class for config complex type.</p>
+ * <p>The following schema fragment specifies the expected content contained within this class.</p>
* <pre>
- * <complexType name="config">
- * <simpleContent>
- * <extension base="<http://www.w3.org/2001/XMLSchema>string">
- * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </extension>
- * </simpleContent>
- * </complexType>
+ * <complexType name="config">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ * <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </extension>
+ * </simpleContent>
+ * </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/ConfigFile.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/ConfigFile.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/ConfigFile.java
index a418622..25d69f3 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/ConfigFile.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/ConfigFile.java
@@ -26,22 +26,18 @@ import org.apache.karaf.features.ConfigFileInfo;
/**
- * Additional configuration files which should be created during feature installation.
- * <p/>
- * <p/>
- * <p>Java class for configFile complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
+ * <p>Additional configuration files which should be created during feature installation.</p>
+ * <p>Java class for configFile complex type.</p>
+ * <p>The following schema fragment specifies the expected content contained within this class.</p>
* <pre>
- * <complexType name="configFile">
- * <simpleContent>
- * <extension base="<http://www.w3.org/2001/XMLSchema>string">
- * <attribute name="finalname" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="override" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- * </extension>
- * </simpleContent>
- * </complexType>
+ * <complexType name="configFile">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ * <attribute name="finalname" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="override" type="{http://www.w3.org/2001/XMLSchema}boolean" />
+ * </extension>
+ * </simpleContent>
+ * </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/Content.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Content.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Content.java
index 02c453b..dffc981 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Content.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Content.java
@@ -16,17 +16,9 @@
*/
package org.apache.karaf.features.internal.model;
-import java.io.IOException;
-import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import javax.xml.bind.annotation.XmlTransient;
@@ -43,24 +35,22 @@ public class Content {
protected List<Bundle> bundle;
/**
- * Gets the value of the config property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
+ * <p>Gets the value of the config property.</p>
+ *
+ * <p>This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the config property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
+ * This is why there is not a <CODE>set</CODE> method for the config property.</p>
+ *
+ * <p>For example, to add a new item, do as follows:</p>
* <pre>
* getConfig().add(newItem);
* </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link Config }
+ *
+ * <p>Objects of the following type(s) are allowed in the list
+ * {@link Config }</p>
+ *
+ * @return the list of config elements in a feature.
*/
public List<Config> getConfig() {
if (config == null) {
@@ -70,24 +60,22 @@ public class Content {
}
/**
- * Gets the value of the configfile property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
+ * <p>Gets the value of the configfile property.</p>
+ *
+ * <p>This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the configfile property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
+ * This is why there is not a <CODE>set</CODE> method for the configfile property.</p>
+ *
+ * <p>For example, to add a new item, do as follows:</p>
* <pre>
* getConfigfile().add(newItem);
* </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link ConfigFile }
+ *
+ * <p>Objects of the following type(s) are allowed in the list
+ * {@link ConfigFile }</p>
+ *
+ * @return the list of configfile elements in a feature.
*/
public List<ConfigFile> getConfigfile() {
if (configfile == null) {
@@ -97,24 +85,22 @@ public class Content {
}
/**
- * Gets the value of the feature property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
+ * <p>Gets the value of the feature property.</p>
+ *
+ * <p>This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the feature property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
+ * This is why there is not a <CODE>set</CODE> method for the feature property.</p>
+ *
+ * <p>For example, to add a new item, do as follows:</p>
* <pre>
* getFeatures().add(newItem);
* </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link Dependency }
+ *
+ * <p>Objects of the following type(s) are allowed in the list
+ * {@link Dependency }</p>
+ *
+ * @return the list of dependency features in a feature.
*/
public List<Dependency> getFeature() {
if (feature == null) {
@@ -124,24 +110,22 @@ public class Content {
}
/**
- * Gets the value of the bundle property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
+ * <p>Gets the value of the bundle property.</p>
+ *
+ * <p>This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the bundle property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
+ * This is why there is not a <CODE>set</CODE> method for the bundle property.</p>
+ *
+ * <p>For example, to add a new item, do as follows:</p>
* <pre>
* getBundle().add(newItem);
* </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link Bundle }
+ *
+ * <p>Objects of the following type(s) are allowed in the list
+ * {@link Bundle }</p>
+ *
+ * @return the list of bundle elements in a feature.
*/
public List<Bundle> getBundle() {
if (bundle == null) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/Dependency.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Dependency.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Dependency.java
index a0a3854..34067c6 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Dependency.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Dependency.java
@@ -24,21 +24,17 @@ import javax.xml.bind.annotation.XmlValue;
/**
- * Dependency of feature.
- * <p/>
- * <p/>
- * <p>Java class for dependency complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
+ * <p>Dependency of feature.</p>
+ * <p>Java class for dependency complex type.</p>
+ * <p>The following schema fragment specifies the expected content contained within this class.</p>
* <pre>
- * <complexType name="dependency">
- * <simpleContent>
- * <extension base="<http://karaf.apache.org/xmlns/features/v1.0.0>featureName">
- * <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" default="0.0.0" />
- * </extension>
- * </simpleContent>
- * </complexType>
+ * <complexType name="dependency">
+ * <simpleContent>
+ * <extension base="<http://karaf.apache.org/xmlns/features/v1.0.0>featureName">
+ * <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" default="0.0.0" />
+ * </extension>
+ * </simpleContent>
+ * </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/Feature.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Feature.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Feature.java
index 8ea59f1..635c2ea 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Feature.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Feature.java
@@ -34,34 +34,30 @@ import org.apache.felix.utils.version.VersionCleaner;
/**
- * Definition of the Feature.
- * <p/>
- * <p/>
- * <p>Java class for feature complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
+ * <p>Definition of the Feature.</p>
+ * <p>Java class for feature complex type.</p>
+ * <p>The following schema fragment specifies the expected content contained within this class.</p>
* <pre>
- * <complexType name="feature">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="details" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- * <element name="config" type="{http://karaf.apache.org/xmlns/features/v1.0.0}config" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="configfile" type="{http://karaf.apache.org/xmlns/features/v1.0.0}configFile" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="feature" type="{http://karaf.apache.org/xmlns/features/v1.0.0}dependency" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="bundle" type="{http://karaf.apache.org/xmlns/features/v1.0.0}bundle" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="conditional" type="{http://karaf.apache.org/xmlns/features/v1.0.0}conditional" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="capability" type="{http://karaf.apache.org/xmlns/features/v1.0.0}capability" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="requirement" type="{http://karaf.apache.org/xmlns/features/v1.0.0}requirement" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="name" use="required" type="{http://karaf.apache.org/xmlns/features/v1.0.0}featureName" />
- * <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" default="0.0.0" />
- * <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
- * <attribute name="resolver" type="{http://karaf.apache.org/xmlns/features/v1.0.0}resolver" />
- * </restriction>
- * </complexContent>
- * </complexType>
+ * <complexType name="feature">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="details" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * <element name="config" type="{http://karaf.apache.org/xmlns/features/v1.0.0}config" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="configfile" type="{http://karaf.apache.org/xmlns/features/v1.0.0}configFile" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="feature" type="{http://karaf.apache.org/xmlns/features/v1.0.0}dependency" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="bundle" type="{http://karaf.apache.org/xmlns/features/v1.0.0}bundle" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="conditional" type="{http://karaf.apache.org/xmlns/features/v1.0.0}conditional" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="capability" type="{http://karaf.apache.org/xmlns/features/v1.0.0}capability" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="requirement" type="{http://karaf.apache.org/xmlns/features/v1.0.0}requirement" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="name" use="required" type="{http://karaf.apache.org/xmlns/features/v1.0.0}featureName" />
+ * <attribute name="version" type="{http://www.w3.org/2001/XMLSchema}string" default="0.0.0" />
+ * <attribute name="description" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * <attribute name="resolver" type="{http://karaf.apache.org/xmlns/features/v1.0.0}resolver" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
@@ -122,7 +118,6 @@ public class Feature extends Content implements org.apache.karaf.features.Featur
this.version = VersionCleaner.clean(version);
}
-
public static org.apache.karaf.features.Feature valueOf(String str) {
if (str.contains(VERSION_SEPARATOR)) {
String strName = str.substring(0, str.indexOf(VERSION_SEPARATOR));
@@ -136,36 +131,32 @@ public class Feature extends Content implements org.apache.karaf.features.Featur
}
-
public String getId() {
return getName() + VERSION_SEPARATOR + getVersion();
}
/**
- * Gets the value of the name property.
+ * Get the value of the name property.
*
- * @return possible object is
- * {@link String }
+ * @return possible object is {@link String}
*/
public String getName() {
return name;
}
/**
- * Sets the value of the name property.
+ * Set the value of the name property.
*
- * @param value allowed object is
- * {@link String }
+ * @param value allowed object is {@link String}
*/
public void setName(String value) {
this.name = value;
}
/**
- * Gets the value of the version property.
+ * Get the value of the version property.
*
- * @return possible object is
- * {@link String }
+ * @return possible object is {@link String}
*/
public String getVersion() {
if (version == null) {
@@ -176,10 +167,9 @@ public class Feature extends Content implements org.apache.karaf.features.Featur
}
/**
- * Sets the value of the version property.
+ * Set the value of the version property.
*
- * @param value allowed object is
- * {@link String }
+ * @param value allowed object is {@link String}
*/
@XmlAttribute
public void setVersion(String value) {
@@ -189,120 +179,139 @@ public class Feature extends Content implements org.apache.karaf.features.Featur
/**
* Since version has a default value ("0.0.0"), returns
* whether or not the version has been set.
+ *
+ * @return true if the feature has a version, false else.
*/
public boolean hasVersion() {
return this.version != null;
}
/**
- * Gets the value of the description property.
+ * Get the value of the description property.
*
- * @return possible object is
- * {@link String }
+ * @return possible object is {@link String}.
*/
public String getDescription() {
return description;
}
/**
- * Sets the value of the description property.
+ * Set the value of the description property.
*
- * @param value allowed object is
- * {@link String }
+ * @param value allowed object is {@link String}.
*/
public void setDescription(String value) {
this.description = value;
}
+ /**
+ * Get the feature details.
+ *
+ * @return the feature details.
+ */
public String getDetails() {
return details;
}
+ /**
+ * Set the feature details.
+ *
+ * @param details the feature details.
+ */
public void setDetails(String details) {
this.details = details;
}
/**
- * Gets the value of the resolver property.
+ * Get the value of the resolver property.
*
- * @return possible object is
- * {@link String }
+ * @return possible object is {@link String}.
*/
public String getResolver() {
return resolver;
}
+ /**
+ * Get the feature install flag.
+ *
+ * @return the feature install flags.
+ */
public String getInstall() {
return install;
}
+ /**
+ * Set the feature install flag.
+ *
+ * @param install the feature install flag.
+ */
public void setInstall(String install) {
this.install = install;
}
/**
- * Sets the value of the resolver property.
+ * Set the value of the resolver property.
*
- * @param value allowed object is
- * {@link String }
+ * @param value allowed object is {@link String}.
*/
public void setResolver(String value) {
this.resolver = value;
}
/**
- * Gets the value of the startLevel property.
+ * Get the value of the startLevel property.
*
- * @return possible object is
- * {@link Integer }
+ * @return possible object is {@link Integer}.
*/
public int getStartLevel() {
return startLevel == null ? 0 : startLevel;
}
/**
- * Sets the value of the startLevel property.
+ * Set the value of the startLevel property.
*
- * @param value allowed object is
- * {@link Integer }
+ * @param value allowed object is {@link Integer}.
*/
public void setStartLevel(Integer value) {
this.startLevel = value;
}
/**
- * Gets the value of the hidden property.
+ * Get the value of the hidden property.
+ *
+ * @return true if the feature is hidden, false else.
*/
public boolean isHidden() {
return hidden == null ? false : hidden;
}
/**
- * Sets the value of the hidden property.
+ * Set the value of the hidden property.
+ *
+ * @param value true to set the feature as hidden, false else.
*/
public void setHidden(Boolean value) {
this.hidden = value;
}
/**
- * Gets the value of the conditional property.
- * <p/>
- * <p/>
+ * Get the value of the conditional property.
+ *
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the feature property.
- * <p/>
- * <p/>
+ *
* For example, to add a new item, do as follows:
+ *
* <pre>
* getConditionals().add(newItem);
* </pre>
- * <p/>
- * <p/>
- * <p/>
+ *
* Objects of the following type(s) are allowed in the list
- * {@link Conditional }
+ * {@link Conditional}.
+ *
+ * @return the list of feature conditions.
*/
public List<Conditional> getConditional() {
if (conditional == null) {
@@ -311,6 +320,11 @@ public class Feature extends Content implements org.apache.karaf.features.Featur
return this.conditional;
}
+ /**
+ * Get the feature capabilities.
+ *
+ * @return the feature capabilities as a {@link List}..
+ */
public List<Capability> getCapabilities() {
if (capability == null) {
capability = new ArrayList<>();
@@ -318,6 +332,11 @@ public class Feature extends Content implements org.apache.karaf.features.Featur
return this.capability;
}
+ /**
+ * Get the feature requirements.
+ *
+ * @return the feature requirements as a {@link List}.
+ */
public List<Requirement> getRequirements() {
if (requirement == null) {
requirement = new ArrayList<>();
@@ -325,14 +344,29 @@ public class Feature extends Content implements org.apache.karaf.features.Featur
return this.requirement;
}
+ /**
+ * Get the feature scoping.
+ *
+ * @return the feature scoping.
+ */
public Scoping getScoping() {
return scoping;
}
+ /**
+ * Set the feature scoping.
+ *
+ * @param scoping the feature scoping.
+ */
public void setScoping(Scoping scoping) {
this.scoping = scoping;
}
+ /**
+ * Return a string representation of the feature.
+ *
+ * @return the feature string representation.
+ */
public String toString() {
return getId();
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/Features.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Features.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Features.java
index 95be1d4..30039ae 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Features.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Features.java
@@ -28,30 +28,25 @@ import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;
-
/**
- * Root element of Feature definition. It contains optional attribute which allow
+ * <p>Root element of Feature definition. It contains optional attribute which allow
* name of repository. This name will be used in shell to display source repository
- * of given feature.
- * <p/>
- * <p/>
- * <p>Java class for featuresRoot complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
+ * of given feature.</p>
+ * <p>Java class for featuresRoot complex type.</p>
+ * <p>The following schema fragment specifies the expected content contained within this class.</p>
* <pre>
- * <complexType name="features">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="repository" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="resource-repository" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
- * <element name="feature" type="{http://karaf.apache.org/xmlns/features/v1.0.0}feature" maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
- * </restriction>
- * </complexContent>
- * </complexType>
+ * <complexType name="features">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="repository" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="resource-repository" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded" minOccurs="0"/>
+ * <element name="feature" type="{http://karaf.apache.org/xmlns/features/v1.0.0}feature" maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
+ * </restriction>
+ * </complexContent>
+ * </complexType>
* </pre>
*/
@XmlRootElement(name = "features")
@@ -70,24 +65,23 @@ public class Features {
private String namespace;
/**
- * Gets the value of the repository property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
+ * <p>Get the value of the repository property.</p>
+ *
+ * <p>This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the repository property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
+ * This is why there is not a <CODE>set</CODE> method for the repository property.</p>
+ *
+ * <p>For example, to add a new item, do as follows:</p>
+ *
* <pre>
* getRepository().add(newItem);
* </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link String }
+ *
+ * <p>Objects of the following type(s) are allowed in the list
+ * {@link String}.</p>
+ *
+ * @return the list of inner repositories.
*/
public List<String> getRepository() {
if (repository == null) {
@@ -97,24 +91,25 @@ public class Features {
}
/**
- * Gets the value of the resource repository property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
+ * <p>Get the value of the resource repository property.</p>
+ *
+ * <p>This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the resource repository property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
+ * returned list will be present inside the JAXB object.</p>
+ *
+ * <p>This is why there is not a <CODE>set</CODE> method for
+ * the resource repository property.</p>
+ *
+ * <p>For example, to add a new item, do as follows:</p>
+ *
* <pre>
* getResourceRepository().add(newItem);
* </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link String }
+ *
+ * <p>Objects of the following type(s) are allowed in the list
+ * {@link String}</p>
+ *
+ * @return the list of inner resource repositories.
*/
public List<String> getResourceRepository() {
if (resourceRepository == null) {
@@ -124,24 +119,25 @@ public class Features {
}
/**
- * Gets the value of the feature property.
- * <p/>
- * <p/>
- * This accessor method returns a reference to the live list,
+ * <p>Get the value of the feature property.</p>
+ *
+ * <p>This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the feature property.
- * <p/>
- * <p/>
- * For example, to add a new item, do as follows:
+ * returned list will be present inside the JAXB object.</p>
+ *
+ * <p>This is why there is not a <CODE>set</CODE> method
+ * for the feature property.</p>
+ *
+ * <p>For example, to add a new item, do as follows:</p>
+ *
* <pre>
* getFeatures().add(newItem);
* </pre>
- * <p/>
- * <p/>
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link Feature }
+ *
+ * <p>Objects of the following type(s) are allowed in the list
+ * {@link Feature}.</p>
+ *
+ * @return the list of inner features.
*/
public List<Feature> getFeature() {
if (feature == null) {
@@ -151,20 +147,18 @@ public class Features {
}
/**
- * Gets the value of the name property.
+ * Get the value of the name property.
*
- * @return possible object is
- * {@link String }
+ * @return possible object is {@link String}.
*/
public String getName() {
return name;
}
/**
- * Sets the value of the name property.
+ * Set the value of the name property.
*
- * @param value allowed object is
- * {@link String }
+ * @param value allowed object is {@link String}.
*/
public void setName(String value) {
this.name = value;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/ObjectFactory.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/ObjectFactory.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/ObjectFactory.java
index 7ad5c18..6ae4cb2 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/ObjectFactory.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/ObjectFactory.java
@@ -21,19 +21,18 @@ import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
-
/**
- * This object contains factory methods for each
+ * <p>This object contains factory methods for each
* Java content interface and Java element interface
- * generated in the org.apache.karaf.features.wrapper package.
- * <p>An ObjectFactory allows you to programatically
+ * generated in the org.apache.karaf.features.wrapper package.</p>
+ * <p>An ObjectFactory allows you to programmatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
- * provided in this class.
+ * provided in this class.</p>
*/
@XmlRegistry
public class ObjectFactory {
@@ -47,49 +46,64 @@ public class ObjectFactory {
}
/**
- * Create an instance of {@link ConfigFile }
+ * Create an instance of {@link ConfigFile}
+ *
+ * @return the config file.
*/
public ConfigFile createConfigFile() {
return new ConfigFile();
}
/**
- * Create an instance of {@link Dependency }
+ * Create an instance of {@link Dependency}
+ *
+ * @return the dependency.
*/
public Dependency createDependency() {
return new Dependency();
}
/**
- * Create an instance of {@link Bundle }
+ * Create an instance of {@link Bundle}
+ *
+ * @return the bundle.
*/
public Bundle createBundle() {
return new Bundle();
}
/**
- * Create an instance of {@link Features }
+ * Create an instance of {@link Features}
+ *
+ * @return the features.
*/
public Features createFeaturesRoot() {
return new Features();
}
/**
- * Create an instance of {@link Config }
+ * Create an instance of {@link Config}
+ *
+ * @return the config.
*/
public Config createConfig() {
return new Config();
}
/**
- * Create an instance of {@link Feature }
+ * Create an instance of {@link Feature}
+ *
+ * @return the feature.
*/
public Feature createFeature() {
return new Feature();
}
/**
- * Create an instance of {@link JAXBElement }{@code <}{@link Features }{@code >}}
+ * Create an instance of {@link JAXBElement}{@code <}{@link Features }{@code >}
+ *
+ * @param value the features
+ * @return the JAXB representation of the given features.
*/
@XmlElementDecl(namespace = "http://karaf.apache.org/xmlns/features/v1.0.0", name = "features")
public JAXBElement<Features> createFeatures(Features value) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/model/Requirement.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/model/Requirement.java b/features/core/src/main/java/org/apache/karaf/features/internal/model/Requirement.java
index 6771e3d..7fbabc3 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/model/Requirement.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/model/Requirement.java
@@ -23,20 +23,16 @@ import javax.xml.bind.annotation.XmlValue;
/**
- * Additional requirement for a feature.
- * <p/>
- * <p/>
- * <p>Java class for bundle complex type.
- * <p/>
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p/>
+ * <p>Additional requirement for a feature.</p>
+ * <p>Java class for bundle complex type.</p>
+ * <p>The following schema fragment specifies the expected content contained within this class.</p>
* <pre>
- * <complexType name="capability">
- * <simpleContent>
- * <extension base="<http://www.w3.org/2001/XMLSchema>string">
- * </extension>
- * </simpleContent>
- * </complexType>
+ * <complexType name="capability">
+ * <simpleContent>
+ * <extension base="<http://www.w3.org/2001/XMLSchema>string">
+ * </extension>
+ * </simpleContent>
+ * </complexType>
* </pre>
*/
@XmlAccessorType(XmlAccessType.FIELD)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java b/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java
index e624b7f..122d59a 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/resolver/ResourceBuilder.java
@@ -1132,6 +1132,7 @@ public final class ResourceBuilder {
*
* @param value the delimited string to parse.
* @param delim the characters delimiting the tokens.
+ * @param trim true to trim the string, false else.
* @return a list of string or an empty list if there are none.
*/
public static List<String> parseDelimitedString(String value, String delim, boolean trim) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/service/BootFeaturesInstaller.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/BootFeaturesInstaller.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/BootFeaturesInstaller.java
index f3b1647..2b3f81b 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/BootFeaturesInstaller.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/BootFeaturesInstaller.java
@@ -58,10 +58,7 @@ public class BootFeaturesInstaller {
* The system separator character.
*/
private static final char SYSTEM_SEPARATOR = File.separatorChar;
-
- /**
- * @param features list of boot features separated by comma. Optionally contains ;version=x.x.x to specify a specific feature version
- */
+
public BootFeaturesInstaller(BundleContext bundleContext,
FeaturesServiceImpl featuresService,
String repositories,
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
index b7b7af6..3a053f4 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/Deployer.java
@@ -191,10 +191,11 @@ public class Deployer {
}
/**
+ * Perform a deployment.
*
* @param dstate deployment state
* @param request deployment request
- * @throws Exception
+ * @throws Exception in case of deployment failure.
*/
public void deploy(DeploymentState dstate, DeploymentRequest request) throws Exception {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
----------------------------------------------------------------------
diff --git a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
index 7e588f0..f040ac2 100644
--- a/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
+++ b/features/core/src/main/java/org/apache/karaf/features/internal/service/FeatureConfigInstaller.java
@@ -149,8 +149,7 @@ public class FeatureConfigInstaller {
/**
* Substitute variables in the final name and append prefix if necessary.
- *
- * <p>
+ *
* <ol>
* <li>If the final name does not start with '${' it is prefixed with
* karaf.base (+ file separator).</li>
@@ -161,7 +160,6 @@ public class FeatureConfigInstaller {
* substituted, it will be prefixed with karaf.base (+ file separator), too.
* </li>
* </ol>
- * </p>
*
* @param finalname
* The final name that should be processed.
[2/5] karaf git commit: KARAF-4392 - Upgrade to maven-javadoc-plugin
2.10.3 and clean javadoc comments
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java
----------------------------------------------------------------------
diff --git a/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java b/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java
index 4c07349..6ac5f53 100644
--- a/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java
+++ b/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/handler/EventAdminImpl.java
@@ -63,10 +63,17 @@ public class EventAdminImpl implements EventAdmin
private boolean addSubject;
/**
- * The constructor of the <tt>EventAdmin</tt> implementation.
+ * The constructor of the <code>EventAdmin</code> implementation.
*
- * @param syncPool The synchronous thread pool
- * @param asyncPool The asynchronous thread pool
+ * @param bundleContext The bundle context to use.
+ * @param syncPool The synchronous thread pool.
+ * @param asyncPool The asynchronous thread pool.
+ * @param timeout The thread execution timeout.
+ * @param ignoreTimeout The thread ignore timeout.
+ * @param requireTopic True to define the topic as required, false else.
+ * @param ignoreTopics The array of topics to ignore.
+ * @param addTimestamp True to add timestamp to the event, false else.
+ * @param addSubject True to add subject to the event, false else.
*/
public EventAdminImpl(
final BundleContext bundleContext,
@@ -93,9 +100,10 @@ public class EventAdminImpl implements EventAdmin
}
/**
- * Check if the event admin is active and return the tracker
- * @return The tracker
- * @throws IllegalArgumentException if the event admin has been stopped
+ * Check if the event admin is active and return the tracker.
+ *
+ * @return The event tracker.
+ * @throws IllegalArgumentException If the event admin has been stopped.
*/
private EventHandlerTracker getTracker() {
final EventHandlerTracker localTracker = tracker;
@@ -106,7 +114,10 @@ public class EventAdminImpl implements EventAdmin
}
/**
- * Check whether the topic should be delivered at all
+ * Check whether the topic should be delivered at all.
+ *
+ * @param event The event.
+ * @return True if the topic is delivered, false else.
*/
private boolean checkTopic( final Event event )
{
@@ -157,9 +168,8 @@ public class EventAdminImpl implements EventAdmin
/**
* Post an asynchronous event.
*
- * @param event The event to be posted by this service
- *
- * @throws IllegalStateException - In case we are stopped
+ * @param event The event to be posted by this service.
+ * @throws IllegalStateException In case we are stopped.
*
* @see org.osgi.service.event.EventAdmin#postEvent(org.osgi.service.event.Event)
*/
@@ -174,9 +184,8 @@ public class EventAdminImpl implements EventAdmin
/**
* Send a synchronous event.
*
- * @param event The event to be send by this service
- *
- * @throws IllegalStateException - In case we are stopped
+ * @param event The event to be send by this service.
+ * @throws IllegalStateException In case we are stopped.
*
* @see org.osgi.service.event.EventAdmin#sendEvent(org.osgi.service.event.Event)
*/
@@ -199,6 +208,13 @@ public class EventAdminImpl implements EventAdmin
/**
* Update the event admin with new configuration.
+ *
+ * @param timeout The event timeout.
+ * @param ignoreTimeout The event ignore timeout.
+ * @param requireTopic True if the event require a topic, false else.
+ * @param ignoreTopics The array of topic to ignore.
+ * @param addTimestamp True to add timestamp to the event, false else.
+ * @param addSubject True to add subject to the event, false else.
*/
public void update(final int timeout,
final String[] ignoreTimeout,
@@ -217,9 +233,13 @@ public class EventAdminImpl implements EventAdmin
}
/**
- * This is a utility method that will throw a <tt>NullPointerException</tt>
+ * This is a utility method that will throw a <code>NullPointerException</code>
* in case that the given object is null. The message will be of the form
* "${name} + may not be null".
+ *
+ * @param object The object to check.
+ * @param name The object name (in the event).
+ * @throws NullPointerException If the object is null.
*/
private void checkNull(final Object object, final String name)
{
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java
----------------------------------------------------------------------
diff --git a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java
index a252177..af7bca7 100644
--- a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java
+++ b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/LessAction.java
@@ -665,9 +665,9 @@ public class LessAction implements Action, SignalListener {
}
/**
- * This is for long running commands to be interrupted by ctrl-c
+ * This is for long running commands to be interrupted by ctrl-c.
*
- * @throws InterruptedException
+ * @throws InterruptedException If the command is interrupted.
*/
public static void checkInterrupted() throws InterruptedException {
Thread.yield();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java
----------------------------------------------------------------------
diff --git a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java
index 971db97..ef92105 100644
--- a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java
+++ b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/MoreAction.java
@@ -130,9 +130,9 @@ public class MoreAction implements Action {
}
/**
- * This is for long running commands to be interrupted by ctrl-c
+ * This is for long running commands to be interrupted by ctrl-c.
*
- * @throws InterruptedException
+ * @throws InterruptedException If the command is interrupted.
*/
public static void checkInterrupted() throws InterruptedException {
Thread.yield();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java
----------------------------------------------------------------------
diff --git a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java
index 93e00bc..4a063f8 100644
--- a/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java
+++ b/shell/commands/src/main/java/org/apache/karaf/shell/commands/impl/WcAction.java
@@ -102,12 +102,10 @@ public class WcAction implements Action {
}
/**
- * Perform the main logic of counting the relevant data within a given input stream.
- * <p/>
- * Note, a line is considered to be terminated by linefeed '\n' or carriage return '\r'.
- * A previous linefeed will be consumed.
- * <p/>
- * This method assumes UTF-8.
+ * <p>Perform the main logic of counting the relevant data within a given input stream.</p>
+ * <p>Note, a line is considered to be terminated by linefeed '\n' or carriage return '\r'.</p>
+ * <p>A previous linefeed will be consumed.</p>
+ * <p>This method assumes UTF-8.</p>
*
* @param inputStream the input stream.
* @return the word count result.
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java b/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java
index 10c494a..c4bc759 100644
--- a/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java
+++ b/shell/console/src/main/java/org/apache/felix/gogo/commands/Command.java
@@ -31,23 +31,32 @@ import java.lang.annotation.ElementType;
@Target({ElementType.TYPE})
@Deprecated
public @interface Command {
+
/**
- * Returns the scope or sub shell of the command
+ * Return the scope or sub shell of the command.
+ *
+ * @return The command scope.
*/
String scope();
/**
- * REturns the name of the command if used inside a shell
+ * Return the name of the command if used inside a shell.
+ *
+ * @return The command name.
*/
String name();
/**
- * Returns the description of the command which is used to generate command line help
+ * Return the description of the command which is used to generate command line help.
+ *
+ * @return The command description.
*/
String description() default "";
/**
- * Returns a detailed description of the command
+ * Return a detailed description of the command.
+ *
+ * @return The command detailed description.
*/
String detailedDescription() default "";
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java b/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java
index 0206964..3d3e85a 100644
--- a/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java
+++ b/shell/console/src/main/java/org/apache/felix/gogo/commands/SubShell.java
@@ -29,17 +29,23 @@ import java.lang.annotation.Target;
public @interface SubShell {
/**
- * Returns the name of the command if used inside a shell
+ * Return the name of the command if used inside a shell.
+ *
+ * @return The name of the command in the shell.
*/
String name();
/**
- * Returns the description of the command which is used to generate command line help
+ * Return the description of the command which is used to generate command line help.
+ *
+ * @return The description of the command in the shell.
*/
String description() default "";
/**
- * Returns a detailed description of the command
+ * Return a detailed description of the command.
+ *
+ * @return The detailed description of the command in the shell.
*/
String detailedDescription() default "";
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java b/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java
index bc835d9..56f6677 100644
--- a/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java
+++ b/shell/console/src/main/java/org/apache/felix/gogo/commands/converter/ReifiedType.java
@@ -30,10 +30,8 @@ package org.apache.felix.gogo.commands.converter;
* a subclass that provide type arguments should be respected. Blueprint
* extender implementations can subclass this class and provide access to the
* generics type graph if used in a conversion. Such a subclass must
- * <em>reify<em> the different Java 5 <code>Type</code> instances into the
+ * <em>reify</em> the different Java 5 <code>Type</code> instances into the
* reified form. That is, a form where the raw Class is available with its optional type arguments as Reified Types.
- *
- * @Immutable
*/
@Deprecated
public class ReifiedType {
@@ -82,7 +80,7 @@ public class ReifiedType {
* object is assignable to Object and therefore no conversion is then
* necessary, this is compatible with older Javas than 5. For this reason,
* the implementation in this class always returns the
- * <code>Object<code> class, regardless of the given index.
+ * <code>Object</code> class, regardless of the given index.
*
* This method should be overridden by a subclass that provides access to
* the generic information.
@@ -98,7 +96,7 @@ public class ReifiedType {
*
* @param i
* The index of the type argument
- * @return <code>ReifiedType(Object.class)<code>, subclasses must override this and return the generic argument at index <code>i</code>
+ * @return <code>ReifiedType(Object.class)</code>, subclasses must override this and return the generic argument at index <code>i</code>
*/
public ReifiedType getActualTypeArgument(int i) {
return ALL;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java b/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java
index 36fd665..79ea355 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/commands/Command.java
@@ -33,22 +33,30 @@ import java.lang.annotation.ElementType;
public @interface Command
{
/**
- * Returns the scope or sub shell of the command
+ * Return the scope or sub shell of the command.
+ *
+ * @return The command scope.
*/
String scope();
/**
- * REturns the name of the command if used inside a shell
+ * Return the name of the command if used inside a shell.
+ *
+ * @return The command name.
*/
String name();
/**
- * Returns the description of the command which is used to generate command line help
+ * Return the description of the command which is used to generate command line help.
+ *
+ * @return The command description.
*/
String description() default "";
/**
- * Returns a detailed description of the command
+ * Return a detailed description of the command.
+ *
+ * @return The command detailed description.
*/
String detailedDescription() default "";
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java b/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java
index e1681b0..9914baa 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/commands/basic/ActionPreparator.java
@@ -28,15 +28,15 @@ public interface ActionPreparator {
/**
* Check if the arguments are valid for the action and inject the arguments into the fields
- * of the action
+ * of the action.
*
- * Using deprecated Action for compatiblity
+ * Using deprecated Action for compatibility.
*
- * @param action
- * @param session
- * @param arguments
- * @return
- * @throws Exception
+ * @param action The action to perform.
+ * @param session The command session to use.
+ * @param arguments The action arguments.
+ * @return True if the action preparation succeed, false else.
+ * @throws Exception In case of preparation failure.
*/
boolean prepare(@SuppressWarnings("deprecation") Action action, CommandSession session, List<Object> arguments) throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java b/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java
index 8f28dc2..4f91dcc 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/commands/converter/ReifiedType.java
@@ -30,10 +30,8 @@ package org.apache.karaf.shell.commands.converter;
* a subclass that provide type arguments should be respected. Blueprint
* extender implementations can subclass this class and provide access to the
* generics type graph if used in a conversion. Such a subclass must
- * <em>reify<em> the different Java 5 <code>Type</code> instances into the
+ * <em>reify</em> the different Java 5 <code>Type</code> instances into the
* reified form. That is, a form where the raw Class is available with its optional type arguments as Reified Types.
- *
- * @Immutable
*/
@Deprecated
public class ReifiedType {
@@ -81,7 +79,7 @@ public class ReifiedType {
* object is assignable to Object and therefore no conversion is then
* necessary, this is compatible with older Javas than 5. For this reason,
* the implementation in this class always returns the
- * <code>Object<code> class, regardless of the given index.
+ * <code>Object</code> class, regardless of the given index.
*
* This method should be overridden by a subclass that provides access to
* the generic information.
@@ -97,7 +95,7 @@ public class ReifiedType {
*
* @param i
* The index of the type argument
- * @return <code>ReifiedType(Object.class)<code>, subclasses must override this and return the generic argument at index <code>i</code>
+ * @return <code>ReifiedType(Object.class)</code>, subclasses must override this and return the generic argument at index <code>i</code>
*/
public ReifiedType getActualTypeArgument(int i) {
return ALL;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java
index 8f52503..df534aa 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/compat/ArgumentCompleter.java
@@ -275,16 +275,20 @@ public class ArgumentCompleter {
}
/**
- * If true, a completion at argument index N will only succeed
- * if all the completions from 0-(N-1) also succeed.
+ * If true, a completion at argument index N will only succeed
+ * if all the completions from 0-(N-1) also succeed.
+ *
+ * @param strict The new value of the strict flag.
*/
public void setStrict(final boolean strict) {
this.strict = strict;
}
/**
- * Returns whether a completion at argument index N will succees
- * if all the completions from arguments 0-(N-1) also succeed.
+ * Return whether a completion at argument index N will success
+ * if all the completions from arguments 0-(N-1) also succeed.
+ *
+ * @return The value of the strict flag.
*/
public boolean getStrict() {
return this.strict;
@@ -393,14 +397,14 @@ public class ArgumentCompleter {
int pos = ret + (list.getBufferPosition() - argpos);
/**
- * Special case: when completing in the middle of a line, and the
- * area under the cursor is a delimiter, then trim any delimiters
- * from the candidates, since we do not need to have an extra
- * delimiter.
+ * Special case: when completing in the middle of a line, and the
+ * area under the cursor is a delimiter, then trim any delimiters
+ * from the candidates, since we do not need to have an extra
+ * delimiter.
*
- * E.g., if we have a completion for "foo", and we
- * enter "f bar" into the buffer, and move to after the "f"
- * and hit TAB, we want "foo bar" instead of "foo bar".
+ * E.g., if we have a completion for "foo", and we
+ * enter "f bar" into the buffer, and move to after the "f"
+ * and hit TAB, we want "foo bar" instead of "foo bar".
*/
String buffer = list.getBuffer();
int cursor = list.getBufferPosition();
@@ -426,14 +430,14 @@ public class ArgumentCompleter {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Return true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -444,8 +448,12 @@ public class ArgumentCompleter {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character is a delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java
index 407244c..27d4e34 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/compat/OldArgumentCompleter.java
@@ -205,16 +205,20 @@ public class OldArgumentCompleter {
}
/**
- * If true, a completion at argument index N will only succeed
- * if all the completions from 0-(N-1) also succeed.
+ * If true, a completion at argument index N will only succeed
+ * if all the completions from 0-(N-1) also succeed.
+ *
+ * @param strict The new value of the strict flag.
*/
public void setStrict(final boolean strict) {
this.strict = strict;
}
/**
- * Returns whether a completion at argument index N will succees
- * if all the completions from arguments 0-(N-1) also succeed.
+ * Return whether a completion at argument index N will succees
+ * if all the completions from arguments 0-(N-1) also succeed.
+ *
+ * @return The current value of the strict flag.
*/
public boolean getStrict() {
return this.strict;
@@ -356,14 +360,14 @@ public class OldArgumentCompleter {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Return true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -374,15 +378,19 @@ public class OldArgumentCompleter {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character is delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
}
/**
- * The result of a delimited buffer.
+ * The result of a delimited buffer.
*/
public static class ArgumentList {
private String[] arguments;
@@ -391,12 +399,10 @@ public class OldArgumentCompleter {
private int bufferPosition;
/**
- * @param arguments the array of tokens
- * @param cursorArgumentIndex the token index of the cursor
- * @param argumentPosition the position of the cursor in the
- * current token
- * @param bufferPosition the position of the cursor in
- * the whole buffer
+ * @param arguments The array of tokens.
+ * @param cursorArgumentIndex The token index of the cursor.
+ * @param argumentPosition The position of the cursor in the current token.
+ * @param bufferPosition The position of the cursor in the whole buffer.
*/
public ArgumentList(String[] arguments, int cursorArgumentIndex,
int argumentPosition, int bufferPosition) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java b/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java
index 634f264..5ebd9ad 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/AbstractAction.java
@@ -37,9 +37,9 @@ public abstract class AbstractAction implements Action {
protected abstract Object doExecute() throws Exception;
/**
- * This is for long running commands to be interrupted by ctrl-c
+ * This is for long running commands to be interrupted by ctrl-c.
*
- * @throws InterruptedException
+ * @throws InterruptedException If the action is interrupted.
*/
public static void checkInterrupted() throws InterruptedException {
Thread.yield();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java b/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java
index 3fcdad3..90d5b21 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/NameScoping.java
@@ -19,7 +19,6 @@ package org.apache.karaf.shell.console;
import org.apache.felix.service.command.CommandSession;
-
/**
* A helper class for name scoping
*/
@@ -29,8 +28,12 @@ public class NameScoping {
public static final String MULTI_SCOPE_MODE_KEY = "MULTI_SCOPE_MODE";
/**
- * Returns the name of the command which can omit the global scope prefix if the command starts with the
- * same prefix as the current application
+ * Return the name of the command which can omit the global scope prefix if the command starts with the
+ * same prefix as the current application.
+ *
+ * @param session The command session.
+ * @param key The command key.
+ * @return The command name without the global prefix.
*/
public static String getCommandNameWithoutGlobalPrefix(CommandSession session, String key) {
if (!isMultiScopeMode(session)) {
@@ -48,7 +51,11 @@ public class NameScoping {
}
/**
- * Returns true if the given scope is the global scope so that it can be hidden from help messages
+ * Return true if the given scope is the global scope so that it can be hidden from help messages.
+ *
+ * @param session The command session.
+ * @param scope The command scope.
+ * @return True if the scope is global, false else.
*/
public static boolean isGlobalScope(CommandSession session, String scope) {
if (session == null)
@@ -64,8 +71,11 @@ public class NameScoping {
}
/**
- * Returns true if we are in multi-scope mode (the default) or if we are in single scope mode which means we
- * avoid prefixing commands with their scope
+ * Return true if we are in multi-scope mode (the default) or if we are in single scope mode which means we
+ * avoid prefixing commands with their scope.
+ *
+ * @param session The command session.
+ * @return True if the command is multi-scoped, false else.
*/
public static boolean isMultiScopeMode(CommandSession session) {
if (session == null)
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java b/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java
index 8f627a6..0bccb94 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/SubShell.java
@@ -22,17 +22,23 @@ package org.apache.karaf.shell.console;
public interface SubShell {
/**
- * Returns the name of the command if used inside a shell
+ * Return the name of the command if used inside a shell.
+ *
+ * @return The name of the command in the shell.
*/
String getName();
/**
- * Returns the description of the command which is used to generate command line help
+ * Return the description of the command which is used to generate command line help.
+ *
+ * @return The description of the command in the shell.
*/
String getDescription();
/**
- * Returns a detailed description of the command
+ * Return a detailed description of the command.
+ *
+ * @return The detailed description of the command in the shell.
*/
String getDetailedDescription();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java
index bdf1733..6e7dea5 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/ArgumentCompleter.java
@@ -279,16 +279,20 @@ public class ArgumentCompleter implements Completer {
}
/**
- * If true, a completion at argument index N will only succeed
- * if all the completions from 0-(N-1) also succeed.
+ * If true, a completion at argument index N will only succeed
+ * if all the completions from 0-(N-1) also succeed.
+ *
+ * @param strict The new value of the strict flag.
*/
public void setStrict(final boolean strict) {
this.strict = strict;
}
/**
- * Returns whether a completion at argument index N will succees
- * if all the completions from arguments 0-(N-1) also succeed.
+ * Return whether a completion at argument index N will success
+ * if all the completions from arguments 0-(N-1) also succeed.
+ *
+ * @return The value of the strict flag.
*/
public boolean getStrict() {
return this.strict;
@@ -405,14 +409,14 @@ public class ArgumentCompleter implements Completer {
int pos = ret + (list.getBufferPosition() - argpos);
/**
- * Special case: when completing in the middle of a line, and the
- * area under the cursor is a delimiter, then trim any delimiters
- * from the candidates, since we do not need to have an extra
- * delimiter.
+ * Special case: when completing in the middle of a line, and the
+ * area under the cursor is a delimiter, then trim any delimiters
+ * from the candidates, since we do not need to have an extra
+ * delimiter.
*
- * E.g., if we have a completion for "foo", and we
- * enter "f bar" into the buffer, and move to after the "f"
- * and hit TAB, we want "foo bar" instead of "foo bar".
+ * E.g., if we have a completion for "foo", and we
+ * enter "f bar" into the buffer, and move to after the "f"
+ * and hit TAB, we want "foo bar" instead of "foo bar".
*/
if ((buffer != null) && (cursor != buffer.length()) && isDelimiter(buffer, cursor)) {
@@ -448,14 +452,14 @@ public class ArgumentCompleter implements Completer {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Return true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -466,15 +470,19 @@ public class ArgumentCompleter implements Completer {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character is a delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
}
/**
- * The result of a delimited buffer.
+ * The result of a delimited buffer.
*/
public static class ArgumentList {
private String[] arguments;
@@ -483,12 +491,10 @@ public class ArgumentCompleter implements Completer {
private int bufferPosition;
/**
- * @param arguments the array of tokens
- * @param cursorArgumentIndex the token index of the cursor
- * @param argumentPosition the position of the cursor in the
- * current token
- * @param bufferPosition the position of the cursor in
- * the whole buffer
+ * @param arguments The array of tokens.
+ * @param cursorArgumentIndex The token index of the cursor.
+ * @param argumentPosition The position of the cursor in the current token.
+ * @param bufferPosition The position of the cursor in the whole buffer.
*/
public ArgumentList(String[] arguments, int cursorArgumentIndex,
int argumentPosition, int bufferPosition) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java
index 477aad0..d66e7b1 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/FileCompleter.java
@@ -24,13 +24,13 @@ import org.apache.felix.service.command.CommandSession;
import org.apache.karaf.shell.console.Completer;
/**
- * A file name completer takes the buffer and issues a list of
- * potential completions.
- * <p/>
- * This completer tries to behave as similar as possible to
+ * <p>A file name completer takes the buffer and issues a list of
+ * potential completions.</p>
+ *
+ * <p>This completer tries to behave as similar as possible to
* <i>bash</i>'s file name completion (using GNU readline)
- * with the following exceptions:
- * <p/>
+ * with the following exceptions:</p>
+ *
* <ul>
* <li>Candidates that are directories will end with "/"</li>
* <li>Wildcard regular expressions are not evaluated or replaced</li>
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java
index 90c3b1a..0cc7252 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/completer/OldArgumentCompleter.java
@@ -196,16 +196,20 @@ public class OldArgumentCompleter implements Completer {
}
/**
- * If true, a completion at argument index N will only succeed
- * if all the completions from 0-(N-1) also succeed.
+ * If true, a completion at argument index N will only succeed
+ * if all the completions from 0-(N-1) also succeed.
+ *
+ * @param strict The new value of the strict flag.
*/
public void setStrict(final boolean strict) {
this.strict = strict;
}
/**
- * Returns whether a completion at argument index N will succees
- * if all the completions from arguments 0-(N-1) also succeed.
+ * Return whether a completion at argument index N will succees
+ * if all the completions from arguments 0-(N-1) also succeed.
+ *
+ * @return The value of the strict flag.
*/
public boolean getStrict() {
return this.strict;
@@ -312,14 +316,14 @@ public class OldArgumentCompleter implements Completer {
int pos = ret + (list.getBufferPosition() - argpos);
/**
- * Special case: when completing in the middle of a line, and the
- * area under the cursor is a delimiter, then trim any delimiters
- * from the candidates, since we do not need to have an extra
- * delimiter.
+ * Special case: when completing in the middle of a line, and the
+ * area under the cursor is a delimiter, then trim any delimiters
+ * from the candidates, since we do not need to have an extra
+ * delimiter.
*
- * E.g., if we have a completion for "foo", and we
- * enter "f bar" into the buffer, and move to after the "f"
- * and hit TAB, we want "foo bar" instead of "foo bar".
+ * E.g., if we have a completion for "foo", and we
+ * enter "f bar" into the buffer, and move to after the "f"
+ * and hit TAB, we want "foo bar" instead of "foo bar".
*/
if ((buffer != null) && (cursor != buffer.length()) && isDelimiter(buffer, cursor)) {
@@ -355,14 +359,14 @@ public class OldArgumentCompleter implements Completer {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Return true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer The complete command buffer.
+ * @param pos The index of the character in the buffer.
+ * @return True if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -373,29 +377,32 @@ public class OldArgumentCompleter implements Completer {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer The complete command buffer.
+ * @param pos The position of the character in the buffer.
+ * @return True if the character is a delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
}
/**
- * The result of a delimited buffer.
+ * The result of a delimited buffer.
*/
public static class ArgumentList {
+
private String[] arguments;
private int cursorArgumentIndex;
private int argumentPosition;
private int bufferPosition;
/**
- * @param arguments the array of tokens
- * @param cursorArgumentIndex the token index of the cursor
- * @param argumentPosition the position of the cursor in the
- * current token
- * @param bufferPosition the position of the cursor in
- * the whole buffer
+ * @param arguments The array of tokens.
+ * @param cursorArgumentIndex The token index of the cursor.
+ * @param argumentPosition The position of the cursor in the current token.
+ * @param bufferPosition The position of the cursor in the whole buffer.
*/
public ArgumentList(String[] arguments, int cursorArgumentIndex,
int argumentPosition, int bufferPosition) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java
index 2b0d0d9..eea5af8 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/Main.java
@@ -57,8 +57,8 @@ public class Main {
/**
* Use this method when the shell is being executed as a top level shell.
*
- * @param args
- * @throws Exception
+ * @param args The console main arguments.
+ * @throws Exception In case of console running failure.
*/
public void run(String args[]) throws Exception {
@@ -80,9 +80,10 @@ public class Main {
* Use this method when the shell is being executed as a command
* of another shell.
*
- * @param parent
- * @param args
- * @throws Exception
+ * @param parent The parent command session.
+ * @param threadIO The thread IO to use to execute the console.
+ * @param args The console arguments.
+ * @throws Exception In case of console running failure.
*/
public void run(CommandSession parent, ThreadIO threadIO, String args[]) throws Exception {
@@ -221,13 +222,14 @@ public class Main {
/**
* Allow sub classes of main to change the ConsoleImpl implementation used.
*
- * @param commandProcessor
- * @param in
- * @param out
- * @param err
- * @param terminal
- * @return
- * @throws Exception
+ * @param commandProcessor The command processor to use.
+ * @param threadIO The thread IO to use for the console.
+ * @param in The input stream.
+ * @param out The output stream.
+ * @param err The error stream.
+ * @param terminal The terminal to use.
+ * @return The created console implementation.
+ * @throws Exception If the console creation fails.
*/
protected ConsoleImpl createConsole(CommandProcessorImpl commandProcessor, ThreadIO threadIO, InputStream in, PrintStream out, PrintStream err, Terminal terminal) throws Exception {
return new ConsoleImpl(commandProcessor, threadIO, in, out, err, terminal, null, null, null, false);
@@ -237,7 +239,7 @@ public class Main {
* Sub classes can override so that their registered commands do not conflict with the default shell
* implementation.
*
- * @return
+ * @return The location of the commands resource.
*/
public String getDiscoveryResource() {
return "META-INF/services/org/apache/karaf/shell/commands";
@@ -299,10 +301,12 @@ public class Main {
}
/**
- * Returns whether or not we are in multi-scope mode.
- * <p/>
- * The default mode is multi-scoped where we prefix commands by their scope. If we are in single
- * scoped mode then we don't use scope prefixes when registering or tab completing commands.
+ * <p>Returns whether or not we are in multi-scope mode.</p>
+ *
+ * <p>The default mode is multi-scoped where we prefix commands by their scope. If we are in single
+ * scoped mode then we don't use scope prefixes when registering or tab completing commands.</p>
+ *
+ * @return True if the command is multi-scoped, false else.
*/
public boolean isMultiScopeMode() {
return true;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
index 1cbe4b5..78d7479 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/console/impl/jline/ConsoleImpl.java
@@ -153,7 +153,7 @@ public class ConsoleImpl implements Console {
/**
* Subclasses can override to use a different history file.
*
- * @return
+ * @return The history file.
*/
protected File getHistoryFile() {
String defaultHistoryPath = new File(System.getProperty("user.home"), ".karaf/karaf.history").toString();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java
----------------------------------------------------------------------
diff --git a/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java b/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java
index 9d21e49..41c6b3c 100644
--- a/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java
+++ b/shell/console/src/main/java/org/apache/karaf/shell/util/ShellUtil.java
@@ -101,11 +101,11 @@ public class ShellUtil {
}
/**
- * Check if a bundle is a system bundle (start level < 50)
+ * Check if a bundle is a system bundle (start level minor than 50)
*
- * @param bundleContext
- * @param bundle
- * @return true if the bundle has start level minor than 50
+ * @param bundleContext The bundle context.
+ * @param bundle The bundle to check.
+ * @return True if the bundle has start level minor than 50, false else.
*/
public static boolean isASystemBundle(BundleContext bundleContext, Bundle bundle) {
int level = bundle.adapt(BundleStartLevel.class).getStartLevel();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java
index 955c837..c206d22 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Action.java
@@ -19,25 +19,25 @@
package org.apache.karaf.shell.api.action;
/**
- * An action is the default implementation of the commands in karaf.
+ * <p>An action is the default implementation of the commands in karaf.
* In OSGi, Actions are discovered using an extender and a new instance
* of the class is created when the command is invoked, so that the
- * implementation does not need to be thread safe.
+ * implementation does not need to be thread safe.</p>
*
- * Before the call to the execute method the action is checked for
+ * <p>Before the call to the execute method the action is checked for
* fields annotated with @Reference and injected with services coming
* from the SessionFactory's Registry or from the OSGi registry.
* Methods annotated with @Init are then called. The next step is to
* inject command line parameters into fields annotated with @Option
- * and @Argument and then call the execute method.
+ * and @Argument and then call the execute method.</p>
*
- * Any class implementing Action must have a no argument constructor. This
+ * <p>Any class implementing Action must have a no argument constructor. This
* is necessary so the help generator can instantiate the class and get the
- * default values.
+ * default values.</p>
*
- * In order to make commands available from the non-OSGi shell,
+ * <p>In order to make commands available from the non-OSGi shell,
* the commands must be listed in a file available at
- * META-INF/services/org/apache/karaf/shell/commmands.
+ * META-INF/services/org/apache/karaf/shell/commmands.</p>
*
* @see org.apache.karaf.shell.api.action.Command
* @see org.apache.karaf.shell.api.action.lifecycle.Service
@@ -49,7 +49,7 @@ public interface Action {
* registry, options and arguments from the command line.
*
* @return <code>null</code> or the result of the action execution
- * @throws Exception
+ * @throws Exception in case of execution failure.
*/
Object execute() throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java
index 8cb1e51..6fc25b3 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Argument.java
@@ -37,16 +37,22 @@ public @interface Argument
/**
* Name of the argument.
* By default, the field name will be used.
+ *
+ * @return the argument name.
*/
String name() default DEFAULT;
/**
* A textual description of the argument.
+ *
+ * @return the argument description.
*/
String description() default "";
/**
* Whether this argument is mandatory or not.
+ *
+ * @return true if the argument is required, false else.
*/
boolean required() default false;
@@ -54,12 +60,16 @@ public @interface Argument
* Position of the argument in the command line.
* When using multiple arguments, the indices must be
* starting from 0 and incrementing without any holes.
+ *
+ * @return the argument index.
*/
int index() default 0;
/**
* The last argument can be multi-valued in which case
* the field type must be a List.
+ *
+ * @return true if the argument has multiple values, false else.
*/
boolean multiValued() default false;
@@ -68,6 +78,8 @@ public @interface Argument
* In case the value displayed in the help to the user should
* be different that the default value of the field, one
* can use this property to specify the value to display.
+ *
+ * @return the argument help string representation.
*/
String valueToShowInHelp() default DEFAULT_STRING;
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java
index 7622b33..4364689 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Command.java
@@ -35,17 +35,23 @@ import java.lang.annotation.Target;
public @interface Command
{
/**
- * Returns the scope or sub shell of the command
+ * Returns the scope or sub shell of the command.
+ *
+ * @return the command scope.
*/
String scope();
/**
- * Returns the name of the command if used inside a shell
+ * Returns the name of the command if used inside a shell.
+ *
+ * @return the command name.
*/
String name();
/**
- * Returns the description of the command which is used to generate command line help
+ * Returns the description of the command which is used to generate command line help.
+ *
+ * @return the command description.
*/
String description() default "";
@@ -54,8 +60,10 @@ public @interface Command
* This description will be shown in the help for the command.
* Longer descriptions can be externalized using a
* <code>classpath:[location]</code> url, in which case the
- * descrition will be loaded from the bundle at the given location,
+ * description will be loaded from the bundle at the given location,
* relatively to the implementation of the command.
+ *
+ * @return the command long description.
*/
String detailedDescription() default "";
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java
index d9a3dca..1eb9b7b 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Completion.java
@@ -42,17 +42,23 @@ public @interface Completion {
* {@link org.apache.karaf.shell.support.completers.StringsCompleter},
* in which case, the <code>values</code> property will be used
* as the list of possible completions.
+ *
+ * @return the completer class.
*/
Class<?> value();
/**
* When using a static completer, returns the possible values.
+ *
+ * @return possible completion values as string array.
*/
String[] values() default { };
/**
* When using a static completer, indicates if completion
* should be done case sensitive or not.
+ *
+ * @return true if the completion is case sensitive, false else.
*/
boolean caseSensitive() default false;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java
index 66065d4..62c9510 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Option.java
@@ -24,21 +24,21 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Used to mark an optional named command line option who's name typically starts with "--" or "-".
+ * <p>Used to mark an optional named command line option who's name typically starts with "--" or "-".
* This annotation can be applied to attributes of a class implementing an Action.
- * The value of the command line option will be automatically converted to the attribute type.
+ * The value of the command line option will be automatically converted to the attribute type.</p>
* @see org.apache.karaf.shell.support.converter.DefaultConverter
- * <p>
+ *
* <h2>Example 1 (boolean option):</h2>
* <code>@Option(name="--force") boolean force;</code>
- * <p>
- * This will be represented as --force on the command line.
- * <p>
+ *
+ * <p>This will be represented as --force on the command line.</p>
+ *
* <h2>Example 2 (mandatory String option):</h2>
* <code>@Option(name="-name",required=true) String name;</code>
- * <p>
- * This will be represented as -name=<myname> on the command line and the command will be rejected if the
- * option is not given.
+ *
+ * <p>This will be represented as -name=<myname> on the command line and the command will be rejected if the
+ * option is not given.</p>
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@@ -48,22 +48,30 @@ public @interface Option
/**
* The name of this option. Usually starting with a '-'.
+ *
+ * @return the option name.
*/
String name();
/**
* Specify a list of aliases for this option.
* Useful when using an option with short or long names.
+ *
+ * @return the option aliases (as a string array).
*/
String[] aliases() default {};
/**
* A textual description of the option.
+ *
+ * @return the option description.
*/
String description() default "";
/**
* Whether this argument is mandatory or not.
+ *
+ * @return true if the option is required, false else.
*/
boolean required() default false;
@@ -72,6 +80,8 @@ public @interface Option
* the field type must be a List. On the command line,
* multi-valued options are used with specifying the option
* multiple times with different values.
+ *
+ * @return true if the option is multivalued, false else.
*/
boolean multiValued() default false;
@@ -80,6 +90,8 @@ public @interface Option
* In case the value displayed in the help to the user should
* be different that the default value of the field, one
* can use this property to specify the value to display.
+ *
+ * @return the option description as shown in the help.
*/
String valueToShowInHelp() default DEFAULT_STRING;
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java
index d9808c5..172b439 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/Parsing.java
@@ -33,6 +33,8 @@ public @interface Parsing {
/**
* The parser class to use for this command.
+ *
+ * @return the parsing value.
*/
Class<?> value();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java
index 86199c0..1a23a3c 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Destroy.java
@@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * A class annotated with {@link @Service} can have a method
+ * A class annotated with {@link Service} can have a method
* annotation with <code>@Destroy</code> in which case the annotated
* method will be called when the object is destroyed.
*/
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java
index d0cd3c0..8d3bfde 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Init.java
@@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * A class annotated with {@link @Service} can have a method
+ * A class annotated with {@link Service} can have a method
* annotation with <code>@Init</code> in which case the annotated
* method will be called after a successful injection.
*/
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java
index 2b26e81..42a7f25 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Manager.java
@@ -19,14 +19,14 @@
package org.apache.karaf.shell.api.action.lifecycle;
/**
- * The <code>Manager</code> service can be used to programmatically
+ * <p>The <code>Manager</code> service can be used to programmatically
* register {@link org.apache.karaf.shell.api.action.Action}s or
- * {@link org.apache.karaf.shell.api.console.Completer}s.
+ * {@link org.apache.karaf.shell.api.console.Completer}s.</p>
*
- * Registered objects must be annotated with the {@link Service} annotation.
+ * <p>Registered objects must be annotated with the {@link Service} annotation.</p>
*
- * Objects will be registered in the {@link org.apache.karaf.shell.api.console.Registry}
- * associated with this <code>Manager</code>.
+ * <p>Objects will be registered in the {@link org.apache.karaf.shell.api.console.Registry}
+ * associated with this <code>Manager</code>.</p>
*
* @see org.apache.karaf.shell.api.console.Registry
* @see org.apache.karaf.shell.api.action.lifecycle.Service
@@ -38,11 +38,15 @@ public interface Manager {
* If the given class is an {@link org.apache.karaf.shell.api.action.Action},
* a {@link org.apache.karaf.shell.api.console.Command} will be created and registered,
* else, an instance of the class will be created, injected and registered.
+ *
+ * @param clazz the Action class to register.
*/
void register(Class<?> clazz);
/**
* Unregister a previously registered class.
+ *
+ * @param clazz the Action class to unregister.
*/
void unregister(Class<?> clazz);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java
index 8239f7d..5892fb3 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/action/lifecycle/Reference.java
@@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * A class annotated with {@link @Service} can have fields
+ * A class annotated with {@link Service} can have fields
* annotated with <code>@Service</code> in which case matching
* services will be retrieved from the
* {@link org.apache.karaf.shell.api.console.Registry} and
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java
index 8ac47fc..7349699 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Command.java
@@ -25,11 +25,15 @@ public interface Command extends Function {
/**
* Retrieve the scope of this command.
+ *
+ * @return the command scope.
*/
String getScope();
/**
* Retrieve the name of this command.
+ *
+ * @return the command name.
*/
String getName();
@@ -37,6 +41,8 @@ public interface Command extends Function {
* Retrieve the description of this command.
* This short command description will be printed
* when using the <code>help</code> command.
+ *
+ * @return the command description.
*/
String getDescription();
@@ -51,7 +57,7 @@ public interface Command extends Function {
/**
* Retrieve the parser associated with this command or null for the default one.
*
- * @return
+ * @return the command parser.
*/
Parser getParser();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java
index 2ed7697..fa68e17 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/CommandLine.java
@@ -28,16 +28,22 @@ public interface CommandLine {
/**
* Retrieve the argument index for the cursor position
+ *
+ * @return the cursor argument index
*/
int getCursorArgumentIndex();
/**
* Retrieve the argument for the cursor position
+ *
+ * @return the cursor argument at position
*/
String getCursorArgument();
/**
* Retrieve the position of the cursor within the argument
+ *
+ * @return the position of the argument
*/
int getArgumentPosition();
@@ -45,16 +51,22 @@ public interface CommandLine {
* List of arguments on the current command.
* If the command line contains multiple commands, only the command corresponding
* to the cursor position is available.
+ *
+ * @return array of arguments
*/
String[] getArguments();
/**
* Retrieve the position of the cursor within the command line.
+ *
+ * @return the buffer position
*/
int getBufferPosition();
/**
* Retrieve the full buffer.
+ *
+ * @return the buffer
*/
String getBuffer();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java
index 10b1b11..be2100d 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/History.java
@@ -23,17 +23,24 @@ public interface History {
/**
* First available index.
+ *
+ * @return first index in the history
*/
int first();
/**
* Last available index.
+ *
+ * @return last index in the history
*/
int last();
/**
* Command at the given index.
* Indices can range from <code>first()</code> to <code>last()</code>.
+ *
+ * @param index the index in the history.
+ * @return the command in the history at the given index.
*/
CharSequence get(int index);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java
index 8df1b22..7d9f131 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Registry.java
@@ -32,14 +32,17 @@ public interface Registry {
/**
* Return a list of available commands.
+ *
+ * @return the list of available commands.
*/
List<Command> getCommands();
/**
+ * Get the actual command with the corresponding scope and name.
*
- * @param scope
- * @param name
- * @return
+ * @param scope the command scope.
+ * @param name the command name.
+ * @return the actual corresponding {@link Command}.
*/
Command getCommand(String scope, String name);
@@ -49,14 +52,16 @@ public interface Registry {
* a {@link Callable} can be registered and each injection will
* call it to obtain the actual service implementation.
*
- * @param factory
- * @param clazz
- * @param <T>
+ * @param factory the service factory.
+ * @param clazz the registration class.
+ * @param <T> the corresponding type.
*/
<T> void register(Callable<T> factory, Class<T> clazz);
/**
* Register a service.
+ *
+ * @param service register a given service.
*/
void register(Object service);
@@ -64,21 +69,34 @@ public interface Registry {
* Unregister a service.
* If the registration has been done using a factory, the same
* factory should be used to unregister.
+ *
+ * @param service unregister a given service.
*/
void unregister(Object service);
/**
* Obtain a service implementing the given class.
+ *
+ * @param clazz the class/interface to look for service.
+ * @param <T> the service type.
+ * @return the service corresponding to the given class/interface.
*/
<T> T getService(Class<T> clazz);
/**
* Obtain a list of services implementing the given class.
+ *
+ * @param clazz the class/interface to look for services.
+ * @param <T> the service type.
+ * @return the list of services corresponding to the given class/interface.
*/
<T> List<T> getServices(Class<T> clazz);
/**
* Check whether the registry has a service of the given class.
+ *
+ * @param clazz the class/interface to look for service.
+ * @return true if at least one service is found for the corresponding interface, false else.
*/
boolean hasService(Class<?> clazz);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java
index cf7f795..4150ead 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Session.java
@@ -60,16 +60,17 @@ public interface Session extends Runnable {
/**
* Execute a program in this session.
*
- * @param commandline
+ * @param commandline the provided command line
* @return the result of the execution
+ * @throws Exception in case of execution failure.
*/
Object execute(CharSequence commandline) throws Exception;
/**
* Get the value of a variable.
*
- * @param name
- * @return
+ * @param name the key name in the session
+ * @return the corresponding object
*/
Object get(String name);
@@ -98,17 +99,17 @@ public interface Session extends Runnable {
* bypass the piping. If the output is piped to a file, then the object
* returned must be null.
*
- * @return
+ * @return the console stream
*/
PrintStream getConsole();
/**
* Prompt the user for a line.
*
- * @param prompt
- * @param mask
- * @return
- * @throws java.io.IOException
+ * @param prompt the session prompt
+ * @param mask the session mask
+ * @return the corresponding line
+ * @throws java.io.IOException in case of prompting failure
*/
String readLine(String prompt, final Character mask) throws IOException;
@@ -116,6 +117,8 @@ public interface Session extends Runnable {
* Retrieve the {@link org.apache.karaf.shell.api.console.Terminal} associated
* with this <code>Session</code> or <code>null</code> if this <code>Session</code>
* is headless.
+ *
+ * @return the session terminal
*/
Terminal getTerminal();
@@ -123,18 +126,24 @@ public interface Session extends Runnable {
* Retrieve the {@link org.apache.karaf.shell.api.console.History} associated
* with this <code>Session</code> or <code>null</code> if this <code>Session</code>
* is headless.
+ *
+ * @return the session history
*/
History getHistory();
/**
* Retrieve the {@link org.apache.karaf.shell.api.console.Registry} associated
* with this <code>Session</code>.
+ *
+ * @return the session registry
*/
Registry getRegistry();
/**
* Retrieve the {@link org.apache.karaf.shell.api.console.SessionFactory} associated
* with this <code>Session</code>.
+ *
+ * @return the session factory
*/
SessionFactory getFactory();
@@ -142,6 +151,9 @@ public interface Session extends Runnable {
* Resolve a command name. If the command name has no specified scope, the fully
* qualified command name will be returned, depending on the scopes and current
* subshell.
+ *
+ * @param name the command name
+ * @return the full qualified command name
*/
String resolveCommand(String name);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java
index a33e62d..2e93f98 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/SessionFactory.java
@@ -34,6 +34,8 @@ public interface SessionFactory {
/**
* Retrieve the {@link Registry} used by this <code>SessionFactory</code>.
+ *
+ * @return a registry built by the factory.
*/
Registry getRegistry();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java
index 3f6927a..25169e4 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/SignalListener.java
@@ -24,8 +24,9 @@ package org.apache.karaf.shell.api.console;
public interface SignalListener {
/**
+ * Callback method called when a signal occurs.
*
- * @param signal
+ * @param signal the signal event.
*/
void signal(Signal signal);
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java
index bed0786..76b4cb0 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/api/console/Terminal.java
@@ -27,57 +27,73 @@ public interface Terminal {
/**
* The infocmp type of this terminal
+ *
+ * @return the terminal type.
*/
String getType();
/**
* Width of the terminal.
+ *
+ * @return the terminal width.
*/
int getWidth();
/**
* Height of the terminal.
+ *
+ * @return the terminal height.
*/
int getHeight();
/**
* Whether ansi sequences are supported or not.
+ *
+ * @return true if ANSI is supported, false else.
*/
boolean isAnsiSupported();
/**
* Whether echo is enabled or not.
+ *
+ * @return true if echo is enabled, false else.
*/
boolean isEchoEnabled();
/**
* Enable or disable echo.
+ *
+ * @param enabled true to enable echo, false else.
*/
void setEchoEnabled(boolean enabled);
/**
- * Add a qualified listener for the specific signal
- * @param listener the listener to register
- * @param signal the signal the listener is interested in
+ * Add a qualified listener for the specific signal.
+ *
+ * @param listener the listener to register.
+ * @param signal the signal the listener is interested in.
*/
void addSignalListener(SignalListener listener, Signal... signal);
/**
- * Add a qualified listener for the specific set of signal
- * @param listener the listener to register
- * @param signals the signals the listener is interested in
+ * Add a qualified listener for the specific set of signal.
+ *
+ * @param listener the listener to register.
+ * @param signals the signals the listener is interested in.
*/
void addSignalListener(SignalListener listener, EnumSet<Signal> signals);
/**
- * Add a global listener for all signals
- * @param listener the listener to register
+ * Add a global listener for all signals.
+ *
+ * @param listener the listener to register.
*/
void addSignalListener(SignalListener listener);
/**
- * Remove a previously registered listener for all the signals it was registered
- * @param listener the listener to remove
+ * Remove a previously registered listener for all the signals it was registered.
+ *
+ * @param listener the listener to remove.
*/
void removeSignalListener(SignalListener listener);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
index adc554b..c766c24 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/command/ArgumentCompleter.java
@@ -314,14 +314,14 @@ public class ArgumentCompleter implements Completer {
}
/**
- * Returns true if the specified character is a whitespace
- * parameter. Check to ensure that the character is not
- * escaped and returns true from
- * {@link #isDelimiterChar}.
+ * Returns true if the specified character is a whitespace
+ * parameter. Check to ensure that the character is not
+ * escaped and returns true from
+ * {@link #isDelimiterChar}.
*
- * @param buffer the complete command buffer
- * @param pos the index of the character in the buffer
- * @return true if the character should be a delimiter
+ * @param buffer the complete command buffer.
+ * @param pos the index of the character in the buffer.
+ * @return true if the character should be a delimiter, false else.
*/
public boolean isDelimiter(final String buffer, final int pos) {
return !isEscaped(buffer, pos) && isDelimiterChar(buffer, pos);
@@ -332,8 +332,12 @@ public class ArgumentCompleter implements Completer {
}
/**
- * The character is a delimiter if it is whitespace, and the
- * preceeding character is not an escape character.
+ * The character is a delimiter if it is whitespace, and the
+ * preceding character is not an escape character.
+ *
+ * @param buffer the complete command buffer.
+ * @param pos the index of the character in the buffer.
+ * @return true if the character should be a delimiter, false else.
*/
public boolean isDelimiterChar(String buffer, int pos) {
return Character.isWhitespace(buffer.charAt(pos));
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java
index 38c0a14..3665396 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/MultiServiceTracker.java
@@ -36,7 +36,7 @@ import org.osgi.framework.ServiceReference;
* Track multiple service by its type.
* When tracking multiple services, the dependency is always considered optional.
*
- * @param <T>
+ * @param <T> the service type (interface)..
*/
public abstract class MultiServiceTracker<T> {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java
index d007382..9b0d24f 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/action/osgi/SingleServiceTracker.java
@@ -32,7 +32,7 @@ import org.osgi.framework.ServiceReference;
* Track a single service by its type.
* When tracking a single service, the dependency is always considered mandatory.
*
- * @param <T>
+ * @param <T> the service type (interface).
*/
public abstract class SingleServiceTracker<T> {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
index 4476211..2925346 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
@@ -191,7 +191,7 @@ public class ConsoleSessionImpl implements Session {
/**
* Subclasses can override to use a different history file.
*
- * @return
+ * @return the history file
*/
protected File getHistoryFile() {
String defaultHistoryPath = new File(System.getProperty("user.home"), ".karaf/karaf.history").toString();
[3/5] karaf git commit: KARAF-4392 - Upgrade to maven-javadoc-plugin
2.10.3 and clean javadoc comments
Posted by jb...@apache.org.
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternParser.java
----------------------------------------------------------------------
diff --git a/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternParser.java b/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternParser.java
index d747ea9..26956f4 100644
--- a/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternParser.java
+++ b/log/src/main/java/org/apache/karaf/log/core/internal/layout/PatternParser.java
@@ -101,10 +101,12 @@ public class PatternParser {
/**
- The option is expected to be in decimal and positive. In case of
- error, zero is returned. */
- protected
- int extractPrecisionOption() {
+ * The option is expected to be in decimal and positive.
+ * In case of error, zero is returned.
+ *
+ * @return The precision value, or zero in case of error.
+ */
+ protected int extractPrecisionOption() {
String opt = extractOption();
int r = 0;
if(opt != null) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/main/src/main/java/org/apache/karaf/main/Main.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/Main.java b/main/src/main/java/org/apache/karaf/main/Main.java
index 1eae257..7426c8c 100644
--- a/main/src/main/java/org/apache/karaf/main/Main.java
+++ b/main/src/main/java/org/apache/karaf/main/Main.java
@@ -95,7 +95,7 @@ public class Main {
* when invoked:
* </p>
* <ol>
- * <li><i><b>Read the system properties file.<b></i> This is a file
+ * <li><i><b>Read the system properties file.</b></i> This is a file
* containing properties to be pushed into <tt>System.setProperty()</tt>
* before starting the framework. This mechanism is mainly shorthand
* for people starting the framework from the command line to avoid having
@@ -123,8 +123,7 @@ public class Main {
* the desired URL using the <tt>felix.config.properties</tt>
* system property; this should be set using the <tt>-D</tt> syntax
* when executing the JVM. Refer to the
- * <a href="Felix.html#Felix(java.util.Map, java.util.List)">
- * <tt>Felix</tt></a> constructor documentation for more
+ * <tt>Felix</tt> constructor documentation for more
* information on the framework configuration options.
* </li>
* <li><i><b>Perform system property variable substitution on configuration
@@ -158,8 +157,7 @@ public class Main {
* the configuration property file cannot be found, the framework will appear to
* be hung or deadlocked. This is not the case, it is executing correctly,
* there is just no way to interact with it. Refer to the
- * <a href="Felix.html#Felix(java.util.Map, java.util.List)">
- * <tt>Felix</tt></a> constructor documentation for more information on
+ * <tt>Felix</tt> constructor documentation for more information on
* framework configuration options.
* </p>
* @param args An array of arguments, all of which are ignored.
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/main/src/main/java/org/apache/karaf/main/ShutdownCallback.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/ShutdownCallback.java b/main/src/main/java/org/apache/karaf/main/ShutdownCallback.java
index bd0bf30..cb70e9a 100644
--- a/main/src/main/java/org/apache/karaf/main/ShutdownCallback.java
+++ b/main/src/main/java/org/apache/karaf/main/ShutdownCallback.java
@@ -18,19 +18,20 @@
*/
package org.apache.karaf.main;
-
/**
* <p>
- * This interface is a callback interface for the stoping process.
+ * This interface is a callback interface for the stopping process.
* It's main purpose is to give the ServiceWrapper a way of waiting
* for the Framework to gracefully stop the Server.
- * <p>
+ * </p>
*/
public interface ShutdownCallback {
/**
* The callback method invoked to inform anyone listening that the
- * Main class is still waiting for the completion of the shutdown.
+ * Main class is still waiting for the completion of the shutdown.
+ *
+ * @param delay The delay to wait for shutdown.
*/
void waitingForShutdown(int delay);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/main/src/main/java/org/apache/karaf/main/Status.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/Status.java b/main/src/main/java/org/apache/karaf/main/Status.java
index 52f6935..4ac8b1a 100644
--- a/main/src/main/java/org/apache/karaf/main/Status.java
+++ b/main/src/main/java/org/apache/karaf/main/Status.java
@@ -31,8 +31,8 @@ public class Status {
* Checks if the shutdown port is bound. The shutdown port can be configured in config.properties
* or in the shutdown port file.
*
- * @param args
- * @throws Exception
+ * @param args The arguments to the status main method.
+ * @throws Exception If an error occurs while checking the status.
*/
public static void main(String[] args) throws Exception {
ConfigProperties config = new ConfigProperties();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/main/src/main/java/org/apache/karaf/main/Stop.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/Stop.java b/main/src/main/java/org/apache/karaf/main/Stop.java
index 3d7d27d..d6af16d 100644
--- a/main/src/main/java/org/apache/karaf/main/Stop.java
+++ b/main/src/main/java/org/apache/karaf/main/Stop.java
@@ -32,11 +32,11 @@ import java.net.Socket;
public class Stop {
/**
- * Sends the shutdown command to the running karaf instance. Uses either a shut down port configured in config.properties or
+ * Send the shutdown command to the running Karaf instance. Uses either a shut down port configured in config.properties or
* the port from the shutdown port file.
*
- * @param args
- * @throws Exception
+ * @param args The arguments to the stop main method.
+ * @throws Exception In case of failure while stopping.
*/
public static void main(String[] args) throws Exception {
ConfigProperties config = new ConfigProperties();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/main/src/main/java/org/apache/karaf/main/lock/GenericJDBCLock.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/lock/GenericJDBCLock.java b/main/src/main/java/org/apache/karaf/main/lock/GenericJDBCLock.java
index 195e914..fe49e92 100644
--- a/main/src/main/java/org/apache/karaf/main/lock/GenericJDBCLock.java
+++ b/main/src/main/java/org/apache/karaf/main/lock/GenericJDBCLock.java
@@ -32,65 +32,65 @@ import org.apache.karaf.main.ConfigProperties;
import org.apache.karaf.main.util.BootstrapLogManager;
/**
- * This classs is the base class used to provide a master/slave configuration for
+ * <p>This class is the base class used to provide a master/slave configuration for
* a given set of active karaf instances using JDBC. </p>
*
- * This implementation uses two different tables. A KARAF_NODE_ID, and KARAF_LOCK tables. The
+ * <p>This implementation uses two different tables. A KARAF_NODE_ID, and KARAF_LOCK tables. The
* KARAF_NODE_ID table is used to generate a unique id for each instance in the cluster. While
* the KARAF_LOCK table is used to determine who is the master of these instances. </p>
*
- * The tables configurations for the different tables are. </p>
+ * <p>The tables configurations for the different tables are. </p>
*
* <pre>
* CREATE TABLE KARAF_NODE_ID ( ID INTEGER DEFAULT 0 )
* CREATE TABLE KARAF_LOCK ( ID INTEGER DEFAULT 0, STATE INTEGER DEFAULT 0, LOCK_DELAY INTEGER DEFAULT 0 )
* </pre>
*
- * The two tables will include a single row each that is created by a single instance in the cluster. </p>
+ * <p>The two tables will include a single row each that is created by a single instance in the cluster. </p>
*
- * The KARAF_NODE_ID table will be updated once for each active karaf instance with there unique id compared
+ * <p>The KARAF_NODE_ID table will be updated once for each active karaf instance with there unique id compared
* to the other instances within the cluster. The single row will contain the next available unique id and
* will not include each clustered instance unique id since these instances can come and go throughout the
* system lifetime. </p>
*
- * The KARAF_LOCK table will be used to determine which of the instances will become the master. The master
+ * <p>The KARAF_LOCK table will be used to determine which of the instances will become the master. The master
* will set the STATE to an initial value and the LOCK_DELAY to a time in milliseconds of when the
* table will be updated. It is the responsibility of the master instance to update the STATE field by the
* allocated lock delay by incrementing the state value. If the STATE value has not been updated by the
* LOCK_DELAY time then a slave has permission to attempt to become the master. </p>
*
- * While the overview does not describe exactly how this is implemented. Here is a description of how this
+ * <p>While the overview does not describe exactly how this is implemented. Here is a description of how this
* is done and what is provides as a fail safe solution. </p>
*
- * Each instance of this class provides an initialization step, a lock, isAlive and release interface. </p>
+ * <p>Each instance of this class provides an initialization step, a lock, isAlive and release interface. </p>
*
- * INITIALIZE:</p>
+ * <p>INITIALIZE:</p>
*
- * During the initialization step it will determine if the given tables exist within the database. We only
+ * <p>During the initialization step it will determine if the given tables exist within the database. We only
* check for a single table since we assume that if one is available then the other must exist. We then
* add a row to each of the tables. The added row to the KARAF_NODE_ID table will set the ID to zero since
* this is consider a non-existent karaf instance. The added row to the KARAF_LOCK will set the ID to zero
* which allows a karaf instances to acquire the lock and become the master instance. </p>
*
*
- * LOCK:</p>
+ * <p>LOCK:</p>
*
- * The current instance will try to acquire the master lock by using the following sql statement. </p>
+ * <p>The current instance will try to acquire the master lock by using the following sql statement. </p>
*
* <pre>
* UPDATE KARAF_LOCK SET ID = unique_id, STATE = state, LOCK_DELAY = lock_delay
* WHERE ID = 0 OR ID = curId
* </pre>
*
- * Now you must be asking why are we using this update statement? The reason is that the statement will
+ * <p>Now you must be asking why are we using this update statement? The reason is that the statement will
* guarantee that only one instance will be able to update this row. The curId is set to this instance
* unique id or to the prior master unique id if the row was not updated within that master lock_delay. </p>
*
- * The current update command will set the curId to this instance unique id. If this fails then it will
+ * <p>The current update command will set the curId to this instance unique id. If this fails then it will
* determine if the current master has not updated the row within its lock_delay. If it hasn't updated
* the row within the allocated time then this instance can try to become the master. </p>
*
- * The current slave instance will then try to steal the lock from the master instance. Why are we trying
+ * <p>The current slave instance will then try to steal the lock from the master instance. Why are we trying
* to steal the lock from the master? The reason is that it is possible that the master instance had a
* hard failure and there is no mechanisms to determine if that is the case. We then assume that it has
* crashed without releasing the lock gracefully. The slave instance then used the following update statement. </p>
@@ -100,31 +100,28 @@ import org.apache.karaf.main.util.BootstrapLogManager;
* WHERE ( ID = 0 OR ID = curId ) AND STATE = curState
* </pre>
*
- * Now why are we using the state value as part of the where clause? The reason that even though the row was
+ * <p>Now why are we using the state value as part of the where clause? The reason that even though the row was
* not updated by the allocated delay time. It is possible that the update statement was performed just after
* the current slave check. This update will insure that the row will be updated if and only if the state was
* also not updated. It is possible that the master instance updated the row after the current slave check
* and we do not want the slave to update the row and make itself the master. This will insure that that will
* not be the case. </p>
*
- * ISALIVE: </p>
+ * <p>ISALIVE: </p>
*
- * This just checks if the connection is active and then just updates the row's STATE by using the lock
+ * <p>This just checks if the connection is active and then just updates the row's STATE by using the lock
* update call mentioned above. </p>
*
- * RELEASE: </p>
+ * <p>RELEASE: </p>
*
- * The release process just updates the KARAF_LOCK ID to zero so that other instances will have a chance
+ * <p>The release process just updates the KARAF_LOCK ID to zero so that other instances will have a chance
* to become the master. </p>
*
- * There are two main scenarios that we need to worry about. Soft and Hard failures. The soft failure
+ * <p>There are two main scenarios that we need to worry about. Soft and Hard failures. The soft failure
* basically allows the master instance to release the master lock and allow other instances to become
* the master. As for a hard failure, the current karaf instance crashes and does not release the lock
* then the other karaf instances will notice that the KARAF_LOCK has not been updated for the current
* master id and then they can compete for the master lock. </p>
- *
- * @author Claudio Corsi
- *
*/
public class GenericJDBCLock implements Lock {
@@ -188,7 +185,7 @@ public class GenericJDBCLock implements Lock {
/**
* This method is called to create an instance of the JDBCStatements instance.
*
- * @return an instance of a JDBCStatement object
+ * @return An instance of a JDBCStatement object.
*/
GenericStatements createStatements() {
GenericStatements statements = new GenericStatements(table, table_id, clusterName);
@@ -255,7 +252,7 @@ public class GenericJDBCLock implements Lock {
/**
* This method is called to determine if the required database schemas have already been created or not.
*
- * @return true, if the schemas are available else false.
+ * @return True, if the schemas are available else false.
*/
boolean schemaExists() {
return schemaExist(this.statements.getLockTableName())
@@ -265,9 +262,8 @@ public class GenericJDBCLock implements Lock {
/**
* This method is called to determine if the required table is available or not.
*
- * @param tableName The name of the table to determine if it exists
- *
- * @return true, if the table exists else false
+ * @param tableName The name of the table to determine if it exists.
+ * @return True, if the table exists else false.
*/
private boolean schemaExist(String tableName) {
ResultSet rs = null;
@@ -342,12 +338,11 @@ public class GenericJDBCLock implements Lock {
}
/**
- * This method is called to determine if this instance jdbc connection is
+ * This method is called to determine if this instance JDBC connection is
* still connected.
*
- * @return true, if the connection is still connected else false
- *
- * @throws SQLException
+ * @return True, if the connection is still connected else false.
+ * @throws SQLException If an SQL error occurs while checking if the lock is connected to the database.
*/
boolean isConnected() throws SQLException {
return lockConnection != null && !lockConnection.isClosed();
@@ -356,7 +351,7 @@ public class GenericJDBCLock implements Lock {
/**
* This method is called to safely close a Statement.
*
- * @param preparedStatement The statement to be closed
+ * @param preparedStatement The statement to be closed.
*/
void closeSafely(Statement preparedStatement) {
if (preparedStatement != null) {
@@ -371,7 +366,7 @@ public class GenericJDBCLock implements Lock {
/**
* This method is called to safely close a ResultSet instance.
*
- * @param rs The result set to be closed
+ * @param rs The result set to be closed.
*/
void closeSafely(ResultSet rs) {
if (rs != null) {
@@ -386,9 +381,8 @@ public class GenericJDBCLock implements Lock {
/**
* This method will return an active connection for this given jdbc driver.
*
- * @return jdbc Connection instance
- *
- * @throws Exception
+ * @return The JDBC connection instance
+ * @throws Exception If the JDBC connection can't be retrieved.
*/
protected Connection getConnection() throws Exception {
if (!isConnected()) {
@@ -399,14 +393,14 @@ public class GenericJDBCLock implements Lock {
}
/**
- * Create a new jdbc connection.
+ * Create a new JDBC connection.
*
- * @param driver The fully qualified driver class name
- * @param url The database connection url
- * @param username The username for the database
- * @param password The password for the data
- * @return a new jdbc connection
- * @throws Exception
+ * @param driver The fully qualified driver class name.
+ * @param url The database connection URL.
+ * @param username The username for the database.
+ * @param password The password for the database.
+ * @return a new JDBC connection.
+ * @throws Exception If the JDBC connection can't be created.
*/
protected Connection createConnection(String driver, String url, String username, String password) throws Exception {
if (url.toLowerCase().startsWith("jdbc:derby")) {
@@ -422,15 +416,15 @@ public class GenericJDBCLock implements Lock {
}
/**
- * This method could be used to inject a mock jdbc connection for testing purposes.
+ * This method could be used to inject a mock JDBC connection for testing purposes.
*
- * @param driver
- * @param url
- * @param username
- * @param password
- * @return
- * @throws ClassNotFoundException
- * @throws SQLException
+ * @param driver The fully qualified driver class name.
+ * @param url The database connection URL.
+ * @param username The username for the database.
+ * @param password The password for the database.
+ * @return a new JDBC connection.
+ * @throws ClassNotFoundException If the JDBC driver class is not found.
+ * @throws SQLException If the JDBC connection can't be created.
*/
protected Connection doCreateConnection(String driver, String url, String username, String password) throws ClassNotFoundException, SQLException {
Class.forName(driver);
@@ -442,7 +436,7 @@ public class GenericJDBCLock implements Lock {
* The different option depend if we are the competing for the master or the lock delay time
* has been exceeded or that we are the master and are update the state.
*
- * @return true, if we are the master instance else false
+ * @return True, if we are the master instance else false.
*
* @see org.apache.karaf.main.lock.Lock#lock()
*/
@@ -509,9 +503,8 @@ public class GenericJDBCLock implements Lock {
* is already the master instance. It will try to update the row given the passed data and will
* succeed if and only if the generated where clause was valid else it would not update the row.
*
- * @param lockUpdateIdStatement The sql statement used to execute the update
- *
- * @return true, if the row was updated else false
+ * @param lockUpdateIdStatement The sql statement used to execute the update.
+ * @return True, if the row was updated else false.
*/
private boolean acquireLock(String lockUpdateIdStatement) {
PreparedStatement preparedStatement = null;
@@ -566,7 +559,7 @@ public class GenericJDBCLock implements Lock {
* This method will check if the jdbc connection is still active and if we were able to
* acquire or update the karaf_table information.
*
- * @return true, if the connection is still active and we still have the lock
+ * @return True, if the connection is still active and we still have the lock.
*
* @see org.apache.karaf.main.lock.Lock#isAlive()
*
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/main/src/main/java/org/apache/karaf/main/lock/GenericStatements.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/lock/GenericStatements.java b/main/src/main/java/org/apache/karaf/main/lock/GenericStatements.java
index e4f1163..88810e9 100644
--- a/main/src/main/java/org/apache/karaf/main/lock/GenericStatements.java
+++ b/main/src/main/java/org/apache/karaf/main/lock/GenericStatements.java
@@ -20,16 +20,16 @@ import java.sql.ResultSet;
import java.sql.SQLException;
/**
- * This class is used to create the sql statements for the karaf lock tables that are used
- * for clustering of karaf instances.
- *
- * It will generate sql statement to create two separate tables, a lock table and a lock id table
+ * <p>This class is used to create the sql statements for the Karaf lock tables that are used
+ * for clustering of Karaf instances.</p>
*
+ * <p>It will generate sql statement to create two separate tables, a lock table and a lock id table:</p>
+ *
+ * <code>
* CREATE TABLE LOCK ( ID INTEGER DEFAULT 0, STATE INTEGER DEFAULT 0, LOCK_DELAY INTEGER DEFAULT 0 )
*
* CREATE TABLE LOCK_ID ( ID INTEGER DEFAULT 0 )
- *
- * @author Claudio Corsi
+ * </code>
*
*/
public class GenericStatements {
@@ -39,12 +39,12 @@ public class GenericStatements {
private final String clusterName;
/**
- * This constructor is used to determine the name of the karaf lock table, the karaf lock id
+ * This constructor is used to determine the name of the Karaf lock table, the Karaf lock id
* table and the name of the clustered instances.
*
- * @param lockTableName The name of the karaf lock table
- * @param lockIdTableName The name of the karaf lock id table
- * @param clusterName the name of the cluster being used
+ * @param lockTableName The name of the karaf lock table.
+ * @param lockIdTableName The name of the karaf lock id table.
+ * @param clusterName the name of the cluster being used.
*/
public GenericStatements(String lockTableName, String lockIdTableName, String clusterName) {
this.lockTableName = lockTableName;
@@ -56,16 +56,16 @@ public class GenericStatements {
* This method will return the name of the cluster that the instances are using to compete for the
* master lock.
*
- * @return cluster node name
+ * @return The cluster node name.
*/
public final String getNodeName() {
return this.clusterName;
}
/**
- * This method will return the name of the karaf lock table.
+ * This method will return the name of the Karaf lock table.
*
- * @return name of the karaf lock table
+ * @return The name of the Karaf lock table.
*/
public final String getLockTableName() {
return lockTableName;
@@ -75,22 +75,30 @@ public class GenericStatements {
* This method will return the insert statement used to create a row in the Lock table and will
* generate the following sql statement.
*
+ * <code>
* INSERT INTO KARAF_LOCK (ID, STATE, LOCK_DELAY) VALUES (0, 0, 0)
+ * </code>
*
- * @return sql insert statement
+ * @return The SQL insert statement.
*/
private String getLockTableInitialInsertStatement() {
return "INSERT INTO " + this.getLockTableName() + "(ID, STATE, LOCK_DELAY) VALUES (0, 0, 0)";
}
/**
- * This will be called when trying to acquire the lock and will generate the following sql statemnt.
+ * This will be called when trying to acquire the lock and will generate the following sql statement.
*
+ * <code>
* UPDATE KARAF_LOCK SET ID = ?, STATE = ?, LOCK_DELAY = ? WHERE ID = 0 OR ID = ?
+ * </code>
*
* You are then expected to assign the values associated with the sql statement.
*
- * @return sql update statement
+ * @param id The new ID.
+ * @param state The new lock state.
+ * @param lock_delay The new lock delay.
+ * @param curId The current ID.
+ * @return The SQL update statement.
*/
public String getLockUpdateIdStatement(int id, int state, int lock_delay, int curId) {
return String.format("UPDATE %s SET ID = %d, STATE = %d, LOCK_DELAY = %d WHERE ID = 0 OR ID = %d",
@@ -98,14 +106,21 @@ public class GenericStatements {
}
/**
- * This will be called when trying to steal the lock and will generate the following sql statemnt.
+ * This will be called when trying to steal the lock and will generate the following sql statement.
*
+ * <code>
* UPDATE KARAF_LOCK SET ID = ?, STATE = ?, LOCK_DELAY = ? WHERE ( ID = 0 OR ID = ? ) AND STATE = ?
+ * </code>
*
- * You are then responsible to assign the values of the different fields using standard jdbc statement
+ * You are then responsible to assign the values of the different fields using standard JDBC statement
* calls.
- *
- * @return sql update statement
+ *
+ * @param id The new ID.
+ * @param state The new lock state.
+ * @param lock_delay The new lock delay.
+ * @param curId The current ID.
+ * @param curState The current state.
+ * @return The SQL update statement.
*/
public String getLockUpdateIdStatementToStealLock(int id, int state, int lock_delay, int curId, int curState) {
return String.format("UPDATE %s SET ID = %d, STATE = %d, LOCK_DELAY = %d WHERE ( ID = 0 OR ID = %d ) AND STATE = %d",
@@ -117,7 +132,8 @@ public class GenericStatements {
* statement.
*
* UPDATE KARAF_LOCK SET ID = 0 WHERE ID = ?
- *
+ *
+ * @param id The current ID.
* @return sql update statement
*/
public String getLockResetIdStatement(int id) {
@@ -128,7 +144,9 @@ public class GenericStatements {
* This will be called to determine the current master instance for the lock table and will
* generate the following sql statement.
*
+ * <code>
* SELECT ID, STATE, LOCK_DELAY FROM KARAF_LOCK
+ * </code>
*
* @return sql select statement
*/
@@ -152,25 +170,26 @@ public class GenericStatements {
* This method should only be called during the creation of the KARAF_LOCK table and will
* generate the following sql statement.
*
+ * <code>
* CREATE TABLE KARAF_LOCK (ID INTEGER DEFAULT 0, STATE INTEGER DEFAULT 0, LOCK_DELAY INTEGER DEFAULT 0)
- *
- * @return sql create table statement
+ * </code>
+ *
+ * @return The SQL create table statement.
*/
private String getLockTableCreateStatement() {
return "CREATE TABLE " + this.getLockTableName()
+ " ( ID INTEGER DEFAULT 0, STATE INTEGER DEFAULT 0 , LOCK_DELAY INTEGER DEFAULT 0 )";
}
-
- // ================== LOCK ID TABLE ========================
-
/**
* This method will generate the create table sql statement to create the karaf id table and will
* generate the following sql statement.
*
+ * <code>
* CREATE TABLE KARAF_ID ( ID INTEGER DEFAULT 0 )
+ * </code>
*
- * @return sql create table statement
+ * @return The SQL create table statement.
*/
private String getLockIdTableCreateStatement() {
return "CREATE TABLE " + this.getLockIdTableName()
@@ -181,9 +200,11 @@ public class GenericStatements {
* This method will return the sql statement to retreive the id of the lock id table and will
* generate the following sql statement.
*
+ * <code>
* SELECT ID FROM KARAF_ID
+ * </code>
*
- * @return sql select statement
+ * @return The SQL select statement.
*/
public String getLockIdSelectStatement() {
return "SELECT ID FROM " + this.getLockIdTableName();
@@ -197,18 +218,22 @@ public class GenericStatements {
* This method will return the update statement for the lock id table and will generate the
* following sql statement.
*
+ * <code>
* UPDATE KARAF_ID SET ID = ? WHERE ID = ?
+ * </code>
*
- * @return sql update statement
+ * @param id The new ID.
+ * @param curId The current ID.
+ * @return The SQL update statement.
*/
public String getLockIdUpdateIdStatement(int id, int curId) {
return String.format("UPDATE %s SET ID = %d WHERE ID = %d", this.getLockIdTableName(), id, curId);
}
/**
- * This method will return the name of the karaf lock id table.
+ * This method will return the name of the Karaf lock id table.
*
- * @return name of the karaf lock id table
+ * @return The name of the Karaf lock id table.
*/
public final String getLockIdTableName() {
return lockIdTableName;
@@ -217,7 +242,8 @@ public class GenericStatements {
/**
* This method will return the required sql statements to initialize the lock database.
*
- * @return array of sql statements
+ * @param moment The moment.
+ * @return The array of SQL statements.
*/
public String[] getLockCreateSchemaStatements(long moment) {
return new String[] {
@@ -232,9 +258,11 @@ public class GenericStatements {
* This method will return the insert statement to insert a row in the lock id table and will
* generate the following sql statement.
*
+ * <code>
* INSERT INTO KARAF_ID (ID) VALUES (0)
+ * </code>
*
- * @return sql insert statement
+ * @return The SQL insert statement.
*/
private String getLockIdTableInitialInsertStatement() {
return "INSERT INTO " + this.getLockIdTableName() + "(ID) VALUES (0)";
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/main/src/main/java/org/apache/karaf/main/lock/Lock.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/lock/Lock.java b/main/src/main/java/org/apache/karaf/main/lock/Lock.java
index 869849b..9242fd0 100644
--- a/main/src/main/java/org/apache/karaf/main/lock/Lock.java
+++ b/main/src/main/java/org/apache/karaf/main/lock/Lock.java
@@ -24,23 +24,23 @@ public interface Lock {
* A KeepAlive function to maintain the lock.
* Indicates whether or not the lock could be aquired.
*
- * @return true if connection lock retained, false otherwise.
- * @throws Exception
+ * @return True if connection lock retained, false otherwise.
+ * @throws Exception If the lock can't be acquired.
*/
boolean lock() throws Exception;
/**
* Terminate the lock connection safely.
*
- * @throws Exception
+ * @throws Exception If the lock can't be released.
*/
void release() throws Exception;
/**
- * Indicates whether or not the lock still exists.
+ * Indicate whether or not the lock still exists.
*
- * @return true, if the lock still exists, otherwise false.
- * @throws Exception
+ * @return True, if the lock still exists, otherwise false.
+ * @throws Exception If an error occurs while checking if the lock is alive.
*/
boolean isAlive() throws Exception;
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/main/src/main/java/org/apache/karaf/main/util/SimpleMavenResolver.java
----------------------------------------------------------------------
diff --git a/main/src/main/java/org/apache/karaf/main/util/SimpleMavenResolver.java b/main/src/main/java/org/apache/karaf/main/util/SimpleMavenResolver.java
index 69d787a..a5e8550 100644
--- a/main/src/main/java/org/apache/karaf/main/util/SimpleMavenResolver.java
+++ b/main/src/main/java/org/apache/karaf/main/util/SimpleMavenResolver.java
@@ -42,7 +42,7 @@ public class SimpleMavenResolver implements ArtifactResolver {
/**
* Resolve from pax-url format for maven URIs to the file that is referenced by the URI
* The URI format is:
- * mvn:<groupId>/<artifactId>/<version>/<type>/<classifier>
+ * mvn:<groupId>/<artifactId>/<version>/<type>/<classifier>
*
* If artifactUri does not match the Syntax the local file that corresponds to the path is returned
*
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java
----------------------------------------------------------------------
diff --git a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java
index 0e746b5..d0a20f0 100644
--- a/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java
+++ b/management/server/src/main/java/org/apache/karaf/management/ConnectorServerFactory.java
@@ -137,7 +137,7 @@ public class ConnectorServerFactory {
/**
* Authenticator type to use. Acceptable values are "none", "password", and "certificate"
*
- * @param value
+ * @param value The authenticator type: "none", "password", "certificate".
*/
public void setAuthenticatorType(String value) {
this.authenticatorType = AuthenticatorType.valueOf(value.toUpperCase());
@@ -146,7 +146,7 @@ public class ConnectorServerFactory {
/**
* Use this param to allow KeyStoreManager to wait for expected keystores to be loaded by other bundle
*
- * @param keyStoreAvailabilityTimeout
+ * @param keyStoreAvailabilityTimeout The keystore timeout.
*/
public void setKeyStoreAvailabilityTimeout(long keyStoreAvailabilityTimeout) {
this.keyStoreAvailabilityTimeout = keyStoreAvailabilityTimeout;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/management/server/src/main/java/org/apache/karaf/management/JMXSecurityMBean.java
----------------------------------------------------------------------
diff --git a/management/server/src/main/java/org/apache/karaf/management/JMXSecurityMBean.java b/management/server/src/main/java/org/apache/karaf/management/JMXSecurityMBean.java
index 927dcca..93dc784 100644
--- a/management/server/src/main/java/org/apache/karaf/management/JMXSecurityMBean.java
+++ b/management/server/src/main/java/org/apache/karaf/management/JMXSecurityMBean.java
@@ -21,10 +21,10 @@ import java.util.List;
import java.util.Map;
/**
- * Security MBean. This MBean can be used to find out whether the currently logged user can access certain MBeans
+ * <p>Security MBean. This MBean can be used to find out whether the currently logged user can access certain MBeans
* or invoke operations on these MBeans. It can be used when building client-facing consoles to ensure that only
- * operations appropriate for the current user are presented.<p/>
- * This MBean does not actually invoke any operations on the given objects, it only checks permissions.
+ * operations appropriate for the current user are presented.</p>
+ * <p>This MBean does not actually invoke any operations on the given objects, it only checks permissions.</p>
*/
public interface JMXSecurityMBean {
@@ -55,32 +55,32 @@ public interface JMXSecurityMBean {
/**
* Checks whether the current user can invoke any methods on a JMX MBean.
*
- * @param objectName the Object Name of the JMX MBean.
- * @return {@code true} if there is at least one method on the MBean that the user can invoke, {@code false} else.
- * @throws Exception
+ * @param objectName The Object Name of the JMX MBean.
+ * @return {@code True} if there is at least one method on the MBean that the user can invoke, {@code false} else.
+ * @throws Exception If the invocation check fails.
*/
boolean canInvoke(String objectName) throws Exception;
/**
* Checks whether the current user can invoke overload of the given method.
*
- * @param objectName the Object Name of the JMX MBean.
- * @param methodName the name of the method to check.
- * @return {@code true} if there is an overload of the specified method that the user can invoke, {@code false} else.
- * @throws Exception
+ * @param objectName The Object Name of the JMX MBean.
+ * @param methodName The name of the method to check.
+ * @return {@code True} if there is an overload of the specified method that the user can invoke, {@code false} else.
+ * @throws Exception If the invocation check fails.
*/
boolean canInvoke(String objectName, String methodName) throws Exception;
/**
* Checks whether the current user can invoke the given method.
*
- * @param objectName the Object Name of the JMX MBean.
- * @param methodName the name of the method to check.
- * @param argumentTypes the argument types of the method.
- * @return {@code true} if the user is allowed to invoke the method, or any of the methods with the given name if
+ * @param objectName The Object Name of the JMX MBean.
+ * @param methodName The name of the method to check.
+ * @param argumentTypes The argument types of the method.
+ * @return {@code True} if the user is allowed to invoke the method, or any of the methods with the given name if
* {@code null} is used for the arguments. There may still be certain values that the user does not have permissions
* to pass to the method.
- * @throws Exception
+ * @throws Exception If the invocation check fails.
*/
boolean canInvoke(String objectName, String methodName, String[] argumentTypes) throws Exception;
@@ -88,10 +88,10 @@ public interface JMXSecurityMBean {
* Bulk operation to check whether the current user can access the requested MBeans or invoke the requested
* methods.
*
- * @param bulkQuery a map of Object Name to requested operations. Operations can be specified with or without
+ * @param bulkQuery <p>a map of Object Name to requested operations. Operations can be specified with or without
* argument types. An operation without arguments matches any overloaded method with this
* name. If an empty list is provided for the operation names, a check is done whether the
- * current user can invoke <em>any</em> operation on the MBean.<p/>
+ * current user can invoke <em>any</em> operation on the MBean.</p>
* Example:
* <pre>{@code
* Map<String, List<String>> query = new HashMap<>();
@@ -104,7 +104,7 @@ public interface JMXSecurityMBean {
* TabularData result = mb.canInvoke(query);
* }</pre>
* @return A Tabular Data object with the result. This object conforms the structure as defined in {@link #CAN_INVOKE_TABULAR_TYPE}
- * @throws Exception
+ * @throws Exception If the invocation check fails.
*/
TabularData canInvoke(Map<String, List<String>> bulkQuery) throws Exception;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
----------------------------------------------------------------------
diff --git a/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java b/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
index 4259326..831ab47 100644
--- a/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
+++ b/management/server/src/main/java/org/apache/karaf/management/KarafMBeanServerGuard.java
@@ -38,6 +38,7 @@ import java.util.regex.Pattern;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
public class KarafMBeanServerGuard implements InvocationHandler {
private static final Logger LOG = LoggerFactory.getLogger(KarafMBeanServerGuard.class);
@@ -46,7 +47,6 @@ public class KarafMBeanServerGuard implements InvocationHandler {
private static final String JMX_ACL_WHITELIST = "jmx.acl.whitelist";
-
private static final String JMX_OBJECTNAME_PROPERTY_WILDCARD = "_";
private static final Comparator<String[]> WILDCARD_PID_COMPARATOR = new WildcardPidComparator();
@@ -85,27 +85,27 @@ public class KarafMBeanServerGuard implements InvocationHandler {
}
/**
- * Returns whether there is any method that the current user can invoke.
+ * Return whether there is any method that the current user can invoke.
*
- * @param mbeanServer the MBeanServer where the object is registered.
- * @param objectName the ObjectName to check.
- * @return {@code true} if there is a method on the object that can be invoked, {@code false} else.
- * @throws JMException
- * @throws IOException
+ * @param mbeanServer The MBeanServer where the object is registered.
+ * @param objectName The ObjectName to check.
+ * @return {@code True} if there is a method on the object that can be invoked, {@code false} else.
+ * @throws JMException If the invocation fails.
+ * @throws IOException If the invocation fails.
*/
public boolean canInvoke(MBeanServer mbeanServer, ObjectName objectName) throws JMException, IOException {
return canInvoke(null, mbeanServer, objectName);
}
/**
- * Returns whether there is any method that the current user can invoke.
+ * Return whether there is any method that the current user can invoke.
*
- * @param context {@link BulkRequestContext} for optimized ConfigAdmin access, may be <code>null</code>
- * @param mbeanServer the MBeanServer where the object is registered.
- * @param objectName the ObjectName to check.
- * @return {@code true} if there is a method on the object that can be invoked, {@code false} else.
- * @throws JMException
- * @throws IOException
+ * @param context {@link BulkRequestContext} for optimized ConfigAdmin access, may be <code>null</code>.
+ * @param mbeanServer The MBeanServer where the object is registered.
+ * @param objectName The ObjectName to check.
+ * @return {@code True} if there is a method on the object that can be invoked, {@code false} else.
+ * @throws JMException If the invocation fails.
+ * @throws IOException If the invocation fails.
*/
public boolean canInvoke(BulkRequestContext context, MBeanServer mbeanServer, ObjectName objectName) throws JMException, IOException {
MBeanInfo info = mbeanServer.getMBeanInfo(objectName);
@@ -135,29 +135,29 @@ public class KarafMBeanServerGuard implements InvocationHandler {
}
/**
- * Returns whether there is any overload of the specified method that can be invoked by the current user.
+ * Return whether there is any overload of the specified method that can be invoked by the current user.
*
- * @param mbeanServer the MBeanServer where the object is registered.
- * @param objectName the MBean ObjectName.
- * @param methodName the name of the method.
- * @return {@code true} if there is an overload of the method that can be invoked by the current user.
- * @throws JMException
- * @throws IOException
+ * @param mbeanServer The MBeanServer where the object is registered.
+ * @param objectName The MBean ObjectName.
+ * @param methodName The name of the method.
+ * @return {@code True} if there is an overload of the method that can be invoked by the current user.
+ * @throws JMException If the invocation fails.
+ * @throws IOException If the invocation fails.
*/
public boolean canInvoke(MBeanServer mbeanServer, ObjectName objectName, String methodName) throws JMException, IOException {
return canInvoke(null, mbeanServer, objectName, methodName);
}
/**
- * Returns whether there is any overload of the specified method that can be invoked by the current user.
+ * Return whether there is any overload of the specified method that can be invoked by the current user.
*
- * @param context {@link BulkRequestContext} for optimized ConfigAdmin access, may be <code>null</code>
- * @param mbeanServer the MBeanServer where the object is registered.
- * @param objectName the MBean ObjectName.
- * @param methodName the name of the method.
- * @return {@code true} if there is an overload of the method that can be invoked by the current user.
- * @throws JMException
- * @throws IOException
+ * @param context {@link BulkRequestContext} for optimized ConfigAdmin access, may be <code>null</code>.
+ * @param mbeanServer The MBeanServer where the object is registered.
+ * @param objectName The MBean ObjectName.
+ * @param methodName The name of the method.
+ * @return {@code True} if there is an overload of the method that can be invoked by the current user.
+ * @throws JMException If the invocation fails.
+ * @throws IOException If the invocation fails.
*/
public boolean canInvoke(BulkRequestContext context, MBeanServer mbeanServer, ObjectName objectName, String methodName) throws JMException, IOException {
methodName = methodName.trim();
@@ -191,35 +191,35 @@ public class KarafMBeanServerGuard implements InvocationHandler {
}
/**
- * Returns true if the method on the MBean with the specified signature can be invoked.
+ * Return true if the method on the MBean with the specified signature can be invoked.
*
- * @param mbeanServer the MBeanServer where the object is registered.
- * @param objectName the MBean ObjectName.
- * @param methodName the name of the method.
- * @param signature the signature of the method.
- * @return {@code true} if the method can be invoked, {@code false} else. Note that if a method name or signature
+ * @param mbeanServer The MBeanServer where the object is registered.
+ * @param objectName The MBean ObjectName.
+ * @param methodName The name of the method.
+ * @param signature The signature of the method.
+ * @return {@code True} if the method can be invoked, {@code false} else. Note that if a method name or signature
* is provided that does not exist on the MBean, the behaviour of this method is undefined. In other words,
* if you ask whether a method that does not exist can be invoked, the method may return {@code true} but
* actually invoking that method will obviously not work.
- * @throws IOException
+ * @throws IOException If the invocation fails.
*/
public boolean canInvoke(MBeanServer mbeanServer, ObjectName objectName, String methodName, String[] signature) throws IOException {
return canInvoke(null, mbeanServer, objectName, methodName, signature);
}
/**
- * Returns true if the method on the MBean with the specified signature can be invoked.
+ * Return true if the method on the MBean with the specified signature can be invoked.
*
- * @param context {@link BulkRequestContext} for optimized ConfigAdmin access, may be <code>null</code>
- * @param mbeanServer the MBeanServer where the object is registered.
- * @param objectName the MBean ObjectName.
- * @param methodName the name of the method.
- * @param signature the signature of the method.
- * @return {@code true} if the method can be invoked, {@code false} else. Note that if a method name or signature
+ * @param context {@link BulkRequestContext} for optimized ConfigAdmin access, may be <code>null</code>.
+ * @param mbeanServer The MBeanServer where the object is registered.
+ * @param objectName The MBean ObjectName.
+ * @param methodName The name of the method.
+ * @param signature The signature of the method.
+ * @return {@code True} if the method can be invoked, {@code false} else. Note that if a method name or signature
* is provided that does not exist on the MBean, the behaviour of this method is undefined. In other words,
* if you ask whether a method that does not exist can be invoked, the method may return {@code true} but
* actually invoking that method will obviously not work.
- * @throws IOException
+ * @throws IOException If the invocation fails.
*/
public boolean canInvoke(BulkRequestContext context, MBeanServer mbeanServer, ObjectName objectName, String methodName, String[] signature) throws IOException {
// no checking done on the MBeanServer of whether the method actually exists...
@@ -451,7 +451,7 @@ public class KarafMBeanServerGuard implements InvocationHandler {
/**
* <code>nulls</code>-last comparator of PIDs split to segments. {@link #JMX_OBJECTNAME_PROPERTY_WILDCARD}
- * in a segment makes the PID more generic, thus - with lower prioroty.
+ * in a segment makes the PID more generic, thus - with lower priority.
*/
private static class WildcardPidComparator implements Comparator<String[]> {
@Override
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/management/server/src/main/java/org/apache/karaf/management/internal/BulkRequestContext.java
----------------------------------------------------------------------
diff --git a/management/server/src/main/java/org/apache/karaf/management/internal/BulkRequestContext.java b/management/server/src/main/java/org/apache/karaf/management/internal/BulkRequestContext.java
index 1b9145b..d4e91ea 100644
--- a/management/server/src/main/java/org/apache/karaf/management/internal/BulkRequestContext.java
+++ b/management/server/src/main/java/org/apache/karaf/management/internal/BulkRequestContext.java
@@ -93,26 +93,30 @@ public class BulkRequestContext {
}
/**
- * Returns list of PIDs related to RBAC/ACL
- * @return
+ * Return list of PIDs related to RBAC/ACL.
+ *
+ * @return The list of PIDs.
*/
public List<String> getAllPids() {
return allPids;
}
/**
- * Returns list of configurations from
- * @return
+ * Return list of configurations from the whitelist.
+ *
+ * @return The list of configurations.
*/
public List<Dictionary<String,Object>> getWhitelistProperties() {
return whiteListProperties;
}
/**
- * Returns {@link Configuration ConfigAdmin configuration} - may be cached in this instance of
+ * Return {@link Configuration ConfigAdmin configuration} - may be cached in this instance of
* {@link BulkRequestContext context}
- * @param generalPid
- * @return
+ *
+ * @param generalPid The configuration PID.
+ * @return The configuration.
+ * @throws IOException If an error ocurrs while retrieving the configuration.
*/
public Dictionary<String, Object> getConfiguration(String generalPid) throws IOException {
if (!cachedConfigurations.containsKey(generalPid)) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/package/src/main/java/org/apache/karaf/packages/core/PackageService.java
----------------------------------------------------------------------
diff --git a/package/src/main/java/org/apache/karaf/packages/core/PackageService.java b/package/src/main/java/org/apache/karaf/packages/core/PackageService.java
index 0ea285b..0e68b43 100644
--- a/package/src/main/java/org/apache/karaf/packages/core/PackageService.java
+++ b/package/src/main/java/org/apache/karaf/packages/core/PackageService.java
@@ -22,29 +22,27 @@ import java.util.SortedMap;
public interface PackageService {
/**
- * Gets the simplified package exports of a bundle. This does not show the
+ * Get the simplified package exports of a bundle. This does not show the
* package versions.
*
- * @param bundleId
- * @return
+ * @param bundleId The bundle ID.
+ * @return The {@link List} of package exports in the given bundle.
*/
List<String> getExports(long bundleId);
List<String> getImports(long bundleId);
/**
- * Gets a map of all exported packages with their version and the bundles that export them
- * The key is in the form packagename:version.
+ * Get all package exports with their version, and the bundles exporting them.
*
- * @return
+ * @return A {@link List} containing all package exports (as {@link PackageVersion}).
*/
List<PackageVersion> getExports();
/**
- * Gets a map of all package imports.
- * The key is the import filter.
+ * Get all package imports with their requirement.
*
- * @return
+ * @return A {@link List} containing all package imports (as {@link PackageRequirement}).
*/
List<PackageRequirement> getImports();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 207f5fd..a5019c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1779,7 +1779,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.9.1</version>
+ <version>2.10.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -2101,7 +2101,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.9.1</version>
+ <version>2.10.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/profile/src/main/java/org/apache/karaf/profile/PlaceholderResolver.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/PlaceholderResolver.java b/profile/src/main/java/org/apache/karaf/profile/PlaceholderResolver.java
index 7dfeace..740178e 100644
--- a/profile/src/main/java/org/apache/karaf/profile/PlaceholderResolver.java
+++ b/profile/src/main/java/org/apache/karaf/profile/PlaceholderResolver.java
@@ -24,16 +24,19 @@ public interface PlaceholderResolver {
/**
* The placeholder scheme.
+ *
+ * @return The placeholder scheme.
*/
public String getScheme();
/**
- * Resolves the placeholder found inside the value, for the specific key of the pid.
- * @param profile The current profile
- * @param pid The pid that contains the placeholder.
- * @param key The key of the configuration value that contains the placeholder.
- * @param value The value with the placeholder.
- * @return The resolved value or EMPTY_STRING.
+ * Resolve the placeholder found inside the value, for the specific key of the pid.
+ *
+ * @param profile The current profile.
+ * @param pid The pid that contains the placeholder.
+ * @param key The key of the configuration value that contains the placeholder.
+ * @param value The value with the placeholder.
+ * @return The resolved value or EMPTY_STRING.
*/
public String resolve(Map<String, Map<String, String>> profile, String pid, String key, String value);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/profile/src/main/java/org/apache/karaf/profile/Profile.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/Profile.java b/profile/src/main/java/org/apache/karaf/profile/Profile.java
index aedd5d8..30097b6 100644
--- a/profile/src/main/java/org/apache/karaf/profile/Profile.java
+++ b/profile/src/main/java/org/apache/karaf/profile/Profile.java
@@ -95,45 +95,62 @@ public interface Profile {
String getId();
/**
- * Get the configuration file names that are available on this profile
+ * Get the configuration file names that are available on this profile.
+ *
+ * @return The configuration file names in the profile.
*/
Set<String> getConfigurationFileNames();
/**
- * Get all file configurations
+ * Get all file configurations.
+ *
+ * @return The file configurations in the profile.
*/
Map<String, byte[]> getFileConfigurations();
/**
- * Get the configuration file for the given name
+ * Get the configuration file for the given name.
+ *
+ * @param fileName The file configuration name to look for in the profile.
+ * @return The file configuration in the profile.
*/
byte[] getFileConfiguration(String fileName);
/**
- * Get all configuration properties
+ * Get all configuration properties.
+ *
+ * @return The configurations in the profile.
*/
Map<String, Map<String, String>> getConfigurations();
/**
- * Get the configuration properties for the given PID
- * @return an empty map if the there is no configuration for the given pid
+ * Get the configuration properties for the given PID.
+ *
+ * @param pid The configuration PID to look for.
+ * @return An empty map if the there is no configuration for the given pid.
*/
Map<String, String> getConfiguration(String pid);
/**
* Indicate if this profile is an overlay or not.
+ *
+ * @return True if the profile is an overlay, false else.
*/
boolean isOverlay();
/**
- * Returns true if this profile is Abstract.
- * Abstract profiles should not be provisioned by default, they are intended to be inherited
+ * Return true if this profile is Abstract.
+ * Abstract profiles should not be provisioned by default, they are intended to be inherited.
+ *
+ * @return True if the profile is abstract, false else.
*/
boolean isAbstract();
/**
- * Returns true if this profile is hidden.
+ * Return true if this profile is hidden.
* Hidden profiles are not listed by default.
+ *
+ * @return True if the profile is hidden, false else.
*/
boolean isHidden();
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/profile/src/main/java/org/apache/karaf/profile/ProfileBuilder.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/ProfileBuilder.java b/profile/src/main/java/org/apache/karaf/profile/ProfileBuilder.java
index d14cc84..e00fedb 100644
--- a/profile/src/main/java/org/apache/karaf/profile/ProfileBuilder.java
+++ b/profile/src/main/java/org/apache/karaf/profile/ProfileBuilder.java
@@ -22,7 +22,6 @@ import java.util.Set;
import org.apache.karaf.profile.impl.ProfileBuilderImpl;
-
/**
* A profile builder.
*/
@@ -49,11 +48,14 @@ public interface ProfileBuilder {
Set<String> getConfigurationKeys();
/**
- * Returns a copy of the configuration with the specified pid
+ * Return a copy of the configuration with the specified pid
* or an empty map if it does not exist yet.
* The copy should be used for updates and then used with
* {@link #addConfiguration(String, java.util.Map)} to keep
* the layout and comments.
+ *
+ * @param pid The configuration PID.
+ * @return The copy of the configuration with the given PID.
*/
Map<String, String> getConfiguration(String pid);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/profile/src/main/java/org/apache/karaf/profile/ProfileService.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/ProfileService.java b/profile/src/main/java/org/apache/karaf/profile/ProfileService.java
index 237c1f6..f4aee40 100644
--- a/profile/src/main/java/org/apache/karaf/profile/ProfileService.java
+++ b/profile/src/main/java/org/apache/karaf/profile/ProfileService.java
@@ -23,75 +23,85 @@ import java.util.Collection;
*/
public interface ProfileService {
- //
- // Lock management
- //
/**
* Acquire a write lock for the profile.
+ *
+ * @return The write lock handler.
*/
LockHandle acquireWriteLock();
/**
* Acquire a read lock for the profile.
* A read lock cannot be upgraded to a write lock.
+ *
+ * @return The read lock handler.
*/
LockHandle acquireReadLock();
- //
- // PlaceholderResolver management
- //
-
/**
* Register the given resolver.
- * @param resolver the resolver to register
+ *
+ * @param resolver The resolver to register.
*/
void registerResolver(PlaceholderResolver resolver);
/**
* Unregister the given resolver.
- * @param resolver the resolver to unregister
+ *
+ * @param resolver The resolver to unregister.
*/
void unregisterResolver(PlaceholderResolver resolver);
- //
- // Profile management
- //
-
/**
* Create the given profile in the data store.
+ *
+ * @param profile The profile to create.
*/
void createProfile(Profile profile);
/**
* Create the given profile in the data store.
+ *
+ * @param profile The profile to update.
*/
void updateProfile(Profile profile);
/**
* True if the given profile exists in the given version.
+ *
+ * @param profileId The profile ID.
+ * @return True if the given profile exists, false else.
*/
boolean hasProfile(String profileId);
/**
* Get the profile for the given version and id.
- * @return The profile or null
+ *
+ * @param profileId The profile ID.
+ * @return The profile or null if not found.
*/
Profile getProfile(String profileId);
/**
* Get the profile for the given version and id.
- * @throws IllegalStateException if the required profile does not exist
+ *
+ * @param profileId The profile ID.
+ * @return The profile or null if not found.
*/
Profile getRequiredProfile(String profileId);
/**
* Get the list of profiles associated with the given version.
+ *
+ * @return The collection of all profiles.
*/
Collection<String> getProfiles();
/**
* Delete the given profile from the data store.
+ *
+ * @param profileId The profile ID to remove.
*/
void deleteProfile(String profileId);
@@ -100,6 +110,9 @@ public interface ProfileService {
*
* The overlay profile is computed by getting all the parent profiles
* and overriding the settings by children profiles.
+ *
+ * @param profile The profile.
+ * @return The overlay profile.
*/
Profile getOverlayProfile(Profile profile);
@@ -108,6 +121,10 @@ public interface ProfileService {
*
* The overlay profile is computed by getting all the parent profiles
* and overriding the settings by children profiles.
+ *
+ * @param profile The profile.
+ * @param environment The environment.
+ * @return The overlay profile.
*/
Profile getOverlayProfile(Profile profile, String environment);
@@ -116,6 +133,9 @@ public interface ProfileService {
*
* The effective profile is computed by performing all substitutions
* in the given profile configurations.
+ *
+ * @param profile The profile to compute.
+ * @return The effective profile.
*/
Profile getEffectiveProfile(Profile profile);
@@ -125,7 +145,9 @@ public interface ProfileService {
* The effective profile is computed by performing all substitutions
* in the given profile configurations.
*
- * @param defaultsToEmptyString if no substitution is valid, defaults to an empty string
+ * @param profile The profile to compute.
+ * @param defaultsToEmptyString if no substitution is valid, defaults to an empty string.
+ * @return The effective profile.
*/
Profile getEffectiveProfile(Profile profile, boolean defaultsToEmptyString);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/profile/src/main/java/org/apache/karaf/profile/impl/PlaceholderResolvers.java
----------------------------------------------------------------------
diff --git a/profile/src/main/java/org/apache/karaf/profile/impl/PlaceholderResolvers.java b/profile/src/main/java/org/apache/karaf/profile/impl/PlaceholderResolvers.java
index 16bf106..a15a830 100644
--- a/profile/src/main/java/org/apache/karaf/profile/impl/PlaceholderResolvers.java
+++ b/profile/src/main/java/org/apache/karaf/profile/impl/PlaceholderResolvers.java
@@ -71,8 +71,11 @@ public final class PlaceholderResolvers {
}
/**
- * Substitutes a placeholder with profile:[property file]/[key], with the target value.
- * @return The target value or the key as is.
+ * Substitute a placeholder with profile:[property file]/[key], with the target value.
+ *
+ * @param key The key in the configuration.
+ * @param configs A {@link Map} of configurations where to perform the substitution.
+ * @return The target value or the key as is.
*/
public static String substituteProfileProperty(String key, Map<String, Map<String, String>> configs) {
String pid = key.substring("profile:".length(), key.indexOf("/"));
@@ -87,7 +90,10 @@ public final class PlaceholderResolvers {
/**
* Substitutes bundle property.
- * @return The target value or an empty String.
+ *
+ * @param key The key in the configuration.
+ * @param bundleContext The bundle context to use.
+ * @return The target value or an empty String.
*/
public static String substituteBundleProperty(String key, BundleContext bundleContext) {
String value = null;
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/scheduler/src/main/java/org/apache/karaf/scheduler/ScheduleOptions.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/karaf/scheduler/ScheduleOptions.java b/scheduler/src/main/java/org/apache/karaf/scheduler/ScheduleOptions.java
index 695f471..a84ba89 100644
--- a/scheduler/src/main/java/org/apache/karaf/scheduler/ScheduleOptions.java
+++ b/scheduler/src/main/java/org/apache/karaf/scheduler/ScheduleOptions.java
@@ -31,6 +31,7 @@ public interface ScheduleOptions {
* Add optional configuration for the job.
*
* @param config An optional configuration object - this configuration is only passed to the job the job implements {@link Job}.
+ * @return The {@code ScheduleOptions}.
*/
ScheduleOptions config(final Map<String, Serializable> config);
@@ -39,7 +40,8 @@ public interface ScheduleOptions {
* A job only needs a name if it is scheduled and should be cancelled later on. The name can then be used to cancel the job.
* If a second job with the same name is started, the second one replaces the first one.
*
- * @param name The job name
+ * @param name The job name.
+ * @return The {@code ScheduleOptions}.
*/
ScheduleOptions name(final String name);
@@ -48,6 +50,7 @@ public interface ScheduleOptions {
* This defaults to false.
*
* @param flag Whether this job can run even if previous scheduled runs are still running.
+ * @return The {@code ScheduleOptions}.
*/
ScheduleOptions canRunConcurrently(final boolean flag);
@@ -56,4 +59,5 @@ public interface ScheduleOptions {
boolean canRunConcurrently();
String schedule();
+
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/scheduler/src/main/java/org/apache/karaf/scheduler/Scheduler.java
----------------------------------------------------------------------
diff --git a/scheduler/src/main/java/org/apache/karaf/scheduler/Scheduler.java b/scheduler/src/main/java/org/apache/karaf/scheduler/Scheduler.java
index e267c28..90bd766 100644
--- a/scheduler/src/main/java/org/apache/karaf/scheduler/Scheduler.java
+++ b/scheduler/src/main/java/org/apache/karaf/scheduler/Scheduler.java
@@ -73,9 +73,9 @@ public interface Scheduler {
* by one of the provided methods from this scheduler.
*
* @param job The job to execute (either {@link Job} or {@link Runnable}).
- * @param options Required options defining how to schedule the job
- * @throws SchedulerException if the job can't be scheduled
- * @throws IllegalArgumentException If the preconditions are not met
+ * @param options Required options defining how to schedule the job.
+ * @throws SchedulerException if the job can't be scheduled.
+ * @throws IllegalArgumentException If the preconditions are not met.
* @see #NOW()
* @see #NOW(int, long)
* @see #AT(Date)
@@ -88,7 +88,7 @@ public interface Scheduler {
* Remove a scheduled job by name.
*
* @param jobName The name of the job.
- * @return <code>true</code> if the job existed and could be stopped, <code>false</code> otherwise.
+ * @return <code>True</code> if the job existed and could be stopped, <code>false</code> otherwise.
*/
boolean unschedule(String jobName);
@@ -96,35 +96,43 @@ public interface Scheduler {
/**
* Create a schedule options to fire a job immediately and only once.
+ *
+ * @return The corresponding {@link ScheduleOptions}.
*/
ScheduleOptions NOW();
/**
* Create a schedule options to fire a job immediately more than once.
- * @param times The number of times this job should be started (must be higher than 1 or
- * -1 for endless)
+ * @param times The number of times this job should be started (must be higher than 1 or -1 for endless).
* @param period Every period seconds this job is started (must be at higher than 0).
+ * @return The corresponding {@link ScheduleOptions}.
*/
ScheduleOptions NOW(int times, long period);
/**
- * Create a schedule options to fire a job once at a specific date
+ * Create a schedule options to fire a job once at a specific date.
+ *
* @param date The date this job should be run.
+ * @return The corresponding {@link ScheduleOptions}.
*/
ScheduleOptions AT(final Date date);
/**
- * Create a schedule options to fire a job period starting at a specific date
+ * Create a schedule options to fire a job period starting at a specific date.
+ *
* @param date The date this job should be run.
- * @param times The number of times this job should be started (must be higher than 1 or
- * -1 for endless)
+ * @param times The number of times this job should be started (must be higher than 1 or -1 for endless).
* @param period Every period seconds this job is started (must be at higher than 0).
+ * @return The corresponding {@link ScheduleOptions}.
*/
ScheduleOptions AT(final Date date, int times, long period);
/**
- * Create a schedule options to schedule the job based on the expression
- * @param expression The cron exception
+ * Create a schedule options to schedule the job based on the expression.
+ *
+ * @param expression The cron exception.
+ * @return The corresponding {@link ScheduleOptions}.
*/
ScheduleOptions EXPR(final String expression);
+
}
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/scr/examples/component-factory/src/main/java/org/apache/karaf/scr/examples/component/factories/impl/GreeterServiceComponentFactoryImpl.java
----------------------------------------------------------------------
diff --git a/scr/examples/component-factory/src/main/java/org/apache/karaf/scr/examples/component/factories/impl/GreeterServiceComponentFactoryImpl.java b/scr/examples/component-factory/src/main/java/org/apache/karaf/scr/examples/component/factories/impl/GreeterServiceComponentFactoryImpl.java
index f6f680e..2a24c5a 100644
--- a/scr/examples/component-factory/src/main/java/org/apache/karaf/scr/examples/component/factories/impl/GreeterServiceComponentFactoryImpl.java
+++ b/scr/examples/component-factory/src/main/java/org/apache/karaf/scr/examples/component/factories/impl/GreeterServiceComponentFactoryImpl.java
@@ -34,8 +34,6 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
* configuration includes setting the name attribute and setting the
* configuration policy to required. The default is optional and when the
* component attempts to activate it will throw a RuntimeException.
- *
- * @author sully6768
*/
// the ConfigAdmin PID of our component
@Component(name = GreeterServiceComponentFactoryImpl.COMPONENT_NAME,
@@ -54,6 +52,8 @@ public class GreeterServiceComponentFactoryImpl implements GreeterServiceCompone
/**
* Called when all of the SCR Components required dependencies have been satisfied.
+ *
+ * @param properties The activation properties.
*/
@Activate
public void activate(final Map<String, ?> properties) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/scr/examples/managed-service/src/main/java/org/apache/karaf/scr/examples/managed/service/impl/ManagedGreeterServiceImpl.java
----------------------------------------------------------------------
diff --git a/scr/examples/managed-service/src/main/java/org/apache/karaf/scr/examples/managed/service/impl/ManagedGreeterServiceImpl.java b/scr/examples/managed-service/src/main/java/org/apache/karaf/scr/examples/managed/service/impl/ManagedGreeterServiceImpl.java
index 1ba42e2..dae7a3c 100644
--- a/scr/examples/managed-service/src/main/java/org/apache/karaf/scr/examples/managed/service/impl/ManagedGreeterServiceImpl.java
+++ b/scr/examples/managed-service/src/main/java/org/apache/karaf/scr/examples/managed/service/impl/ManagedGreeterServiceImpl.java
@@ -46,6 +46,8 @@ public class ManagedGreeterServiceImpl implements ManagedGreeterService {
/**
* Called when all of the SCR Components required dependencies have been satisfied.
+ *
+ * @param properties The activation properties.
*/
@Activate
public void activate(final Map<String, ?> properties) {
@@ -87,6 +89,8 @@ public class ManagedGreeterServiceImpl implements ManagedGreeterService {
/**
* Called when the configuration associated with this component has been updated.
+ *
+ * @param properties The updated configuration.
*/
@Modified
public void modified(final Map<String, ?> properties) {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/scr/management/src/main/java/org/apache/karaf/scr/management/ScrServiceMBean.java
----------------------------------------------------------------------
diff --git a/scr/management/src/main/java/org/apache/karaf/scr/management/ScrServiceMBean.java b/scr/management/src/main/java/org/apache/karaf/scr/management/ScrServiceMBean.java
index 8831083..663eb90 100644
--- a/scr/management/src/main/java/org/apache/karaf/scr/management/ScrServiceMBean.java
+++ b/scr/management/src/main/java/org/apache/karaf/scr/management/ScrServiceMBean.java
@@ -60,47 +60,47 @@ public interface ScrServiceMBean {
String[] REFERENCE = {REFERENCE_NAME, REFERENCE_SATISFIED, REFERENCE_CARDINALITY, REFERENCE_AVAILABILITY, REFERENCE_POLICY, REFERENCE_BOUND_SERVICES};
/**
- * Displays a {@link TabularData} with all the component details.
+ * Display a {@link TabularData} with all the component details.
*
- * @return
+ * @return A {@link TabularData} containing all SCR components.
*/
TabularData getComponents();
/**
- * Presents a {@String} array of components currently registered with the SCR.
+ * Present a {@code String} array of components currently registered with the SCR.
*
- * @return String[]
+ * @return A {@code String[]} containing all SCR components ID.
*/
String[] listComponents();
/**
- * Verifies if the named component is currently in an ACTIVE state.
+ * Verify if the named component is currently in an ACTIVE state.
*
- * @param componentName the components name
- * @return true if ACTIVE, otherwise false
- * @throws Exception
+ * @param componentName The component name.
+ * @return True if the component is ACTIVE, otherwise false.
+ * @throws MBeanException If the check fails.
*/
boolean isComponentActive(String componentName) throws MBeanException;
/**
- * Returns the named components state
+ * Return the named components state.
*
- * @param componentName the components name
- * @return
+ * @param componentName The component name.
+ * @return The component status.
*/
int componentState(String componentName);
/**
- * Activates a component that is currently in a DISABLED state.
+ * Activate a component that is currently in a DISABLED state.
*
- * @param componentName the components name
+ * @param componentName The component name.
*/
void activateComponent(String componentName);
/**
- * Disables a component that is not in an ACTIVE state.
+ * Disable a component that is not in an ACTIVE state.
*
- * @param componentName the components name
+ * @param componentName The component name.
*/
void deactivateComponent(String componentName);
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java
----------------------------------------------------------------------
diff --git a/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java b/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java
index 2d93dc3..13ce9f8 100644
--- a/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java
+++ b/scr/management/src/main/java/org/apache/karaf/scr/management/internal/ScrServiceMBeanImpl.java
@@ -60,7 +60,7 @@ public class ScrServiceMBeanImpl extends StandardMBean implements ScrServiceMBea
/**
* Creates new Declarative Services MBean.
*
- * @throws NotCompliantMBeanException
+ * @throws NotCompliantMBeanException If the MBean is not a valid MBean.
*/
public ScrServiceMBeanImpl() throws NotCompliantMBeanException {
super(ScrServiceMBean.class);
@@ -69,7 +69,7 @@ public class ScrServiceMBeanImpl extends StandardMBean implements ScrServiceMBea
/**
* Service component activation call back. Called when all dependencies are satisfied.
*
- * @throws Exception
+ * @throws Exception If the activation fails.
*/
@Activate
public void activate() throws Exception {
@@ -92,7 +92,7 @@ public class ScrServiceMBeanImpl extends StandardMBean implements ScrServiceMBea
* Service component deactivation call back. Called after the component is in an active
* state when any dependencies become unsatisfied.
*
- * @throws Exception
+ * @throws Exception If the deactivation fails.
*/
@Deactivate
public void deactivate() throws Exception {
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java
----------------------------------------------------------------------
diff --git a/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java b/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java
index b389a90..d47ada2 100644
--- a/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java
+++ b/service/guard/src/main/java/org/apache/karaf/service/guard/tools/ACLConfigurationParser.java
@@ -30,12 +30,13 @@ public class ACLConfigurationParser {
};
/**
- * Returns the roles that can invoke the given operation. This is determined by matching the
- * operation details against configuration provided.<p/>
+ * <p>Returns the roles that can invoke the given operation. This is determined by matching the
+ * operation details against configuration provided.</p>
*
- * The following configuration is supported. Keys are used to match an invocation against. The value can contain
+ * <p>The following configuration is supported. Keys are used to match an invocation against. The value can contain
* a comma-separated list of roles. Spaces are ignored for the role values. Note that comments are allowed in the
- * value field after the hash {@code #} character:
+ * value field after the hash {@code #} character:</p>
+ *
* <pre>
* {@code
* myMethod = role1, role2
@@ -49,7 +50,7 @@ public class ACLConfigurationParser {
* }
* </pre>
*
- * The following algorithm is used to find matching roles:
+ * <p>The following algorithm is used to find matching roles:</p>
* <ol>
* <li>Find all regex and exact value matches. For all parameters these matches are found by calling {@code toString()}
* on the parameters passed in. If there are multiple matches in this category all the matching roles are collected.
http://git-wip-us.apache.org/repos/asf/karaf/blob/8a1e7574/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java
----------------------------------------------------------------------
diff --git a/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java b/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java
index 02ab0aa..a5e96ba 100644
--- a/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java
+++ b/services/eventadmin/src/main/java/org/apache/felix/eventadmin/impl/Configuration.java
@@ -18,7 +18,6 @@
*/
package org.apache.felix.eventadmin.impl;
-
import java.util.Dictionary;
import java.util.Hashtable;
import java.util.StringTokenizer;
@@ -40,61 +39,60 @@ import org.osgi.service.cm.ManagedService;
import org.osgi.service.event.EventAdmin;
import org.osgi.service.metatype.MetaTypeProvider;
-
/**
- * The <code>Configuration</code> class encapsules the
- * configuration for the event admin.
+ * <p>The <code>Configuration</code> class encapsules the
+ * configuration for the event admin.</p>
*
- * The service knows about the following properties which are read at bundle startup:
- * <p>
+ * <p>The service knows about the following properties which are read at bundle startup:</p>
* <p>
* <tt>org.apache.felix.eventadmin.ThreadPoolSize</tt> - The size of the thread
* pool.
* </p>
- * The default value is 10. Increase in case of a large amount of synchronous events
+ *
+ * <p>The default value is 10. Increase in case of a large amount of synchronous events
* where the <tt>EventHandler</tt> services in turn send new synchronous events in
* the event dispatching thread or a lot of timeouts are to be expected. A value of
* less then 2 triggers the default value. A value of 2 effectively disables thread
- * pooling.
- * </p>
- * <p>
+ * pooling.</p>
+ *
* <p>
* <tt>org.apache.felix.eventadmin.Timeout</tt> - The black-listing timeout in
* milliseconds
* </p>
- * The default value is 5000. Increase or decrease at own discretion. A value of less
+ *
+ * <p>The default value is 5000. Increase or decrease at own discretion. A value of less
* then 100 turns timeouts off. Any other value is the time in milliseconds granted
- * to each <tt>EventHandler</tt> before it gets blacklisted.
- * </p>
- * <p>
+ * to each <tt>EventHandler</tt> before it gets blacklisted.</p>
+ *
* <p>
* <tt>org.apache.felix.eventadmin.RequireTopic</tt> - Are <tt>EventHandler</tt>
* required to be registered with a topic?
* </p>
- * The default is <tt>true</tt>. The specification says that <tt>EventHandler</tt>
+ *
+ * <p>The default is <tt>true</tt>. The specification says that <tt>EventHandler</tt>
* must register with a list of topics they are interested in. Setting this value to
* <tt>false</tt> will enable that handlers without a topic are receiving all events
- * (i.e., they are treated the same as with a topic=*).
- * </p>
- * <p>
+ * (i.e., they are treated the same as with a topic=*).</p>
+ *
* <p>
* <tt>org.apache.felix.eventadmin.IgnoreTimeout</tt> - Configure
* <tt>EventHandler</tt>s to be called without a timeout.
* </p>
- * If a timeout is configured by default all event handlers are called using the timeout.
+ *
+ * <p>If a timeout is configured by default all event handlers are called using the timeout.
* For performance optimization it is possible to configure event handlers where the
* timeout handling is not used - this reduces the thread usage from the thread pools
* as the timout handling requires an additional thread to call the event handler.
* However, the application should work without this configuration property. It is a
- * pure optimization!
+ * pure optimization.
* The value is a list of string (separated by comma). If the string ends with a dot,
* all handlers in exactly this package are ignored. If the string ends with a star,
* all handlers in this package and all subpackages are ignored. If the string neither
- * ends with a dot nor with a start, this is assumed to define an exact class name.
+ * ends with a dot nor with a start, this is assumed to define an exact class name.</p>
*
- * These properties are read at startup and serve as a default configuration.
+ * <p>These properties are read at startup and serve as a default configuration.
* If a configuration admin is configured, the event admin can be configured
- * through the config admin.
+ * through the config admin.</p>
*
* @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
*/