cli docs: schema, SYNCOPE-722

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

Branch: refs/heads/master
Commit: d88f853385c2c77837ddc4e50d0d88dd42836633
Parents: b13fc17
Author: massi <massimiliano.perr...@tirasa.net>
Authored: Mon Nov 30 12:03:07 2015 +0100
Committer: massi <massimiliano.perr...@tirasa.net>
Committed: Mon Nov 30 16:16:38 2015 +0100

----------------------------------------------------------------------
 src/main/asciidoc/cli-schema.adoc | 304 +++++++++++++++++++++++++++++++++
 src/main/asciidoc/cli.adoc        |   4 +-
 2 files changed, 307 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/d88f8533/src/main/asciidoc/cli-schema.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-schema.adoc 
b/src/main/asciidoc/cli-schema.adoc
new file mode 100644
index 0000000..a981003
--- /dev/null
+++ b/src/main/asciidoc/cli-schema.adoc
@@ -0,0 +1,304 @@
+//
+// 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.
+//
+
+==== Schema command
+The schema command serves to retrieve the information about every schema 
categories.
+
+===== Help message
+[source,bash]
+----
+Usage: schema [options]
+  Options:
+    --help 
+    --details 
+    --list-all
+    --list-plain
+    --list-derived
+    --list-virtual
+    --read {SCHEMA-TYPE} {SCHEMA-KEY}
+        Schema type: PLAIN / DERIVED / VIRTUAL
+    --delete {SCHEMA-TYPE} {SCHEMA-KEY}
+        Schema type: PLAIN / DERIVED / VIRTUAL
+----
+
+===== Details option
+This option shows a table with some details about the schemas and their 
categories.
+
+[source]
+--
+$ ./syncopeadm.sh schema --details
+--
+
+[source]
+--
+
+You are runnig: schema --details 
+
+##############################
+#                            #
+#      SCHEMAS DETAILS       #
+#                            #
+##############################
+#                  #         #
+#      DETAIL      #  VALUE  #
+#                  #         #
+##############################
+#                  #         #
+#   total number   #   57    #
+#   plain schema   #   44    #
+#  derived schema  #   10    #
+#  virtual schema  #    3    #
+#                  #         #
+##############################
+
+--
+
+===== List all option
+Running the command with this option you will see the list of all (PLAIN, 
DERIVED, VIRTUAL) schemas configured.
+
+[source]
+--
+$ ./syncopeadm.sh schema --list-all
+--
+
+===== List plain option
+Running the command with this option you will see the list of the plain 
schemas available in Syncope.
+
+[source]
+--
+$ ./syncopeadm.sh schema --list-plain
+--
+
+[source]
+--
+
+You are runnig: schema --list-plain 
+
+################################################################
+#                                                              #
+#                        PLAIN SCHEMAS                         #
+#                                                              #
+################################################################
+#                                  #             #             #
+#            SCHEMA KEY            #    TYPE     #  MANDATORY  #
+#                                  #             #             #
+################################################################
+#                                  #             #             #
+#    password.cipher.algorithm     #   String    #    true     #
+#  notificationjob.cronExpression  #   String    #    false    #
+#     notification.maxRetries      #    Long     #    true     #
+#           token.length           #    Long     #    true     #
+#         token.expireTime         #    Long     #    true     #
+#     selfRegistration.allowed     #   Boolean   #    true     #
+#      passwordReset.allowed       #   Boolean   #    true     #
+#  passwordReset.securityQuestion  #   Boolean   #    true     #
+#     authentication.statuses      #   String    #    true     #
+#        log.lastlogindate         #   Boolean   #    true     #
+#    tasks.interruptMaxRetries     #    Long     #    true     #
+#      return.password.value       #   Boolean   #    false    #
+#        admin.user.layout         #   String    #    false    #
+#         self.user.layout         #   String    #    false    #
+#        admin.group.layout        #   String    #    false    #
+#        self.group.layout         #   String    #    false    #
+#     admin.membership.layout      #   String    #    false    #
+#      self.membership.layout      #   String    #    false    #
+#             fullname             #   String    #    true     #
+#              userId              #   String    #    true     #
+#            loginDate             #    Date     #    false    #
+#            firstname             #   String    #    false    #
+#             surname              #   String    #    true     #
+#               type               #   String    #    false    #
+#              email               #   String    #    false    #
+#          activationDate          #    Date     #    false    #
+#         uselessReadonly          #   String    #    false    #
+#               cool               #   Boolean   #    false    #
+#              gender              #    Enum     #    false    #
+#              aLong               #    Long     #    false    #
+#           makeItDouble           #    Long     #    false    #
+#             obscure              #  Encrypted  #    false    #
+#              photo               #   Binary    #    false    #
+#               icon               #   String    #    false    #
+#               show               #   Boolean   #    false    #
+#           rderived_sx            #   String    #    false    #
+#           rderived_dx            #   String    #    false    #
+#              title               #   String    #    false    #
+#         subscriptionDate         #    Date     #    false    #
+#           mderived_sx            #   String    #    false    #
+#           mderived_dx            #   String    #    false    #
+#          postalAddress           #   String    #    false    #
+#              model               #   String    #    false    #
+#             location             #   String    #    false    #
+#                                  #             #             #
+################################################################
+
+--
+
+===== List derived option
+Running the command with this option you will see the list of the derived 
schemas available in Syncope with 
+their expression.
+
+[source]
+--
+$ ./syncopeadm.sh schema --list-derived
+--
+
+[source]
+--
+
+You are runnig: schema --list-derived 
+
+#######################################################################################
+#                                                                              
       #
