You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by ma...@apache.org on 2015/11/27 17:02:36 UTC

[1/6] syncope git commit: cli docs: notification, SYNCOPE-722

Repository: syncope
Updated Branches:
  refs/heads/master 9840cd0d9 -> e66dcf424


cli docs: notification, SYNCOPE-722


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

Branch: refs/heads/master
Commit: e66dcf424284efc7404c6bf76b5e7b7a3b6239f9
Parents: bbcb610
Author: massi <ma...@tirasa.net>
Authored: Fri Nov 27 16:51:02 2015 +0100
Committer: massi <ma...@tirasa.net>
Committed: Fri Nov 27 17:00:42 2015 +0100

----------------------------------------------------------------------
 src/main/asciidoc/cli-notification.adoc | 116 +++++++++++++++++++++++++++
 src/main/asciidoc/cli.adoc              |   4 +-
 2 files changed, 119 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/e66dcf42/src/main/asciidoc/cli-notification.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-notification.adoc b/src/main/asciidoc/cli-notification.adoc
new file mode 100644
index 0000000..d25beb1
--- /dev/null
+++ b/src/main/asciidoc/cli-notification.adoc
@@ -0,0 +1,116 @@
+//
+// 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.
+//
+
+==== Notification command
+The notification command serves to retrieve the information about the configured notification.
+
+===== Help message
+[source,bash]
+----
+Usage: notification [options]
+  Options:
+    --help 
+    --list 
+    --read 
+       Syntax: --read {NOTIFICATION-ID} 
+    --delete 
+       Syntax: --delete {NOTIFICATION-ID}
+----
+
+===== List option
+Running the command with this option you will see the list of notificaitons with their configuration.
+
+[source]
+--
+$ ./syncopeadm.sh notification --list
+--
+
+[source]
+--
+
+You are runnig: notification --list 
+
+ > NOTIFICATION ID: 1
+    events: [[CUSTOM]:[]:[]:[requestPasswordReset]:[SUCCESS]]
+    sender: admin@syncope.apache.org
+    subject: Password Reset request
+    recipients: null
+    recipient attribute name: email
+    template: requestPasswordReset
+    abouts: {USER=token!=$null}
+    recipient attribute types: UserPlainSchema
+    static recipient: []
+    trace level: FAILURES
+    active: true
+    self as recipient: true
+
+ > NOTIFICATION ID: 2
+    events: [[CUSTOM]:[]:[]:[confirmPasswordReset]:[SUCCESS]]
+    sender: admin@syncope.apache.org
+    subject: Password Reset successful
+    recipients: null
+    recipient attribute name: email
+    template: confirmPasswordReset
+    abouts: {}
+    recipient attribute types: UserPlainSchema
+    static recipient: []
+    trace level: FAILURES
+    active: true
+    self as recipient: true
+
+ > NOTIFICATION ID: 10
+    events: [[CUSTOM]:[]:[]:[unexisting1]:[FAILURE], [CUSTOM]:[]:[]:[unexisting2]:[SUCCESS]]
+    sender: test@syncope.apache.org
+    subject: Test subject
+    recipients: $groups==7
+    recipient attribute name: email
+    template: test
+    abouts: {USER=fullname==*o*;fullname==*i*}
+    recipient attribute types: UserPlainSchema
+    static recipient: []
+    trace level: FAILURES
+    active: true
+    self as recipient: false
+
+--
+
+===== Read option
+The option to read all the information of specified notification.
+
+[source]
+--
+$ ./syncopeadm.sh notification --read {NOTIFICATION-ID} {NOTIFICATION-ID} [...]
+--
+
+Unlike the list option, the read one shows only the notifications passed as input.
+
+===== Delete option
+The option to delete a specified notification.
+
+[source]
+--
+$ ./syncopeadm.sh notification --delete {NOTIFICATION-ID} {NOTIFICATION-ID} [...]
+--
+
+The delete option, as can be imagined, tries to remove a specified notification. 
+The output will be something like:
+[source]
+--
+ - security notification {NOTIFICATION-ID} successfully deleted
+--
\ No newline at end of file

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


[5/6] syncope git commit: error, SYNCOPE-722

Posted by ma...@apache.org.
error, SYNCOPE-722


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

