cli docs: configuration, connector, installation, introduction, question, role. 
SYNCOPE-722


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/327c8e03
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/327c8e03
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/327c8e03

Branch: refs/heads/master
Commit: 327c8e03d3764d7a08ad9f376bcc7dc0e243993c
Parents: b32c5db
Author: massi <[email protected]>
Authored: Thu Nov 26 17:55:48 2015 +0100
Committer: massi <[email protected]>
Committed: Thu Nov 26 17:55:48 2015 +0100

----------------------------------------------------------------------
 src/main/asciidoc/cli-configuration.adoc | 172 +++++++++++++++++
 src/main/asciidoc/cli-connector.adoc     | 259 ++++++++++++++++++++++++++
 src/main/asciidoc/cli-installation.adoc  | 181 ++++++++++++++++++
 src/main/asciidoc/cli-introduction.adoc  |  34 ++++
 src/main/asciidoc/cli-question.adoc      |  77 ++++++++
 src/main/asciidoc/cli-role.adoc          | 149 +++++++++++++++
 src/main/asciidoc/cli.adoc               |  13 ++
 src/main/asciidoc/reference-guide.adoc   |   2 +
 8 files changed, 887 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/327c8e03/src/main/asciidoc/cli-configuration.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-configuration.adoc 
b/src/main/asciidoc/cli-configuration.adoc
new file mode 100644
index 0000000..d44b330
--- /dev/null
+++ b/src/main/asciidoc/cli-configuration.adoc
@@ -0,0 +1,172 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+==== Configuration command
+The configuration command serves to retrieve the information about the Syncope 
configuration.
+
+===== Help message
+[source,bash]
+----
+Usage: configuration [options]
+  Options:
+    --help 
+    --get 
+    --read 
+       Syntax: --read {CONF-NAME} {CONF-NAME} [...] 
+    --update 
+       Syntax: --update {CONF-NAME}={CONF-VALUE} {CONF-NAME}={CONF-VALUE} [...]
+    --delete 
+       Syntax: --delete {CONF-NAME} {CONF-NAME} [...]
+    --export 
+       Syntax: --export {WHERE-DIR}
+
+----
+
+===== Get option
+This get option shows a table with the Syncope configuration.
+
+[source]
+--
+$ ./syncopeadm.sh configuration --get
+--
+
+[source]
+--
+
+You are runnig: configuration --get 
+
+########################################################
+#                                                      #
+#                SYNCOPE CONFIGURATION                 #
+#                                                      #
+########################################################
+#                                  #                   #
+#            ATTRIBUTE             #       VALUE       #
+#                                  #                   #
+########################################################
+#                                  #                   #
+#    password.cipher.algorithm     #       SHA1        #
+#  notificationjob.cronExpression  #  0/20 * * * * ?   #
+#     notification.maxRetries      #         3         #
+#           token.length           #        256        #
+#         token.expireTime         #        60         #
+#     selfRegistration.allowed     #       true        #
+#      passwordReset.allowed       #       true        #
+#  passwordReset.securityQuestion  #       true        #
+#     authentication.statuses      #  created, active  #
+#        log.lastlogindate         #       true        #
+#    tasks.interruptMaxRetries     #        20         #
+#      return.password.value       #       false       #
+#                                  #                   #
+########################################################
+
+--
+
+===== Read option
+The option to read the value of the specified configuration attributes.
+
+[source]
+--
+$ ./syncopeadm.sh configuration --read {CONF-NAME} {CONF-NAME} [...]
+--
+
+[source]
+--
+
+You are runnig: configuration --read passwordReset.allowed 
+
+#####################################
+#                                   #
+#       SYNCOPE CONFIGURATION       #
+#                                   #
+#####################################
+#                         #         #
+#        ATTRIBUTE        #  VALUE  #
+#                         #         #
+#####################################
+#                         #         #
+#  passwordReset.allowed  #  true   #
+#                         #         #
+#####################################
+
+--
+
+===== Update option
+The option to update a value of a specified configuration attributes.
+
+[source]
+--
+$ ./syncopeadm.sh configuration --update {CONF-NAME}={CONF-VALUE} 
{CONF-NAME}={CONF-VALUE} [...]
+--
+
+[source]
+--
+
+You are runnig: configuration --update passwordReset.allowed=false 
+
+#####################################
+#                                   #
+#  UPDATED CONFIGURATION ATTRIBUTES #
+#                                   #
+#####################################
+#                         #         #
+#        ATTRIBUTE        #  VALUE  #
+#                         #         #
+#####################################
+#                         #         #
+#  passwordReset.allowed  #  false  #
+#                         #         #
+#####################################
+
+--
+
+===== Delete option
+The option to delete the specified configuration attributes.
+
+[source]
+--
+$ ./syncopeadm.sh configuration --delete {CONF-NAME} {CONF-NAME} [...]
+--
+
+The delete option, as can be imagined, tries to remove the specified roles. 
+The output will be something like:
+[source]
+--
+ - Configuration {CONF-NAME} successfully deleted
+--
+
+===== Export option
+The option to export the Syncope configuration under specified directory.
+
+[source]
+--
+$ ./syncopeadm.sh  - Usage: configuration --export {WHERE-DIR}
+--
+
+[source,xml]
+----
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><dataset>
+<RELATIONSHIPTYPE DESCRIPTION="Models the act that an object is included in 
another" NAME="inclusion"/>
+<RELATIONSHIPTYPE NAME="neighborhood"/>
+<PASSWORDPOLICY ALLOWNULLPASSWORD="1" DESCRIPTION="a password policy" 
HISTORYLENGTH="1" ID="2" TYPE="PASSWORD"/>
+<PASSWORDPOLICY ALLOWNULLPASSWORD="1" DESCRIPTION="sample password policy" 
HISTORYLENGTH="0" ID="4" TYPE="PASSWORD"/>
+<PASSWORDPOLICY ALLOWNULLPASSWORD="0" DESCRIPTION="sample password policy" 
HISTORYLENGTH="0" ID="8" TYPE="PASSWORD"/>
+
+[...]
+----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/327c8e03/src/main/asciidoc/cli-connector.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-connector.adoc 
b/src/main/asciidoc/cli-connector.adoc
new file mode 100644
index 0000000..80defe9
--- /dev/null
+++ b/src/main/asciidoc/cli-connector.adoc
@@ -0,0 +1,259 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+==== Connector command
+The connector command serves to retrieve the information around the connector 
configuration in Apache Syncope.
+
+===== Help message
+[source,bash]
+----
+Usage: connector [options]
+  Options:
+    --help 
+    --details 
+    --list 
+    --list-bundles 
+    --list-configuration-properties
+       Syntax: --list-configuration-properties {CONNECTOR-ID} {CONNECTOR-ID} 
[...]
+    --read 
+       Syntax: --read {CONNECTOR-ID} {CONNECTOR-ID} [...]
+    --delete 
+       Syntax: --delete {CONNECTOR-ID} {CONNECTOR-ID} [...]
+----
+
+===== Details option
+This option shows a table with some details about connectors and bundles.
+
+[source]
+--
+$ ./syncopeadm.sh connector --details
+--
+
+[source]
+--
+
+You are runnig: connector --details 
+
+######################################
+#                                    #
+#         CONNECTORS DETAILS         #
+#                                    #
+######################################
+#                          #         #
+#          DETAIL          #  VALUE  #
+#                          #         #
+######################################
+#                          #         #
+#       Total number       #    9    #
+#  With create capability  #    8    #
+#  With delete capability  #    7    #
+#  With search capability  #    8    #
+#   With sync capability   #    4    #
+#  With update capability  #    8    #
+#      Bundles number      #    8    #
+#                          #         #
+######################################
+
+--
+
+Total number::
+    number of created connectors;
+With create capability::
+    number of connectors configured with create capability;
+With delete capability::
+    number of connectors configured with delete capability;
+With search capability::
+    number of connectors configured with search capability;
+With sync capability::
+    number of connectors configured with sync capability;
+With update capability::
+    number of connectors configured with update capability;
+Bundles number::
+    number of bundles read by Syncope.
+
+===== List option
+Running the command with this option you will see the list of connectors with 
their configuration.
+
+[source]
+--
+$ ./syncopeadm.sh connector --list
+--
+
+[source]
+--
+
+You are runnig: connector --list 
+
+ > CONNECTOR ID: 108
+    bundle name: net.tirasa.connid.bundles.db.scriptedsql
+    connector name: 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector
+    display name: Scripted SQL
+    location: connid://testconnectorserver@localhost:4554
+    version: 2.2.3-SNAPSHOT
+    timeout: 10
+    CAPABILITIES:
+       - CREATE
+       - SEARCH
+       - DELETE
+       - UPDATE
+       - SYNC
+    CONFIGURATION:
+       name: enableEmptyString
+       values: [false]
+       type: boolean
+       display name: Enable writing empty string
+       help message: <b>Enable writing empty string</b><br/>Select to enable 
support for writing an empty strings, instead of a NULL value, in character 
based columns defined as not-null in the table schema. This option does not 
influence the way strings are written for Oracle based tables. By default empty 
strings are written as a NULL value.
+       order: 12
+       default values: [false]
+       confidential: false
+       required: false
+       overridable: false
+
+       name: autoCommit
+       values: [true]
+       type: boolean
+       display name: autoCommit
+       help message: autoCommit
+       order: 0
+       default values: [true]
+       confidential: false
+       required: false
+       overridable: false
+
+       name: testScriptFileName
+       values: 
[/home/massi/Lavoro/syncopeMaster/fit/core-reference/target/test-classes/scriptedsql/TestScript.groovy]
+       type: java.lang.String
+       display name: testScriptFileName
+       help message: testScriptFileName
+       order: 0
+       default values: []
+       confidential: false
+       required: false
+       overridable: true
+
+--
+
+The last snippet code shows a part of screen output. Basically you can read 
the configuration about every connectors
+configured in Syncope.
+
+===== List bundles option
+Running the command with this option you will see the list of the bundles 
available in Syncope.
+
+[source]
+--
+$ ./syncopeadm.sh connector --list-bundles
+--
+
+[source]
+--
+
+You are runnig: connector --list-bundles 
+
+ > BUNDLE NAME: net.tirasa.connid.bundles.soap
+    connector name: net.tirasa.connid.bundles.soap.WebServiceConnector
+    display name: net.tirasa.connid.bundles.soap.WebServiceConnector
+    location: 
file:/home/massi/Lavoro/syncopeMaster/fit/core-reference/target/bundles/
+    version: 1.4.0-SNAPSHOT
+ > BUNDLE NAME: net.tirasa.connid.bundles.db.scriptedsql
+    connector name: 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector
+    display name: Scripted SQL Connector
+    location: 
file:/home/massi/Lavoro/syncopeMaster/fit/core-reference/target/bundles/
+    version: 2.2.3-SNAPSHOT
+ > BUNDLE NAME: net.tirasa.connid.bundles.ldap
+    connector name: net.tirasa.connid.bundles.ldap.LdapConnector
+    display name: net.tirasa.connid.bundles.ldap.LdapConnector
+    location: 
file:/home/massi/Lavoro/syncopeMaster/fit/core-reference/target/bundles/
+    version: 1.5.0-SNAPSHOT
+ > BUNDLE NAME: net.tirasa.connid.bundles.ad
+    connector name: net.tirasa.connid.bundles.ad.ADConnector
+    display name: net.tirasa.connid.bundles.ad.ADConnector
+    location: 
file:/home/massi/Lavoro/syncopeMaster/fit/core-reference/target/bundles/
+    version: 1.3.0-SNAPSHOT
+ > BUNDLE NAME: net.tirasa.connid.bundles.db.table
+    connector name: net.tirasa.connid.bundles.db.table.DatabaseTableConnector
+    display name: Database Table Connector
+    location: 
file:/home/massi/Lavoro/syncopeMaster/fit/core-reference/target/bundles/
+    version: 2.2.3-SNAPSHOT
+ > BUNDLE NAME: net.tirasa.connid.bundles.csvdir
+    connector name: net.tirasa.connid.bundles.csvdir.CSVDirConnector
+    display name: net.tirasa.connid.bundles.csvdir.CSVDirConnector
+    location: 
file:/home/massi/Lavoro/syncopeMaster/fit/core-reference/target/bundles/
+    version: 0.8.2
+ > BUNDLE NAME: net.tirasa.connid.bundles.db.table
+    connector name: net.tirasa.connid.bundles.db.table.DatabaseTableConnector
+    display name: Database Table Connector
+    location: connid://testconnectorserver@localhost:4554
+    version: 2.2.3-SNAPSHOT
+ > BUNDLE NAME: net.tirasa.connid.bundles.db.scriptedsql
+    connector name: 
net.tirasa.connid.bundles.db.scriptedsql.ScriptedSQLConnector
+    display name: Scripted SQL Connector
+    location: connid://testconnectorserver@localhost:4554
+    version: 2.2.3-SNAPSHOT
+
+--
+
+The most useful information are:
+
+location::
+    where the bundle is, it could be on the same server where Syncope is 
deployed or on a remote one linked by 
+connid protocol;
+version:
+    the bundle version;
+
+===== List configuration properties option
+The option to read only the configuration of specified connectors.
+
+[source]
+--
+$ ./syncopeadm.sh connector --list-configuration-properties {CONNECTOR-ID} 
{CONNECTOR-ID} [...]
+--
+
+The output is only the configuration of the connectors passed as input.
+
+===== Read option
+The option to read all the information of specified connectors.
+
+[source]
+--
+$ ./syncopeadm.sh connector --read {CONNECTOR-ID} {CONNECTOR-ID} [...]
+--
+
+Unlike the list option, the read one shows only the connectors passed as input.
+
+===== Delete option
+The option to delete the specified connectors.
+
+[source]
+--
+$ ./syncopeadm.sh connector --delete {CONNECTOR-ID} {CONNECTOR-ID} [...]
+--
+
+The delete option, as can be imagined, tries to remove the specified 
connectors. This operation works only if the 
+connector isn't associated to a resource.
+If the connector isn't associated to anything the output will be
+[source]
+--
+ - Connector {CONNECTOR-ID} successfully deleted
+--
+
+other wise the output will be something like:
+[source]
+--
+ - Error: AssociatedResources [ws-target-resource-nopropagation, 
ws-target-resource-nopropagation2]
+--
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/327c8e03/src/main/asciidoc/cli-installation.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-installation.adoc 
b/src/main/asciidoc/cli-installation.adoc
new file mode 100644
index 0000000..1f93808
--- /dev/null
+++ b/src/main/asciidoc/cli-installation.adoc
@@ -0,0 +1,181 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+==== Installation command
+The installation process serves to create a file, called _cli.properties_, 
uses by the script to call the Apache Syncope
+REST API services with the right credentials.
+
+The obtained file will be something like
+ 
+* *syncope.rest.services*=http://localhost:9080/syncope/rest
+* *syncope.admin.user*=admin
+* *syncope.admin.password*=QePSFVTnzwQowM4ohhaUYcE6aW47MVZ/
+
+where the properties are:
+
+syncope.rest.services::
+    is the URL where the Apache Syncope REST API services listening;
+syncope.admin.user::
+    is the user with the right permissions to call the Syncope APIs;
+syncope.admin.password::
+    is the user password;
+
+as you can read, the user password is encrypted. This only to add a security 
level to avoid that another user could 
+read an admin password.
+
+===== Help message
+[source,bash]
+----
+Usage: install [options]
+  Options:
+    --help 
+    --setup
+    --setup-debug
+----
+
+===== Run the installation
+After the zip file is unzipped you can start with CLI client using the 
syncopeadm file.
+If you tried to run a CLI command before installation process the script 
returns
+[source]
+--
+ - Error: It seems you need to setup the CLI client before. Run install 
--setup.
+--
+
+So, as suggested, you have to run the install command to use the CLI:
+[source]
+--
+$ ./syncopeadm.sh install --setup
+--
+
+A successful result will be:
+[source,bash]
+----
+
+You are runnig: install --setup 
+
+###############################################
+#                                             #
+# Welcome to Syncope CLI installation process #
+#                                             #
+###############################################
+
+Path to config files of Syncope CLI client will be: ./
+- File system permission checked
+
+Syncope server schema [http/https]: http
+Syncope server hostname [e.g. localhost]: localhost
+Syncope server port [e.g. 8080]: 9080
+Syncope server rest context [e.g. /syncope/rest/]: /syncope/rest
+Syncope admin user: admin
+Syncope admin password: password
+Installation parameters checked on Syncope core version: 2.0.0-SNAPSHOT
+
+###############################################
+#                                             #
+#           Installation successful           #
+#     now you can use Syncope CLI client      #
+#                                             #
+###############################################
+
+----
+
+During the installation you have to provide:
+
+Syncope server schema::
+    the http protocol used by the Apache Syncope core, it will be http or 
https;
+Syncope server hostname::
+    the hostname where the core is deployed;
+Syncope server port::
+    the port where the services are listening;
+Syncope server rest context::
+    the context wherewith the rest services are deployed (/syncope/rest is the 
default one);
+Syncope admin user::
+    the user with the right permissions to call the Syncope APIs;
+Syncope admin password::
+    the user password.
+
+===== Installation error
+The causes to get an error may be different, below some result samples.
+
+* Syncope unreachable (or wrong address):
+
+[source]
+--
+
+Provided address :http://localhost:9080/syncope/rest
+
+###############################################
+#                                             #
+#       Provided address is unreachable!      #
+#         Check it and if it is wrong         #
+#        START AGAIN the installation!        #
+#                                             #
+###############################################
+
+--
+
+* Authentication failed:
+
+[source]
+--
+
+###############################################
+#                                             #
+#   Username or password provided are wrong   #
+#        START AGAIN the installation!        #
+#                                             #
+###############################################
+
+--
+
+As the message suggested you have to start again the installation when error 
occurred.
+
+
+===== Debug installation
+To work with the debug environment provided by Syncope we added a particular 
installation option for it.
+It enough to run the script with the --setup-debug option
+[source]
+--
+$ ./syncopeadm.sh install --setup
+--
+[source,bash]
+----
+
+You are runnig: install --setup-debug 
+
+###############################################
+#                                             #
+# Welcome to Syncope CLI installation process #
+#                                             #
+###############################################
+
+Path to config files of Syncope CLI client will be: ./
+- File system permission checked
+
+Installation parameters checked on Syncope core version: 2.0.0-SNAPSHOT
+
+###############################################
+#                                             #
+#           Installation successful           #
+#     now you can use Syncope CLI client      #
+#                                             #
+###############################################
+
+----
+