+#                                   DERIVED SCHEMAS                            
       #
+#                                                                              
       #
+#######################################################################################
+#                      #                                                       
       #
+#      SCHEMA KEY      #                          EXPRESSION                   
       #
+#                      #                                                       
       #
+#######################################################################################
+#                      #                                                       
       #
+#      csvuserid       #                  firstname + ',' + surname            
       #
+#          cn          #                  surname + ', ' + firstname           
       #
+#       noschema       #                  surname + ', ' + notfound            
       #
+#         info         #  username + ' - ' + creationDate + '[' + failedLogins 
+ ']'  #
+#     rderiveddata     #               rderived_sx + '-' + rderived_dx         
       #
+#   displayProperty    #                      icon + ': ' + show               
       #
+#  rderToBePropagated  #               rderived_sx + '-' + rderived_dx         
       #
+#    rderivedschema    #               rderived_sx + '-' + rderived_dx         
       #
+#     mderiveddata     #               mderived_sx + '-' + mderived_dx         
       #
+#  mderToBePropagated  #               mderived_sx + '-' + mderived_dx         
       #
+#                      #                                                       
       #
+#######################################################################################
+
+--
+
+===== List virtual option
+Running the command with this option you will see the list of the virtual 
schemas available in Syncope.
+
+[source]
+--
+$ ./syncopeadm.sh schema --list-virtual
+--
+
+[source]
+--
+
+You are runnig: schema --list-virtual 
+
+##################################
+#                                #
+#        VIRTUAL SCHEMAS         #
+#                                #
+##################################
+#                   #            #
+#    SCHEMA KEY     #  READONLY  #
+#                   #            #
+##################################
+#                   #            #
+#  virtualReadOnly  #    true    #
+#   rvirtualdata    #   false    #
+#    virtualdata    #   false    #
+#                   #            #
+##################################
+
+--
+
+===== Read option
+The option to read all the information of specified schema.
+
+[source]
+--
+$ ./syncopeadm.sh schema --read {SCHEMA-TYPE} {SCHEMA-KEY}
+   Schema type: PLAIN / DERIVED / VIRTUAL
+--
+
+Unlike the list option, the read one shows the schema passed as input and, in 
case of PLAIN category, the full 
+attributes of it.
+
+[source]
+--
+
+You are runnig: schema --read PLAIN email 
+
+ > SCHEMA ID: email
+    type: String
+    any type class: minimal user
+    conversion pattern: null
+    mandatory condition: false
+    mime type: null
+    validator class: 
org.apache.syncope.core.persistence.jpa.attrvalue.validation.EmailAddressValidator
+    chiper algorithm: 
+
+--
+[source]
+--
+
+You are runnig: schema --read DERIVED info 
+
+###############################################################################
+#                                                                             #
+#                               DERIVED SCHEMAS                               #
+#                                                                             #
+###############################################################################
+#              #                                                              #
+#  SCHEMA KEY  #                          EXPRESSION                          #
+#              #                                                              #
+###############################################################################
+#              #                                                              #
+#     info     #  username + ' - ' + creationDate + '[' + failedLogins + ']'  #
+#              #                                                              #
+###############################################################################
+
+--
+[source]
+--
+
+You are runnig: schema --read VIRTUAL virtualReadOnly 
+
+##################################
+#                                #
+#        VIRTUAL SCHEMAS         #
+#                                #
+##################################
+#                   #            #
+#    SCHEMA KEY     #  READONLY  #
+#                   #            #
+##################################
+#                   #            #
+#  virtualReadOnly  #    true    #
+#                   #            #
+##################################
+
+--
+
+===== Delete option
+The option to delete a specified schemas.
+
+[source]
+--
+$ ./syncopeadm.sh schema --delete {SCHEMA-TYPE} {SCHEMA-KEY}
+        Schema type: PLAIN / DERIVED / VIRTUAL
+--
+
+The delete option, as can be imagined, tries to remove a specified schema.
+If the connector isn't associated to anything the output will be
+[source]
+--
+ - Schema {SCHEMA-KEY} successfully deleted
+--
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/d88f8533/src/main/asciidoc/cli.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli.adoc b/src/main/asciidoc/cli.adoc
index 304c1b5..d0e6cdb 100644
--- a/src/main/asciidoc/cli.adoc
+++ b/src/main/asciidoc/cli.adoc
@@ -34,4 +34,6 @@ include::cli-logger.adoc[]
 
 include::cli-task.adoc[]
 
-include::cli-notification.adoc[]
\ No newline at end of file
+include::cli-notification.adoc[]
+
+include::cli-schema.adoc[]
\ No newline at end of file

Reply via email to