Branch: refs/heads/master
Commit: bbcb6105885273eff5e953cac9c637687abb1fa4
Parents: fd940ec
Author: massi <ma...@tirasa.net>
Authored: Fri Nov 27 16:06:45 2015 +0100
Committer: massi <ma...@tirasa.net>
Committed: Fri Nov 27 17:00:42 2015 +0100

----------------------------------------------------------------------
 src/main/asciidoc/cli-configuration.adoc | 6 +++---
 src/main/asciidoc/cli-connector.adoc     | 8 ++++----
 src/main/asciidoc/cli-logger.adoc        | 2 +-
 src/main/asciidoc/cli-question.adoc      | 4 ++--
 src/main/asciidoc/cli-role.adoc          | 4 ++--
 5 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/bbcb6105/src/main/asciidoc/cli-configuration.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-configuration.adoc b/src/main/asciidoc/cli-configuration.adoc
index d44b330..9bb0884 100644
--- a/src/main/asciidoc/cli-configuration.adoc
+++ b/src/main/asciidoc/cli-configuration.adoc
@@ -79,7 +79,7 @@ You are runnig: configuration --get
 --
 
 ===== Read option
-The option to read the value of the specified configuration attributes.
+The option to read the value of a specified configuration attributes.
 
 [source]
 --
@@ -137,14 +137,14 @@ You are runnig: configuration --update passwordReset.allowed=false
 --
 
 ===== Delete option
-The option to delete the specified configuration attributes.
+The option to delete a 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 delete option, as can be imagined, tries to remove a specified roles. 
 The output will be something like:
 [source]
 --

http://git-wip-us.apache.org/repos/asf/syncope/blob/bbcb6105/src/main/asciidoc/cli-connector.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-connector.adoc b/src/main/asciidoc/cli-connector.adoc
index 80defe9..bf508a5 100644
--- a/src/main/asciidoc/cli-connector.adoc
+++ b/src/main/asciidoc/cli-connector.adoc
@@ -149,7 +149,7 @@ You are runnig: connector --list
 
 --
 
-The last snippet code shows a part of screen output. Basically you can read the configuration about every connectors
+The last snippet code shows a part of the screen output. Basically you can read the configuration about every connectors
 configured in Syncope.
 
 ===== List bundles option
@@ -237,14 +237,14 @@ $ ./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.
+The option to delete a 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 
+The delete option, as can be imagined, tries to remove a 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]
@@ -252,7 +252,7 @@ If the connector isn't associated to anything the output will be
  - Connector {CONNECTOR-ID} successfully deleted
 --
 
-other wise the output will be something like:
+otherwise the output will be something like:
 [source]
 --
  - Error: AssociatedResources [ws-target-resource-nopropagation, ws-target-resource-nopropagation2]

http://git-wip-us.apache.org/repos/asf/syncope/blob/bbcb6105/src/main/asciidoc/cli-logger.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-logger.adoc b/src/main/asciidoc/cli-logger.adoc
index 9ab3c95..83b93c0 100644
--- a/src/main/asciidoc/cli-logger.adoc
+++ b/src/main/asciidoc/cli-logger.adoc
@@ -233,7 +233,7 @@ You are runnig: logger --create net.tirasa=ERROR
 --
 
 ===== Delete option
-The option to delete the specified logger.
+The option to delete a specified logger.
 
 [source]
 --

http://git-wip-us.apache.org/repos/asf/syncope/blob/bbcb6105/src/main/asciidoc/cli-question.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-question.adoc b/src/main/asciidoc/cli-question.adoc
index 031ab85..c9ef57b 100644
--- a/src/main/asciidoc/cli-question.adoc
+++ b/src/main/asciidoc/cli-question.adoc
@@ -62,14 +62,14 @@ $ ./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.
+The option to delete a 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 delete option, as can be imagined, tries to remove a specified questions. 
 The output will be something like:
 [source]
 --

http://git-wip-us.apache.org/repos/asf/syncope/blob/bbcb6105/src/main/asciidoc/cli-role.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-role.adoc b/src/main/asciidoc/cli-role.adoc
index 4bf0f15..cc3f244 100644
--- a/src/main/asciidoc/cli-role.adoc
+++ b/src/main/asciidoc/cli-role.adoc
@@ -134,14 +134,14 @@ $ ./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.
+The option to delete a 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 delete option, as can be imagined, tries to remove a specified roles. 
 The output will be something like:
 [source]
 --


[2/6] syncope git commit: cli docs: task. SYNCOPE-722

