You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by io...@apache.org on 2011/02/11 17:30:54 UTC
svn commit: r1069862 - in /karaf/trunk/shell/config/src/main:
java/org/apache/karaf/shell/config/ resources/org/ resources/org/apache/
resources/org/apache/karaf/ resources/org/apache/karaf/shell/
resources/org/apache/karaf/shell/config/
Author: iocanel
Date: Fri Feb 11 16:30:53 2011
New Revision: 1069862
URL: http://svn.apache.org/viewvc?rev=1069862&view=rev
Log:
[KARAF-415] Edited the description of the useFile option. Added detailed description that explains the use case of that flag.
Added:
karaf/trunk/shell/config/src/main/resources/org/
karaf/trunk/shell/config/src/main/resources/org/apache/
karaf/trunk/shell/config/src/main/resources/org/apache/karaf/
karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/
karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/
karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt
Modified:
karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java
Modified: karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java
URL: http://svn.apache.org/viewvc/karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java?rev=1069862&r1=1069861&r2=1069862&view=diff
==============================================================================
--- karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java (original)
+++ karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java Fri Feb 11 16:30:53 2011
@@ -28,7 +28,7 @@ import java.io.IOException;
import java.util.Dictionary;
import java.util.Properties;
-@Command(scope = "config", name = "edit", description = "Creates or edits a configuration.")
+@Command(scope = "config", name = "edit", description = "Creates or edits a configuration.", detailedDescription="classpath:edit.txt")
public class EditCommand extends ConfigCommandSupport {
private static final String PID_FILTER="(service.pid=%s*)";
@@ -43,7 +43,7 @@ public class EditCommand extends ConfigC
@Option(name = "--force", aliases = {}, description = "Force the edition of this config, even if another one was under edition", required = false, multiValued = false)
boolean force;
- @Option(name = "-f", aliases = {"--use-file"}, description = "Force the edition of this config, even if another one was under edition", required = false, multiValued = false)
+ @Option(name = "-f", aliases = {"--use-file"}, description = "Configuration lookup using the filename instead of the pid", required = false, multiValued = false)
boolean useFile;
private File storage;
Added: karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt
URL: http://svn.apache.org/viewvc/karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt?rev=1069862&view=auto
==============================================================================
--- karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt (added)
+++ karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt Fri Feb 11 16:30:53 2011
@@ -0,0 +1,11 @@
+The edit command can be used to create or edit a configuration by passing its pid as argument.
+ > config:edit org.apache.karaf.sample.pid
+The command above will create a file etc/org.apache.karaf.sample.pid which corresponds to a configuration object with pid org.apache.karaf.sample.pid
+
+In case of Managed Service Factories the user can create or edit the configuration of a specific instance of a managed service.
+ > config:edit org.apache.karaf.sample.service.factory.pid-instanceid
+The command above will create a file etc/org.apache.karaf.sample.service.factory.pid-instanceid but in this case the pid is generated, according to the specification.
+
+This makes further editing to the configuration difficult because the generated pid is not known to the user. To make things simple config:edit provides a special flag -f or --use-file which allows editing a configuration using the filename instead of the pid.
+So the user can simply edit again the configuration by typing:
+> config:edit org.apache.karaf.sample.service.factory.pid-instanceid.
Re: svn commit: r1069862 - in /karaf/trunk/shell/config/src/main:
java/org/apache/karaf/shell/config/ resources/org/ resources/org/apache/
resources/org/apache/karaf/ resources/org/apache/karaf/shell/ resources/org/apache/karaf/shell/config/
Posted by Guillaume Nodet <gn...@gmail.com>.
Awesome. I think it we at least at those informations each time we
add / modify a command, we'll soon have an awesome help system ! :-)
On Fri, Feb 11, 2011 at 17:30, <io...@apache.org> wrote:
> Author: iocanel
> Date: Fri Feb 11 16:30:53 2011
> New Revision: 1069862
>
> URL: http://svn.apache.org/viewvc?rev=1069862&view=rev
> Log:
> [KARAF-415] Edited the description of the useFile option. Added detailed description that explains the use case of that flag.
>
> Added:
> karaf/trunk/shell/config/src/main/resources/org/
> karaf/trunk/shell/config/src/main/resources/org/apache/
> karaf/trunk/shell/config/src/main/resources/org/apache/karaf/
> karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/
> karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/
> karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt
> Modified:
> karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java
>
> Modified: karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java
> URL: http://svn.apache.org/viewvc/karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java?rev=1069862&r1=1069861&r2=1069862&view=diff
> ==============================================================================
> --- karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java (original)
> +++ karaf/trunk/shell/config/src/main/java/org/apache/karaf/shell/config/EditCommand.java Fri Feb 11 16:30:53 2011
> @@ -28,7 +28,7 @@ import java.io.IOException;
> import java.util.Dictionary;
> import java.util.Properties;
>
> -@Command(scope = "config", name = "edit", description = "Creates or edits a configuration.")
> +@Command(scope = "config", name = "edit", description = "Creates or edits a configuration.", detailedDescription="classpath:edit.txt")
> public class EditCommand extends ConfigCommandSupport {
>
> private static final String PID_FILTER="(service.pid=%s*)";
> @@ -43,7 +43,7 @@ public class EditCommand extends ConfigC
> @Option(name = "--force", aliases = {}, description = "Force the edition of this config, even if another one was under edition", required = false, multiValued = false)
> boolean force;
>
> - @Option(name = "-f", aliases = {"--use-file"}, description = "Force the edition of this config, even if another one was under edition", required = false, multiValued = false)
> + @Option(name = "-f", aliases = {"--use-file"}, description = "Configuration lookup using the filename instead of the pid", required = false, multiValued = false)
> boolean useFile;
>
> private File storage;
>
> Added: karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt
> URL: http://svn.apache.org/viewvc/karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt?rev=1069862&view=auto
> ==============================================================================
> --- karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt (added)
> +++ karaf/trunk/shell/config/src/main/resources/org/apache/karaf/shell/config/edit.txt Fri Feb 11 16:30:53 2011
> @@ -0,0 +1,11 @@
> +The edit command can be used to create or edit a configuration by passing its pid as argument.
> + > config:edit org.apache.karaf.sample.pid
> +The command above will create a file etc/org.apache.karaf.sample.pid which corresponds to a configuration object with pid org.apache.karaf.sample.pid
> +
> +In case of Managed Service Factories the user can create or edit the configuration of a specific instance of a managed service.
> + > config:edit org.apache.karaf.sample.service.factory.pid-instanceid
> +The command above will create a file etc/org.apache.karaf.sample.service.factory.pid-instanceid but in this case the pid is generated, according to the specification.
> +
> +This makes further editing to the configuration difficult because the generated pid is not known to the user. To make things simple config:edit provides a special flag -f or --use-file which allows editing a configuration using the filename instead of the pid.
> +So the user can simply edit again the configuration by typing:
> +> config:edit org.apache.karaf.sample.service.factory.pid-instanceid.
>
>
>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com