http://git-wip-us.apache.org/repos/asf/syncope/blob/327c8e03/src/main/asciidoc/cli-introduction.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-introduction.adoc 
b/src/main/asciidoc/cli-introduction.adoc
new file mode 100644
index 0000000..e7bf329
--- /dev/null
+++ b/src/main/asciidoc/cli-introduction.adoc
@@ -0,0 +1,34 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+==== Introduction
+A brief introduction about this document and the examples you will find 
reading it.
+
+Once you downloaded and uzipped the zip file containing the scripts, you will 
find a lib directory and the 
+two script files, a .bat and a .sh one, called _syncopeadm_. According with 
your operating system you will use 
+one of them.
+
+[NOTE]
+Every examples of this document is executed on a linux machine with _debug 
environment_ up.
+
+[NOTE]
+As the Wikipedia page suggests a 
https://en.wikipedia.org/wiki/Command-line_interface[command line interface] 
(CLI) 
+is a means of interacting with a computer program where the user (or client) 
issues commands to the program 
+in the form of successive lines of text (command lines). In our case the CLI 
tool is the way to call, more or less, 
+every Syncope core commands through a shell.
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/327c8e03/src/main/asciidoc/cli-question.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-question.adoc 
b/src/main/asciidoc/cli-question.adoc
new file mode 100644
index 0000000..031ab85
--- /dev/null
+++ b/src/main/asciidoc/cli-question.adoc
@@ -0,0 +1,77 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+==== Question command
+The question command serves to retrieve the information about the user 
question to retrieve his password.
+
+===== Help message
+[source,bash]
+----
+Usage: question [options]
+  Options:
+    --help 
+    --list 
+    --read 
+       Syntax: --read {QUESTION-ID} {QUESTION-ID} [...]
+    --delete 
+       Syntax: --delete {QUESTION-ID} {QUESTION-ID} [...]
+----
+
+===== List option
+Running the command with this option you will see the list of questions with 
their content.
+
+[source]
+--
+$ ./syncopeadm.sh question --list
+--
+
+[source]
+--
+
+You are runnig: question --list 
+
+  > SECURITY QUESTION ID: 1
+    content: What's your mother's maiden name?
+
+--
+
+===== Read option
+The option to read all the information of specified questions.
+
+[source]
+--
+$ ./syncopeadm.sh question --read {QUESTION-ID} {QUESTION-ID} [...]
+--
+
+Unlike the list option, the read one shows only the questions passed as input.
+
+===== Delete option
+The option to delete the specified questions.
+
+[source]
+--
+$ ./syncopeadm.sh question --delete {QUESTION-ID} {QUESTION-ID} [...]
+--
+
+The delete option, as can be imagined, tries to remove the specified 
questions. 
+The output will be something like:
+[source]
+--
+ - security question {QUESTION-ID} successfully deleted
+--
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/327c8e03/src/main/asciidoc/cli-role.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-role.adoc b/src/main/asciidoc/cli-role.adoc
new file mode 100644
index 0000000..4bf0f15
--- /dev/null
+++ b/src/main/asciidoc/cli-role.adoc
@@ -0,0 +1,149 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+==== Role command
+The role command serves to retrieve the information about the roles.
+
+===== Help message
+[source,bash]
+----
+Usage: role [options]
+  Options:
+    --help 
+    --details 
+    --list 
+    --read 
+       Syntax: --read {ROLE-NAME} {ROLE-NAME} [...]
+    --delete 
+       Syntax: --delete {ROLE-NAME} {ROLE-NAME} [...]
+----
+
+===== Details option
+This option shows a table with some details about the roles.
+
+[source]
+--
+$ ./syncopeadm.sh role --details
+--
+
+[source]
+--
+
+You are runnig: role --details 
+
+####################################
+#                                  #
+#          ROLES DETAILS           #
+#                                  #
+####################################
+#                        #         #
+#         DETAIL         #  VALUE  #
+#                        #         #
+####################################
+#                        #         #
+#      Total number      #    4    #
+#  Without entitlements  #    0    #
+#                        #         #
+####################################
+
+--
+
+Total number::
+    number of created roles;
+Without entitlements::
+    number of roles without linked entitlments.
+
+===== List option
+Running the command with this option you will see the list of roles with the 
realm where are configured 
+and their entitlments.
+
+[source]
+--
+$ ./syncopeadm.sh role --list
+--
+
+[source]
+--
+
+You are runnig: role --list 
+
+ > ROLE ID: User reviewer
+    REALMS: 
+       - /odd
+       - /even
+    ENTITLEMENTS:
+       - USER_READ
+       - USER_LIST
+       - USER_SEARCH
+    dynamic membership condition: null
+
+ > ROLE ID: User manager
+    REALMS: 
+       - /
+    ENTITLEMENTS:
+       - WORKFLOW_FORM_SUBMIT
+       - USER_READ
+       - USER_LIST
+       - USER_SEARCH
+       - WORKFLOW_FORM_CLAIM
+    dynamic membership condition: null
+
+ > ROLE ID: Other
+    REALMS: 
+       - /odd
+    ENTITLEMENTS:
+       - SCHEMA_READ
+       - GROUP_READ
+       - WORKFLOW_FORM_CLAIM
+    dynamic membership condition: null
+
+ > ROLE ID: Search for realm evenTwo
+    REALMS: 
+       - /even/two
+    ENTITLEMENTS:
+       - USER_READ
+       - USER_SEARCH
+    dynamic membership condition: null
+
+--
+
+===== Read option
+The option to read all the information of specified roles.
+
+[source]
+--
+$ ./syncopeadm.sh role --read {ROLE-NAME} {ROLE-NAME} [...]
+--
+
+Unlike the list option, the read one shows only the roles passed as input.
+
+===== Delete option
+The option to delete the specified roles.
+
+[source]
+--
+$ ./syncopeadm.sh role --delete {ROLE-NAME} {ROLE-NAME} [...]
+--
+
+The delete option, as can be imagined, tries to remove the specified roles. 
+The output will be something like:
+[source]
+--
+ - role {ROLE-NAME} successfully deleted
+--
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/327c8e03/src/main/asciidoc/cli.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli.adoc b/src/main/asciidoc/cli.adoc
new file mode 100644
index 0000000..77a539e
--- /dev/null
+++ b/src/main/asciidoc/cli.adoc
@@ -0,0 +1,13 @@
+=== CLI
+
+include::cli-introduction.adoc[]
+
+include::cli-installation.adoc[]
+
+include::cli-connector.adoc[]
+
+include::cli-question.adoc[]
+
+include::cli-role.adoc[]
+
+include::cli-configuration.adoc[]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/327c8e03/src/main/asciidoc/reference-guide.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/reference-guide.adoc 
b/src/main/asciidoc/reference-guide.adoc
index a273c81..a19d3a9 100644
--- a/src/main/asciidoc/reference-guide.adoc
+++ b/src/main/asciidoc/reference-guide.adoc
@@ -120,6 +120,8 @@ provisioning, and compliance.
 
 === Using the Admin Console
 
+include::cli.adoc[]
+
 === RESTful services
 
 ==== Client library

Reply via email to