Posted by ma...@apache.org.
cli docs: task. SYNCOPE-722


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

Branch: refs/heads/master
Commit: fd940ec1e09e478b0e01c9cbfd416d555ecfd0f2
Parents: 5153b16
Author: massi <ma...@tirasa.net>
Authored: Fri Nov 27 16:06:22 2015 +0100
Committer: massi <ma...@tirasa.net>
Committed: Fri Nov 27 17:00:42 2015 +0100

----------------------------------------------------------------------
 src/main/asciidoc/cli-task.adoc | 315 +++++++++++++++++++++++++++++++++++
 src/main/asciidoc/cli.adoc      |   4 +-
 2 files changed, 318 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/fd940ec1/src/main/asciidoc/cli-task.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-task.adoc b/src/main/asciidoc/cli-task.adoc
new file mode 100644
index 0000000..b57a535
--- /dev/null
+++ b/src/main/asciidoc/cli-task.adoc
@@ -0,0 +1,315 @@
+//
+// 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.
+//
+
+==== Task command
+The connector command serves to retrieve the information around the connector configuration in Apache Syncope.
+
+===== Help message
+[source,bash]
+----
+Usage: task [options]
+  Options:
+    --help 
+    --details
+    --list
+       Syntax: --list {TASK-TYPE} 
+          Task type: NOTIFICATION / PROPAGATION / PUSH / SCHEDULED / SYNCHRONIZATION
+    --list-running-jobs 
+    --list-scheduled-jobs 
+    --read 
+       Syntax: --read {TASK-ID} {TASK-ID} [...]
+    --read-execution 
+       Syntax: --read-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]
+    --delete 
+       Syntax: --delete {TASK-ID} {TASK-ID} [...]
+    --delete-execution 
+       Syntax: --delete-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]
+    --execute 
+       Syntax: --execute {TASK-ID} {DRY-RUN}
+          Dry run: true / false
+----
+
+===== Details option
+This option shows a table with some details about tasks and jobs.
+
+[source]
+--
+$ ./syncopeadm.sh task --details
+--
+
+[source]
+--
+
+You are runnig: task --details 
+
+##############################################################
+#                                                            #
+#                       TASKS DETAILS                        #
+#                                                            #
+##############################################################
+#                                                  #         #
+#                      DETAIL                      #  VALUE  #
+#                                                  #         #
+##############################################################
+#                                                  #         #
+#                   total number                   #   28    #
+#                notification tasks                #    1    #
+#         notification tasks not executed          #    1    #
+#                propagation tasks                 #    5    #
+#          propagation tasks not executed          #    3    #
+#                    push tasks                    #   11    #
+#             push tasks not executed              #   11    #
+#                 scheduled tasks                  #    1    #
+#           scheduled tasks not executed           #    1    #
+#              synchronization tasks               #   10    #
+#        synchronization tasks not executed        #   10    #
+#  synchronization tasks with full reconciliation  #    5    #
+#                   running jobs                   #    0    #
+#                  scheduled jobs                  #    1    #
+#                                                  #         #
+##############################################################
+
+--
+
+===== List option
+Running the command with this option you will see the list of selected tasks type with their information.
+
+[source]
+--
+$ ./syncopeadm.sh - task --list {TASK-TYPE}
+   Task type: NOTIFICATION / PROPAGATION / PUSH / SCHEDULED / SYNCHRONIZATION
+--
+
+[source]
+--
+
+You are runnig: task --list SCHEDULED 
+
+ - Scheduled task key: 5
+     name: SampleJob Task
+     cron expression: 0 0 0 1 * ?
+     description: null
+     start date: null
+     end date: null
+     last execution: null
+     next execution: Tue Dec 01 00:00:00 CET 2015
+     latest execution status: 
+     job delegate class: org.apache.syncope.fit.core.reference.TestSampleJobDelegate
+
+--
+
+The last snippet code shows the information of the scheduled tasks.
+
+===== List running jobs
+Running the command with this option you will see the list of the actual running jobs.
+
+[source]
+--
+$ ./syncopeadm.sh task --list-running-jobs
+--
+
+[source]
+--
+ - There is NOT running jobs available
+--
+
+===== List scheduled jobs
+Running the command with this option you will see the list of the actual scheduled jobs.
+
+[source]
+--
+$ ./syncopeadm.sh task --list-scheduled-jobs
+--
+
+[source]
+--
+ EXECUTIONS: 
+     - task execution key: 0
+       task: 5
+       message: 
+       ###############     <BEGIN MESSAGE>     ###############
+       message: null
+       ###############     <END   MESSAGE>     ###############
+       status: NORMAL
+       start date: Fri Nov 27 15:11:23 CET 2015
+       end date: null
+--
+
+===== Read option
+The option to read all the information of specified tasks.
+
+[source]
+--
+$ ./syncopeadm.sh task --read {TASK-ID} {TASK-ID} [...]
+--
+
+Unlike the list option, the read one shows only the tasks passed as input. Below the commad to read the task with 
+id 13
+[source]
+--
+You are runnig: task --read 13 
+
+ - Push task key: 13
+     name: Export on resource-testdb2
+     resource: resource-testdb2
+     cron expression: null
+     description: null
+     is perform create: true
+     is perform delete: true
+     is perform update: true
+     is sync status: true
+     start date: null
+     end date: null
+     last execution: null
+     next execution: null
+     latest execution status: 
+     filters: {GROUP=name==_NO_ONE_, USER=surname==Vivaldi}
+     delegate class: null
+     action class: []
+     matching rule: IGNORE
+     not matching rule: ASSIGN
+--
+
+===== Read execution option
+The option to read all the information of executions task.
+
+[source]
+--
+$ ./syncopeadm.sh task --read-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]
+--
+
+===== Delete option
+The option to delete a specified tasks.
+
+[source]
+--
+$ ./syncopeadm.sh task --delete {TASK-ID} TASK-ID} [...]
+--
+
+The delete option, as can be imagined, tries to remove a specified tasks.
+[source]
+--
+ - task {TASK-ID} successfully deleted
+--
+
+===== Delete execution option
+The option to delete a specified execution tasks.
+[source]
+--
+$ ./syncopeadm.sh task --delete {TASK-EXEC-ID} {TASK-EXEC-ID} [...]
+--
+
+The delete option, as can be imagined, tries to remove a specified execution tasks.
+[source]
+--
+ - task {TASK-EXEC-ID} successfully deleted
+--
+
+===== Execute option
+The option to execute a specified execution tasks.
+[source]
+--
+$ ./syncopeadm.sh task --execute {TASK-ID} {DRY-RUN}
+          Dry run: true / false
+--
+
+For instance, executing the PUSH task with id 13 in dry run mode the result is
+[source]
+--
+ You are runnig: task --execute 13 false 
+     EXECUTIONS: 
+     - task execution key: 0
+       task: 13
+       message: 
+       ###############     <BEGIN MESSAGE>     ###############
+       message: Job fired; waiting for results...
+       ###############     <END   MESSAGE>     ###############
+       status: JOB_FIRED
+       start date: Fri Nov 27 16:02:24 CET 2015
+       end date: null
+--
+then reading again the task id you will find the execution results among the other task information
+[source]
+--
+- Push task key: 13
+     name: Export on resource-testdb2
+     resource: resource-testdb2
+     cron expression: null
+     description: null
+     is perform create: true
+     is perform delete: true
+     is perform update: true
+     is sync status: true
+     start date: Fri Nov 27 16:02:24 CET 2015
+     end date: Fri Nov 27 16:02:26 CET 2015
+     last execution: null
+     next execution: null
+     latest execution status: SUCCESS
+     filters: {GROUP=name==_NO_ONE_, USER=surname==Vivaldi}
+     delegate class: null
+     action class: []
+     matching rule: IGNORE
+     not matching rule: ASSIGN
+     EXECUTIONS: 
+     - task execution key: 15
+       task: 13
+       message: 
+       ###############     <BEGIN MESSAGE>     ###############
+       message: Users [created/failures]: 1/0 [updated/failures]: 0/0 [deleted/failures]: 0/0 [no operation/ignored]: 0/0
+Groups [created/failures]: 0/0 [updated/failures]: 0/0 [deleted/failures]: 0/0 [no operation/ignored]: 0/0
+Any objects [created/failures]: 0/0 [updated/failures]: 0/0 [deleted/failures]: 0/0 [no operation/ignored]: 0/0
+
+Users created:
+CREATE SUCCESS (id/name): 3/vivaldi 
+
+Users updated:
+
+Users deleted:
+
+Users no operation:
+
+Users ignored:
+
+
+Groups created:
+
+Groups updated:
+
+Groups deleted:
+
+Groups no operation:
+
+Groups ignored:
+
+
+Any objects created:
+
+Any objects updated:
+
+Any objects deleted:
+
+Any objects no operation:
+
+Any objects ignored:
+
+       ###############     <END   MESSAGE>     ###############
+       status: SUCCESS
+       start date: Fri Nov 27 16:02:24 CET 2015
+       end date: Fri Nov 27 16:02:26 CET 2015
+--
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/fd940ec1/src/main/asciidoc/cli.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli.adoc b/src/main/asciidoc/cli.adoc
index 3fe029b..f3e2762 100644
--- a/src/main/asciidoc/cli.adoc
+++ b/src/main/asciidoc/cli.adoc
@@ -30,4 +30,6 @@ include::cli-role.adoc[]
 
 include::cli-configuration.adoc[]
 
-include::cli-logger.adoc[]
\ No newline at end of file
+include::cli-logger.adoc[]
+
+include::cli-task.adoc[]
\ No newline at end of file


[4/6] syncope git commit: Added message for empty running jobs

Posted by ma...@apache.org.
Added message for empty running jobs


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

Branch: refs/heads/master
Commit: becd01e9342d0a3064d54e21a771e3788dbcd165
Parents: 8d42fa8
Author: massi <ma...@tirasa.net>
Authored: Fri Nov 27 14:55:26 2015 +0100
Committer: massi <ma...@tirasa.net>
Committed: Fri Nov 27 17:00:42 2015 +0100

----------------------------------------------------------------------
 .../cli/commands/task/TaskListRunningJobs.java  | 21 +++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/becd01e9/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java
index 928af35..3b278e4 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java
@@ -18,27 +18,34 @@
  */
 package org.apache.syncope.client.cli.commands.task;
 
+import java.util.List;
 import org.apache.syncope.client.cli.Input;
 import org.apache.syncope.common.lib.SyncopeClientException;
+import org.apache.syncope.common.lib.to.TaskExecTO;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class TaskListRunningJobs extends AbstractTaskCommand {
-
+    
     private static final Logger LOG = LoggerFactory.getLogger(TaskListRunningJobs.class);
-
+    
     private static final String READ_HELP_MESSAGE = "task --list-running-jobs";
-
+    
     private final Input input;
-
+    
     public TaskListRunningJobs(final Input input) {
         this.input = input;
     }
-
+    
     public void list() {
         if (input.parameterNumber() == 0) {
             try {
-                taskResultManager.printTaskExecTO(taskSyncopeOperations.listRunningJobs());
+                final List<TaskExecTO> taskExecTOs = taskSyncopeOperations.listRunningJobs();
+                if (taskExecTOs.isEmpty()) {
+                    taskResultManager.genericMessage("There is NOT running jobs available");
+                } else {
+                    taskResultManager.printTaskExecTO(taskExecTOs);
+                }
             } catch (final SyncopeClientException ex) {
                 LOG.error("Error listing jobs", ex);
                 taskResultManager.genericError(ex.getMessage());
@@ -46,6 +53,6 @@ public class TaskListRunningJobs extends AbstractTaskCommand {
         } else {
             taskResultManager.unnecessaryParameters(input.listParameters(), READ_HELP_MESSAGE);
         }
-
+        
     }
 }


[3/6] syncope git commit: cli docs: logger. SYNCOPE-722

Posted by ma...@apache.org.
cli docs: logger. SYNCOPE-722


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

Branch: refs/heads/master
Commit: 8d42fa877d68ad91469577f54852721ce039bb14
Parents: 9840cd0
Author: massi <ma...@tirasa.net>
Authored: Fri Nov 27 13:01:37 2015 +0100
Committer: massi <ma...@tirasa.net>
Committed: Fri Nov 27 17:00:42 2015 +0100

----------------------------------------------------------------------
 src/main/asciidoc/cli-logger.adoc | 250 +++++++++++++++++++++++++++++++++
 src/main/asciidoc/cli.adoc        |   4 +-
 2 files changed, 253 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/8d42fa87/src/main/asciidoc/cli-logger.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli-logger.adoc b/src/main/asciidoc/cli-logger.adoc
new file mode 100644
index 0000000..9ab3c95
--- /dev/null
+++ b/src/main/asciidoc/cli-logger.adoc
@@ -0,0 +1,250 @@
+//
+// 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.
+//
+
+==== Logger command
+The logger command serves to retrieve the information about the logger configuration in Apache Syncope.
+
+===== Help message
+[source,bash]
+----
+Usage: logger [options]
+  Options:
+    --help 
+    --details 
+    --list 
+    --read 
+       Syntax: --read {LOG-NAME} {LOG-NAME} [...]
+    --update 
+       Syntax: --update {LOG-NAME}={LOG-LEVEL} {LOG-NAME}={LOG-LEVEL} [...]
+    --update-all 
+       Syntax: --update-all {LOG-LEVEL} 
+    --create 
+       Syntax: --create {LOG-NAME}={LOG-LEVEL} {LOG-NAME}={LOG-LEVEL} [...]
+    --delete 
+       Syntax: --delete {LOG-NAME} {LOG-NAME} [...]
+----
+
+===== Details option
+This option shows a table with some details about logger configuration.
+
+[source]
+--
+$ ./syncopeadm.sh logger --details
+--
+
+[source]
+--
+
+You are runnig: logger --details 
+
+############################
+#                          #
+#     LOGGERS DETAILS      #
+#                          #
+############################
+#                #         #
+#     DETAIL     #  VALUE  #
+#                #         #
+############################
+#                #         #
+#  Total number  #   16    #
+#  Set to DEBUG  #    2    #
+#  Set to ERROR  #    3    #
+#  Set to FATAL  #    0    #
+#  Set to INFO   #   11    #
+#   Set to OFF   #    0    #
+#  Set to TRACE  #    0    #
+#  Set to WARN   #    0    #
+#                #         #
+############################
+
+--
+
+===== List option
+Running the command with this option you will see the table of the loggers configuration.
+
+[source]
+--
+$ ./syncopeadm.sh logger --list
+--
+
+[source]
+--
+
+You are runnig: logger --list 
+
+############################################################################
+#                                                                          #
+#                               LIST LOGGERS                               #
+#                                                                          #
+############################################################################
+#                                                                #         #
+#                             LOGGER                             #  LEVEL  #
+#                                                                #         #
+############################################################################
+#                                                                #         #
+#                    org.springframework.web                     #  INFO   #
+#                 org.apache.syncope.core.logic                  #  INFO   #
+#                       net.tirasa.connid                        #  DEBUG  #
+#                           org.quartz                           #  INFO   #
+#              org.apache.syncope.core.persistence               #  INFO   #
+#                          org.activiti                          #  ERROR  #
+#                        org.apache.http                         #  INFO   #
+#                    org.springframework.orm                     #  INFO   #
+#                        org.apache.camel                        #  ERROR  #
+#                         org.apache.cxf                         #  ERROR  #
+#                       org.apache.syncope                       #  INFO   #
+#                     org.identityconnectors                     #  DEBUG  #
+#                      org.springframework                       #  INFO   #
+#              org.apache.syncope.core.provisioning              #  INFO   #
+#                  org.apache.syncope.core.rest                  #  INFO   #
+#  org.apache.syncope.core.provisioning.api.ConnIdBundleManager  #  INFO   #
+#                                                                #         #
+############################################################################
+
+--
+
+===== Read option
+The option to read all the information of specified loggers.
+
+[source]
+--
+$ ./syncopeadm.sh logger --read {LOG-NAME} {LOG-NAME} [...]
+--
+
+Unlike the list option, the read one shows a table with only the loggers passed as input.
+
+===== Update option
+The option to change the value of the logger passed as input.
+
+[source]
+--
+$ ./syncopeadm.sh logger --update {LOG-NAME}={LOG-LEVEL} {LOG-NAME}={LOG-LEVEL} [...]
+--
+
+[source]
+--
+
+You are runnig: logger --update org.apache.camel=DEBUG 
+
+####################################
+#                                  #
+#         UPDATED LOGGERS          #
+#                                  #
+####################################
+#                    #             #
+#       LOGGER       #  NEW LEVEL  #
+#                    #             #
+####################################
+#                    #             #
+#  org.apache.camel  #    DEBUG    #
+#                    #             #
+####################################
+
+--
+
+===== Update all option
+This option is especially helpful in production environment when every log is disable and you need to change them for a 
+while in DEBUG mode.
+
+[source]
+--
+$ ./syncopeadm.sh logger --update-all DEBUG
+--
+
+[source]
+--
+
+You are runnig: logger --update-all DEBUG 
+
+################################################################################
+#                                                                              #
+#                               UPDATED LOGGERS                                #
+#                                                                              #
+################################################################################
+#                                                                #             #
+#                             LOGGER                             #  NEW LEVEL  #
+#                                                                #             #
+################################################################################
+#                                                                #             #
+#                    org.springframework.web                     #    DEBUG    #
+#                 org.apache.syncope.core.logic                  #    DEBUG    #
+#                       net.tirasa.connid                        #    DEBUG    #
+#                           org.quartz                           #    DEBUG    #
+#              org.apache.syncope.core.persistence               #    DEBUG    #
+#                          org.activiti                          #    DEBUG    #
+#                        org.apache.http                         #    DEBUG    #
+#                    org.springframework.orm                     #    DEBUG    #
+#                         org.apache.cxf                         #    DEBUG    #
+#                       org.apache.syncope                       #    DEBUG    #
+#                     org.identityconnectors                     #    DEBUG    #
+#                      org.springframework                       #    DEBUG    #
+#              org.apache.syncope.core.provisioning              #    DEBUG    #
+#                  org.apache.syncope.core.rest                  #    DEBUG    #
+#  org.apache.syncope.core.provisioning.api.ConnIdBundleManager  #    DEBUG    #
+#                                                                #             #
+################################################################################
+
+--
+
+===== Create option
+For the moment the logger command is one of the few command with a create option to add a new logger configuration.
+
+[source]
+--
+$ ./syncopeadm.sh logger --create net.tirasa=ERROR
+--
+
+[source]
+--
+
+You are runnig: logger --create net.tirasa=ERROR 
+
+##############################
+#                            #
+#      UPDATED LOGGERS       #
+#                            #
+##############################
+#              #             #
+#    LOGGER    #  NEW LEVEL  #
+#              #             #
+##############################
+#              #             #
+#  net.tirasa  #    ERROR    #
+#              #             #
+##############################
+
+--
+
+===== Delete option
+The option to delete the specified logger.
+
+[source]
+--
+$ ./syncopeadm.sh logger --delete {LOG-NAME} {LOG-NAME} [...]
+--
+
+[source]
+--
+
+You are runnig: logger --delete org.apache.camel 
+
+ - Logger org.apache.camel successfully deleted
+
+--
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/syncope/blob/8d42fa87/src/main/asciidoc/cli.adoc
----------------------------------------------------------------------
diff --git a/src/main/asciidoc/cli.adoc b/src/main/asciidoc/cli.adoc
index 571a92a..3fe029b 100644
--- a/src/main/asciidoc/cli.adoc
+++ b/src/main/asciidoc/cli.adoc
@@ -28,4 +28,6 @@ include::cli-question.adoc[]
 
 include::cli-role.adoc[]
 
-include::cli-configuration.adoc[]
\ No newline at end of file
+include::cli-configuration.adoc[]
+
+include::cli-logger.adoc[]
\ No newline at end of file


[6/6] syncope git commit: Added message for empty running jobs

Posted by ma...@apache.org.
Added message for empty running jobs


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

Branch: refs/heads/master
Commit: 5153b165381d034c3e379dc23ba8a9b14f64b13e
Parents: becd01e
Author: massi <ma...@tirasa.net>
Authored: Fri Nov 27 15:13:27 2015 +0100
Committer: massi <ma...@tirasa.net>
Committed: Fri Nov 27 17:00:42 2015 +0100

----------------------------------------------------------------------
 .../client/cli/commands/task/TaskListRunningJobs.java   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/5153b165/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java
index 3b278e4..dfdcaf2 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java
@@ -26,17 +26,17 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class TaskListRunningJobs extends AbstractTaskCommand {
-    
+
     private static final Logger LOG = LoggerFactory.getLogger(TaskListRunningJobs.class);
-    
+
     private static final String READ_HELP_MESSAGE = "task --list-running-jobs";
-    
+
     private final Input input;
-    
+
     public TaskListRunningJobs(final Input input) {
         this.input = input;
     }
-    
+
     public void list() {
         if (input.parameterNumber() == 0) {
             try {
@@ -53,6 +53,6 @@ public class TaskListRunningJobs extends AbstractTaskCommand {
         } else {
             taskResultManager.unnecessaryParameters(input.listParameters(), READ_HELP_MESSAGE);
         }
-        
+
     }
 }