syncope git commit: Parameters order and boolean management, #SYNCOPE-156
Repository: syncope Updated Branches: refs/heads/master cb4059fab -> bc4976f5a Parameters order and boolean management, #SYNCOPE-156 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/bc4976f5 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/bc4976f5 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/bc4976f5 Branch: refs/heads/master Commit: bc4976f5a6fcf88cec9804f7e20aaf9c30655755 Parents: cb4059f Author: Massimiliano PerroneAuthored: Thu Jan 28 17:59:03 2016 +0100 Committer: Massimiliano Perrone Committed: Thu Jan 28 18:00:31 2016 +0100 -- .../panels/ParametersCreateWizardAttrStep.java | 35 +-- .../console/panels/ParametersDetailsPanel.java | 36 ++-- .../client/console/panels/ParametersPanel.java | 11 -- .../client/console/wizards/any/PlainAttrs.java | 1 - 4 files changed, 74 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/bc4976f5/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java index 4ddb9a7..f33276c 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java @@ -94,6 +94,34 @@ public class ParametersCreateWizardAttrStep extends WizardStep { panel = new AjaxDateFieldPanel( id, valueHeaderName, new Model(), plainSchemaTO.getConversionPattern()); break; +case Boolean: +panel = new AjaxDropDownChoicePanel<>(id, valueHeaderName, new Model(), false); +((AjaxDropDownChoicePanel) panel).setChoices(Arrays.asList("true", "false")); + +if (!attrTO.getValues().isEmpty()) { +((AjaxDropDownChoicePanel) panel).setChoiceRenderer(new IChoiceRenderer() { + +private static final long serialVersionUID = -3724971416312135885L; + +@Override +public String getDisplayValue(final String value) { +return value; +} + +@Override +public String getIdValue(final String value, final int i) { +return value; +} + +@Override +public String getObject( +final String id, final IModel> choices) { +return id; +} +}); +} +((AjaxDropDownChoicePanel) panel).setNullValid(false); +break; case Enum: panel = new AjaxDropDownChoicePanel<>(id, valueHeaderName, new Model(), false); ((AjaxDropDownChoicePanel) panel).setChoices(SchemaUtils.getEnumeratedValues(plainSchemaTO)); @@ -120,6 +148,8 @@ public class ParametersCreateWizardAttrStep extends WizardStep { } }); } +((AjaxDropDownChoicePanel) panel).setNullValid( + "true".equalsIgnoreCase(plainSchemaTO.getMandatoryCondition())); break; case Long: @@ -139,9 +169,8 @@ public class ParametersCreateWizardAttrStep extends WizardStep { } else { panel.setNewModel(attrTO.getValues()); } -if (plainSchemaTO.getMandatoryCondition().equalsIgnoreCase("true")) { -panel.setRequired(true); -} + + panel.setRequired("true".equalsIgnoreCase(plainSchemaTO.getMandatoryCondition())); return panel; } } http://git-wip-us.apache.org/repos/asf/syncope/blob/bc4976f5/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java index eae63bc..8e6662d 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersDetailsPanel.java +++
syncope git commit: Parameters page with enum panel, #SYNCOPE-156
Repository: syncope Updated Branches: refs/heads/master 800a39f9d -> dc8e946d3 Parameters page with enum panel, #SYNCOPE-156 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/dc8e946d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/dc8e946d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/dc8e946d Branch: refs/heads/master Commit: dc8e946d31e00ac7f5680166e47aa0a97d05c438 Parents: 800a39f Author: Massimiliano PerroneAuthored: Tue Jan 26 17:12:01 2016 +0100 Committer: Massimiliano Perrone Committed: Tue Jan 26 17:35:35 2016 +0100 -- .../panels/ParametersCreateWizardAttrStep.java | 3 +- .../panels/ParametersCreateWizardPanel.java | 14 ++-- .../ParametersCreateWizardSchemaStep.java | 72 .../client/console/panels/ParametersPanel.java | 1 + .../ParametersCreateWizardSchemaStep.html | 1 + .../ParametersCreateWizardSchemaStep.properties | 1 + ...rametersCreateWizardSchemaStep_it.properties | 1 + ...etersCreateWizardSchemaStep_pt_BR.properties | 1 + 8 files changed, 83 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/dc8e946d/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java index c86d4ae..4ddb9a7 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.java @@ -54,6 +54,7 @@ public class ParametersCreateWizardAttrStep extends WizardStep { final AjaxTextFieldPanel schema = new AjaxTextFieldPanel( "schema", getString("schema"), new PropertyModel(modelObject.getAttrTO(), "schema")); +schema.setRequired(true); content.add(schema); final LoadableDetachableModel loadableDetachableModel @@ -75,8 +76,6 @@ public class ParametersCreateWizardAttrStep extends WizardStep { @Override protected void populateItem(final ListItem item) { final Panel panel = getFieldPanel("panel", modelObject.getAttrTO(), item.getModelObject()); -panel.setEnabled(true); -panel.setVisible(true); item.add(panel); } }; http://git-wip-us.apache.org/repos/asf/syncope/blob/dc8e946d/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardPanel.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardPanel.java index 09f7aae..8db78d0 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardPanel.java @@ -56,15 +56,11 @@ public class ParametersCreateWizardPanel extends AjaxWizardBuilderhttp://git-wip-us.apache.org/repos/asf/syncope/blob/dc8e946d/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java index a5b4eaf..769081e 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java @@ -18,13 +18,23 @@ */ package org.apache.syncope.client.console.panels; +import static org.apache.syncope.client.console.commons.PropertyList.getEnumValuesAsString; + import java.util.Arrays; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.console.commons.PropertyList; import org.apache.syncope.client.console.wicket.markup.html.form.AjaxCheckBoxPanel; import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel; import
syncope git commit: Useless import and println, #SYNCOPE-156
Repository: syncope Updated Branches: refs/heads/master dc8e946d3 -> b9fd9303f Useless import and println, #SYNCOPE-156 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b9fd9303 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b9fd9303 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b9fd9303 Branch: refs/heads/master Commit: b9fd9303f4afd038e138d1d13339df0a52312b2d Parents: dc8e946 Author: Massimiliano PerroneAuthored: Tue Jan 26 17:40:04 2016 +0100 Committer: Massimiliano Perrone Committed: Tue Jan 26 17:40:04 2016 +0100 -- .../console/panels/ParametersCreateWizardSchemaStep.java | 6 -- 1 file changed, 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/b9fd9303/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java index 769081e..7a776ee 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/ParametersCreateWizardSchemaStep.java @@ -18,8 +18,6 @@ */ package org.apache.syncope.client.console.panels; -import static org.apache.syncope.client.console.commons.PropertyList.getEnumValuesAsString; - import java.util.Arrays; import java.util.List; import org.apache.commons.lang3.StringUtils; @@ -62,14 +60,11 @@ public class ParametersCreateWizardSchemaStep extends WizardStep { @Override public String getValues() { -System.out.println("> getvalues: " + modelObject.getPlainSchemaTO(). -getEnumerationValues()); return modelObject.getPlainSchemaTO().getEnumerationValues(); } @Override public void setValues(final List list) { -System.out.println("> setvalues " + list); modelObject.getPlainSchemaTO().setEnumerationValues(getEnumValuesAsString(list)); } }; @@ -77,7 +72,6 @@ public class ParametersCreateWizardSchemaStep extends WizardStep { @Override public void setObject(final List object) { -System.out.println("> setObject: " + object); modelObject.getPlainSchemaTO().setEnumerationValues(PropertyList.getEnumValuesAsString(object)); } }) {
[2/2] syncope git commit: Parameters page, #SYNCOPE-156
Parameters page, #SYNCOPE-156 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/143c8e6d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/143c8e6d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/143c8e6d Branch: refs/heads/master Commit: 143c8e6db2b49e696375e2f12fd3039650efad60 Parents: dde1cbc Author: Massimiliano PerroneAuthored: Sun Jan 24 14:45:49 2016 +0100 Committer: Massimiliano Perrone Committed: Sun Jan 24 14:45:49 2016 +0100 -- .../client/console/commons/Constants.java | 2 + .../client/console/commons/SchemaUtils.java | 66 + .../syncope/client/console/pages/BasePage.java | 14 +- .../client/console/pages/Parameters.java| 45 +++ .../console/panels/AbstractModalPanel.java | 12 - .../panels/ParametersCreateModalPanel.java | 45 +++ .../panels/ParametersCreateWizardAttrStep.java | 148 ++ .../panels/ParametersCreateWizardPanel.java | 91 ++ .../ParametersCreateWizardSchemaStep.java | 54 .../console/panels/ParametersDetailsPanel.java | 133 + .../panels/ParametersEditModalPanel.java| 65 + .../client/console/panels/ParametersPanel.java | 285 +++ .../console/panels/PlainSchemaDetails.java | 4 +- .../panels/SecurityQuestionModalPanel.java | 67 - .../panels/SecurityQuestionsModalPanel.java | 67 + .../console/panels/SecurityQuestionsPanel.java | 9 +- .../console/panels/search/GroupSearchPanel.java | 2 +- .../markup/html/form/MultiFieldPanel.java | 41 +-- .../client/console/wizards/WizardMgtPanel.java | 3 +- .../console/wizards/any/AnyWizardBuilder.java | 5 +- .../client/console/wizards/any/PlainAttrs.java | 68 ++--- .../syncope/client/console/pages/BasePage.html | 1 + .../client/console/pages/Parameters.html| 41 +++ .../client/console/pages/Parameters.properties | 19 ++ .../console/pages/Parameters_it.properties | 19 ++ .../console/pages/Parameters_pt_BR.properties | 19 ++ .../panels/ParametersCreateModalPanel.html | 24 ++ .../console/panels/ParametersCreateWizard.html | 31 ++ .../panels/ParametersCreateWizardAttrStep.html | 28 ++ .../ParametersCreateWizardAttrStep.properties | 15 + ...ParametersCreateWizardAttrStep_it.properties | 15 + ...ametersCreateWizardAttrStep_pt_BR.properties | 15 + .../ParametersCreateWizardSchemaStep.html | 27 ++ .../ParametersCreateWizardSchemaStep.properties | 16 ++ ...rametersCreateWizardSchemaStep_it.properties | 16 ++ ...etersCreateWizardSchemaStep_pt_BR.properties | 16 ++ .../console/panels/ParametersDetailsPanel.html | 34 +++ .../panels/ParametersDetailsPanel.properties| 19 ++ .../panels/ParametersDetailsPanel_it.properties | 19 ++ .../ParametersDetailsPanel_pt_BR.properties | 19 ++ .../panels/ParametersEditModalPanel.html| 24 ++ .../client/console/panels/ParametersPanel.html | 23 ++ .../console/panels/ParametersPanel.properties | 21 ++ .../panels/ParametersPanel_it.properties| 21 ++ .../panels/ParametersPanel_pt_BR.properties | 21 ++ .../panels/SecurityQuestionModalPanel.html | 24 -- .../panels/SecurityQuestionsModalPanel.html | 24 ++ 47 files changed, 1567 insertions(+), 210 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/143c8e6d/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java index 60a1f58..69b0930 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java @@ -60,6 +60,8 @@ public final class Constants { public static final String PREF_SECURITY_QUESTIONS_PAGINATOR_ROWS = "security.questions.paginator.rows"; +public static final String PREF_PARAMETERS_PAGINATOR_ROWS = "parameters.paginator.rows"; + public static final String PREF_RELATIONSHIPTYPE_PAGINATOR_ROWS = "relationshiptype.painator.rows"; public static final String PREF_GROUP_DETAILS_VIEW = "group.details.view"; http://git-wip-us.apache.org/repos/asf/syncope/blob/143c8e6d/client/console/src/main/java/org/apache/syncope/client/console/commons/SchemaUtils.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/SchemaUtils.java
[1/2] syncope git commit: Parameters page, #SYNCOPE-156
Repository: syncope Updated Branches: refs/heads/master dde1cbca6 -> 143c8e6db http://git-wip-us.apache.org/repos/asf/syncope/blob/143c8e6d/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizard.html -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizard.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizard.html new file mode 100644 index 000..4579656 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizard.html @@ -0,0 +1,31 @@ + +http://www.w3.org/1999/xhtml; xmlns:wicket="http://wicket.apache.org;> + + + + +[schema] + + +[panel] + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/143c8e6d/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.html -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.html new file mode 100644 index 000..dd7f053 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.html @@ -0,0 +1,28 @@ + +http://www.w3.org/1999/xhtml; xmlns:wicket="http://wicket.apache.org;> + + + [schema] + +[panel] + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/143c8e6d/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.properties -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.properties new file mode 100644 index 000..faab67a --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep.properties @@ -0,0 +1,15 @@ +# Copyright 2016 The Apache Software Foundation. +# +# Licensed 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. +type=Schema type +values=Values http://git-wip-us.apache.org/repos/asf/syncope/blob/143c8e6d/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep_it.properties -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep_it.properties new file mode 100644 index 000..5d988e2 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep_it.properties @@ -0,0 +1,15 @@ +# Copyright 2016 The Apache Software Foundation. +# +# Licensed 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. +type=Tipo di schema +values=Valori http://git-wip-us.apache.org/repos/asf/syncope/blob/143c8e6d/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep_pt_BR.properties -- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/ParametersCreateWizardAttrStep_pt_BR.properties
syncope git commit: Menù bugfix: SYNCOPE-156
Repository: syncope Updated Branches: refs/heads/master 2a75cf3b6 -> 656156454 Menù bugfix: SYNCOPE-156 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/65615645 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/65615645 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/65615645 Branch: refs/heads/master Commit: 656156454209711641b938d3ed1f16774999f295 Parents: 2a75cf3 Author: Massimiliano PerroneAuthored: Tue Dec 22 16:35:47 2015 +0100 Committer: Massimiliano Perrone Committed: Tue Dec 22 16:35:52 2015 +0100 -- .../syncope/client/console/pages/BasePage.java | 32 ++-- .../client/console/pages/SecurityQuestions.java | 15 +++-- .../syncope/client/console/pages/BasePage.html | 4 +-- 3 files changed, 23 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/65615645/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java index b034eda..79b4dbe 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java @@ -49,14 +49,6 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware { this(null); } -private String getLIContainerId(final String linkId) { -return linkId + "LI"; -} - -private String getULContainerId(final String linkId) { -return linkId + "UL"; -} - public BasePage(final PageParameters parameters) { super(parameters); @@ -102,12 +94,6 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware { MetaDataRoleAuthorizationStrategy.authorize( liContainer, WebPage.RENDER, StandardEntitlement.CONFIGURATION_LIST); -liContainer = new WebMarkupContainer(getLIContainerId("securityQuestions")); -confULContainer.add(liContainer); -final BookmarkablePageLink securityQuestionLink = new BookmarkablePageLink<>( -"securityQuestions", SecurityQuestions.class); -liContainer.add(securityQuestionLink); - liContainer = new WebMarkupContainer(getLIContainerId("workflow")); confULContainer.add(liContainer); final BookmarkablePageLink workflowLink = new BookmarkablePageLink<>("workflow", Workflow.class); @@ -122,6 +108,12 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware { liContainer.add(logsLink); MetaDataRoleAuthorizationStrategy.authorize(liContainer, WebPage.RENDER, StandardEntitlement.LOG_LIST); +liContainer = new WebMarkupContainer(getLIContainerId("securityquestions")); +confULContainer.add(liContainer); +final BookmarkablePageLink secuityQuestionsLink = new BookmarkablePageLink<>("securityquestions", +SecurityQuestions.class); +liContainer.add(secuityQuestionsLink); + liContainer = new WebMarkupContainer(getLIContainerId("types")); confULContainer.add(liContainer); BookmarkablePageLink typesLink = new BookmarkablePageLink<>("types", Types.class); @@ -142,9 +134,9 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware { liContainer.add(new BookmarkablePageLink<>("notifications", Notifications.class)); MetaDataRoleAuthorizationStrategy.authorize(liContainer, WebPage.RENDER, StandardEntitlement.NOTIFICATION_LIST); -liContainer = new WebMarkupContainer(getLIContainerId("camelRoutes")); +liContainer = new WebMarkupContainer(getLIContainerId("camelroutes")); add(liContainer); -liContainer.add(new BookmarkablePageLink<>("camelRoutes", CamelRoutes.class)); +liContainer.add(new BookmarkablePageLink<>("camelroutes", CamelRoutes.class)); add(new Label("domain", SyncopeConsoleSession.get().getDomain())); add(new BookmarkablePageLink("logout", Logout.class)); @@ -194,6 +186,14 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware { } } +private String getLIContainerId(final String linkId) { +return linkId + "LI"; +} + +private String getULContainerId(final String linkId) { +return linkId + "UL"; +} + @Override public String getAjaxIndicatorMarkupId() { return "veil";
syncope git commit: Security questions page: SYNCOPE-156
Repository: syncope Updated Branches: refs/heads/master 14e06e0f1 -> 50ecf0d80 Security questions page: SYNCOPE-156 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/50ecf0d8 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/50ecf0d8 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/50ecf0d8 Branch: refs/heads/master Commit: 50ecf0d80163d6d828417bb71f3b52a910dfc716 Parents: 14e06e0 Author: Massimiliano PerroneAuthored: Mon Dec 21 17:11:42 2015 +0100 Committer: Massimiliano Perrone Committed: Mon Dec 21 17:11:47 2015 +0100 -- .../client/console/commons/Constants.java | 6 +- .../syncope/client/console/pages/BasePage.java | 25 ++- .../syncope/client/console/pages/Logs.java | 42 +--- .../client/console/pages/SecurityQuestions.java | 78 ++- .../client/console/panels/ConsoleLogPanel.java | 3 +- .../client/console/panels/CoreLogPanel.java | 3 +- .../panels/SecurityQuestionDetailsPanel.java| 65 ++ .../panels/SecurityQuestionModalPanel.java | 67 ++ .../console/panels/SecurityQuestionsPanel.java | 223 +++ .../markup/html/bootstrap/dialog/BaseModal.java | 2 +- .../client/console/pages/Logs.properties| 1 + .../client/console/pages/Logs_it.properties | 1 + .../client/console/pages/Logs_pt_BR.properties | 1 + .../client/console/pages/SecurityQuestions.html | 38 ++-- .../console/pages/SecurityQuestions.properties | 19 ++ .../pages/SecurityQuestions_it.properties | 19 ++ .../pages/SecurityQuestions_pt_BR.properties| 19 ++ .../panels/SecurityQuestionDetailsPanel.html| 34 +++ .../SecurityQuestionDetailsPanel.properties | 18 ++ .../SecurityQuestionDetailsPanel_it.properties | 18 ++ ...ecurityQuestionDetailsPanel_pt_BR.properties | 18 ++ .../panels/SecurityQuestionModalPanel.html | 24 ++ 22 files changed, 653 insertions(+), 71 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/50ecf0d8/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java index e5edbf3..8f78562 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java @@ -58,8 +58,10 @@ public final class Constants { public static final String PREF_ANYTYPE_PAGINATOR_ROWS = "anytype.paginator.rows"; -public static final String PREF_RELATIONSHIPTYPE_PAGINATOR_ROWS = "relationshiptype.painator.rows" ; - +public static final String PREF_SECURITY_QUESTIONS_PAGINATOR_ROWS = "secutiry.questions.paginator.rows"; + +public static final String PREF_RELATIONSHIPTYPE_PAGINATOR_ROWS = "relationshiptype.painator.rows"; + public static final String PREF_GROUP_DETAILS_VIEW = "group.details.view"; public static final String PREF_GROUP_ATTRIBUTES_VIEW = "group.attributes.view"; http://git-wip-us.apache.org/repos/asf/syncope/blob/50ecf0d8/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java index 3d03ab2..9b50853 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java @@ -96,18 +96,27 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware { WebMarkupContainer confULContainer = new WebMarkupContainer(getULContainerId("configuration")); confLIContainer.add(confULContainer); +liContainer = new WebMarkupContainer(getLIContainerId("securityQuestions")); +confULContainer.add(liContainer); +final BookmarkablePageLink securityQuestionLink = new BookmarkablePageLink<>( +"securityQuestions", SecurityQuestions.class); +MetaDataRoleAuthorizationStrategy.authorize( +securityQuestionLink, WebPage.ENABLE, StandardEntitlement.SECURITY_QUESTION_CREATE); +liContainer.add(securityQuestionLink); + liContainer = new WebMarkupContainer(getLIContainerId("workflow")); confULContainer.add(liContainer); -BookmarkablePageLink link = new
syncope git commit: Logs page: SYNCOPE-156
Repository: syncope Updated Branches: refs/heads/master c3b1c7e66 -> 82ccd29d8 Logs page: SYNCOPE-156 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/82ccd29d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/82ccd29d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/82ccd29d Branch: refs/heads/master Commit: 82ccd29d88b787e1749c46bf4701c098147619f6 Parents: c3b1c7e Author: Massimiliano PerroneAuthored: Fri Dec 18 16:47:10 2015 +0100 Committer: Massimiliano Perrone Committed: Fri Dec 18 16:50:05 2015 +0100 -- .../syncope/client/console/pages/BasePage.java | 22 ++-- .../syncope/client/console/pages/Logs.java | 84 +++ .../console/panels/AbstractLogsPanel.java | 106 +++ .../client/console/panels/ConsoleLogPanel.java | 79 ++ .../client/console/panels/CoreLogPanel.java | 41 +++ .../client/console/panels/ListViewPanel.java| 2 +- .../META-INF/resources/css/syncopeConsole.css | 19 .../syncope/client/console/pages/Logs.html | 30 +++--- .../client/console/pages/Logs.properties| 17 +++ .../client/console/pages/Logs_it.properties | 17 +++ .../client/console/pages/Logs_pt_BR.properties | 17 +++ .../client/console/panels/ConsoleLogPanel.html | 28 + .../console/panels/ConsoleLogPanel.properties | 18 .../panels/ConsoleLogPanel_it.properties| 18 .../panels/ConsoleLogPanel_pt_BR.properties | 18 .../client/console/panels/CoreLogPanel.html | 28 + .../console/panels/CoreLogPanel.properties | 18 .../console/panels/CoreLogPanel_it.properties | 18 .../panels/CoreLogPanel_pt_BR.properties| 18 .../client/console/panels/ListViewPanel.html| 3 +- 20 files changed, 574 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/82ccd29d/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java index 191cc0d..3d03ab2 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/BasePage.java @@ -96,17 +96,23 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware { WebMarkupContainer confULContainer = new WebMarkupContainer(getULContainerId("configuration")); confLIContainer.add(confULContainer); -liContainer = new WebMarkupContainer(getLIContainerId("types")); -confULContainer.add(liContainer); -BookmarkablePageLink typesLink = new BookmarkablePageLink<>("types", Types.class); -MetaDataRoleAuthorizationStrategy.authorize(typesLink, WebPage.ENABLE, StandardEntitlement.SCHEMA_LIST); -liContainer.add(typesLink); - liContainer = new WebMarkupContainer(getLIContainerId("workflow")); confULContainer.add(liContainer); BookmarkablePageLink link = new BookmarkablePageLink<>("workflow", Workflow.class); MetaDataRoleAuthorizationStrategy.authorize(link, WebPage.ENABLE, StandardEntitlement.WORKFLOW_DEF_READ); liContainer.add(link); + +liContainer = new WebMarkupContainer(getLIContainerId("logs")); +confULContainer.add(liContainer); +BookmarkablePageLink logsLink = new BookmarkablePageLink<>("logs", Logs.class); +MetaDataRoleAuthorizationStrategy.authorize(logsLink, WebPage.ENABLE, StandardEntitlement.LOG_LIST); +liContainer.add(logsLink); + +liContainer = new WebMarkupContainer(getLIContainerId("types")); +confULContainer.add(liContainer); +BookmarkablePageLink typesLink = new BookmarkablePageLink<>("types", Types.class); +MetaDataRoleAuthorizationStrategy.authorize(typesLink, WebPage.ENABLE, StandardEntitlement.SCHEMA_LIST); +liContainer.add(typesLink); liContainer = new WebMarkupContainer(getLIContainerId("policies")); confULContainer.add(liContainer); @@ -116,10 +122,6 @@ public class BasePage extends AbstractBasePage implements IAjaxIndicatorAware { confULContainer.add(liContainer); liContainer.add(new BookmarkablePageLink<>("securityQuestions", SecurityQuestions.class)); -liContainer = new WebMarkupContainer(getLIContainerId("logs")); -confULContainer.add(liContainer); -liContainer.add(new BookmarkablePageLink<>("logs",
syncope git commit: Maven archetype, SYNCOPE-700
Repository: syncope Updated Branches: refs/heads/master 05478375f -> 64129fcab Maven archetype, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/64129fca Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/64129fca Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/64129fca Branch: refs/heads/master Commit: 64129fcab688ae0ebcbb8dc5180abb67680c5947 Parents: 0547837 Author: Massimiliano PerroneAuthored: Thu Dec 17 09:50:34 2015 +0100 Committer: Massimiliano Perrone Committed: Thu Dec 17 09:50:43 2015 +0100 -- src/main/asciidoc/commondocs/maven.adoc | 123 +++ src/main/asciidoc/obtain.adoc | 106 +--- .../installation/installation.adoc | 2 +- 3 files changed, 125 insertions(+), 106 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/64129fca/src/main/asciidoc/commondocs/maven.adoc -- diff --git a/src/main/asciidoc/commondocs/maven.adoc b/src/main/asciidoc/commondocs/maven.adoc new file mode 100644 index 000..ff92f6a --- /dev/null +++ b/src/main/asciidoc/commondocs/maven.adoc @@ -0,0 +1,123 @@ +// +// 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. +// +=== Maven Project + +This is the *preferred method* for working with Apache Syncope, giving access to the whole set of customization +and extension capabilities. + +[CAUTION] +.Target Audience +Provides access to the full capabilities of Apache Syncope, and almost all extensions that are possible. + +*Requires Apache Maven (and potentially https://en.wikipedia.org/wiki/DevOps[DevOps^]) skills.* + + Prerequisites + + . http://maven.apache.org/[Apache Maven^] (version 3.0.3 or higher) installed + . Some basic knowledge about Maven + . Some basic knowledge about http://maven.apache.org/guides/introduction/introduction-to-archetypes.html[Maven archetypes^]. + + Create project + +Maven archetypes are templates of projects. Maven can generate a new project from such a template. +In the folder in which the new project folder should be created, type the command shown below. +On Windows, run the command on a single line and leave out the line continuation characters ('\'). + +ifeval::["{snapshotOrRelease}" == "release"] + +[subs="verbatim,attributes"] + +mvn archetype:generate \ +-DarchetypeGroupId=org.apache.syncope \ +-DarchetypeArtifactId=syncope-archetype \ +-DarchetypeRepository=http://repo1.maven.org/maven2 \ +-DarchetypeVersion={docVersion} + + +endif::[] + +ifeval::["{snapshotOrRelease}" == "snapshot"] + +[subs="verbatim,attributes"] + +mvn archetype:generate \ +-DarchetypeGroupId=org.apache.syncope \ +-DarchetypeArtifactId=syncope-archetype \ + -DarchetypeRepository=http://repository.apache.org/content/repositories/snapshots \ +-DarchetypeVersion={docVersion} + + +[WARNING] + +Once the Maven project is generated, add the following right before `` in the root `pom.xml` of the +generated project: + +[source,xml] + + + +ASF +https://repository.apache.org/content/repositories/snapshots/ + + true + + + + + + +endif::[] + +The archetype is configured with default values for all required properties; if you want to customize any of these +property values, type 'n' when prompted for confirmation. + +You will be asked for: + +groupId:: +something like 'com.mycompany' +artifactId:: +something like 'myproject' +version number:: +You can use the default; it is good practice to have 'SNAPSHOT' in the version number during development and the +maven release plugin makes use of that string. But ensure to comply with the desired numbering scheme for your project. +package name:: +The java package name. A folder structure according to this name will be generated automatically; by default, equal +to the groupId. +secretKey:: +
[2/2] syncope git commit: refactoring of CLI documentation, SYNCOPE-700
id.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: Enable writing empty stringSelect 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 code snippet shows a part of the screen output. Basically you can read the configuration about every connector -configured in Syncope. - -= List bundles option +--list-bundles:: 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 running: 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 is: - -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 +--list-configuration-properties:: This option lists the configuration of specified connectors. - -[source] --- -$ ./syncopeadm.sh connector --list-configuration-properties {CONNECTOR-ID} {CONNECTOR-ID} [...] --- - -The output is the configuration of the connectors passed as input. - -= Read option +--read:: The option to read all the information of specified connectors. - -[source]
[1/2] syncope git commit: refactoring of CLI documentation, SYNCOPE-700
Repository: syncope Updated Branches: refs/heads/master 546ea0bf3 -> dbc909278 http://git-wip-us.apache.org/repos/asf/syncope/blob/dbc90927/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc -- diff --git a/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc b/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc index ed2715c..30fd6fd 100644 --- a/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc +++ b/src/main/asciidoc/workingwithapachesyncope/cli/user.adoc @@ -32,502 +32,48 @@ Usage: user [options] Syntax: --get-user-key {USERNAME} {USERNAME} [...] --get-username Syntax: --get-username {USER-ID} {USER-ID} [...] ---read - Syntax: --read {USER-ID} {USER-ID} [...] ---search-by-attribute +--read-by-usernam + Syntax: --read-by-usernam {USERNAME} {USERNAME} [...] +--read-by-userid + Syntax: --read-by-userid {USER-ID} {USER-ID} [...] +--search-by-attribute Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE} ---search-by-role +--search-by-role Syntax: --search-by-role {REALM} {ROLE-ID} ---search-by-resource +--search-by-resource Syntax: --search-by-resource {REALM} {RESOURCE-NAME} ---delete +--delete Syntax: --delete {USER-ID} {USER-ID} [...] --delete-all Syntax: --delete-all {REALM} ---delete-by-attribute +--delete-by-attribute Syntax: --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE} -= Details option -This option shows a table with some details about the users. - -[source] --- -$ ./syncopeadm.sh user --details --- - -[source] --- - -You are running: user --details - -# -# # -# USERS DETAILS # -# # -# -# # # -# DETAIL# VALUE # -# # # -# -# # # -#Total number #5# -# Active#5# -# Suspended #0# -# Without resources #0# -#Without roles#2# -# # # -# - --- - -= List option -Running the command with this option you will see the list of all users in the environment. However, the system will ask you a confirmation before execution, because as you can imagine this operation might produce very large output. - -[source] --- -$ ./syncopeadm.sh user --list --- -[source] --- -You are running: user --list - -This operation might produce very large output. Do you want to continue? [yes/no] -yes - - > USER ID: 2 -username: verdi -realm: / -status: active -RESOURCES: - - ws-target-resource-list-mappings-1 - - ws-target-resource-list-mappings-2 -ROLES: -creation date: Wed Oct 20 11:00:00 CEST 2010 -change password date: null -PLAIN ATTRIBUTES: - fullname: [Giuseppe Verdi] - firstname: [Giuseppe] - surname: [Verdi] - userId: [ve...@apache.org] - email: [ve...@syncope.org] -DERIVED ATTRIBUTES: - info: [verdi - 2010-10-20T11:00:00+0200[0]] - is readonly. - noschema: [Verdi, ] - is readonly. - cn: [Verdi, Giuseppe] - is readonly. -VIRTUAL ATTRIBUTES: -creator: admin -last modifier: admin -token: null -token expiration time: null -last change: Wed Oct 20 11:00:00 CEST 2010 -last login: null -failed logins: 0 -RELATIONSHIPS: -security question id: null -security question answer id: null += Options --- - -= Get user key option +--details:: +This option shows a table with some details about the users. +-- List option:: +Running the command with this option you will see the list of all users in the environment. However, the system will +ask you a confirmation before execution, because as you can imagine this operation might produce very large output. +--get-user-key:: The option to get the user key starting from a username. - -[source] --- -$ ./syncopeadm.sh user --get-user-key {USERNAME} --- - -[source] --- -You are running: user --get-user-key rossini - - - rossini user ID is 1 --- - -= Get username option +--get-username:: The option to get the username starting from a user id. - -[source] --- -$ ./syncopeadm.sh user --get-user-key {USER-ID} --- - -[source] --- -You are running: user --get-username 1 - - - 1 username is rossini --- - -= Read by user id option +--read-by-userid:: The option to read user information by their user id. - -[source] --- -$ ./syncopeadm.sh user --read {USER-ID} {USER-ID} [...] --- - -[source] --- - -You are running: user --read 1 - - > USER ID: 1 -username: rossini -realm: /even -status: active -RESOURCES: - - resource-testdb2 - -
[1/2] syncope git commit: installer, SYNCOPE-700
Repository: syncope Updated Branches: refs/heads/master c95ca2fd2 -> 73b9f6d67 installer, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/97b202db Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/97b202db Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/97b202db Branch: refs/heads/master Commit: 97b202db1650470e4d2789cb6e088fcbba5a1e89 Parents: c95ca2f Author: Massimiliano PerroneAuthored: Wed Dec 16 12:20:02 2015 +0100 Committer: Massimiliano Perrone Committed: Wed Dec 16 12:20:11 2015 +0100 -- src/main/asciidoc/images/installer-1.png| Bin 0 -> 170640 bytes src/main/asciidoc/images/installer-10.png | Bin 0 -> 45301 bytes src/main/asciidoc/images/installer-11.png | Bin 0 -> 55982 bytes src/main/asciidoc/images/installer-12.png | Bin 0 -> 375102 bytes src/main/asciidoc/images/installer-13.png | Bin 0 -> 72643 bytes src/main/asciidoc/images/installer-14.png | Bin 0 -> 39897 bytes src/main/asciidoc/images/installer-2.png| Bin 0 -> 69467 bytes src/main/asciidoc/images/installer-3.png| Bin 0 -> 61796 bytes src/main/asciidoc/images/installer-4.png| Bin 0 -> 42771 bytes src/main/asciidoc/images/installer-5.png| Bin 0 -> 58758 bytes src/main/asciidoc/images/installer-6.png| Bin 0 -> 47589 bytes src/main/asciidoc/images/installer-7.png| Bin 0 -> 44672 bytes src/main/asciidoc/images/installer-8.png| Bin 0 -> 45854 bytes src/main/asciidoc/images/installer-9.png| Bin 0 -> 44522 bytes src/main/asciidoc/reference-guide.adoc | 3 - .../installation/deb.adoc | 118 +++ .../installation/installation.adoc | 30 + .../installation/installer.adoc | 118 +++ .../installation/maven.adoc | 118 +++ .../workingwithapachesyncope.adoc | 2 + 20 files changed, 386 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/97b202db/src/main/asciidoc/images/installer-1.png -- diff --git a/src/main/asciidoc/images/installer-1.png b/src/main/asciidoc/images/installer-1.png new file mode 100644 index 000..145735d Binary files /dev/null and b/src/main/asciidoc/images/installer-1.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/97b202db/src/main/asciidoc/images/installer-10.png -- diff --git a/src/main/asciidoc/images/installer-10.png b/src/main/asciidoc/images/installer-10.png new file mode 100644 index 000..ec0b151 Binary files /dev/null and b/src/main/asciidoc/images/installer-10.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/97b202db/src/main/asciidoc/images/installer-11.png -- diff --git a/src/main/asciidoc/images/installer-11.png b/src/main/asciidoc/images/installer-11.png new file mode 100644 index 000..351aef6 Binary files /dev/null and b/src/main/asciidoc/images/installer-11.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/97b202db/src/main/asciidoc/images/installer-12.png -- diff --git a/src/main/asciidoc/images/installer-12.png b/src/main/asciidoc/images/installer-12.png new file mode 100644 index 000..692790f Binary files /dev/null and b/src/main/asciidoc/images/installer-12.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/97b202db/src/main/asciidoc/images/installer-13.png -- diff --git a/src/main/asciidoc/images/installer-13.png b/src/main/asciidoc/images/installer-13.png new file mode 100644 index 000..0bc120e Binary files /dev/null and b/src/main/asciidoc/images/installer-13.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/97b202db/src/main/asciidoc/images/installer-14.png -- diff --git a/src/main/asciidoc/images/installer-14.png b/src/main/asciidoc/images/installer-14.png new file mode 100644 index 000..8fbf70f Binary files /dev/null and b/src/main/asciidoc/images/installer-14.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/97b202db/src/main/asciidoc/images/installer-2.png -- diff --git a/src/main/asciidoc/images/installer-2.png b/src/main/asciidoc/images/installer-2.png new file mode 100644 index 000..cba6a93 Binary files
[2/2] syncope git commit: installer, SYNCOPE-700
installer, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/73b9f6d6 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/73b9f6d6 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/73b9f6d6 Branch: refs/heads/master Commit: 73b9f6d673e7de06331a8fda30270804c4589957 Parents: 97b202d Author: Massimiliano PerroneAuthored: Wed Dec 16 13:14:00 2015 +0100 Committer: Massimiliano Perrone Committed: Wed Dec 16 13:14:00 2015 +0100 -- .../installation/installer.adoc | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/73b9f6d6/src/main/asciidoc/workingwithapachesyncope/installation/installer.adoc -- diff --git a/src/main/asciidoc/workingwithapachesyncope/installation/installer.adoc b/src/main/asciidoc/workingwithapachesyncope/installation/installer.adoc index 096530e..f626cc3 100644 --- a/src/main/asciidoc/workingwithapachesyncope/installation/installer.adoc +++ b/src/main/asciidoc/workingwithapachesyncope/installation/installer.adoc @@ -102,17 +102,19 @@ Remember to configure right DataSource on it and to configure Tomcat user like: + +The next images shows how the installer print some feedback directly on the GUI or reading the log file under the +configuration directory: + +[source] +-- +/var/tmp/syncope_2_0_0/install.log +-- + image::installer-11.png[installer-11] image::installer-12.png[installer-12] image::installer-13.png[installer-13] -image::installer-14.png[installer-14] - -The latest images shows how the installer print some feedback directly on the GUI or following the log - -[source] --- -/var/tmp/syncope_2_0_0/install.log --- \ No newline at end of file +image::installer-14.png[installer-14] \ No newline at end of file
syncope git commit: Added debian packages, SYNCOPE-700
Repository: syncope Updated Branches: refs/heads/master b7f88690c -> 546ea0bf3 Added debian packages, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/546ea0bf Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/546ea0bf Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/546ea0bf Branch: refs/heads/master Commit: 546ea0bf32cfd247a39058ad3f818e9ddc2dc4f4 Parents: b7f8869 Author: Massimiliano PerroneAuthored: Wed Dec 16 15:56:43 2015 +0100 Committer: Massimiliano Perrone Committed: Wed Dec 16 15:56:50 2015 +0100 -- src/main/asciidoc/commondocs/debpackages.adoc | 88 ++ src/main/asciidoc/obtain.adoc | 72 +-- .../installation/deb.adoc | 118 --- .../installation/installation.adoc | 2 +- .../installation/maven.adoc | 101 +--- 5 files changed, 91 insertions(+), 290 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/546ea0bf/src/main/asciidoc/commondocs/debpackages.adoc -- diff --git a/src/main/asciidoc/commondocs/debpackages.adoc b/src/main/asciidoc/commondocs/debpackages.adoc new file mode 100644 index 000..ebaa299 --- /dev/null +++ b/src/main/asciidoc/commondocs/debpackages.adoc @@ -0,0 +1,88 @@ +// +// 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. +// +=== Debian packages + +Debian packages are available for use with http://www.debian.org/[Debian GNU / Linux^], +http://www.ubuntu.com/[Ubuntu^] and their derivatives. + +[CAUTION] +.Target Audience +Getting up and running quickly on Debian / Ubuntu. + +*Difficult to extend beyond pre-sets.* + +Download:: +http://syncope.apache.org/downloads.html[Download^] the latest .deb packages +Prepare:: +. Install Apache Tomcat 8 and PostgreSQL ++ +[source,bash] +sudo apt-get install tomcat8 libpostgresql-jdbc-java postgresql postgresql-client ++ +. Use the PostgreSQL JDBC driver with Tomcat ++ +[source,bash] +sudo ln -s /usr/share/java/postgresql-jdbc4.jar /usr/share/tomcat8/lib/ ++ +. Replace `JAVA_OPTS` in `/etc/default/tomcat8` with the following: ++ +[source,bash] + +JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server \ + -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m + -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC" + ++ +Install:: +. Stop Tomcat ++ +[source,bash] +sudo service tomcat8 stop ++ +. Install Apache Syncope core and console via the downloaded packages ++ +[source,bash] +sudo dpkg -i apache-syncope-*.deb ++ +. Create a database for use with Apache Syncope ++ +[source,bash] +sudo SYNCOPE_USER="syncope" SYNCOPE_PASS="syncope" sh /usr/share/apache-syncope/dbinit-postgresql.sh ++ +. Start Tomcat ++ +[source,bash] +sudo service tomcat8 start + + Components + +CAUTION: The following assumes that Apache Tomcat is reachable on host `host.domain` and port `port`. + +[cols="1,2"] +|=== + +| Complete REST API reference +| http://host.domain:port/syncope/index.html + +| http://swagger.io/[Swagger^] UI +| http://host.domain:port/syncope/swagger/ + +| Administration console +| http://host.domain:port/syncope-console/ + + +|=== \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/546ea0bf/src/main/asciidoc/obtain.adoc -- diff --git a/src/main/asciidoc/obtain.adoc b/src/main/asciidoc/obtain.adoc index 23357dd..c87cf7a 100644 --- a/src/main/asciidoc/obtain.adoc +++ b/src/main/asciidoc/obtain.adoc @@ -83,77 +83,7 @@ This will create H2 database files in the home directory of the user running Apa Please refer to the http://www.h2database.com/[H2 documentation^] for more options. -=== Debian packages - -Debian packages are available for use with http://www.debian.org/[Debian GNU / Linux^], -http://www.ubuntu.com/[Ubuntu^] and their
[4/4] syncope git commit: swagger installation, SYNCOPE-700
swagger installation, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/54db1893 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/54db1893 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/54db1893 Branch: refs/heads/master Commit: 54db189335d308adc174a9993ca1ca6862b9f2c7 Parents: ce7cad4 Author: Massimiliano PerroneAuthored: Tue Dec 15 11:44:16 2015 +0100 Committer: Massimiliano Perrone Committed: Tue Dec 15 18:08:02 2015 +0100 -- .../restfulservices/restful-reference.adoc| 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/54db1893/src/main/asciidoc/workingwithapachesyncope/restfulservices/restful-reference.adoc -- diff --git a/src/main/asciidoc/workingwithapachesyncope/restfulservices/restful-reference.adoc b/src/main/asciidoc/workingwithapachesyncope/restfulservices/restful-reference.adoc index 73bcf83..3c9c145 100644 --- a/src/main/asciidoc/workingwithapachesyncope/restfulservices/restful-reference.adoc +++ b/src/main/asciidoc/workingwithapachesyncope/restfulservices/restful-reference.adoc @@ -35,6 +35,18 @@ image::restSchemaReferenceLogger.png[restSchemaReferenceLogger] = Swagger UI From the 2.0 version, Syncope offers also the Swagger UI to work with its services. + +The Swagger installation is really simple because you just add the Maven dependency to your core pom.xml file generated +from the archetype operation; the dependency is: +[source, xml] + + + org.apache.syncope.ext + syncope-ext-swagger-ui + ${syncope.version} + + + The swagger interface is available going to the URL [source] -- @@ -59,4 +71,4 @@ Now in version 2.0, Swagger is more enabling than ever. And it's 100% open sourc To be consistent with the example, below the image shows the Swagger UI used to read the configuration of _org.apache.syncope.core.rest_ -image::swaggerLoggerRead.png[swaggerLoggerRead] +image::swaggerLoggerRead.png[swaggerLoggerRead] \ No newline at end of file
[2/4] syncope git commit: Swagger option, SYNCOPE-637
Swagger option, SYNCOPE-637 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e2158717 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e2158717 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e2158717 Branch: refs/heads/master Commit: e21587171946ae764b820d4db9c7f731e84e871f Parents: 54db189 Author: Massimiliano PerroneAuthored: Tue Dec 15 12:04:19 2015 +0100 Committer: Massimiliano Perrone Committed: Tue Dec 15 18:08:02 2015 +0100 -- .../syncope/installer/files/ParentPom.java | 14 +++-- .../installer/processes/ArchetypeProcess.java | 19 +--- .../main/resources/izpack/ProcessPanel.Spec.xml | 3 ++ installer/src/main/resources/izpack/install.xml | 2 ++ .../main/resources/izpack/userInputLang.xml_eng | 4 +++ .../main/resources/izpack/userInputLang.xml_ita | 4 +++ .../src/main/resources/izpack/userInputSpec.xml | 32 +++- 7 files changed, 64 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/e2158717/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java b/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java index 4653224..867b925 100644 --- a/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java +++ b/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java @@ -20,10 +20,18 @@ package org.apache.syncope.installer.files; public final class ParentPom { -public static final String PLACEHOLDER = ""; +public static final String SWAGGER_PLACEHOLDER = ""; -public static final String REPOSITORY = -" \n" +public static final String SWAGGER_CONTENT_TO_ADD = "\n" ++ "\n" ++ " org.apache.syncope.ext\n" ++ " syncope-ext-swagger-ui\n" ++ " ${syncope.version}\n" ++ "\n"; + +public static final String REPOSITORY_PLACEHOLDER = ""; + +public static final String REPOSITORY_CONTENT_TO_ADD = " \n" + " \n" + "ASF\n" + " https://repository.apache.org/content/repositories/snapshots/\n" http://git-wip-us.apache.org/repos/asf/syncope/blob/e2158717/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java b/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java index d3cc987..30a7270 100644 --- a/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java +++ b/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java @@ -52,6 +52,9 @@ public class ArchetypeProcess extends BaseProcess { final String proxyUser = args[15]; final String proxyPwd = args[16]; final boolean mavenProxyAutoconf = Boolean.valueOf(args[17]); +final boolean swagger = Boolean.valueOf(args[18]); +final boolean activiti = Boolean.valueOf(args[19]); +final boolean camel = Boolean.valueOf(args[20]); setSyncopeInstallDir(installPath, artifactId); @@ -92,11 +95,19 @@ public class ArchetypeProcess extends BaseProcess { mavenUtils.archetypeGenerate( syncopeVersion, groupId, artifactId, secretKey, anonymousKey, installPath, customMavenProxySettings); -if (syncopeVersion.contains("SNAPSHOT")) { -final File pomFile = new File(syncopeInstallDir + PROPERTIES.getProperty("pomFile")); +if (swagger) { +final File pomFile = new File( +syncopeInstallDir ++ File.separator ++ "core" ++ File.separator ++ PROPERTIES.getProperty("pomFile")); String contentPomFile = fileSystemUtils.readFile(pomFile); -fileSystemUtils. -writeToFile(pomFile, contentPomFile.replace(ParentPom.PLACEHOLDER, ParentPom.REPOSITORY)); +contentPomFile = contentPomFile.replace( +ParentPom.REPOSITORY_PLACEHOLDER, ParentPom.REPOSITORY_CONTENT_TO_ADD); +contentPomFile = contentPomFile.replace(ParentPom.SWAGGER_PLACEHOLDER, ParentPom.SWAGGER_CONTENT_TO_ADD); + +fileSystemUtils.writeToFile(pomFile, contentPomFile); } fileSystemUtils.createDirectory(confDirectory);
[3/4] syncope git commit: Camel option, SYNCOPE-637
Camel option, SYNCOPE-637 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/335d7f61 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/335d7f61 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/335d7f61 Branch: refs/heads/master Commit: 335d7f61ab7e60a4f87cd76ac179eda4f318d30c Parents: e215871 Author: Massimiliano PerroneAuthored: Tue Dec 15 15:49:23 2015 +0100 Committer: Massimiliano Perrone Committed: Tue Dec 15 18:08:02 2015 +0100 -- installer/pom.xml | 6 +++ .../apache/syncope/installer/files/CorePom.java | 54 .../syncope/installer/files/ParentPom.java | 25 +++-- .../installer/processes/ArchetypeProcess.java | 27 -- .../installer/processes/PersistenceProcess.java | 18 ++- .../src/main/resources/izpack/userInputSpec.xml | 6 +-- 6 files changed, 100 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/335d7f61/installer/pom.xml -- diff --git a/installer/pom.xml b/installer/pom.xml index 7bfc0cf..c69b4b4 100644 --- a/installer/pom.xml +++ b/installer/pom.xml @@ -189,6 +189,12 @@ under the License. + ${basedir}/../fit/core-reference/src/main/resources/all + + provisioning.properties + + + ${basedir} META-INF http://git-wip-us.apache.org/repos/asf/syncope/blob/335d7f61/installer/src/main/java/org/apache/syncope/installer/files/CorePom.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/files/CorePom.java b/installer/src/main/java/org/apache/syncope/installer/files/CorePom.java new file mode 100644 index 000..54f5685 --- /dev/null +++ b/installer/src/main/java/org/apache/syncope/installer/files/CorePom.java @@ -0,0 +1,54 @@ +/* + * 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. + */ +package org.apache.syncope.installer.files; + +public final class CorePom { + +public static final String SWAGGER_PLACEHOLDER = ""; + +public static final String SWAGGER_CONTENT_TO_ADD = " \n" ++ " org.apache.syncope.ext\n" ++ " syncope-ext-swagger-ui\n" ++ " ${syncope.version}\n" ++ "\n" ++ " \n"; + +public static final String CAMEL_PLACEHOLDER = ""; + +public static final String CAMEL_CONTENT_TO_ADD = " \n" ++ " org.apache.syncope.ext.camel\n" ++ " syncope-ext-camel-rest-cxf\n" ++ " ${syncope.version}\n" ++ "\n" ++ "\n" ++ " org.apache.syncope.ext.camel\n" ++ " syncope-ext-camel-persistence-jpa\n" ++ " ${syncope.version}\n" ++ "\n" ++ "\n" ++ " org.apache.syncope.ext.camel\n" ++ " syncope-ext-camel-provisioning\n" ++ " ${syncope.version}\n" ++ "\n" ++ " \n"; + +private CorePom() { +// private constructor for static utility class +} +} http://git-wip-us.apache.org/repos/asf/syncope/blob/335d7f61/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java b/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java index 867b925..4f23ca7 100644 --- a/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java +++ b/installer/src/main/java/org/apache/syncope/installer/files/ParentPom.java @@ -20,26 +20,17 @@ package org.apache.syncope.installer.files; public final class ParentPom { -public static final String SWAGGER_PLACEHOLDER = ""; - -public
syncope git commit: mistyped bug in the installer properties
Repository: syncope Updated Branches: refs/heads/master 588c2d390 -> eaf5110aa mistyped bug in the installer properties Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/eaf5110a Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/eaf5110a Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/eaf5110a Branch: refs/heads/master Commit: eaf5110aa0a63224350b68c8622edee55f6543f6 Parents: 588c2d3 Author: Massimiliano PerroneAuthored: Mon Dec 14 12:11:46 2015 +0100 Committer: Massimiliano Perrone Committed: Mon Dec 14 12:11:46 2015 +0100 -- installer/src/main/resources/installer.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/eaf5110a/installer/src/main/resources/installer.properties -- diff --git a/installer/src/main/resources/installer.properties b/installer/src/main/resources/installer.properties index 55f1882..3df89d7 100644 --- a/installer/src/main/resources/installer.properties +++ b/installer/src/main/resources/installer.properties @@ -19,7 +19,7 @@ glassfishCoreWebXmlFile=core/src/main/webapp/WEB-INF/glassfish-web.xml urlConfig=url-config.js saveModel=save-model.html consoleResDirectory=console/src/main/resources -enduserResDirectory=endyser/src/main/resources +enduserResDirectory=enduser/src/main/resources pomFile=pom.xml masterDomainFile=core/src/main/resources/domains/MasterDomain.xml coreMetaInfDirectory=core/src/main/resources/META-INF
syncope git commit: Bugfix: why there was those copy operations? I don't know
Repository: syncope Updated Branches: refs/heads/master eaf5110aa -> 1d48e5f29 Bugfix: why there was those copy operations? I don't know Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1d48e5f2 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1d48e5f2 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1d48e5f2 Branch: refs/heads/master Commit: 1d48e5f29ceabdee460325f061709d5ded7b3847 Parents: eaf5110 Author: Massimiliano PerroneAuthored: Mon Dec 14 15:15:07 2015 +0100 Committer: Massimiliano Perrone Committed: Mon Dec 14 15:15:07 2015 +0100 -- .../syncope/installer/processes/ArchetypeProcess.java| 11 --- .../syncope/installer/utilities/FileSystemUtils.java | 2 +- .../apache/syncope/installer/utilities/MavenUtils.java | 1 + installer/src/main/resources/modelerPom.xml | 7 --- 4 files changed, 6 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/1d48e5f2/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java b/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java index d0a3f62..4f17035 100644 --- a/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java +++ b/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java @@ -119,17 +119,6 @@ public class ArchetypeProcess extends BaseProcess { + File.separator + PROPERTIES.getProperty("saveModel"), modelerDirectory + File.separator + PROPERTIES.getProperty("saveModel")); -fileSystemUtils.copyFile( -syncopeInstallDir -+ PROPERTIES.getProperty("enduserResDirectory") -+ File.separator + PROPERTIES.getProperty("urlConfig"), -modelerDirectory + File.separator + PROPERTIES.getProperty("urlConfig")); -fileSystemUtils.copyFile( -syncopeInstallDir -+ PROPERTIES.getProperty("enduserResDirectory") -+ File.separator + PROPERTIES.getProperty("saveModel"), -modelerDirectory + File.separator + PROPERTIES.getProperty("saveModel")); - final Properties modelerProperties = new Properties(); modelerProperties.setProperty("modeler.directory", modelerDirectory); mavenUtils.mvnCleanPackageWithProperties(modelerDirectory, modelerProperties, customMavenProxySettings); http://git-wip-us.apache.org/repos/asf/syncope/blob/1d48e5f2/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java b/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java index 45b43d5..9ae37a9 100644 --- a/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java +++ b/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java @@ -61,7 +61,7 @@ public class FileSystemUtils { FileUtils.copyFile(new File(sourceFilePath), new File(targetFilePath)); } catch (final IOException ex) { final String errorMessage = -"Error copy file " + sourceFilePath + " to " + targetFilePath; +"Error copying file " + sourceFilePath + " to " + targetFilePath; handler.emitError(errorMessage, errorMessage); InstallLog.getInstance().error(errorMessage); } http://git-wip-us.apache.org/repos/asf/syncope/blob/1d48e5f2/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java b/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java index 3a8319f..cb47f04 100644 --- a/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java +++ b/installer/src/main/java/org/apache/syncope/installer/utilities/MavenUtils.java @@ -92,6 +92,7 @@ public class MavenUtils { properties.setProperty("artifactId", artifactId); properties.setProperty("secretKey", secretKey); properties.setProperty("anonymousKey", anonymousKey); +properties.setProperty("version", "1.0-SNAPSHOT"); return properties; }
syncope git commit: The installer works for 2_0_X version
Repository: syncope Updated Branches: refs/heads/master 417eb401b -> 26c3e413f The installer works for 2_0_X version Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/26c3e413 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/26c3e413 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/26c3e413 Branch: refs/heads/master Commit: 26c3e413fa2ec1077fc8d848c1c9b7c346820e67 Parents: 417eb40 Author: Massimiliano PerroneAuthored: Mon Dec 14 18:48:27 2015 +0100 Committer: Massimiliano Perrone Committed: Mon Dec 14 18:48:38 2015 +0100 -- .../installer/files/ProvisioningProperties.java | 20 .../installer/processes/ArchetypeProcess.java | 11 +-- .../installer/processes/PersistenceProcess.java | 18 -- installer/src/main/resources/izpack/install.xml | 2 +- installer/src/main/resources/modelerPom.xml | 18 -- 5 files changed, 38 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/26c3e413/installer/src/main/java/org/apache/syncope/installer/files/ProvisioningProperties.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/files/ProvisioningProperties.java b/installer/src/main/java/org/apache/syncope/installer/files/ProvisioningProperties.java index 020efcb..605fc6a 100644 --- a/installer/src/main/java/org/apache/syncope/installer/files/ProvisioningProperties.java +++ b/installer/src/main/java/org/apache/syncope/installer/files/ProvisioningProperties.java @@ -20,26 +20,6 @@ package org.apache.syncope.installer.files; public final class ProvisioningProperties { -public static final String HEADER = "# Licensed to the Apache Software Foundation (ASF) under one\n" -+ "# or more contributor license agreements. See the NOTICE file\n" -+ "# distributed with this work for additional information\n" -+ "# regarding copyright ownership. The ASF licenses this file\n" -+ "# to you under the Apache License, Version 2.0 (the\n" -+ "# \"License\"); you may not use this file except in compliance\n" -+ "# with the License. You may obtain a copy of the License at\n" + "#\n" -+ "# http://www.apache.org/licenses/LICENSE-2.0\n; + "#\n" -+ "# Unless required by applicable law or agreed to in writing,\n" -+ "# software distributed under the License is distributed on an\n" -+ "# \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n" -+ "# KIND, either express or implied. See the License for the\n" -+ "# specific language governing permissions and limitations\n" -+ "# under the License.\n" -+ "userProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultUserProvisioningManager\n" -+ "groupProvisioningManager=org.apache.syncope.core.provisioning.java.DefaultGroupProvisioningManager\n" -+ "anyObjectProvisioningManager=" -+ "org.apache.syncope.core.provisioning.java.DefaultAnyObjectProvisioningManager\n" -+ "virAttrCache=org.apache.syncope.core.provisioning.java.cache.MemoryVirAttrCache\n"; - public static final String POSTGRES = "" + "quartz.jobstore=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate\n" + "quartz.sql=tables_postgres.sql\n"; http://git-wip-us.apache.org/repos/asf/syncope/blob/26c3e413/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java b/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java index 4f17035..d3cc987 100644 --- a/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java +++ b/installer/src/main/java/org/apache/syncope/installer/processes/ArchetypeProcess.java @@ -93,8 +93,7 @@ public class ArchetypeProcess extends BaseProcess { syncopeVersion, groupId, artifactId, secretKey, anonymousKey, installPath, customMavenProxySettings); if (syncopeVersion.contains("SNAPSHOT")) { -final File pomFile = -new File(syncopeInstallDir + PROPERTIES.getProperty("pomFile")); +final File pomFile = new File(syncopeInstallDir + PROPERTIES.getProperty("pomFile")); String contentPomFile = fileSystemUtils.readFile(pomFile); fileSystemUtils. writeToFile(pomFile,
syncope git commit: Run the verify before commit! It's the king rule
Repository: syncope Updated Branches: refs/heads/master 26c3e413f -> 13c0ff630 Run the verify before commit! It's the king rule Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/13c0ff63 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/13c0ff63 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/13c0ff63 Branch: refs/heads/master Commit: 13c0ff630e3891286ea4667a58bffda3f2b35e81 Parents: 26c3e41 Author: Massimiliano PerroneAuthored: Mon Dec 14 18:49:55 2015 +0100 Committer: Massimiliano Perrone Committed: Mon Dec 14 18:49:55 2015 +0100 -- .../org/apache/syncope/installer/processes/PersistenceProcess.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/13c0ff63/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java -- diff --git a/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java b/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java index 94ce093..8090173 100644 --- a/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java +++ b/installer/src/main/java/org/apache/syncope/installer/processes/PersistenceProcess.java @@ -21,7 +21,6 @@ package org.apache.syncope.installer.processes; import org.apache.syncope.installer.utilities.FileSystemUtils; import com.izforge.izpack.panels.process.AbstractUIProcessHandler; import java.io.File; -import java.nio.channels.FileChannel; import org.apache.syncope.installer.enums.DBs; import org.apache.syncope.installer.files.MasterProperties; import org.apache.syncope.installer.files.ProvisioningProperties;
syncope git commit: Introduction, SYNCOPE-700
Repository: syncope Updated Branches: refs/heads/master 930db341f -> 8f1a55716 Introduction, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8f1a5571 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8f1a5571 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8f1a5571 Branch: refs/heads/master Commit: 8f1a5571600310becf7722c4500684581ee61a1b Parents: 930db34 Author: Massimiliano PerroneAuthored: Fri Dec 11 11:46:35 2015 +0100 Committer: Massimiliano Perrone Committed: Fri Dec 11 11:46:35 2015 +0100 -- src/main/asciidoc/iam/iam.adoc | 70 + src/main/asciidoc/reference-guide.adoc | 10 + 2 files changed, 71 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/8f1a5571/src/main/asciidoc/iam/iam.adoc -- diff --git a/src/main/asciidoc/iam/iam.adoc b/src/main/asciidoc/iam/iam.adoc new file mode 100644 index 000..a781255 --- /dev/null +++ b/src/main/asciidoc/iam/iam.adoc @@ -0,0 +1,70 @@ +// +// 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. +// + +== Identity and Access Management +Though Identity management and Access Management are often united, because the two management world often coexist in the +same projects or in the same environment, the two topics are completely different: each one has its context, its rules, +its best bractice. On the other hand, many software have unorthodox implementation so you could done a samething with +both of them. +However, in general as suggested by their name, the access management basically handles the access in a certain +environment providing some kind of credentials; on the countray the identity management handles the digital identity +profile and its life cicle. +Apache Syncope is an identity manager. + +=== Identity Stores +An identity store is the place where the digital identity are stored. Of course there are various store types, the most +famous are: + +* Microsoft Active Directory; +* LDAP +** OpenLDAP; +** FreeIPA; +** ForgeRock OpenDJ; +** 389 Directory Server; +* DBMS +** MySQL +** PostgreSQL +** Oracle +* ... + +From Apache Syncope point of view, an identity stores is viewed as an integrated resource with a communication based +on the identity connectors. + +=== Provisioning Engines +A provisioning engine is a software able to execute some operation on the profile of a digital identity. +Precisely this operation could be run to manage a user life cicle, the _CRUD_ operation to persiste the user on an +identity store: + +* Create +* Read +* Update +* Delete + +or could be the operations albe to modify the user profile in order to activate or deactivate its digital identity, or +could be the operations to add or remove a role from an user profile to achieve the RBAC (Role-based access control) +in an enviroment and so on. Definitely a provisioning angine manages the digital identity user profile in a centralized +way. + +=== Access Managers +As briefly mentioned before, an access manager is not an identity manager. An access management software manages above all +the authentication on a given environment. It provides the methods, generally called authentication module, to manage +the user authentication, the latter based on various identification system as the password, the fingerprint or based on +various protocols as SAML and OAuth 2.0. + +=== The Complete Picture \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/8f1a5571/src/main/asciidoc/reference-guide.adoc -- diff --git a/src/main/asciidoc/reference-guide.adoc b/src/main/asciidoc/reference-guide.adoc index 82e50ad..250e87f 100644 --- a/src/main/asciidoc/reference-guide.adoc +++ b/src/main/asciidoc/reference-guide.adoc @@ -54,15 +54,7 @@ provisioning, and compliance.
[2/4] syncope git commit: files reorganized, SYNCOPE-700
http://git-wip-us.apache.org/repos/asf/syncope/blob/75387d7a/src/main/asciidoc/workingwithapachesyncope/cli/installation.adoc -- diff --git a/src/main/asciidoc/workingwithapachesyncope/cli/installation.adoc b/src/main/asciidoc/workingwithapachesyncope/cli/installation.adoc new file mode 100644 index 000..fb7e693 --- /dev/null +++ b/src/main/asciidoc/workingwithapachesyncope/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 creates a file, called _cli.properties_, used by the script to call the Apache Syncope +REST API services with the right credentials. + +The properties file will contain content similar to: + +* *syncope.rest.services*=http://localhost:9080/syncope/rest +* *syncope.admin.user*=admin +* *syncope.admin.password*=QePSFVTnzwQowM4ohhaUYcE6aW47MVZ/ + +where the properties are: + +syncope.rest.services:: +the URL where the Apache Syncope REST API services are listening; +syncope.admin.user:: +the user with the permission to call the Syncope APIs; +syncope.admin.password:: +the user password; + +as can be seen, the user password is encrypted. This is only 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 the installation process, the script returns +[source] +-- + - Error: It seems you need to first setup the CLI client. 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,subs="verbatim,attributes"] + + +You are running: 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: {docVersion} + +### +# # +# 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 where the rest services are deployed (/syncope/rest is the default); +Syncope admin user:: +the user with the permission to call the Syncope APIs; +Syncope admin password:: +the user password. + += Installation error +Various error messages are possible on installation. Here are some sample error messages: + +* 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 the installation AGAIN!# +# # +### + +-- + +* Authentication failed: + +[source] +-- + +### +#
syncope git commit: provisioning, SYNCOPE-700
Repository: syncope Updated Branches: refs/heads/master 75387d7ac -> 8714fa8b6 provisioning, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8714fa8b Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8714fa8b Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8714fa8b Branch: refs/heads/master Commit: 8714fa8b67ae5f4fa4eab408bcb4ef63fadbd97e Parents: 75387d7 Author: Massimiliano PerroneAuthored: Fri Dec 11 16:34:42 2015 +0100 Committer: Massimiliano Perrone Committed: Fri Dec 11 16:34:42 2015 +0100 -- src/main/asciidoc/concepts/concepts.adoc| 8 +-- .../concepts/provisioning/connectors.adoc | 32 .../concepts/provisioning/propagation.adoc | 34 + .../concepts/provisioning/provisioning.adoc | 37 ++ .../asciidoc/concepts/provisioning/push.adoc| 51 +++ .../concepts/provisioning/resources.adoc| 51 +++ .../asciidoc/concepts/provisioning/sync.adoc| 52 7 files changed, 258 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/8714fa8b/src/main/asciidoc/concepts/concepts.adoc -- diff --git a/src/main/asciidoc/concepts/concepts.adoc b/src/main/asciidoc/concepts/concepts.adoc index 2798816..c781e50 100644 --- a/src/main/asciidoc/concepts/concepts.adoc +++ b/src/main/asciidoc/concepts/concepts.adoc @@ -32,13 +32,7 @@ === Tasks -=== Provisioning - - Connectors - - Resources - - Propagation, Push & Synchronization +include::provisioning/provisioning.adoc[] === Policies http://git-wip-us.apache.org/repos/asf/syncope/blob/8714fa8b/src/main/asciidoc/concepts/provisioning/connectors.adoc -- diff --git a/src/main/asciidoc/concepts/provisioning/connectors.adoc b/src/main/asciidoc/concepts/provisioning/connectors.adoc new file mode 100644 index 000..835d95a --- /dev/null +++ b/src/main/asciidoc/concepts/provisioning/connectors.adoc @@ -0,0 +1,32 @@ +// +// 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. +// + Connectors +Syncope uses entities like connectors bundles, connector instances and external resources to synchronize user accounts +with and propagate to external systems. This paragraph clarifies what the responsibility and scope of each of these entities are. + += Connector bundle +Connector bundles are the components that are able to connect to classes of systems when configured correctly and +told to do so. They are not bound to Syncope specifically, as they are part of the separate framework +http://connid.tirasa.net/[ConnId], but they can be plugged into a deployed Syncope system. + += Connector instance +Connectors instances are instance of connector bundles, obtained by assigning values to configuration properties +defined in bundles. +For instance, there is only a single "DatabaseTable connector" (the bundle) that can be instantiated many times, for +example if there is need to connect to two different databases. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/8714fa8b/src/main/asciidoc/concepts/provisioning/propagation.adoc -- diff --git a/src/main/asciidoc/concepts/provisioning/propagation.adoc b/src/main/asciidoc/concepts/provisioning/propagation.adoc new file mode 100644 index 000..d58ba53 --- /dev/null +++ b/src/main/asciidoc/concepts/provisioning/propagation.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 +//
syncope git commit: Fixed SYNCOPE-741
Repository: syncope Updated Branches: refs/heads/1_2_X fc421a5ec -> b4812b218 Fixed SYNCOPE-741 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b4812b21 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b4812b21 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b4812b21 Branch: refs/heads/1_2_X Commit: b4812b218b60c821fa00309674018045b5bcc1de Parents: fc421a5 Author: Massimiliano PerroneAuthored: Thu Dec 10 15:14:07 2015 +0100 Committer: Massimiliano Perrone Committed: Thu Dec 10 15:14:07 2015 +0100 -- .../syncope/common/services/TaskService.java| 24 +++- .../syncope/common/to/AbstractSyncTaskTO.java | 2 +- .../syncope/common/to/AbstractTaskTO.java | 2 +- .../syncope/console/pages/TaskModalPage.java| 50 +--- .../org/apache/syncope/console/pages/Tasks.java | 20 --- .../pages/panels/AbstractSyncTasksPanel.java| 2 +- .../console/pages/panels/PropagationTasks.java | 2 +- .../syncope/console/rest/TaskRestClient.java| 30 ++ .../core/rest/controller/TaskController.java| 28 + .../syncope/core/rest/data/TaskDataBinder.java | 14 +++-- .../syncope/core/services/TaskServiceImpl.java | 20 --- .../core/notification/NotificationTest.java | 2 +- .../syncope/core/rest/TaskTestITCase.java | 63 .../syncope/core/rest/UserTestITCase.java | 60 +-- 14 files changed, 191 insertions(+), 128 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/b4812b21/common/src/main/java/org/apache/syncope/common/services/TaskService.java -- diff --git a/common/src/main/java/org/apache/syncope/common/services/TaskService.java b/common/src/main/java/org/apache/syncope/common/services/TaskService.java index 5b197c6..0deba68 100644 --- a/common/src/main/java/org/apache/syncope/common/services/TaskService.java +++ b/common/src/main/java/org/apache/syncope/common/services/TaskService.java @@ -91,13 +91,15 @@ public interface TaskService extends JAXRSService { * Returns the task matching the given id. * * @param taskId id of task to be read + * @param details whether include executions or not, defaults to true * @param type of taskTO * @return task with matching id */ @GET @Path("{taskId}") @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) - T read(@NotNull @PathParam("taskId") Long taskId); + T read(@NotNull @PathParam("taskId") Long taskId, +@QueryParam(PARAM_DETAILS) @DefaultValue("true") boolean details); /** * Returns the task execution with the given id. @@ -141,6 +143,7 @@ public interface TaskService extends JAXRSService { * @param page page number of tasks in relation to page size * @param size number of tasks listed per page * @param orderBy list of ordering clauses, separated by comma + * @param details whether include executions or not, defaults to true * @param type of taskTO * @return paged list of existing tasks matching type and page/size conditions */ @@ -149,7 +152,8 @@ public interface TaskService extends JAXRSService { PagedResult list(@NotNull @MatrixParam("type") TaskType taskType, @NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page, @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size, -@QueryParam(PARAM_ORDERBY) String orderBy); +@QueryParam(PARAM_ORDERBY) String orderBy, +@QueryParam(PARAM_DETAILS) @DefaultValue("true") boolean details); /** * Returns a paged list of existing tasks matching type and page/size conditions. @@ -167,6 +171,22 @@ public interface TaskService extends JAXRSService { @NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size); /** + * Returns the task matching the given id. + * + * @param taskId id of task where to list the executions + * @param page page number of executions in relation to page size + * @param size number of executions listed per page + * @return list of executions with matching id + */ +@GET +@Path("{taskId}/executions") +@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) +PagedResult listEexecutions( +@NotNull @Min(1) @QueryParam(PARAM_PAGE) @DefaultValue(DEFAULT_PARAM_PAGE) Integer page, +@NotNull @Min(1) @QueryParam(PARAM_SIZE) @DefaultValue(DEFAULT_PARAM_SIZE) Integer size, +@NotNull @PathParam("taskId")
syncope git commit: Added delete all propagation tasks and bugfix on delete propagation, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 2080b51c5 -> fa91567d7 Added delete all propagation tasks and bugfix on delete propagation, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/fa91567d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/fa91567d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/fa91567d Branch: refs/heads/master Commit: fa91567d71b7e62cbb4c88a3ad9a70e2de7bd97d Parents: 2080b51 Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Dec 4 14:00:44 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Dec 4 14:00:59 2015 +0100 -- .../client/cli/commands/task/TaskCommand.java | 4 ++ .../cli/commands/task/TaskDeleteAllProp.java| 66 .../commands/task/TaskSyncopeOperations.java| 6 +- .../cli/src/main/resources/messages.properties | 2 +- 4 files changed, 76 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/fa91567d/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskCommand.java index 074e17c..903cbfc 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskCommand.java @@ -58,6 +58,9 @@ public class TaskCommand extends AbstractCommand { case DELETE: new TaskDelete(input).delete(); break; +case DELETE_PROP_TASK: +new TaskDeleteAllProp(input).delete(); +break; case DELETE_EXECUTION: new TaskExecutionDelete(input).delete(); break; @@ -87,6 +90,7 @@ public class TaskCommand extends AbstractCommand { READ("--read"), READ_EXECUTION("--read-execution"), DELETE("--delete"), +DELETE_PROP_TASK("--delete-all-prop"), DELETE_EXECUTION("--delete-execution"), EXECUTE("--execute"); http://git-wip-us.apache.org/repos/asf/syncope/blob/fa91567d/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskDeleteAllProp.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskDeleteAllProp.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskDeleteAllProp.java new file mode 100644 index 000..4f41428 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskDeleteAllProp.java @@ -0,0 +1,66 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.task; + +import javax.xml.ws.WebServiceException; +import org.apache.syncope.client.cli.Input; +import org.apache.syncope.common.lib.SyncopeClientException; +import org.apache.syncope.common.lib.to.AbstractTaskTO; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class TaskDeleteAllProp extends AbstractTaskCommand { + +private static final Logger LOG = LoggerFactory.getLogger(TaskDeleteAllProp.class); + +private static final String DELETE_HELP_MESSAGE = "task --delete-all-prop"; + +private final Input input; + +public TaskDeleteAllProp(final Input input) { +this.input = input; +} + +public void delete() { + +if (input.parameterNumber() == 0) { +for (final AbstractTaskTO taskTO : taskSyncopeOperations.listPropagationTask()) { +final String taskId = String.valueOf(taskTO.getKey()); +try { +t
syncope git commit: Introduction on the Open Source, SYNCOPE-700
Repository: syncope Updated Branches: refs/heads/master fa91567d7 -> da596533f Introduction on the Open Source, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/da596533 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/da596533 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/da596533 Branch: refs/heads/master Commit: da596533f9b9726802d360d51045a24a1cf23677 Parents: fa91567 Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Dec 4 14:34:10 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Dec 4 14:34:10 2015 +0100 -- src/main/asciidoc/introduction/history.adoc | 20 ++ .../asciidoc/introduction/introduction.adoc | 76 src/main/asciidoc/reference-guide.adoc | 4 +- 3 files changed, 97 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/da596533/src/main/asciidoc/introduction/history.adoc -- diff --git a/src/main/asciidoc/introduction/history.adoc b/src/main/asciidoc/introduction/history.adoc new file mode 100644 index 000..2e88dc1 --- /dev/null +++ b/src/main/asciidoc/introduction/history.adoc @@ -0,0 +1,20 @@ +// +// 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. +// +=== A bit of history +Syncope \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/da596533/src/main/asciidoc/introduction/introduction.adoc -- diff --git a/src/main/asciidoc/introduction/introduction.adoc b/src/main/asciidoc/introduction/introduction.adoc new file mode 100644 index 000..ba7759a --- /dev/null +++ b/src/main/asciidoc/introduction/introduction.adoc @@ -0,0 +1,76 @@ +// +// 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 +*Apache Syncope* is an Open Source system for managing digital identities in enterprise environments, implemented in +Java EE technology and released under the Apache 2.0 license. + +=== *Open Source*: what does it mean? +Apache Syncope is one of several identity manager software defined Open Source; but how and why a software +should be defined Open Source? And, in reality, now that Open Source is quite a brand, what really does it mean? + +To answer to this question maybe it's better to refer to the words of the https://opensource.org[Open Source Initiave] +about _the open source definition_: + +Open source doesn't just mean access to the source code. The distribution terms of open-source software must +comply with the following criteria: + +*1. Free Redistribution*:: +The license shall not restrict any party from selling or giving away the software as a component of an aggregate +software distribution containing programs from several different sources. The license shall not require a royalty +or other fee for such sale. +*2. Source Code*:: +The program must include source code, and must allow distribution in source code as well as compiled form. Where +some form of a product is not distributed with source code, there must be a well-publicized means of obtaining the +source code for
syncope git commit: RESTful reference, SYNCOPE-700
Repository: syncope Updated Branches: refs/heads/master 85843f77c -> cfce9b9f3 RESTful reference, SYNCOPE-700 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/cfce9b9f Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/cfce9b9f Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/cfce9b9f Branch: refs/heads/master Commit: cfce9b9f3a1b0aaac2fb607953add73078ccd74f Parents: 85843f7 Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Dec 3 17:39:39 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Dec 3 17:39:50 2015 +0100 -- .../asciidoc/images/restReferenceLoggerRead.png | Bin 0 -> 68071 bytes .../images/restReferenceLoggerUpdate.png| Bin 0 -> 63936 bytes .../images/restSchemaReferenceLogger.png| Bin 0 -> 203689 bytes src/main/asciidoc/images/swaggerLoggerRead.png | Bin 0 -> 98491 bytes .../restfulservices/client-library.adoc | 16 - .../restfulservices/restful-reference.adoc | 62 +++ .../restfulservices/restful-services.adoc | 9 +++ 7 files changed, 86 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/cfce9b9f/src/main/asciidoc/images/restReferenceLoggerRead.png -- diff --git a/src/main/asciidoc/images/restReferenceLoggerRead.png b/src/main/asciidoc/images/restReferenceLoggerRead.png new file mode 100644 index 000..b9c0152 Binary files /dev/null and b/src/main/asciidoc/images/restReferenceLoggerRead.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/cfce9b9f/src/main/asciidoc/images/restReferenceLoggerUpdate.png -- diff --git a/src/main/asciidoc/images/restReferenceLoggerUpdate.png b/src/main/asciidoc/images/restReferenceLoggerUpdate.png new file mode 100644 index 000..58ac593 Binary files /dev/null and b/src/main/asciidoc/images/restReferenceLoggerUpdate.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/cfce9b9f/src/main/asciidoc/images/restSchemaReferenceLogger.png -- diff --git a/src/main/asciidoc/images/restSchemaReferenceLogger.png b/src/main/asciidoc/images/restSchemaReferenceLogger.png new file mode 100644 index 000..44b85a6 Binary files /dev/null and b/src/main/asciidoc/images/restSchemaReferenceLogger.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/cfce9b9f/src/main/asciidoc/images/swaggerLoggerRead.png -- diff --git a/src/main/asciidoc/images/swaggerLoggerRead.png b/src/main/asciidoc/images/swaggerLoggerRead.png new file mode 100644 index 000..0861665 Binary files /dev/null and b/src/main/asciidoc/images/swaggerLoggerRead.png differ http://git-wip-us.apache.org/repos/asf/syncope/blob/cfce9b9f/src/main/asciidoc/restfulservices/client-library.adoc -- diff --git a/src/main/asciidoc/restfulservices/client-library.adoc b/src/main/asciidoc/restfulservices/client-library.adoc index dfcfaac..9831b2e 100644 --- a/src/main/asciidoc/restfulservices/client-library.adoc +++ b/src/main/asciidoc/restfulservices/client-library.adoc @@ -43,4 +43,18 @@ SyncopeClient client = new SyncopeClientFactoryBean(). and you get enabled for any kind of REST service interaction with Apache Syncope. You can read the http://syncope.apache.org/apidocs/1.2/org/apache/syncope/common/services/package-summary.html[javadoc] -page for a documented list of available REST services in Apache Syncope. \ No newline at end of file +page for a documented list of available REST services in Apache Syncope. + += Usage example +Below a snippet that shows how to use the SyncopeClient to update the logger configuration. +[source,java] + +SyncopeClient client = new SyncopeClientFactoryBean(). +setAddress("http://localhost:9080/syncope/rest/;). +create("admin", "password"); +LoggerService loggerService = client.getService(LoggerService.class); + +LoggerTO loggerTO = loggerService.read(LoggerType.LOG, "org.apache.syncope.core.connid"); +loggerTO.setLevel(LoggerLevel.DEBUG); +loggerService.update(LoggerType.LOG, loggerTO); + http://git-wip-us.apache.org/repos/asf/syncope/blob/cfce9b9f/src/main/asciidoc/restfulservices/restful-reference.adoc -- diff --git a/src/main/asciidoc/restfulservices/restful-reference.adoc b/src/main/asciidoc/restfulservices/restful-reference.adoc new file mode 100644 index 000.
[2/3] syncope git commit: reorganized doc files, SYNCOPE-722
{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: Enable writing empty stringSelect 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 the 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 na
[1/3] syncope git commit: reorganized doc files, SYNCOPE-722
Repository: syncope Updated Branches: refs/heads/master e04439481 -> 715e1d399 http://git-wip-us.apache.org/repos/asf/syncope/blob/715e1d39/src/main/asciidoc/cli/cli-policy.adoc -- diff --git a/src/main/asciidoc/cli/cli-policy.adoc b/src/main/asciidoc/cli/cli-policy.adoc new file mode 100644 index 000..af51145 --- /dev/null +++ b/src/main/asciidoc/cli/cli-policy.adoc @@ -0,0 +1,166 @@ +// +// 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. +// + + Policy command +The policy command serves to retrieve the information about the policies for each type. + += Help message +[source,bash] + +Usage: policy [options] + Options: +--help +--details +--list + Syntax: --list-policy {POLICY-TYPE} + Policy type: ACCOUNT / PASSWORD / SYNC / PUSH +--read + Syntax: --read {POLICY-ID} {POLICY-ID} [...] +--delete + Syntax: --delete {POLICY-ID} {POLICY-ID} [...] + + += Details option +This option shows a table with policies amount for each type. + +[source] +-- +$ ./syncopeadm.sh policy --details +-- + +[source] +-- + +You are runnig: policy --details + +# +# # +# POLICIES DETAILS# +# # +# +# # # +# DETAIL# VALUE # +# # # +# +# # # +#total number #9# +# account policies #2# +# password policies #3# +#sync policies#4# +#push policies#0# +# # # +# + +-- + += List option +Running the command with this option you will see the list of the policies. + +[source] +-- +$ ./syncopeadm.sh Usage: policy --list {POLICY-TYPE} + Policy type: ACCOUNT / PASSWORD / SYNC / PUSH +-- + +[source] +-- + +You are runnig: policy --list SYNC + + > KEY: 1 +type: SYNC +description: a sync policy +resources : [] +realms : [] + + > KEY: 3 +type: SYNC +description: sync policy 2 +resources : [resource-csv] +realms : [] +conflict resolution action: ALL +correlation rule : {USER=["username","firstname"]} + + > KEY: 7 +type: SYNC +description: sync policy 1 +resources : [] +realms : [] +conflict resolution action: IGNORE +correlation rule : {} + + > KEY: 9 +type: SYNC +description: sync policy for java rule +resources : [ws-target-resource-2] +realms : [] +conflict resolution action: IGNORE +correlation rule : {} + +-- + += Read option +The option to read all the information of specified policy. + +[source] +-- +$ ./syncopeadm.sh policy --read {POLICY-ID} {POLICY-ID} [...] +-- + +Unlike the list option, the read one shows only the policy passed as input. +[source] +-- +You are runnig: policy --read 6 + + > KEY: 6 +type: ACCOUNT +description: sample account policy +resources : [] +realms : [/odd] +max authentication attempts : 3 +propagation suspension : false +RULES : + > class : [org.apache.syncope.common.lib.policy.DefaultAccountRuleConf@708a538f[ + maxLength=0 + minLength=4 + pattern= + allUpperCase=false + allLowerCase=false + wordsNotPermitted=[] + schemasNotPermitted=[] + prefixesNotPermitted=[notpermitted1, notpermitted2] + suffixesNotPermitted=[] + name=org.apache.syncope.common.lib.policy.DefaultAccountRuleConf +]] +-- + += Delete option +The option to delete a specified policy. + +[source] +-- +$ ./syncopeadm.sh policy --delete {POLICY-ID} {POLICY-ID} [...] +-- + +The delete option, as can be imagined, tries to remove a specified policy. +The output will be something like: +[source] +-- + - Policy {POLICY-ID} successfully deleted +-- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/715e1d39/src/main/asciidoc/cli/cli-question.adoc -- diff --git a/src/main/asciidoc/cli/cli-question.adoc
[2/3] syncope git commit: Renamed files, client library and syntax error, SYNCOPE-700
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: Enable writing empty stringSelect 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 the 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 +conne
syncope git commit: Improved IT, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 234819b6e -> d433501b9 Improved IT, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d433501b Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d433501b Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d433501b Branch: refs/heads/master Commit: d433501b978ea120436de48c7dbcaf08f8d8e249 Parents: 234819b Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Dec 1 11:27:54 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Dec 1 11:27:54 2015 +0100 -- client/cli/pom.xml | 4 +- .../commands/connector/ConnectorCommand.java| 2 +- .../entitlement/EntitlementCommand.java | 2 +- .../client/cli/commands/group/GroupCommand.java | 2 +- .../cli/commands/install/InstallCommand.java| 2 +- .../cli/commands/policy/PolicyCommand.java | 16 ++-- .../cli/commands/report/ReportCommand.java | 16 ++-- .../client/cli/commands/role/RoleCommand.java | 2 +- .../client/cli/commands/user/UserCommand.java | 2 +- fit/core-reference/pom.xml | 6 ++ .../syncope/fit/core/reference/CLIITCase.java | 90 ++-- 11 files changed, 93 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/d433501b/client/cli/pom.xml -- diff --git a/client/cli/pom.xml b/client/cli/pom.xml index 61282ce..b1b1e08 100644 --- a/client/cli/pom.xml +++ b/client/cli/pom.xml @@ -30,8 +30,8 @@ under the License. Apache Syncope Client CLI Apache Syncope Client CLI - - org.apache.syncope + + org.apache.syncope.client syncope-client-cli jar http://git-wip-us.apache.org/repos/asf/syncope/blob/d433501b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/ConnectorCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/ConnectorCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/ConnectorCommand.java index b08ecd5..aeec15c 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/ConnectorCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/ConnectorCommand.java @@ -71,7 +71,7 @@ public class ConnectorCommand extends AbstractCommand { return connectorResultManager.commandHelpMessage(getClass()); } -private enum ConnectorOptions { +public enum ConnectorOptions { HELP("--help"), LIST("--list"), http://git-wip-us.apache.org/repos/asf/syncope/blob/d433501b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java index de35fc3..42949a7 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java @@ -65,7 +65,7 @@ public class EntitlementCommand extends AbstractCommand { return entitlementResultManager.commandHelpMessage(getClass()); } -private enum EntitlementOptions { +public enum EntitlementOptions { HELP("--help"), LIST("--list"), http://git-wip-us.apache.org/repos/asf/syncope/blob/d433501b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/group/GroupCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/group/GroupCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/group/GroupCommand.java index e5d4e39..fee8252 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/group/GroupCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/group/GroupCommand.java @@ -67,7 +67,7 @@ public class GroupCommand extends AbstractCommand { return groupResultManager.commandHelpMessage(getClass()); } -private enum GroupOptions { +public enum GroupOptions { HELP("--help"), DETAILS("--details"), http://git-wip-us.apache.org/repos/asf/syncope/blob/d433501b/client/cli/src/m
[4/4] syncope git commit: cli docs: realm, group, SYNCOPE-722
cli docs: realm, group, SYNCOPE-722 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/78204b93 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/78204b93 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/78204b93 Branch: refs/heads/master Commit: 78204b93ebb7197b796923704506528cb9fca11c Parents: 748793c Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Dec 1 16:51:53 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Dec 1 16:51:53 2015 +0100 -- src/main/asciidoc/cli-group.adoc | 205 ++ src/main/asciidoc/cli-realm.adoc | 111 ++ src/main/asciidoc/cli.adoc | 6 +- 3 files changed, 321 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/78204b93/src/main/asciidoc/cli-group.adoc -- diff --git a/src/main/asciidoc/cli-group.adoc b/src/main/asciidoc/cli-group.adoc new file mode 100644 index 000..032b94a --- /dev/null +++ b/src/main/asciidoc/cli-group.adoc @@ -0,0 +1,205 @@ +// +// 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. +// + + Group command +The group command serves to retrieve the information about the configured groups. + += Help message +[source,bash] + +Usage: group [options] + Options: +--help +--details +--list +--read + Syntax: --read {GROUP-ID} {GROUP-ID} [...] +--read-attr-by-schema-type {GROUP-ID} {SCHEMA-TYPE} + Schema type: PLAIN / DERIVED / VIRTUAL +--read-attr-by-schema {GROUP-ID} {SCHEMA-TYPE} {SCHEMA-NAME} + Schema type: PLAIN / DERIVED / VIRTUAL +--delete + Syntax: --delete {GROUP-ID} {GROUP-ID} [...] + + += Details option +This option shows a table with group amount and some information. + +[source] +-- +$ ./syncopeadm.sh group --details +-- + +[source] +-- + +You are runnig: group --details + +## +## +# GROUPS DETAILS # +## +## +# # # +#DETAIL# VALUE # +# # # +## +# # # +# Total number # 16# +# Without resources # 10# +# Without attributes #0# +#On root realm # 14# +# On the other realm #2# +# # # +## + +-- + += List option +Running the command with this option you will see the list of the groups. + +[source] +-- +$ ./syncopeadm.sh group --list +-- + +[source] +-- + +You are runnig: group --list + + > GROUP ID: 1 +name: root +type: GROUP +realm: / +status: null +user owner: null +group owner: null +RESOURCES: +PLAIN ATTRIBUTES: + - icon: [niceIcon] + + - show: [true] + + - rderived_sx: [sx] + + - rderived_dx: [dx] + +DERIVED ATTRIBUTES: + - displayProperty: [niceIcon: true] - is readonly + + - rderiveddata: [sx-dx] - is readonly + + - rderivedschema: [sx-dx] - is readonly + + - rderToBePropagated: [sx-dx] - is readonly + +VIRTUAL ATTRIBUTES: +[...] +-- + += Read option +The option to read the group passed as input. + +[source] +-- +$ ./syncopeadm.sh group --read {GROUP-ID} {GROUP-ID} [...] +-- + +[source] +-- + +You are runnig: group --read 15 + + > GROUP ID: 15 +name: additional +type: GROUP +realm: /even +status: null +user owner: null +group owner: null +RESOURCES: +PLAIN ATTRIBUTES: +DERIVED ATTRIBUTES: + - displayProperty: [: ] - is readonly + + - rderToBePropagated: [-] - is readonly + + - rderiveddata: [-] - is readonly + + - rderivedschema: [-] - is readonly + +VIRTUAL ATTRIBUTES: + +-- + += Read attribute of type option +The option to read the
[3/4] syncope git commit: cli docs: domain, SYNCOPE-722
cli docs: domain, SYNCOPE-722 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/748793c4 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/748793c4 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/748793c4 Branch: refs/heads/master Commit: 748793c4386c301494efdc47fdfe9e821c45d06b Parents: 80a04bb Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Dec 1 16:42:16 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Dec 1 16:42:16 2015 +0100 -- src/main/asciidoc/cli.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/748793c4/src/main/asciidoc/cli.adoc -- diff --git a/src/main/asciidoc/cli.adoc b/src/main/asciidoc/cli.adoc index 1b0f4c4..582b140 100644 --- a/src/main/asciidoc/cli.adoc +++ b/src/main/asciidoc/cli.adoc @@ -48,4 +48,6 @@ include::cli-policy.adoc[] include::cli-info.adoc[] -include::cli-entitlement.adoc[] \ No newline at end of file +include::cli-entitlement.adoc[] + +include::cli-domain.adoc[] \ No newline at end of file
[1/4] syncope git commit: cli docs: info, entitlement, SYNCOPE-722
Repository: syncope Updated Branches: refs/heads/master 08531e6e6 -> 78204b93e cli docs: info, entitlement, SYNCOPE-722 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/8875e0fd Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/8875e0fd Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/8875e0fd Branch: refs/heads/master Commit: 8875e0fda8866d1bb8f8b89523eaa4a8bfc8267a Parents: 08531e6 Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Dec 1 16:38:18 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Dec 1 16:38:18 2015 +0100 -- src/main/asciidoc/cli-entitlement.adoc | 140 src/main/asciidoc/cli-info.adoc| 52 +++ src/main/asciidoc/cli.adoc | 6 +- 3 files changed, 197 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/8875e0fd/src/main/asciidoc/cli-entitlement.adoc -- diff --git a/src/main/asciidoc/cli-entitlement.adoc b/src/main/asciidoc/cli-entitlement.adoc new file mode 100644 index 000..c7bc30f --- /dev/null +++ b/src/main/asciidoc/cli-entitlement.adoc @@ -0,0 +1,140 @@ +// +// 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. +// + + Entitlement command +The entitlement command serves to retrieve the information about the entitlments. + += Help message +[source,bash] + +Usage: entitlement [options] + Options: +--help +--list +--list-role + Syntax: --list-role {ENTITLEMENT-NAME} +--read-by-username + Syntax: --read-by-username {USERNAME} +--read-by-userid + Syntax: --read-by-userid {USER-ID} +--search-by-role + Syntax: --search-by-role {ROLE-ID} + + += List option +Running the command with this option you will see the list of the entitlements. + +[source] +-- +$ ./syncopeadm.sh entitlement --list +-- + +[source] +-- + +You are runnig: entitlement --list + +- CONNECTOR_READ +- NOTIFICATION_DELETE +- ANYTYPE_UPDATE +- RELATIONSHIPTYPE_UPDATE +- SCHEMA_CREATE +[...] + +-- + += List role option +Running the command with this option you will see the list of the roles with a certain entitlement. + +[source] +-- +$ ./syncopeadm.sh entitlement --list +-- + +[source] +-- + +You are runnig: entitlement --list-role PRINTER_DELETE + + > ROLE ID: Search for realm evenTwo +REALMS: + - /even/two + + > ROLE ID: User manager +REALMS: + - / + + > ROLE ID: User reviewer +REALMS: + - /odd + - /even + + > ROLE ID: Other +REALMS: + - /odd + +-- + += Read by username option +The option to read the entitlements of the username passed as input. + +[source] +-- +$ ./syncopeadm.sh entitlement --read-by-username {USERNAME} +-- +[source] +-- +You are runnig: entitlement --read-by-username rossini + +- GROUP_READ +- SCHEMA_READ +- WORKFLOW_FORM_CLAIM +-- + += Read by userid option +The option to read the entitlements of the userid passed as input. + +[source] +-- +$ ./syncopeadm.sh entitlement --read-by-userid {USER-ID} +-- +[source] +-- +You are runnig: entitlement --read-by-userid 5 + +- USER_READ +- USER_SEARCH +-- + += Search by role option +The option to read the entitlements of a certain role. + +[source] +-- +$ ./syncopeadm.sh entitlement --search-by-role {ROLE-ID} +-- + +[source] +-- +You are runnig: entitlement --search-by-role Other + +- SCHEMA_READ +- GROUP_READ +- WORKFLOW_FORM_CLAIM +-- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/8875e0fd/src/main/asciidoc/cli-info.adoc -- diff --git a/src/main/asciidoc/cli-info.adoc b/src/main/asciidoc/cli-info.adoc new file mode 100644 index 000..2186862 --- /dev/null +++ b/src/main/asciidoc/cli-info.adoc @@ -0,0 +1,52 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contr
[2/2] syncope git commit: New message in execution result, SYNCOPE-158
New message in execution result, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/630de0af Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/630de0af Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/630de0af Branch: refs/heads/master Commit: 630de0af3fc5781be8a97c9077ce343ca4ba139f Parents: e34a8e4 Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Dec 1 12:51:25 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Dec 1 13:22:15 2015 +0100 -- .../client/cli/commands/report/ReportExecute.java | 14 +++--- .../cli/commands/report/ReportResultManager.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/630de0af/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExecute.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExecute.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExecute.java index 284ede1..72bd9c8 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExecute.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExecute.java @@ -18,12 +18,9 @@ */ package org.apache.syncope.client.cli.commands.report; -import java.util.Arrays; -import java.util.List; import javax.xml.ws.WebServiceException; import org.apache.syncope.client.cli.Input; import org.apache.syncope.common.lib.SyncopeClientException; -import org.apache.syncope.common.lib.to.ReportExecTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,10 +40,13 @@ public class ReportExecute extends AbstractReportCommand { if (input.parameterNumber() == 1) { try { reportSyncopeOperations.execute(input.firstParameter()); -final List executionList -= reportSyncopeOperations.read(input.firstParameter()).getExecutions(); -final ReportExecTO lastExecution = executionList.get(executionList.size() - 1); - reportResultManager.printReportExecution(Arrays.asList(lastExecution)); +reportResultManager.genericMessage("Report " + input.firstParameter() + "executed."); +reportResultManager.genericMessage( +"Run " ++ ReportCommand.ReportOptions.READ.getOptionName() ++ " " ++ input.firstParameter() ++ " to see the results."); } catch (final WebServiceException | SyncopeClientException ex) { LOG.error("Error executin report", ex); if (ex.getMessage().startsWith("NotFound")) { http://git-wip-us.apache.org/repos/asf/syncope/blob/630de0af/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java index 5ac14e1..150aa77 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportResultManager.java @@ -46,7 +46,7 @@ public class ReportResultManager extends CommonsResultManager { for (final AbstractReportletConf reportletConf : reportTO.getReportletConfs()) { printReportletConf(reportletConf); } -System.out.println("EXECUTION:"); +System.out.println("EXECUTIONS:"); printReportExecution(reportTO.getExecutions()); System.out.println(""); }
[1/2] syncope git commit: cli docs: report, SYNCOPE-722
Repository: syncope Updated Branches: refs/heads/master e34a8e4f3 -> 933fcc68f cli docs: report, SYNCOPE-722 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/933fcc68 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/933fcc68 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/933fcc68 Branch: refs/heads/master Commit: 933fcc68f0865a4af4c8034ba8be1a314f3d9e99 Parents: 630de0a Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Dec 1 12:59:19 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Dec 1 13:22:15 2015 +0100 -- .../commands/report/ReportExportExecution.java | 2 +- src/main/asciidoc/cli-report.adoc | 251 +++ src/main/asciidoc/cli.adoc | 4 +- 3 files changed, 255 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/933fcc68/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExportExecution.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExportExecution.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExportExecution.java index 0dd7fb8..87583c2 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExportExecution.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/report/ReportExportExecution.java @@ -52,7 +52,7 @@ public class ReportExportExecution extends AbstractReportCommand { try { final String result = reportSyncopeOperations.exportExecutionResult( parameter, input.lastParameter()); -reportResultManager.genericMessage(result); +reportResultManager.genericMessage(result + "created."); } catch (final WebServiceException | SyncopeClientException ex) { LOG.error("Error exporting execution", ex); if (ex.getMessage().startsWith("NotFound")) { http://git-wip-us.apache.org/repos/asf/syncope/blob/933fcc68/src/main/asciidoc/cli-report.adoc -- diff --git a/src/main/asciidoc/cli-report.adoc b/src/main/asciidoc/cli-report.adoc new file mode 100644 index 000..48ee95a --- /dev/null +++ b/src/main/asciidoc/cli-report.adoc @@ -0,0 +1,251 @@ +// +// 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. +// + + Report command +The report command serves to retrieve the information about the configured reports. + += Help message +[source,bash] + +Usage: report [options] + Options: +--help +--details +--list +--list-jobs +--read + Syntax: --read {REPORT-ID} {REPORT-ID} [...] +--delete + Syntax: --delete {REPORT-ID} {REPORT-ID} [...] +--execute + Syntax: --execute {REPORT-ID} +--read-execution + Syntax: --read-execution {EXECUTION-ID} {EXECUTION-ID} [...] +--delete-execution + Syntax: --delete-execution {EXECUTION-ID} {EXECUTION-ID} [...] +--export-execution-result + Syntax: --export-execution-result {EXECUTION-ID} {EXECUTION-ID} [...] {FORMAT} + Format: CSV / HTML / PDF / XML / RTF + + += Details option +This option shows a table with some details about the reports and their executions. + +[source] +-- +$ ./syncopeadm.sh report --details +-- + +[source] +-- + +You are runnig: report --details + +## +## +# REPORTS DETAILS # +## +## +# # # +# DETAIL # VALUE # +# # # +## +# #
[3/3] syncope git commit: cli docs: policy, SYNCOPE-722
cli docs: policy, SYNCOPE-722 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/08531e6e Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/08531e6e Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/08531e6e Branch: refs/heads/master Commit: 08531e6e604815c9b1a134a83b5e118f938f460c Parents: 394aa2e Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Dec 1 15:08:23 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Dec 1 15:08:23 2015 +0100 -- src/main/asciidoc/cli-policy.adoc | 168 + src/main/asciidoc/cli.adoc| 4 +- 2 files changed, 171 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/08531e6e/src/main/asciidoc/cli-policy.adoc -- diff --git a/src/main/asciidoc/cli-policy.adoc b/src/main/asciidoc/cli-policy.adoc new file mode 100644 index 000..c3f0a5d --- /dev/null +++ b/src/main/asciidoc/cli-policy.adoc @@ -0,0 +1,168 @@ +// +// 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. +// + + Policy command +The policy command serves to retrieve the information about the policies for each type. + += Help message +[source,bash] + +Usage: policy [options] + Options: +--help +--details +--list + Syntax: --list-policy {POLICY-TYPE} + Policy type: ACCOUNT / PASSWORD / SYNC / PUSH +--read + Syntax: --read {POLICY-ID} {POLICY-ID} [...] +--delete + Syntax: --delete {POLICY-ID} {POLICY-ID} [...] + + += Details option +This option shows a table with policies amount for each type. + +[source] +-- +$ ./syncopeadm.sh policy --details +-- + +[source] +-- + +You are runnig: policy --details + +# +# # +# POLICIES DETAILS# +# # +# +# # # +# DETAIL# VALUE # +# # # +# +# # # +#total number #9# +# account policies #2# +# password policies #3# +#sync policies#4# +#push policies#0# +# # # +# + +-- + += List option +Running the command with this option you will see the list of the policies. + +[source] +-- +$ ./syncopeadm.sh Usage: policy --list {POLICY-TYPE} + Policy type: ACCOUNT / PASSWORD / SYNC / PUSH +-- + +[source] +-- + +./syncopeadm.sh policy --list SYNC + +You are runnig: policy --list SYNC + + > KEY: 1 +type: SYNC +description: a sync policy +resources : [] +realms : [] + + > KEY: 3 +type: SYNC +description: sync policy 2 +resources : [resource-csv] +realms : [] +conflict resolution action: ALL +correlation rule : {USER=["username","firstname"]} + + > KEY: 7 +type: SYNC +description: sync policy 1 +resources : [] +realms : [] +conflict resolution action: IGNORE +correlation rule : {} + + > KEY: 9 +type: SYNC +description: sync policy for java rule +resources : [ws-target-resource-2] +realms : [] +conflict resolution action: IGNORE +correlation rule : {} + +-- + += Read option +The option to read all the information of specified policy. + +[source] +-- +$ ./syncopeadm.sh policy --read {POLICY-ID} {POLICY-ID} [...] +-- + +Unlike the list option, the read one shows only the policy passed as input. +[source] +-- +You are runnig: policy --read 6 + + > KEY: 6 +type: ACCOUNT +description: sample account policy +resources : [] +realms : [/odd] +max authentication attempts : 3 +propagation suspension : false +RULES : + > class : [org.apache.syncope.common.lib.policy.DefaultAccountRuleConf@708
[1/3] syncope git commit: Wrong resource command messages, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 933fcc68f -> 08531e6e6 Wrong resource command messages, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b9f542bf Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b9f542bf Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b9f542bf Branch: refs/heads/master Commit: b9f542bf26702f3823168fa86ac8955d50341583 Parents: 933fcc6 Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Dec 1 14:56:56 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Dec 1 14:56:56 2015 +0100 -- .../syncope/client/cli/commands/resource/ResourceDetails.java | 2 +- client/cli/src/main/resources/messages.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/b9f542bf/client/cli/src/main/java/org/apache/syncope/client/cli/commands/resource/ResourceDetails.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/resource/ResourceDetails.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/resource/ResourceDetails.java index 5d0f90b..be0029c 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/resource/ResourceDetails.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/resource/ResourceDetails.java @@ -44,7 +44,7 @@ public class ResourceDetails extends AbstractResourceCommand { try { final Map<String, String> details = new LinkedMap<>(); final List resourceTOs = resourceSyncopeOperations.list(); -details.put("Total numbers", String.valueOf(resourceTOs.size())); +details.put("Total number", String.valueOf(resourceTOs.size())); resourceResultManager.printDetails(details); } catch (final SyncopeClientException ex) { LOG.error("Error reading details about resource", ex); http://git-wip-us.apache.org/repos/asf/syncope/blob/b9f542bf/client/cli/src/main/resources/messages.properties -- diff --git a/client/cli/src/main/resources/messages.properties b/client/cli/src/main/resources/messages.properties index dd9bc2f..934cba0 100644 --- a/client/cli/src/main/resources/messages.properties +++ b/client/cli/src/main/resources/messages.properties @@ -26,7 +26,7 @@ policy.help.message=\nUsage: policy [options]\n Options:\n --help \n--de question.help.message=\nUsage: question [options]\n Options:\n--help \n --list \n--read \n Syntax: --read {QUESTION-ID} {QUESTION-ID} [...]\n--delete \n Syntax: --delete {QUESTION-ID} {QUESTION-ID} [...]\n realm.help.message=\nUsage: realm [options]\n Options:\n--help \n --details \n--list \n report.help.message=\nUsage: report [options]\n Options:\n--help \n --details\n--list \n--list-jobs \n--read \n Syntax: --read {REPORT-ID} {REPORT-ID} [...] \n--delete \n Syntax: --delete {REPORT-ID} {REPORT-ID} [...]\n--execute \n Syntax: --execute {REPORT-ID} \n--read-execution \n Syntax: --read-execution {EXECUTION-ID} {EXECUTION-ID} [...]\n--delete-execution \n Syntax: --delete-execution {EXECUTION-ID} {EXECUTION-ID} [...]\n --export-execution-result \n Syntax: --export-execution-result {EXECUTION-ID} {EXECUTION-ID} [...] {FORMAT}\n Format: CSV / HTML / PDF / XML / RTF\n -resource.help.message=\nUsage: resource [options]\n Options:\n--help \n --details \n--list \n--read \n Syntax: --read {CONNECTOR-ID} {CONNECTOR-ID} [...]\n--delete \n Syntax: --delete {CONNECTOR-ID} {CONNECTOR-ID} [...]\n +resource.help.message=\nUsage: resource [options]\n Options:\n--help \n --details \n--list \n--read \n Syntax: --read {RESOURCE-NAME} {RESOURCE-NAME} [...]\n--delete \n Syntax: --delete {RESOURCE-NAME} {RESOURCE-NAME} [...]\n role.help.message=\nUsage: role [options]\n Options:\n--help \n --details \n--list \n--read \n Syntax: --read {ROLE-ID} {ROLE-ID} [...]\n--delete \n Syntax: --delete {ROLE-ID} {ROLE-ID} [...]\n schema.help.message=\nUsage: schema [options]\n Options:\n--help \n --details \n--list-all\n--list-plain\n--list-derived\n --list-virtual\n--read {SCHEMA-TYPE} {SCHEMA-KEY}\nSchema type: PLAIN / DERIVED / VIRTUAL\n--delete {SCHEMA-TYPE} {SCHEMA-KEY}\n Schema type: PLAIN / DERIVED / VIRTUAL\n
[07/10] syncope git commit: Wrong user help message, SYNCOPE-158
Wrong user help message, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/c6f4fc7a Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/c6f4fc7a Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/c6f4fc7a Branch: refs/heads/master Commit: c6f4fc7a75ad3512835fe8e38c8e603c6b50ca70 Parents: 609ff9a Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 30 12:46:29 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 30 16:16:38 2015 +0100 -- client/cli/src/main/resources/messages.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/c6f4fc7a/client/cli/src/main/resources/messages.properties -- diff --git a/client/cli/src/main/resources/messages.properties b/client/cli/src/main/resources/messages.properties index 95d8e74..a4fd5f4 100644 --- a/client/cli/src/main/resources/messages.properties +++ b/client/cli/src/main/resources/messages.properties @@ -30,5 +30,5 @@ resource.help.message=\nUsage: resource [options]\n Options:\n--help \n role.help.message=\nUsage: role [options]\n Options:\n--help \n --details \n--list \n--read \n Syntax: --read {ROLE-ID} {ROLE-ID} [...]\n--delete \n Syntax: --delete {ROLE-ID} {ROLE-ID} [...]\n schema.help.message=\nUsage: schema [options]\n Options:\n--help \n --details \n--list-all\n--list-plain\n--list-derived\n --list-virtual\n--read {SCHEMA-TYPE} {SCHEMA-KEY}\nSchema type: PLAIN / DERIVED / VIRTUAL\n--delete {SCHEMA-TYPE} {SCHEMA-KEY}\n Schema type: PLAIN / DERIVED / VIRTUAL\n task.help.message=\nUsage: task [options]\n Options:\n--help \n --details\n--list\n Syntax: --list {TASK-TYPE} \n Task type: NOTIFICATION / PROPAGATION / PUSH / SCHEDULED / SYNCHRONIZATION\n --list-running-jobs \n--list-scheduled-jobs \n--read \n Syntax: --read {TASK-ID} {TASK-ID} [...]\n--read-execution \n Syntax: --read-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]\n--delete \n Syntax: --delete {TASK-ID} {TASK-ID} [...]\n--delete-execution \n Syntax: --delete-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]\n--execute \n Syntax: --execute {TASK-ID} {DRY-RUN}\n Dry run: true / false\n -user.help.message=\nUsage: user [options]\n Options:\n--help \n --details \n--list \n--get-user-key\n Syntax: --get-user-key {USERNAME} {USERNAME} [...]\n--get-username\n Syntax: --get-username {USER-ID} {USER-ID} [...]\n--read \n Syntax: --read {USER-ID} {USER-ID} [...]\n--search-by-attribute \n Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n--search-by-role \n Syntax: --search-by-role {REALM} {ROLE-ID}\n--search-by-resource \n Syntax: --search-by-resource {REALM} {RESOURCE-NAME}\n--delete \n Syntax: --delete {USER-ID} {USER-ID} [...]\n--delete-all \n Syntax: --delete-all {REALM}\n--delete-by-attribute \n Syntax: --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n +user.help.message=\nUsage: user [options]\n Options:\n--help \n --details \n--list \n--get-user-key\n Syntax: --get-user-key {USERNAME}\n--get-username\n Syntax: --get-username {USER-ID}\n --read \n Syntax: --read {USER-ID} {USER-ID} [...]\n --search-by-attribute \n Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n--search-by-role \n Syntax: --search-by-role {REALM} {ROLE-ID}\n--search-by-resource \n Syntax: --search-by-resource {REALM} {RESOURCE-NAME}\n--delete \n Syntax: --delete {USER-ID} {USER-ID} [...]\n--delete-all \n Syntax: --delete-all {REALM}\n--delete-by-attribute \n Syntax: --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n workflow.help.message=\nUsage: workflow [options]\n Options:\n--help \n --export-diagram {ANY-TYPE-KIND}\nAny type kind: ANY_OBJECT / USER / GROUP\n--export-definition {ANY-TYPE-KIND}\nAny type kind: ANY_OBJECT / USER / GROUP\n
[01/10] syncope git commit: Bugfix, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master b13fc1781 -> b3d131dd9 Bugfix, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b3d131dd Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b3d131dd Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b3d131dd Branch: refs/heads/master Commit: b3d131dd916dabb0cad43b82d7473a58eb3f435c Parents: 1c2e69f Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 30 16:16:27 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 30 16:16:38 2015 +0100 -- .../syncope/client/cli/commands/user/UserReadByUserId.java | 2 +- .../syncope/client/cli/commands/user/UserReadByUsername.java | 2 +- .../org/apache/syncope/fit/core/reference/CLIITCase.java | 8 +--- src/main/asciidoc/cli-user.adoc | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/b3d131dd/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java index 25ff680..93a4712 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java @@ -31,7 +31,7 @@ public class UserReadByUserId extends AbstractUserCommand { private static final Logger LOG = LoggerFactory.getLogger(UserReadByUserId.class); -private static final String READ_HELP_MESSAGE = "user --read {USER-ID} {USER-ID} [...]"; +private static final String READ_HELP_MESSAGE = "user --read-by-userid {USER-ID} {USER-ID} [...]"; private final Input input; http://git-wip-us.apache.org/repos/asf/syncope/blob/b3d131dd/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUsername.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUsername.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUsername.java index bc325bd..ae2dd7c 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUsername.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUsername.java @@ -31,7 +31,7 @@ public class UserReadByUsername extends AbstractUserCommand { private static final Logger LOG = LoggerFactory.getLogger(UserReadByUsername.class); -private static final String READ_HELP_MESSAGE = "user --read {USERNAME} {USERNAME} [...]"; +private static final String READ_HELP_MESSAGE = "user --read-by-username {USERNAME} {USERNAME} [...]"; private final Input input; http://git-wip-us.apache.org/repos/asf/syncope/blob/b3d131dd/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java index e346e95..26f23d4 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java @@ -155,13 +155,14 @@ public class CLIITCase extends AbstractITCase { final long userId4 = 4; final long userId5 = 5; try { -PROCESS_BUILDER.command(getCommand("user", "--read", String.valueOf(userId1))); +PROCESS_BUILDER.command(getCommand("user", "--read-by-userid", String.valueOf(userId1))); Process process = PROCESS_BUILDER.start(); String result = IOUtils.toString(process.getInputStream()); assertTrue(result.contains("username: " + userService.read(userId1).getUsername())); process.destroy(); -PROCESS_BUILDER.command(getCommand("user", "--read", String.valueOf(userId1), String.valueOf(userId2), +PROCESS_BUILDER.command(getCommand( +"user", "--read-by-userid", String.valueOf(userId1), String.valueOf(userId2), String.valueOf(userId3), String.valueOf(userId4), String.valueOf(user
[06/10] syncope git commit: added read by username option, SYNCOPE-158
added read by username option, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a02adbd8 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a02adbd8 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a02adbd8 Branch: refs/heads/master Commit: a02adbd8771a80ec6e606d3adf0eeb8f2b7fb39d Parents: 341c985 Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 30 13:09:52 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 30 16:16:38 2015 +0100 -- .../client/cli/commands/user/UserCommand.java | 10 ++- .../client/cli/commands/user/UserGetKey.java| 2 +- .../cli/commands/user/UserReadByUserId.java | 66 +++ .../cli/commands/user/UserReadByUsername.java | 67 .../cli/src/main/resources/messages.properties | 2 +- 5 files changed, 142 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/a02adbd8/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java index 3832625..e74eb95 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java @@ -49,8 +49,11 @@ public class UserCommand extends AbstractCommand { case GET_BY_USERNAME: new UserGetUsername(input).get(); break; -case READ: -new UserRead(input).read(); +case READ_BY_ID: +new UserReadByUserId(input).read(); +break; +case READ_BY_USERNAME: +new UserReadByUsername(input).read(); break; case SEARCH_BY_ATTRIBUTE: new UserSearchByAttribute(input).search(); @@ -90,7 +93,8 @@ public class UserCommand extends AbstractCommand { LIST("--list"), GET_BY_KEY("--get-user-key"), GET_BY_USERNAME("--get-username"), -READ("--read"), +READ_BY_ID("--read-by-userid"), +READ_BY_USERNAME("--read-by-username"), SEARCH_BY_ATTRIBUTE("--search-by-attribute"), SEARCH_BY_ROLE("--search-by-role"), SEARCH_BY_RESOURCE("--search-by-resource"), http://git-wip-us.apache.org/repos/asf/syncope/blob/a02adbd8/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java index 5012ea9..2eb1e3d 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java @@ -39,7 +39,7 @@ public class UserGetKey extends AbstractUserCommand { if (input.getParameters().length == 1) { try { final String userId = userSyncopeOperations.getIdFromUsername(input.firstParameter()); -userResultManager.genericMessage(input.firstParameter() + " user ID is : " + userId); +userResultManager.genericMessage(input.firstParameter() + " user ID is " + userId); } catch (final SyncopeClientException ex) { LOG.error("Error getting user", ex); userResultManager.genericError(ex.getMessage()); http://git-wip-us.apache.org/repos/asf/syncope/blob/a02adbd8/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java new file mode 100644 index 000..25ff680 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserReadByUserId.java @@ -0,0 +1,66 @@ +/* + * 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 A
[04/10] syncope git commit: cli docs: schema, SYNCOPE-722
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 000..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.statu
[02/10] syncope git commit: Wrong help message in role command, SYNCOPE-158
Wrong help message in role command, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/684e203f Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/684e203f Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/684e203f Branch: refs/heads/master Commit: 684e203f42eb4f9fcbd861d68ab037d6b7b55088 Parents: cf05bb5 Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 30 15:25:54 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 30 16:16:38 2015 +0100 -- .../syncope/client/cli/commands/user/UserSearchByResource.java | 2 +- .../apache/syncope/client/cli/commands/user/UserSearchByRole.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/684e203f/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java index f258bfd..abf3811 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java @@ -30,7 +30,7 @@ public class UserSearchByResource extends AbstractUserCommand { private static final Logger LOG = LoggerFactory.getLogger(UserSearchByResource.class); -private static final String SEARCH_HELP_MESSAGE = "user --search {REALM} {RESOURCE-NAME}"; +private static final String SEARCH_HELP_MESSAGE = "user --search-by-resource {REALM} {RESOURCE-NAME}"; private final Input input; http://git-wip-us.apache.org/repos/asf/syncope/blob/684e203f/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java index 80d5a41..6674966 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java @@ -30,7 +30,7 @@ public class UserSearchByRole extends AbstractUserCommand { private static final Logger LOG = LoggerFactory.getLogger(UserSearchByRole.class); -private static final String SEARCH_HELP_MESSAGE = "user --search {REALM} {ROLE-NAME}"; +private static final String SEARCH_HELP_MESSAGE = "user --search-by-role {REALM} {ROLE-NAME}"; private final Input input;
[03/10] syncope git commit: Better result message, SYNCOPE-158
Better result message, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/341c985d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/341c985d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/341c985d Branch: refs/heads/master Commit: 341c985dc3d70e24d91e5e50813dd6cad26f36eb Parents: c6f4fc7 Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 30 12:52:10 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 30 16:16:38 2015 +0100 -- .../org/apache/syncope/client/cli/commands/user/UserGetKey.java | 3 ++- .../apache/syncope/client/cli/commands/user/UserGetUsername.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/341c985d/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java index ed46ad1..5012ea9 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetKey.java @@ -38,7 +38,8 @@ public class UserGetKey extends AbstractUserCommand { public void get() { if (input.getParameters().length == 1) { try { - userResultManager.genericMessage(userSyncopeOperations.getIdFromUsername(input.firstParameter())); +final String userId = userSyncopeOperations.getIdFromUsername(input.firstParameter()); +userResultManager.genericMessage(input.firstParameter() + " user ID is : " + userId); } catch (final SyncopeClientException ex) { LOG.error("Error getting user", ex); userResultManager.genericError(ex.getMessage()); http://git-wip-us.apache.org/repos/asf/syncope/blob/341c985d/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetUsername.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetUsername.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetUsername.java index d705a83..42fc558 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetUsername.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserGetUsername.java @@ -38,7 +38,8 @@ public class UserGetUsername extends AbstractUserCommand { public void get() { if (input.getParameters().length == 1) { try { - userResultManager.genericMessage(userSyncopeOperations.getUsernameFromId(input.firstParameter())); +final String username = userSyncopeOperations.getUsernameFromId(input.firstParameter()); +userResultManager.genericMessage(input.firstParameter() + " username is " + username); } catch (final SyncopeClientException ex) { LOG.error("Error getting user", ex); userResultManager.genericError(ex.getMessage());
[08/10] syncope git commit: added read by username option, SYNCOPE-158
added read by username option, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/e27f2094 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/e27f2094 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/e27f2094 Branch: refs/heads/master Commit: e27f20945acb3f3f8b06c8b786a68b6220414c61 Parents: a02adbd Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 30 13:10:10 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 30 16:16:38 2015 +0100 -- .../client/cli/commands/user/UserRead.java | 66 1 file changed, 66 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/e27f2094/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserRead.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserRead.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserRead.java deleted file mode 100644 index 6192135..000 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserRead.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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. - */ -package org.apache.syncope.client.cli.commands.user; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.ws.WebServiceException; -import org.apache.syncope.client.cli.Input; -import org.apache.syncope.common.lib.SyncopeClientException; -import org.apache.syncope.common.lib.to.UserTO; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class UserRead extends AbstractUserCommand { - -private static final Logger LOG = LoggerFactory.getLogger(UserRead.class); - -private static final String READ_HELP_MESSAGE = "user --read {USER-ID} {USER-ID} [...]"; - -private final Input input; - -public UserRead(final Input input) { -this.input = input; -} - -public void read() { -if (input.getParameters().length >= 1) { -final List userTOs = new ArrayList<>(); -for (final String parameter : input.getParameters()) { -try { -userTOs.add(userSyncopeOperations.read(parameter)); -} catch (final SyncopeClientException | WebServiceException ex) { -LOG.error("Error reading user", ex); -if (ex.getMessage().startsWith("NotFound")) { -userResultManager.notFoundError("User", parameter); -} else { -userResultManager.genericError(ex.getMessage()); -} -break; -} catch (final NumberFormatException ex) { -LOG.error("Error reading user", ex); -userResultManager.numberFormatException("user", parameter); -} -} -userResultManager.printUsers(userTOs); -} else { -userResultManager.commandOptionError(READ_HELP_MESSAGE); -} -} -}
[05/10] syncope git commit: changed help message order, SYNCOPE-158
changed help message order, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/609ff9a0 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/609ff9a0 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/609ff9a0 Branch: refs/heads/master Commit: 609ff9a06d10fed5a1d270d63a16208a7fabbcd3 Parents: d88f853 Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 30 12:14:13 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 30 16:16:38 2015 +0100 -- client/cli/src/main/resources/messages.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/609ff9a0/client/cli/src/main/resources/messages.properties -- diff --git a/client/cli/src/main/resources/messages.properties b/client/cli/src/main/resources/messages.properties index 0e0700d..95d8e74 100644 --- a/client/cli/src/main/resources/messages.properties +++ b/client/cli/src/main/resources/messages.properties @@ -30,5 +30,5 @@ resource.help.message=\nUsage: resource [options]\n Options:\n--help \n role.help.message=\nUsage: role [options]\n Options:\n--help \n --details \n--list \n--read \n Syntax: --read {ROLE-ID} {ROLE-ID} [...]\n--delete \n Syntax: --delete {ROLE-ID} {ROLE-ID} [...]\n schema.help.message=\nUsage: schema [options]\n Options:\n--help \n --details \n--list-all\n--list-plain\n--list-derived\n --list-virtual\n--read {SCHEMA-TYPE} {SCHEMA-KEY}\nSchema type: PLAIN / DERIVED / VIRTUAL\n--delete {SCHEMA-TYPE} {SCHEMA-KEY}\n Schema type: PLAIN / DERIVED / VIRTUAL\n task.help.message=\nUsage: task [options]\n Options:\n--help \n --details\n--list\n Syntax: --list {TASK-TYPE} \n Task type: NOTIFICATION / PROPAGATION / PUSH / SCHEDULED / SYNCHRONIZATION\n --list-running-jobs \n--list-scheduled-jobs \n--read \n Syntax: --read {TASK-ID} {TASK-ID} [...]\n--read-execution \n Syntax: --read-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]\n--delete \n Syntax: --delete {TASK-ID} {TASK-ID} [...]\n--delete-execution \n Syntax: --delete-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]\n--execute \n Syntax: --execute {TASK-ID} {DRY-RUN}\n Dry run: true / false\n -user.help.message=\nUsage: user [options]\n Options:\n--help \n--list \n--details \n--get-user-key\n Syntax: --get-user-key {USERNAME} {USERNAME} [...]\n--get-username\n Syntax: --get-username {USER-ID} {USER-ID} [...]\n--read \n Syntax: --read {USER-ID} {USER-ID} [...]\n --search-by-attribute \n Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n--search-by-role \n Syntax: --search-by-role {REALM} {ROLE-ID}\n--search-by-resource \n Syntax: --search-by-resource {REALM} {RESOURCE-NAME}\n--delete \n Syntax: --delete {USER-ID} {USER-ID} [...]\n--delete-all \n Syntax: --delete-all {REALM}\n--delete-by-attribute \n Syntax: --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n +user.help.message=\nUsage: user [options]\n Options:\n--help \n --details \n--list \n--get-user-key\n Syntax: --get-user-key {USERNAME} {USERNAME} [...]\n--get-username\n Syntax: --get-username {USER-ID} {USER-ID} [...]\n--read \n Syntax: --read {USER-ID} {USER-ID} [...]\n--search-by-attribute \n Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n--search-by-role \n Syntax: --search-by-role {REALM} {ROLE-ID}\n--search-by-resource \n Syntax: --search-by-resource {REALM} {RESOURCE-NAME}\n--delete \n Syntax: --delete {USER-ID} {USER-ID} [...]\n--delete-all \n Syntax: --delete-all {REALM}\n--delete-by-attribute \n Syntax: --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n workflow.help.message=\nUsage: workflow [options]\n Options:\n--help \n --export-diagram {ANY-TYPE-KIND}\nAny type kind: ANY_OBJECT / USER / GROUP\n--export-definition {ANY-TYPE-KIND}\nAny type kind: ANY_OBJECT / USER / GROUP\n
[09/10] syncope git commit: cli docs: user, SYNCOPE-722
cli docs: user, SYNCOPE-722 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1c2e69f2 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1c2e69f2 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1c2e69f2 Branch: refs/heads/master Commit: 1c2e69f217c6d61fcbfe754b5a848c345d5c188d Parents: 684e203 Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 30 15:37:20 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 30 16:16:38 2015 +0100 -- src/main/asciidoc/cli-schema.adoc | 3 +- src/main/asciidoc/cli-user.adoc | 534 + src/main/asciidoc/cli.adoc| 4 +- 3 files changed, 538 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/1c2e69f2/src/main/asciidoc/cli-schema.adoc -- diff --git a/src/main/asciidoc/cli-schema.adoc b/src/main/asciidoc/cli-schema.adoc index a981003..0e88f07 100644 --- a/src/main/asciidoc/cli-schema.adoc +++ b/src/main/asciidoc/cli-schema.adoc @@ -288,7 +288,7 @@ You are runnig: schema --read VIRTUAL virtualReadOnly -- = Delete option -The option to delete a specified schemas. +The option to delete a specified schema. [source] -- @@ -297,7 +297,6 @@ $ ./syncopeadm.sh schema --delete {SCHEMA-TYPE} {SCHEMA-KEY} -- 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 http://git-wip-us.apache.org/repos/asf/syncope/blob/1c2e69f2/src/main/asciidoc/cli-user.adoc -- diff --git a/src/main/asciidoc/cli-user.adoc b/src/main/asciidoc/cli-user.adoc new file mode 100644 index 000..16639fa --- /dev/null +++ b/src/main/asciidoc/cli-user.adoc @@ -0,0 +1,534 @@ +// +// 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. +// + + User command +The user command serves to retrieve the information about the users. + += Help message +[source,bash] + +Usage: user [options] + Options: +--help +--list +--details +--get-user-key + Syntax: --get-user-key {USERNAME} {USERNAME} [...] +--get-username + Syntax: --get-username {USER-ID} {USER-ID} [...] +--read + Syntax: --read {USER-ID} {USER-ID} [...] +--search-by-attribute + Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE} +--search-by-role + Syntax: --search-by-role {REALM} {ROLE-ID} +--search-by-resource + Syntax: --search-by-resource {REALM} {RESOURCE-NAME} +--delete + Syntax: --delete {USER-ID} {USER-ID} [...] +--delete-all + Syntax: --delete-all {REALM} +--delete-by-attribute + Syntax: --delete-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE} + + += Details option +This option shows a table with some details about the users. + +[source] +-- +$ ./syncopeadm.sh user --details +-- + +[source] +-- + +You are runnig: user --details + +# +# # +# USERS DETAILS # +# # +# +# # # +# DETAIL# VALUE # +# # # +# +# # # +#Total number #5# +# Active#5# +# Suspended #0# +# Without resources #0# +#Without roles#2# +# # # +# + +-- + += List option +Running the command with this option you will see the list of all user in the environment but, before the execution, +the system will ask you a confirmation because as you can imagine this operation might produce very heavy output. + +[source] +-- +$ ./syncop
[2/6] syncope git commit: cli docs: task. SYNCOPE-722
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 <massimiliano.perr...@tirasa.net> Authored: Fri Nov 27 16:06:22 2015 +0100 Committer: massi <massimiliano.perr...@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 000..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-T
[5/6] syncope git commit: error, SYNCOPE-722
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 <massimiliano.perr...@tirasa.net> Authored: Fri Nov 27 16:06:45 2015 +0100 Committer: massi <massimiliano.perr...@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 que
[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 <massimiliano.perr...@tirasa.net> Authored: Fri Nov 27 16:51:02 2015 +0100 Committer: massi <massimiliano.perr...@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 000..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: ad...@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: ad...@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: t...@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
[6/6] syncope git commit: Added message for empty running jobs
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 <massimiliano.perr...@tirasa.net> Authored: Fri Nov 27 15:13:27 2015 +0100 Committer: massi <massimiliano.perr...@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); } - + } }
[3/6] syncope git commit: cli docs: logger. SYNCOPE-722
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 <massimiliano.perr...@tirasa.net> Authored: Fri Nov 27 13:01:37 2015 +0100 Committer: massi <massimiliano.perr...@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 000..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
[1/5] syncope git commit: forgot delete command
Repository: syncope Updated Branches: refs/heads/master 7334152c7 -> 327c8e03d forgot delete command Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/9a5b26c6 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/9a5b26c6 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/9a5b26c6 Branch: refs/heads/master Commit: 9a5b26c681685d77617274ddb1d974b98d5fb5c2 Parents: 7334152 Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Nov 26 15:31:38 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Nov 26 15:31:38 2015 +0100 -- .../syncope/client/cli/commands/question/QuestionCommand.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/9a5b26c6/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java index bcb2a5f..8c40375 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java @@ -44,6 +44,7 @@ public class QuestionCommand extends AbstractCommand { new QuestionRead(input).read(); break; case DELETE: +new QuestionDelete(input).delete(); break; case HELP: System.out.println(getHelpMessage());
[3/5] syncope git commit: wrong table header title
wrong table header title Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/54131374 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/54131374 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/54131374 Branch: refs/heads/master Commit: 54131374f86b65b3736d1b728e510f58690ed140 Parents: 6daf51b Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Nov 26 17:14:50 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Nov 26 17:14:50 2015 +0100 -- .../cli/commands/configuration/ConfigurationResultManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/54131374/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java index b5a504f..8e8565a 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationResultManager.java @@ -31,11 +31,11 @@ public class ConfigurationResultManager extends CommonsResultManager { } public void fromRead(final LinkedList attrTOs) { -fromCommandToView("selected configuration attributes", attrTOs); +fromCommandToView("selected conf attributes", attrTOs); } public void fromUpdate(final LinkedList attrTOs) { -fromCommandToView("updated configuration attributes", attrTOs); +fromCommandToView("updated conf attributes", attrTOs); } private void fromCommandToView(final String title, final LinkedList attrTOs) {
[4/5] syncope git commit: forgot export command
forgot export command Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/b32c5db2 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/b32c5db2 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/b32c5db2 Branch: refs/heads/master Commit: b32c5db2e2c49db6581c354d62d07737a6f1711a Parents: 5413137 Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Nov 26 17:24:41 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Nov 26 17:24:41 2015 +0100 -- .../client/cli/commands/configuration/ConfigurationCommand.java | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/b32c5db2/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationCommand.java index 00fcdfd..3f06eaa 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationCommand.java @@ -50,6 +50,7 @@ public class ConfigurationCommand extends AbstractCommand { new ConfigurationDelete(input).delete(); break; case EXPORT: +new ConfigurationExport(input).export(); break; case HELP: System.out.println(getHelpMessage());
[2/5] syncope git commit: The role key is the role name
The role key is the role name Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6daf51b5 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6daf51b5 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6daf51b5 Branch: refs/heads/master Commit: 6daf51b5ab54fb5f0ca475833a5b4eeaa5050a29 Parents: 9a5b26c Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Nov 26 16:32:15 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Nov 26 16:32:15 2015 +0100 -- .../org/apache/syncope/client/cli/commands/role/RoleDelete.java| 2 +- .../java/org/apache/syncope/client/cli/commands/role/RoleRead.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/6daf51b5/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleDelete.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleDelete.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleDelete.java index a16392c..0d5426d 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleDelete.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleDelete.java @@ -28,7 +28,7 @@ public class RoleDelete extends AbstractRoleCommand { private static final Logger LOG = LoggerFactory.getLogger(RoleDelete.class); -private static final String DELETE_HELP_MESSAGE = "role --delete {ROLE-ID} {ROLE-ID} [...]"; +private static final String DELETE_HELP_MESSAGE = "role --delete {ROLE-NAME} {ROLE-NAME} [...]"; private final Input input; http://git-wip-us.apache.org/repos/asf/syncope/blob/6daf51b5/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleRead.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleRead.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleRead.java index 75ecc76..f5f4aa7 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleRead.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleRead.java @@ -31,7 +31,7 @@ public class RoleRead extends AbstractRoleCommand { private static final Logger LOG = LoggerFactory.getLogger(RoleRead.class); -private static final String READ_HELP_MESSAGE = "role --read {ROLE-ID} {ROLE-ID} [...]"; +private static final String READ_HELP_MESSAGE = "role --read {ROLE-NAME} {ROLE-NAME} [...]"; private final Input input;
syncope git commit: license. Jenkins I love you too...
Repository: syncope Updated Branches: refs/heads/master 327c8e03d -> 992f6002f license. Jenkins I love you too... Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/992f6002 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/992f6002 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/992f6002 Branch: refs/heads/master Commit: 992f6002fed3a30ca553242ca9d4dc9c0a636b7d Parents: 327c8e0 Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Nov 26 18:02:03 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Nov 26 18:02:03 2015 +0100 -- src/main/asciidoc/cli.adoc | 18 ++ 1 file changed, 18 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/992f6002/src/main/asciidoc/cli.adoc -- diff --git a/src/main/asciidoc/cli.adoc b/src/main/asciidoc/cli.adoc index 77a539e..571a92a 100644 --- a/src/main/asciidoc/cli.adoc +++ b/src/main/asciidoc/cli.adoc @@ -1,3 +1,21 @@ +// +// 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. +// === CLI include::cli-introduction.adoc[]
syncope git commit: changed test assertion
Repository: syncope Updated Branches: refs/heads/master cd329070d -> 7bcabd1d3 changed test assertion Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7bcabd1d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7bcabd1d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7bcabd1d Branch: refs/heads/master Commit: 7bcabd1d34801ac16d518f902a54726c17fc76cb Parents: cd32907 Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 23 16:06:27 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 23 16:06:38 2015 +0100 -- .../test/java/org/apache/syncope/fit/core/reference/CLIITCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/7bcabd1d/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java index 9fcd018..0343507 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java @@ -168,7 +168,7 @@ public class CLIITCase extends AbstractITCase { return line.startsWith(" > USER ID:"); } }); -assertEquals(userService.list(new AnyListQuery()).getResult().size(), users); +assertEquals(5, users); process2.destroy(); } catch (IOException e) {
syncope git commit: unused import
Repository: syncope Updated Branches: refs/heads/master 7bcabd1d3 -> d398b6e05 unused import Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d398b6e0 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d398b6e0 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d398b6e0 Branch: refs/heads/master Commit: d398b6e0592c17b2ae795f98cd2fb1cdd03c8700 Parents: 7bcabd1 Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 23 16:07:32 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 23 16:07:32 2015 +0100 -- .../test/java/org/apache/syncope/fit/core/reference/CLIITCase.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/d398b6e0/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java -- diff --git a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java index 0343507..3e2dcbd 100644 --- a/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java +++ b/fit/core-reference/src/test/java/org/apache/syncope/fit/core/reference/CLIITCase.java @@ -32,7 +32,6 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.Predicate; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.SystemUtils; -import org.apache.syncope.common.rest.api.beans.AnyListQuery; import org.junit.BeforeClass; import org.junit.FixMethodOrder; import org.junit.Test;
syncope git commit: bugfix backslash char, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 7a259ec2e -> cb7f0fb1c bugfix backslash char, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/cb7f0fb1 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/cb7f0fb1 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/cb7f0fb1 Branch: refs/heads/master Commit: cb7f0fb1c27b9c4ee0569e4e27154011dccbf0df Parents: 7a259ec Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 23 17:11:41 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Mon Nov 23 17:11:41 2015 +0100 -- .../cli/src/main/java/org/apache/syncope/client/cli/Input.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/cb7f0fb1/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java b/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java index a5f4fe5..bc92eef 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java @@ -48,8 +48,8 @@ public class Input { if (args.length > 2) { parameters = new String[args.length - 2]; for (int i = 0; i < parameters.length; i++) { -parameters[i] = args[i + 2]; -commandFields.add(args[i + 2]); +parameters[i] = args[i + 2].replaceAll("", ""); +commandFields.add(parameters[i]); } } else { parameters = new String[0]; @@ -106,7 +106,7 @@ public class Input { public String printCommandFields() { final StringBuilder commandBuilder = new StringBuilder(); -for (String commandField : commandFields) { +for (final String commandField : commandFields) { commandBuilder.append(commandField).append(" "); } return commandBuilder.toString();
syncope git commit: Added unit tests, SYNCOPE-727
Repository: syncope Updated Branches: refs/heads/master 9b033aa1b -> 444182f72 Added unit tests, SYNCOPE-727 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/444182f7 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/444182f7 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/444182f7 Branch: refs/heads/master Commit: 444182f724a4fc9a9f2985244f630aa30659e4c8 Parents: 9b033aa Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Nov 20 11:10:08 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Nov 20 11:10:08 2015 +0100 -- client/cli/pom.xml | 5 ++ .../syncope/client/cli/util/CommandUtils.java | 2 +- .../client/cli/util/FileSystemUtils.java| 40 - .../syncope/client/cli/util/JasyptUtils.java| 4 +- .../client/cli/util/CommandUtilsTest.java | 62 .../client/cli/util/JasyptUtilsTest.java| 42 + 6 files changed, 113 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/444182f7/client/cli/pom.xml -- diff --git a/client/cli/pom.xml b/client/cli/pom.xml index 447d7f7..61282ce 100644 --- a/client/cli/pom.xml +++ b/client/cli/pom.xml @@ -81,6 +81,11 @@ under the License. jcl-over-slf4j + + junit + junit + test + http://git-wip-us.apache.org/repos/asf/syncope/blob/444182f7/client/cli/src/main/java/org/apache/syncope/client/cli/util/CommandUtils.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/util/CommandUtils.java b/client/cli/src/main/java/org/apache/syncope/client/cli/util/CommandUtils.java index 8085380..9b401a6 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/util/CommandUtils.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/util/CommandUtils.java @@ -75,7 +75,7 @@ public final class CommandUtils { } return types; } - + public static String helpMessage(final String command, final List options) { final StringBuilder helpMessageBuilder = new StringBuilder(String.format("\nUsage: %s [options]\n", command)); helpMessageBuilder.append(" Options:\n"); http://git-wip-us.apache.org/repos/asf/syncope/blob/444182f7/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java b/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java index 8fc779c..6ed7a9b 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/util/FileSystemUtils.java @@ -18,30 +18,13 @@ */ package org.apache.syncope.client.cli.util; -import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.IOException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.nio.file.attribute.PosixFilePermission; -import java.util.HashSet; -import java.util.ResourceBundle; -import java.util.Set; -import org.apache.syncope.client.cli.commands.install.InstallConfigFileTemplate; public final class FileSystemUtils { -private static final ResourceBundle CONF = ResourceBundle.getBundle("configuration"); - -public static void createNewDirectory(final String directoryToCreate) { -final File directory = new File(directoryToCreate); -directory.mkdirs(); -} - public static void createFileWith(final String filePath, final String content) throws FileNotFoundException, UnsupportedEncodingException { try (PrintWriter writer = new PrintWriter(filePath, "UTF-8")) { @@ -59,29 +42,6 @@ public final class FileSystemUtils { return installationDirectory.exists(); } -public static void createScriptFile() throws FileNotFoundException, UnsupportedEncodingException, IOException { -final File file = new File(InstallConfigFileTemplate.scriptFilePath()); -file.setExecutable(true); -file.setReadable(true); -file.setWritable(true); -file.createNewFile(); -final FileWriter fw = new FileWriter(file.getAbsoluteFile()); -final BufferedWriter bw = new BufferedWriter(fw); -if (isWindows()) { -bw.write(
[2/3] syncope git commit: changed script permissions to executable
changed script permissions to executable Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/73269550 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/73269550 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/73269550 Branch: refs/heads/master Commit: 73269550f5c4a9c68a0c9bd64e38b99cdb44ad5d Parents: 6cd894a Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Nov 19 10:26:01 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Nov 19 18:06:33 2015 +0100 -- client/cli/src/assemble/cli-zip.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/73269550/client/cli/src/assemble/cli-zip.xml -- diff --git a/client/cli/src/assemble/cli-zip.xml b/client/cli/src/assemble/cli-zip.xml index f88a447..1e242a3 100644 --- a/client/cli/src/assemble/cli-zip.xml +++ b/client/cli/src/assemble/cli-zip.xml @@ -46,6 +46,7 @@ under the License. syncopeadm.bat ${project.build.finalName} + 0755 @@ -58,4 +59,4 @@ under the License. - \ No newline at end of file +
[3/3] syncope git commit: changed question message
changed question message Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6cd894a4 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6cd894a4 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6cd894a4 Branch: refs/heads/master Commit: 6cd894a4f319cfe9fcf3ce8c3cde3a99fe6e1c28 Parents: 24e4144 Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Nov 17 17:15:27 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Nov 19 18:06:33 2015 +0100 -- .../org/apache/syncope/client/cli/commands/user/UserList.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/6cd894a4/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java index 42b5a23..881dc96 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserList.java @@ -44,8 +44,7 @@ public class UserList extends AbstractUserCommand { try { final Scanner scanIn = new Scanner(System.in); System.out.println( -"\nThis operation could be print a lot of information " -+ "on your screen. Do you want to continue? [yes/no]"); +"\nThis operation might produce very heavy output. Do you want to continue? [yes/no]"); final String answer = scanIn.nextLine(); if ("yes".equalsIgnoreCase(answer)) { final PagedResult uResult = userSyncopeOperations.list();
[2/2] syncope git commit: Fixed SYNCOPE-728, added debug setup option. SYNCOPE-158
Fixed SYNCOPE-728, added debug setup option. SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3cf1df3f Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3cf1df3f Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3cf1df3f Branch: refs/heads/master Commit: 3cf1df3f94dda26e259cd89dc900800c6484afa4 Parents: bd910fb Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Nov 17 17:01:51 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Nov 17 17:02:10 2015 +0100 -- .../apache/syncope/client/cli/SyncopeAdm.java | 4 +- .../syncope/client/cli/SyncopeServices.java | 13 +++ .../cli/commands/install/InstallCommand.java| 17 +++- .../commands/install/InstallSetupForDebug.java | 80 + .../cli/commands/user/AbstractUserCommand.java | 7 ++ .../client/cli/commands/user/UserCommand.java | 10 ++- .../client/cli/commands/user/UserDeleteAll.java | 94 .../commands/user/UserDeleteByAttribute.java| 84 + .../client/cli/commands/user/UserList.java | 2 +- .../cli/commands/user/UserResultManager.java| 23 ++--- .../commands/user/UserSearchByAttribute.java| 7 +- .../cli/commands/user/UserSearchByResource.java | 6 +- .../cli/commands/user/UserSearchByRole.java | 4 +- .../commands/user/UserSyncopeOperations.java| 47 +- .../cli/src/main/resources/messages.properties | 2 +- 15 files changed, 367 insertions(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/3cf1df3f/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java index 5c7ef20..17abce8 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java @@ -52,9 +52,11 @@ public final class SyncopeAdm { System.out.println(helpMessage()); } catch (final IllegalArgumentException ex) { LOG.error("Error in main", ex); -RESULT_MANAGER.genericError(ex.getMessage()); if (!ex.getMessage().startsWith("It seems you")) { +System.out.println(""); System.out.println(helpMessage()); +} else { +RESULT_MANAGER.genericError(ex.getMessage()); } } catch (final ProcessingException e) { LOG.error("Error in main", e); http://git-wip-us.apache.org/repos/asf/syncope/blob/3cf1df3f/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java index 5cfcefa..c3e7062 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeServices.java @@ -25,6 +25,7 @@ import org.apache.syncope.client.cli.commands.install.InstallConfigFileTemplate; import org.apache.syncope.client.cli.util.JasyptUtils; import org.apache.syncope.client.lib.SyncopeClient; import org.apache.syncope.client.lib.SyncopeClientFactoryBean; +import org.apache.syncope.common.rest.api.service.SyncopeService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -57,6 +58,18 @@ public final class SyncopeServices { return SYNCOPE_ADDRESS; } +public static void testUsernameAndPassword(final String username, final String password) { +final Properties properties = new Properties(); +try { +properties.load(new FileInputStream(InstallConfigFileTemplate.configurationFilePath())); +} catch (final IOException e) { +LOG.error("Error opening properties file", e); +} +final SyncopeClient syncopeClient = new SyncopeClientFactoryBean() + .setAddress(properties.getProperty("syncope.rest.services")).create(username, password); +syncopeClient.getService(SyncopeService.class).info(); +} + private SyncopeServices() { // private constructor for static utility class } http://git-wip-us.apache.org/repos/asf/syncope/blob/3cf1df3f/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallCommand.java -- diff --git a
[1/2] syncope git commit: resolved conflict
Repository: syncope Updated Branches: refs/heads/master e034afcd5 -> 3cf1df3f9 resolved conflict Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/bd910fbe Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/bd910fbe Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/bd910fbe Branch: refs/heads/master Commit: bd910fbee38daf9f1477e08a7aeca1a25dd25620 Parents: e034afc Author: massi <massimiliano.perr...@tirasa.net> Authored: Mon Nov 16 15:34:13 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Nov 17 17:02:09 2015 +0100 -- client/cli/src/main/resources/messages.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/bd910fbe/client/cli/src/main/resources/messages.properties -- diff --git a/client/cli/src/main/resources/messages.properties b/client/cli/src/main/resources/messages.properties index 2497301..6e6cf72 100644 --- a/client/cli/src/main/resources/messages.properties +++ b/client/cli/src/main/resources/messages.properties @@ -30,5 +30,5 @@ resource.help.message=\nUsage: resource [options]\n Options:\n--help \n role.help.message=\nUsage: role [options]\n Options:\n--help \n --details \n--list \n--read \n Syntax: --read {ROLE-ID} {ROLE-ID} [...]\n--delete \n Syntax: --delete {ROLE-ID} {ROLE-ID} [...]\n schema.help.message=\nUsage: schema [options]\n Options:\n--help \n --details \n--list-all\n--list-plain\n--list-derived\n --list-virtual\n--read {SCHEMA-TYPE} {SCHEMA-KEY}\nSchema type: PLAIN / DERIVED / VIRTUAL\n--delete {SCHEMA-TYPE} {SCHEMA-KEY}\n Schema type: PLAIN / DERIVED / VIRTUAL\n task.help.message=\nUsage: task [options]\n Options:\n--help \n --details\n--list\n Syntax: --list {TASK-TYPE} \n Task type: NOTIFICATION / PROPAGATION / PUSH / SCHEDULED / SYNCHRONIZATION\n --list-running-jobs \n--list-scheduled-jobs \n--read \n Syntax: --read {TASK-ID} {TASK-ID} [...]\n--read-execution \n Syntax: --read-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]\n--delete \n Syntax: --delete {TASK-ID} {TASK-ID} [...]\n--delete-execution \n Syntax: --delete-execution {TASK-EXEC-ID} {TASK-EXEC-ID} [...]\n--execute \n Syntax: --execute {TASK-ID} {DRY-RUN}\n Dry run: true / false\n -user.help.message=\nUsage: user [options]\n Options:\n--help \n--list \n--details \n--get-user-key\n Syntax: --get-user-key {USERNAME} {USERNAME} [...]\n--get-username\n Syntax: --get-username {USER-ID} {USER-ID} [...]\n--read \n Syntax: --read {USER-ID} {USER-ID} [...]\n --search-by-attribute \n Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n--search-by-role \n Syntax: --search-by-role {REALM} {ROLE-ID}\n--search-by-resource \n Syntax: --search-by-resource {REALM} {RESOURCE-NAME}\n--delete \n Syntax: --delete {USER-ID} {USER-ID} [...]\n +user.help.message=\nUsage: user [options]\n Options:\n--help \n--list \n--details \n--get-user-key\n Syntax: --get-user-key {USERNAME} {USERNAME} [...]\n--get-username\n Syntax: --get-username {USER-ID} {USER-ID} [...]\n--read \n Syntax: --read {USER-ID} {USER-ID} [...]\n --search-by-attribute \n Syntax: --search-by-attribute {REALM} {ATTR-NAME}={ATTR-VALUE}\n--search-by-role \n Syntax: --search-by-role {REALM} {ROLE-ID}\n--search-by-resource \n Syntax: --search-by-resource {REALM} {RESOURCE-NAME}\n--delete-all\n--delete \n Syntax: --delete {USER-ID} {USER-ID} [...]\n workflow.help.message=\nUsage: workflow [options]\n Options:\n--help \n --export-diagram {ANY-TYPE-KIND}\nAny type kind: ANY_OBJECT / USER / GROUP\n--export-definition {ANY-TYPE-KIND}\nAny type kind: ANY_OBJECT / USER / GROUP\n
[4/4] syncope git commit: Fixed SYNCOPE-724
Fixed SYNCOPE-724 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d59380af Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d59380af Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d59380af Branch: refs/heads/master Commit: d59380af6f3be5412fa283c7c59e759f34ae71f1 Parents: 03b341e Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Nov 6 12:00:43 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Nov 6 17:57:22 2015 +0100 -- .../cli/commands/CommonsResultManager.java | 7 - .../client/cli/commands/any/AnyCommand.java | 20 +++--- .../configuration/ConfigurationCommand.java | 19 +++-- .../commands/connector/ConnectorCommand.java| 19 +++-- .../cli/commands/domain/DomainCommand.java | 14 +++--- .../entitlement/EntitlementCommand.java | 21 --- .../client/cli/commands/group/GroupCommand.java | 20 +++--- .../cli/commands/install/InstallSetup.java | 8 +- .../cli/commands/logger/LoggerCommand.java | 22 +++ .../notification/NotificationCommand.java | 15 +++ .../cli/commands/policy/PolicyCommand.java | 18 +++-- .../cli/commands/question/QuestionCommand.java | 15 +++ .../client/cli/commands/realm/RealmCommand.java | 12 +++-- .../cli/commands/report/ReportCommand.java | 26 +++--- .../cli/commands/resource/ResourceCommand.java | 16 +++ .../client/cli/commands/role/RoleCommand.java | 16 +++ .../cli/commands/schema/SchemaCommand.java | 19 +++-- .../cli/commands/self/WorkflowCommand.java | 14 +++--- .../client/cli/commands/task/TaskCommand.java | 27 +++ .../client/cli/commands/user/UserCommand.java | 28 .../syncope/client/cli/view/Messages.java | 10 ++- .../cli/src/main/resources/messages.properties | 18 + 22 files changed, 114 insertions(+), 270 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/d59380af/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java index e0f7986..c3f553a 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java @@ -23,6 +23,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.syncope.client.cli.Command; import org.apache.syncope.client.cli.view.Messages; import org.apache.syncope.client.cli.view.Table; import org.apache.syncope.common.lib.types.ConnConfProperty; @@ -69,6 +70,10 @@ public abstract class CommonsResultManager { Messages.printMessage("Error: " + error); } +public String commandHelpMessage(final Class name) { +return Messages.commandHelpMessage(((Command) name.getAnnotation(Command.class)).name()); +} + protected void printConfiguration(final Set configurationPropertys) { for (final ConnConfProperty configuration : configurationPropertys) { System.out.println(" name: " + configuration.getSchema().getName()); @@ -84,7 +89,7 @@ public abstract class CommonsResultManager { System.out.println(""); } } - + protected void printDetails(final String title, final Map<String, String> details) { final Table.TableBuilder tableBuilder = new Table.TableBuilder(title).header("detail").header("value"); http://git-wip-us.apache.org/repos/asf/syncope/blob/d59380af/client/cli/src/main/java/org/apache/syncope/client/cli/commands/any/AnyCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/any/AnyCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/any/AnyCommand.java index a8bed99..c4b2159 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/any/AnyCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/any/AnyCommand.java @@ -28,19 +28,7 @@ import org.apache.syncope.client.cli.commands.AbstractCommand; @Command(name = "any") public class AnyCommand extends AbstractCommand { -private static final
[1/4] syncope git commit: Fixed SYNCOPE-723, tested on Windows environment, added zip plugin, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 03b341e11 -> a61f60363 Fixed SYNCOPE-723, tested on Windows environment, added zip plugin, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/a61f6036 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/a61f6036 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/a61f6036 Branch: refs/heads/master Commit: a61f603634eb10a131b03b18696487f05ee199f3 Parents: 474e732 Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Nov 6 17:57:11 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Nov 6 17:57:22 2015 +0100 -- client/cli/pom.xml | 70 +++- client/cli/src/assemble/cli-zip.xml | 36 ++ .../apache/syncope/client/cli/ArgsManager.java | 2 +- .../org/apache/syncope/client/cli/Input.java| 14 .../apache/syncope/client/cli/SyncopeAdm.java | 2 + .../syncope/client/cli/SyncopeServices.java | 2 +- .../client/cli/commands/info/InfoCommand.java | 3 +- .../install/InstallConfigFileTemplate.java | 34 -- .../commands/install/InstallResultManager.java | 2 + .../cli/commands/install/InstallSetup.java | 24 +++ .../client/cli/util/FileSystemUtils.java| 39 +++ .../syncope/client/cli/view/Messages.java | 2 +- .../src/main/resources/configuration.properties | 7 +- .../cli/src/main/resources/messages.properties | 16 + client/cli/src/main/resources/syncopeadm.bat| 19 ++ client/cli/src/main/resources/syncopeadm.sh | 19 ++ 16 files changed, 259 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/pom.xml -- diff --git a/client/cli/pom.xml b/client/cli/pom.xml index 7872ca6..d63f679 100644 --- a/client/cli/pom.xml +++ b/client/cli/pom.xml @@ -37,6 +37,8 @@ under the License. ${basedir}/../.. + +${project.build.directory}/cli @@ -150,6 +152,51 @@ under the License. src/main/resources/**/*.properties + + +org.apache.maven.plugins +maven-antrun-plugin + + +prepare-cli + + run + + verify + + + + + + + + + + + + + + + + + +org.apache.maven.plugins +maven-assembly-plugin + + +src/assemble/cli-zip.xml + + + + +make-cli-zip +verify + + single + + + + @@ -173,16 +220,33 @@ under the License. apache-release - + - + org.apache.maven.plugins maven-deploy-plugin true - + + + + + + + doc + + + + +org.asciidoctor +asciidoctor-maven-plugin +false + + true + + http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/assemble/cli-zip.xml -- diff --git a/client/cli/src/assemble/cli-zip.xml b/client/cli/src/assemble/cli-zip.xml new file mode 100644 index 000..be2a254 --- /dev/null +++ b/client/cli/src/assemble/cli-zip.xml @@ -0,0 +1,36 @@ + + +http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 + http://maven.apache.org/xsd/assembly-1.1.2.xsd;> + + cli + +zip + + false + + + ${work.dir} + ${project.build.finalName} + + + http://git-wip-us.apache.org/repos/asf/syncope/blob/a61f6036/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java index 926b4dd..3ec222a 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/ArgsManager.java +++ b/client/cli/src/main/java/o
[2/4] syncope git commit: prevent Java JCE installation, SYNCOPE-158
prevent Java JCE installation, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/ea56dc91 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/ea56dc91 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/ea56dc91 Branch: refs/heads/master Commit: ea56dc9179b880f79d0eabf726ac55ddb23edcc7 Parents: d59380a Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Nov 6 12:57:31 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Nov 6 17:57:22 2015 +0100 -- .../java/org/apache/syncope/client/cli/util/JasyptUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/ea56dc91/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java b/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java index c0af3b0..0f9d592 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/util/JasyptUtils.java @@ -18,11 +18,11 @@ */ package org.apache.syncope.client.cli.util; -import org.jasypt.util.text.StrongTextEncryptor; +import org.jasypt.util.text.BasicTextEncryptor; public final class JasyptUtils { -private final StrongTextEncryptor textEncryptor; +private final BasicTextEncryptor textEncryptor; private static JasyptUtils JASYPT_UTILS = null; @@ -34,7 +34,7 @@ public final class JasyptUtils { } private JasyptUtils() { -textEncryptor = new StrongTextEncryptor(); +textEncryptor = new BasicTextEncryptor(); textEncryptor.setPassword("Ka9s8yadaisj9mud87ssdaifansy"); }
syncope git commit: bugfix, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 10f6a51b1 -> 87a969138 bugfix, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/87a96913 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/87a96913 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/87a96913 Branch: refs/heads/master Commit: 87a96913883de764106f007f7e8f2115ec71ee7c Parents: 10f6a51 Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Nov 5 09:38:29 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Nov 5 09:38:42 2015 +0100 -- .../org/apache/syncope/client/cli/commands/user/UserCommand.java | 4 ++-- .../org/apache/syncope/client/cli/commands/user/UserDetails.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/87a96913/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java index d219f24..2637c20 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCommand.java @@ -34,9 +34,9 @@ public class UserCommand extends AbstractCommand { + "--list \n" + "--details \n" + "--get-user-key\n" -+ " Syntax: --get-user-key {USER-ID} {USER-ID} [...]\n" ++ " Syntax: --get-user-key {USERNAME} {USERNAME} [...]\n" + "--get-username\n" -+ " Syntax: --get-username {USERNAME} {USERNAME} [...]\n" ++ " Syntax: --get-username {USER-ID} {USER-ID} [...]\n" + "--read \n" + " Syntax: --read {USER-ID} {USER-ID} [...]\n" + "--search-by-attribute \n" http://git-wip-us.apache.org/repos/asf/syncope/blob/87a96913/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java index c4df03e..d9110eb 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java @@ -49,10 +49,10 @@ public class UserDetails extends AbstractUserCommand { int activeStatus = 0; int suspendedStatus = 0; for (final UserTO userTO : usersTOs) { -if (!userTO.getResources().isEmpty()) { +if (userTO.getResources().isEmpty()) { withoutResource++; } -if (!userTO.getRoles().isEmpty()) { +if (userTO.getRoles().isEmpty()) { withoutRole++; } if ("active".equalsIgnoreCase(userTO.getStatus())) {
syncope git commit: bugfix in schema output and refactoring, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 2d036afe2 -> 3082eb0d6 bugfix in schema output and refactoring, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3082eb0d Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3082eb0d Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3082eb0d Branch: refs/heads/master Commit: 3082eb0d6728681d6a5f8dc86d343cebd65aa3be Parents: 2d036af Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Nov 3 16:52:42 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Nov 3 16:52:42 2015 +0100 -- .../cli/commands/policy/PolicyCommand.java | 6 +- .../cli/commands/policy/PolicyDetails.java | 8 +-- .../client/cli/commands/policy/PolicyList.java | 7 +- .../commands/policy/PolicyResultManager.java| 3 +- .../policy/PolicySyncopeOperations.java | 4 +- .../commands/report/ReportExportExecution.java | 30 + .../cli/commands/report/ReportListJobs.java | 2 +- .../report/ReportSyncopeOperations.java | 35 -- .../cli/commands/schema/SchemaDelete.java | 2 +- .../client/cli/commands/schema/SchemaList.java | 17 + .../cli/commands/schema/SchemaListAll.java | 16 + .../cli/commands/schema/SchemaListPlain.java| 2 +- .../client/cli/commands/schema/SchemaRead.java | 17 + .../commands/schema/SchemaResultManager.java| 68 +++- .../schema/SchemaSyncopeOperations.java | 12 ++-- .../commands/self/WorkflowExportDefinition.java | 5 +- .../commands/self/WorkflowExportDiagram.java| 3 +- .../self/WorkflowSyncopeOperations.java | 8 +-- .../client/cli/commands/task/TaskCommand.java | 8 +-- .../client/cli/commands/task/TaskDetails.java | 11 ++-- .../client/cli/commands/task/TaskList.java | 7 +- .../cli/commands/task/TaskResultManager.java| 4 +- .../commands/task/TaskSyncopeOperations.java| 4 +- 23 files changed, 124 insertions(+), 155 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/3082eb0d/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyCommand.java index 6c11f02..6403049 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyCommand.java @@ -32,7 +32,7 @@ public class PolicyCommand extends AbstractCommand { + " Options:\n" + "--help \n" + "--details \n" -+ "--list-policy \n" ++ "--list \n" + " Syntax: --list-policy {POLICY-TYPE} \n" + " Policy type: ACCOUNT / PASSWORD / SYNC / PUSH\n" + "--read \n" @@ -50,7 +50,7 @@ public class PolicyCommand extends AbstractCommand { case DETAILS: new PolicyDetails(input).details(); break; -case LIST_POLICY: +case LIST: new PolicyList(input).list(); break; case READ: @@ -76,7 +76,7 @@ public class PolicyCommand extends AbstractCommand { HELP("--help"), DETAILS("--details"), -LIST_POLICY("--list-policy"), +LIST("--list"), READ("--read"), DELETE("--delete"); http://git-wip-us.apache.org/repos/asf/syncope/blob/3082eb0d/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDetails.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDetails.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDetails.java index bb4fdb6..077ab45 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDetails.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDetails.java @@ -41,10 +41,10 @@ public class PolicyDetails extends AbstractPolicyCommand { if (input.parameterNumber() == 0) { try { final Map<String, String> details = new LinkedMap<>(); -final int accountPolicySize = policySyncopeOperations.list(PolicyTyp
[2/2] syncope git commit: added details option, SYNCOPE-158
added details option, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/d43268c1 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/d43268c1 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/d43268c1 Branch: refs/heads/master Commit: d43268c10f022e9707b01a95ffdc55c37e91b05e Parents: 714557e Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Oct 30 11:18:47 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Oct 30 11:18:55 2015 +0100 -- .../cli/commands/CommonsResultManager.java | 13 ++ .../commands/connector/ConnectorCommand.java| 5 + .../commands/connector/ConnectorDetails.java| 76 ++ .../connector/ConnectorResultManager.java | 7 +- .../cli/commands/domain/DomainCommand.java | 5 + .../cli/commands/domain/DomainDetails.java | 50 +++ .../commands/domain/DomainResultManager.java| 5 + .../cli/commands/logger/LoggerCommand.java | 5 + .../cli/commands/logger/LoggerDetails.java | 93 + .../commands/logger/LoggerResultManager.java| 5 + .../commands/notification/NotificationList.java | 5 +- .../commands/notification/NotificationRead.java | 2 +- .../notification/NotificationResultManager.java | 23 .../cli/commands/policy/PolicyCommand.java | 5 + .../cli/commands/policy/PolicyDetails.java | 60 .../client/cli/commands/policy/PolicyList.java | 1 - .../commands/policy/PolicyResultManager.java| 5 + .../client/cli/commands/realm/RealmCommand.java | 5 + .../client/cli/commands/realm/RealmDetails.java | 49 +++ .../cli/commands/realm/RealmResultManager.java | 5 + .../cli/commands/report/ReportCommand.java | 5 + .../cli/commands/report/ReportDetails.java | 59 .../client/cli/commands/report/ReportList.java | 4 +- .../client/cli/commands/report/ReportRead.java | 2 +- .../commands/report/ReportResultManager.java| 9 +- .../cli/commands/resource/ResourceCommand.java | 5 + .../cli/commands/resource/ResourceDetails.java | 52 +++ .../resource/ResourceResultManager.java | 8 ++ .../client/cli/commands/role/RoleCommand.java | 5 + .../client/cli/commands/role/RoleDetails.java | 59 .../cli/commands/role/RoleResultManager.java| 5 + .../cli/commands/schema/SchemaCommand.java | 5 + .../cli/commands/schema/SchemaDetails.java | 58 .../commands/schema/SchemaResultManager.java| 5 + .../client/cli/commands/task/TaskCommand.java | 5 + .../client/cli/commands/task/TaskDetails.java | 137 +++ .../client/cli/commands/task/TaskList.java | 3 +- .../cli/commands/task/TaskResultManager.java| 35 +++-- .../commands/task/TaskSyncopeOperations.java| 5 +- .../client/cli/commands/user/UserCommand.java | 8 +- .../client/cli/commands/user/UserCount.java | 45 -- .../client/cli/commands/user/UserDetails.java | 73 ++ .../cli/commands/user/UserResultManager.java| 5 + .../commands/user/UserSyncopeOperations.java| 4 - .../apache/syncope/client/cli/view/Table.java | 2 + 45 files changed, 941 insertions(+), 86 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/d43268c1/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java index 4764d4d..26873a1 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java @@ -18,9 +18,13 @@ */ package org.apache.syncope.client.cli.commands; +import java.util.Arrays; +import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Set; import org.apache.syncope.client.cli.view.Messages; +import org.apache.syncope.client.cli.view.Table; import org.apache.syncope.common.lib.types.ConnConfProperty; public abstract class CommonsResultManager { @@ -80,4 +84,13 @@ public abstract class CommonsResultManager { System.out.println(""); } } + +protected void printDetails(final String title, final Map<String, String> details) { +final Table.TableBuilder tableBuilder += new Table.TableBuilder(title).header("detail").header("value"); +for (final Map.Entry<String, String> entrySet : details.entrySet())
[1/2] syncope git commit: added details option, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 714557e64 -> d43268c10 http://git-wip-us.apache.org/repos/asf/syncope/blob/d43268c1/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCount.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCount.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCount.java deleted file mode 100644 index 7316768..000 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserCount.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -package org.apache.syncope.client.cli.commands.user; - -import org.apache.syncope.client.cli.Input; -import org.apache.syncope.common.lib.SyncopeClientException; - -public class UserCount extends AbstractUserCommand { - -private static final String COUNT_HELP_MESSAGE = "user --count"; - -private final Input input; - -public UserCount(final Input input) { -this.input = input; -} - -public void count() { -if (input.parameterNumber() == 0) { -try { -userResultManager.genericMessage("Total users: " + userSyncopeOperations.count()); -} catch (final SyncopeClientException ex) { -userResultManager.genericError(ex.getMessage()); -} -} else { -userResultManager.unnecessaryParameters(input.listParameters(), COUNT_HELP_MESSAGE); -} -} -} http://git-wip-us.apache.org/repos/asf/syncope/blob/d43268c1/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java new file mode 100644 index 000..f09b4ad --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserDetails.java @@ -0,0 +1,73 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.user; + +import java.util.List; +import java.util.Map; +import org.apache.commons.collections4.map.LinkedMap; +import org.apache.syncope.client.cli.Input; +import org.apache.syncope.common.lib.SyncopeClientException; +import org.apache.syncope.common.lib.to.UserTO; + +public class UserDetails extends AbstractUserCommand { + +private static final String COUNT_HELP_MESSAGE = "user --details"; + +private final Input input; + +public UserDetails(final Input input) { +this.input = input; +} + +public void details() { +if (input.parameterNumber() == 0) { +try { +final Mapdetails = new LinkedMap<>(); +final List usersTOs = userSyncopeOperations.list().getResult(); +int withoutResource = 0; +int withoutRole = 0; +int activeStatus = 0; +int suspendedStatus = 0; +for (final UserTO userTO : usersTOs) { +if (!userTO.getResources().isEmpty()) { +withoutResource++; +} +if (!userTO.getRoles().isEmpty()) { +
syncope git commit: Sorry Jenkins and thanks for your patience, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 2f50e2979 -> 27fc4be7e Sorry Jenkins and thanks for your patience, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/27fc4be7 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/27fc4be7 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/27fc4be7 Branch: refs/heads/master Commit: 27fc4be7ed5b913a36618f5e580692ef643afe6d Parents: 2f50e29 Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Oct 30 14:50:23 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Oct 30 14:50:23 2015 +0100 -- .../commands/schema/SchemaSyncopeOperations.java | 8 .../cli/commands/self/WorkflowResultManager.java | 18 ++ 2 files changed, 22 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/27fc4be7/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java index c5e8097..c8f0a6d 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/schema/SchemaSyncopeOperations.java @@ -33,19 +33,19 @@ public class SchemaSyncopeOperations { } public List list(final SchemaType schemaType) { -return schemaService.list(schemaType, null); +return schemaService.list(schemaType); } public List listVirtual() { -return schemaService.list(SchemaType.VIRTUAL, null); +return schemaService.list(SchemaType.VIRTUAL); } public List listPlain() { -return schemaService.list(SchemaType.PLAIN, null); +return schemaService.list(SchemaType.PLAIN); } public List listDerived() { -return schemaService.list(SchemaType.DERIVED, null); +return schemaService.list(SchemaType.DERIVED); } public void delete(final SchemaType schemaType, final String schemaName) { http://git-wip-us.apache.org/repos/asf/syncope/blob/27fc4be7/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowResultManager.java index 118d9fe..f46be07 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowResultManager.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package org.apache.syncope.client.cli.commands.self; import org.apache.syncope.client.cli.commands.CommonsResultManager;
[1/3] syncope git commit: error log, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master d29be2af7 -> 24a912591 http://git-wip-us.apache.org/repos/asf/syncope/blob/24a91259/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java index a906954..0fb7b9f 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByResource.java @@ -25,9 +25,13 @@ import org.apache.syncope.client.cli.commands.realm.RealmSyncopeOperations; import org.apache.syncope.client.cli.commands.resource.ResourceSyncopeOperations; import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.UserTO; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class UserSearchByResource extends AbstractUserCommand { +private static final Logger LOG = LoggerFactory.getLogger(UserSearchByResource.class); + private static final String SEARCH_HELP_MESSAGE = "user --search {REALM} {RESOURCE-NAME}"; private final Input input; @@ -59,6 +63,7 @@ public class UserSearchByResource extends AbstractUserCommand { userResultManager.printUsers(userTOs); } } catch (final WebServiceException | SyncopeClientException ex) { +LOG.error("Error searching user", ex); userResultManager.genericError(ex.getMessage()); userResultManager.genericError(SEARCH_HELP_MESSAGE); } http://git-wip-us.apache.org/repos/asf/syncope/blob/24a91259/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java index 1eed5a3..861c9e9 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/user/UserSearchByRole.java @@ -24,9 +24,13 @@ import org.apache.syncope.client.cli.Input; import org.apache.syncope.client.cli.commands.realm.RealmSyncopeOperations; import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.UserTO; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class UserSearchByRole extends AbstractUserCommand { +private static final Logger LOG = LoggerFactory.getLogger(UserSearchByRole.class); + private static final String SEARCH_HELP_MESSAGE = "user --search {REALM} {ROLE-ID}"; private final Input input; @@ -53,6 +57,7 @@ public class UserSearchByRole extends AbstractUserCommand { userResultManager.printUsers(userTOs); } } catch (final WebServiceException | SyncopeClientException ex) { +LOG.error("Error searching user", ex); userResultManager.genericError(ex.getMessage()); userResultManager.genericError(SEARCH_HELP_MESSAGE); }
[3/3] syncope git commit: error log, SYNCOPE-158
error log, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/24a91259 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/24a91259 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/24a91259 Branch: refs/heads/master Commit: 24a9125914f66f31827dffe34351cfca20288eb8 Parents: d29be2a Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Oct 30 15:57:40 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Oct 30 15:57:40 2015 +0100 -- .../apache/syncope/client/cli/SyncopeAdm.java | 4 +- .../configuration/ConfigurationDelete.java | 5 ++ .../configuration/ConfigurationExport.java | 8 +++ .../configuration/ConfigurationGet.java | 5 ++ .../configuration/ConfigurationRead.java| 5 ++ .../configuration/ConfigurationUpdate.java | 6 ++ .../cli/commands/connector/ConnectorDelete.java | 6 ++ .../commands/connector/ConnectorDetails.java| 74 +++- .../cli/commands/connector/ConnectorList.java | 5 ++ .../connector/ConnectorListBundles.java | 5 ++ .../ConnectorListConfigurationProperties.java | 6 ++ .../cli/commands/connector/ConnectorRead.java | 6 ++ .../connector/ConnectorReadByResource.java | 5 ++ .../cli/commands/domain/DomainDelete.java | 5 ++ .../cli/commands/domain/DomainDetails.java | 5 ++ .../client/cli/commands/domain/DomainList.java | 5 ++ .../client/cli/commands/domain/DomainRead.java | 5 ++ .../entitlement/EntitlementListRole.java| 6 ++ .../entitlement/EntitlementReadByUserId.java| 6 ++ .../entitlement/EntitlementReadByUsername.java | 6 ++ .../entitlement/EntitlementSearchByRole.java| 6 ++ .../syncope/client/cli/commands/help/Help.java | 5 ++ .../syncope/client/cli/commands/info/Info.java | 26 +++ .../cli/commands/install/InstallCommand.java| 5 ++ .../cli/commands/install/InstallSetup.java | 6 ++ .../cli/commands/logger/LoggerCreate.java | 5 ++ .../cli/commands/logger/LoggerDelete.java | 5 ++ .../cli/commands/logger/LoggerDetails.java | 5 ++ .../client/cli/commands/logger/LoggerList.java | 5 ++ .../client/cli/commands/logger/LoggerRead.java | 5 ++ .../cli/commands/logger/LoggerUpdate.java | 5 ++ .../cli/commands/logger/LoggerUpdateAll.java| 5 ++ .../notification/NotificationDelete.java| 5 ++ .../commands/notification/NotificationList.java | 5 ++ .../commands/notification/NotificationRead.java | 6 ++ .../cli/commands/policy/PolicyDelete.java | 6 ++ .../cli/commands/policy/PolicyDetails.java | 5 ++ .../client/cli/commands/policy/PolicyList.java | 6 ++ .../client/cli/commands/policy/PolicyRead.java | 6 ++ .../cli/commands/question/QuestionDelete.java | 6 ++ .../cli/commands/question/QuestionList.java | 5 ++ .../cli/commands/question/QuestionRead.java | 6 ++ .../client/cli/commands/realm/RealmDetails.java | 5 ++ .../client/cli/commands/realm/RealmList.java| 5 ++ .../cli/commands/report/ReportDelete.java | 6 ++ .../commands/report/ReportDeleteExecution.java | 6 ++ .../cli/commands/report/ReportDetails.java | 5 ++ .../cli/commands/report/ReportExecute.java | 6 ++ .../commands/report/ReportExportExecution.java | 8 +++ .../client/cli/commands/report/ReportList.java | 5 ++ .../cli/commands/report/ReportListJobs.java | 5 ++ .../client/cli/commands/report/ReportRead.java | 6 ++ .../commands/report/ReportReadExecution.java| 6 ++ .../cli/commands/resource/ResourceDelete.java | 7 ++ .../cli/commands/resource/ResourceDetails.java | 5 ++ .../cli/commands/resource/ResourceList.java | 5 ++ .../cli/commands/resource/ResourceRead.java | 7 ++ .../client/cli/commands/role/RoleDelete.java| 6 ++ .../client/cli/commands/role/RoleDetails.java | 5 ++ .../client/cli/commands/role/RoleList.java | 5 ++ .../client/cli/commands/role/RoleRead.java | 6 ++ .../cli/commands/schema/SchemaDelete.java | 6 ++ .../cli/commands/schema/SchemaDetails.java | 5 ++ .../client/cli/commands/schema/SchemaList.java | 6 ++ .../cli/commands/schema/SchemaListAll.java | 5 ++ .../cli/commands/schema/SchemaListDerived.java | 5 ++ .../cli/commands/schema/SchemaListPlain.java| 5 ++ .../cli/commands/schema/SchemaListVirtual.java | 5 ++ .../client/cli/commands/schema/SchemaRead.java | 6 ++ .../commands/self/AbstractWorkflowCommand.java | 2 +- .../commands/self/WorkflowExportDefinition.java | 6 ++ .../client/cli/commands/task/TaskDelete.java| 6 ++ .../client/cli/commands/task/TaskDetails.java | 6 ++ .../client/cli/commands/task/TaskExecute.java | 6 ++ .../cli/commands/task/TaskExecutionDelete.java | 6 ++ .../cli/commands/task/TaskExecutionRead.
syncope git commit: manage cxf debug logging
Repository: syncope Updated Branches: refs/heads/master 1a05fe195 -> 11ce3630a manage cxf debug logging Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/11ce3630 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/11ce3630 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/11ce3630 Branch: refs/heads/master Commit: 11ce3630afce03887d16c39870c9acda667e6807 Parents: 1a05fe1 Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Oct 30 12:33:49 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Oct 30 12:34:07 2015 +0100 -- client/lib/src/main/resources/META-INF/cxf/org.apache.cxf.Logger | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/11ce3630/client/lib/src/main/resources/META-INF/cxf/org.apache.cxf.Logger -- diff --git a/client/lib/src/main/resources/META-INF/cxf/org.apache.cxf.Logger b/client/lib/src/main/resources/META-INF/cxf/org.apache.cxf.Logger new file mode 100644 index 000..6e7bd36 --- /dev/null +++ b/client/lib/src/main/resources/META-INF/cxf/org.apache.cxf.Logger @@ -0,0 +1 @@ +org.apache.cxf.common.logging.Slf4jLogger
[1/3] syncope git commit: message refactoring, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master e486aaf3a -> 6d368c8b2 http://git-wip-us.apache.org/repos/asf/syncope/blob/6d368c8b/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 new file mode 100644 index 000..931cfef --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListRunningJobs.java @@ -0,0 +1,46 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.task; + +import org.apache.syncope.client.cli.Input; +import org.apache.syncope.common.lib.SyncopeClientException; + +public class TaskListRunningJobs extends AbstractTaskCommand { + +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()); +} catch (final SyncopeClientException ex) { +taskResultManager.genericError(ex.getMessage()); +} +} else { +taskResultManager.unnecessaryParameters(input.listParameters(), READ_HELP_MESSAGE); +} + +} +} http://git-wip-us.apache.org/repos/asf/syncope/blob/6d368c8b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListScheduledJobs.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListScheduledJobs.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListScheduledJobs.java new file mode 100644 index 000..ec2cab1 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskListScheduledJobs.java @@ -0,0 +1,45 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.task; + +import org.apache.syncope.client.cli.Input; +import org.apache.syncope.common.lib.SyncopeClientException; + +public class TaskListScheduledJobs extends AbstractTaskCommand { + +private static final String READ_HELP_MESSAGE = "task --list-scheduled-jobs"; + +private final Input input; + +public TaskListScheduledJobs(final Input input) { +this.input = input; +} + +public void list() { +if (input.parameterNumber() == 0) { +try { + taskResultManager.printTaskExecTO(taskSyncopeOperations.listScheduledJobs()); +} catch (final SyncopeClientException ex) { +taskResultManager.genericError(ex.getMessage()); +} +} else { +taskResultManager.unnecessaryParameters(input.listParameters(), READ_HELP_MESSAGE); +} +} +} http://git-wip-us.apache.org/repos/asf/syncope/blob/6d368c8b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/task/TaskRead.java -- diff --git
[3/3] syncope git commit: message refactoring, SYNCOPE-158
message refactoring, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6d368c8b Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6d368c8b Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6d368c8b Branch: refs/heads/master Commit: 6d368c8b264e11e35d709365e39e663ede7bc57e Parents: e486aaf Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Oct 29 13:27:57 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Oct 29 13:27:57 2015 +0100 -- .../apache/syncope/client/cli/SyncopeAdm.java | 7 +- .../cli/commands/CommonsResultManager.java | 13 +- .../configuration/ConfigurationCommand.java | 2 +- .../configuration/ConfigurationDelete.java | 5 +- .../configuration/ConfigurationExport.java | 12 +- .../configuration/ConfigurationGet.java | 21 ++- .../configuration/ConfigurationRead.java| 3 +- .../configuration/ConfigurationUpdate.java | 7 +- .../commands/connector/ConnectorCommand.java| 4 +- .../cli/commands/connector/ConnectorDelete.java | 5 +- .../cli/commands/connector/ConnectorList.java | 21 ++- .../connector/ConnectorListBundles.java | 21 ++- .../ConnectorListConfigurationProperties.java | 8 +- .../cli/commands/connector/ConnectorRead.java | 11 +- .../connector/ConnectorReadByResource.java | 11 +- .../connector/ConnectorResultManager.java | 39 +++--- .../connector/ConnectorSyncopeOperations.java | 2 +- .../cli/commands/domain/DomainCommand.java | 4 +- .../cli/commands/domain/DomainDelete.java | 5 +- .../client/cli/commands/domain/DomainList.java | 22 ++- .../client/cli/commands/domain/DomainRead.java | 6 +- .../commands/domain/DomainResultManager.java| 12 ++ .../entitlement/AbstractEntitlementCommand.java | 2 +- .../entitlement/EntitlementCommand.java | 5 +- .../commands/entitlement/EntitlementList.java | 16 ++- .../entitlement/EntitlementListRole.java| 5 +- .../entitlement/EntitlementReadByUserId.java| 2 +- .../entitlement/EntitlementReadByUsername.java | 2 +- .../entitlement/EntitlementResultManager.java | 1 - .../entitlement/EntitlementSearchByRole.java| 3 +- .../syncope/client/cli/commands/help/Help.java | 6 +- .../cli/commands/help/HelpResultManager.java| 3 + .../syncope/client/cli/commands/info/Info.java | 133 +++ .../cli/commands/info/InfoResultManager.java| 126 ++ .../cli/commands/install/InstallCommand.java| 13 +- .../commands/install/InstallResultManager.java | 10 ++ .../cli/commands/install/InstallSetup.java | 20 +-- .../cli/commands/logger/LoggerCommand.java | 3 +- .../cli/commands/logger/LoggerCreate.java | 1 - .../cli/commands/logger/LoggerDelete.java | 3 +- .../client/cli/commands/logger/LoggerList.java | 20 ++- .../client/cli/commands/logger/LoggerRead.java | 2 +- .../commands/logger/LoggerResultManager.java| 1 - .../cli/commands/logger/LoggerUpdate.java | 6 +- .../cli/commands/logger/LoggerUpdateAll.java| 3 +- .../notification/NotificationCommand.java | 3 +- .../notification/NotificationDelete.java| 3 +- .../commands/notification/NotificationList.java | 23 +++- .../commands/notification/NotificationRead.java | 2 +- .../cli/commands/policy/PolicyCommand.java | 1 - .../cli/commands/policy/PolicyDelete.java | 6 +- .../client/cli/commands/policy/PolicyList.java | 2 +- .../client/cli/commands/policy/PolicyRead.java | 4 +- .../cli/commands/question/QuestionCommand.java | 3 +- .../cli/commands/question/QuestionDelete.java | 3 +- .../cli/commands/question/QuestionList.java | 21 ++- .../cli/commands/question/QuestionRead.java | 3 +- .../question/QuestionSyncopeOperations.java | 1 - .../client/cli/commands/realm/RealmCommand.java | 3 +- .../client/cli/commands/realm/RealmList.java| 21 ++- .../commands/realm/RealmSyncopeOperations.java | 1 - .../cli/commands/report/ReportCommand.java | 5 +- .../cli/commands/report/ReportDelete.java | 5 +- .../commands/report/ReportDeleteExecution.java | 7 +- .../cli/commands/report/ReportExecute.java | 6 +- .../commands/report/ReportExportExecution.java | 18 +-- .../client/cli/commands/report/ReportList.java | 22 ++- .../cli/commands/report/ReportListJobs.java | 23 +++- .../client/cli/commands/report/ReportRead.java | 2 +- .../commands/report/ReportReadExecution.java| 4 +- .../cli/commands/resource/ResourceCommand.java | 3 +- .../cli/commands/resource/ResourceDelete.java | 3 +- .../cli/commands/resource/ResourceList.java | 21 ++- .../cli/commands/resource/ResourceRead.ja
[2/3] syncope git commit: message refactoring, SYNCOPE-158
http://git-wip-us.apache.org/repos/asf/syncope/blob/6d368c8b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java index b64eef6..6a4bfec 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerList.java @@ -19,18 +19,28 @@ package org.apache.syncope.client.cli.commands.logger; import java.util.LinkedList; +import org.apache.syncope.client.cli.Input; import org.apache.syncope.common.lib.SyncopeClientException; public class LoggerList extends AbstractLoggerCommand { -public LoggerList() { +private static final String LIST_HELP_MESSAGE = "logger --list"; + +private final Input input; + +public LoggerList(final Input input) { +this.input = input; } public void list() { -try { -loggerResultManager.fromList(new LinkedList<>(loggerSyncopeOperations.list())); -} catch (final SyncopeClientException ex) { -loggerResultManager.generic("Error: " + ex.getMessage()); +if (input.parameterNumber() == 0) { +try { +loggerResultManager.fromList(new LinkedList<>(loggerSyncopeOperations.list())); +} catch (final SyncopeClientException ex) { +loggerResultManager.genericError(ex.getMessage()); +} +} else { +loggerResultManager.unnecessaryParameters(input.listParameters(), LIST_HELP_MESSAGE); } } } http://git-wip-us.apache.org/repos/asf/syncope/blob/6d368c8b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java index 1192252..321e257 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerRead.java @@ -45,7 +45,7 @@ public class LoggerRead extends AbstractLoggerCommand { if (ex.getMessage().startsWith("NotFound")) { loggerResultManager.notFoundError("Logger", parameter); } else { -loggerResultManager.generic("Error: " + ex.getMessage()); +loggerResultManager.genericError(ex.getMessage()); } failed = true; break; http://git-wip-us.apache.org/repos/asf/syncope/blob/6d368c8b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java index a693aff..d6f759c 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerResultManager.java @@ -57,5 +57,4 @@ public class LoggerResultManager extends CommonsResultManager { } tableBuilder.build().print(); } - } http://git-wip-us.apache.org/repos/asf/syncope/blob/6d368c8b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java index 9a45916..6f118e9 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerUpdate.java @@ -57,11 +57,13 @@ public class LoggerUpdate extends AbstractLoggerCommand { input.firstParameter(), CommandUtils.fromEnumToArray(LoggerLevel.class)); } else if ("Parameter syntax error!".equalsIgnoreCase(ex.getMessage())) { -loggerResultManager.generic(ex.getMessage(), UPDATE_HELP_MESSAGE); +loggerResultManager.genericError(ex.getMessage()); +loggerResultManager.genericError(UPDATE_HELP_MESSAGE); }
[3/3] syncope git commit: Fixed SYNCOPE-595 and SYNCOPE-583, SYNCOPE-158
Fixed SYNCOPE-595 and SYNCOPE-583, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3c36fe10 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3c36fe10 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3c36fe10 Branch: refs/heads/master Commit: 3c36fe10e73bc14fb4512a88127d8b2d11919bee Parents: 207d93c Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 28 17:21:15 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 28 17:21:15 2015 +0100 -- .../entitlement/AbstractEntitlementCommand.java | 27 + .../entitlement/EntitlementCommand.java | 121 +++ .../commands/entitlement/EntitlementList.java | 26 .../entitlement/EntitlementListRole.java| 62 ++ .../entitlement/EntitlementReadByUserId.java| 53 .../entitlement/EntitlementReadByUsername.java | 53 .../entitlement/EntitlementResultManager.java | 54 + .../entitlement/EntitlementSearchByRole.java| 54 + .../EntitlementSyncopeOperations.java | 74 .../cli/commands/question/QuestionCommand.java | 6 - .../commands/question/QuestionReadByUser.java | 53 .../commands/self/AbstractWorkflowCommand.java | 27 + .../cli/commands/self/WorkflowCommand.java | 104 .../commands/self/WorkflowExportDefinition.java | 56 + .../commands/self/WorkflowExportDiagram.java| 68 +++ .../commands/self/WorkflowResultManager.java| 38 ++ .../self/WorkflowSyncopeOperations.java | 41 +++ 17 files changed, 858 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/3c36fe10/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/AbstractEntitlementCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/AbstractEntitlementCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/AbstractEntitlementCommand.java new file mode 100644 index 000..acc8aa5 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/AbstractEntitlementCommand.java @@ -0,0 +1,27 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.entitlement; + +public class AbstractEntitlementCommand { + +protected final EntitlementSyncopeOperations entitlementSyncopeOperations = new EntitlementSyncopeOperations(); + +protected final EntitlementResultManager entitlementResultManager = new EntitlementResultManager(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/3c36fe10/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java new file mode 100644 index 000..5ca478c --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/entitlement/EntitlementCommand.java @@ -0,0 +1,121 @@ +/* + * 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 di
syncope git commit: unused import
Repository: syncope Updated Branches: refs/heads/master 3c36fe10e -> 1ebc0bcd0 unused import Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/1ebc0bcd Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/1ebc0bcd Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/1ebc0bcd Branch: refs/heads/master Commit: 1ebc0bcd0c61a7b7d41de3d28ee3a718a78ebe8f Parents: 3c36fe1 Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 28 17:27:10 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 28 17:27:10 2015 +0100 -- .../main/java/org/apache/syncope/common/lib/types/Entitlement.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/1ebc0bcd/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java -- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java index 746a95b..6587d1d 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java @@ -21,7 +21,6 @@ package org.apache.syncope.common.lib.types; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.Collections; -import java.util.HashSet; import java.util.Set; import java.util.TreeSet;
[1/3] syncope git commit: Fixed SYNCOPE-591
Repository: syncope Updated Branches: refs/heads/master 74e867e8c -> 3c36fe10e Fixed SYNCOPE-591 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/435e59db Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/435e59db Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/435e59db Branch: refs/heads/master Commit: 435e59db756bbfcd836f651010cc9e4a61ba2957 Parents: 74e867e Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 28 12:11:19 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 28 12:11:19 2015 +0100 -- .../question/AbstractQuestionCommand.java | 27 + .../cli/commands/question/QuestionCommand.java | 114 +++ .../cli/commands/question/QuestionDelete.java | 57 ++ .../cli/commands/question/QuestionList.java | 32 ++ .../cli/commands/question/QuestionRead.java | 61 ++ .../commands/question/QuestionReadByUser.java | 53 + .../question/QuestionResultManager.java | 38 +++ .../question/QuestionSyncopeOperations.java | 46 .../cli/commands/role/AbstractRoleCommand.java | 6 +- .../client/cli/commands/role/RoleDelete.java| 2 +- 10 files changed, 432 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/435e59db/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/AbstractQuestionCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/AbstractQuestionCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/AbstractQuestionCommand.java new file mode 100644 index 000..0a3846a --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/AbstractQuestionCommand.java @@ -0,0 +1,27 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.question; + +public abstract class AbstractQuestionCommand { + +protected final QuestionSyncopeOperations questionSyncopeOperations = new QuestionSyncopeOperations(); + +protected final QuestionResultManager questionResultManager = new QuestionResultManager(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/435e59db/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java new file mode 100644 index 000..2427203 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/question/QuestionCommand.java @@ -0,0 +1,114 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.question; + +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.cli.Comman
[2/3] syncope git commit: ordered set for the entitlement
ordered set for the entitlement Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/207d93c7 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/207d93c7 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/207d93c7 Branch: refs/heads/master Commit: 207d93c7ceadd2d3a6798308558a81e69c6ce24e Parents: 435e59d Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 28 15:00:39 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 28 15:00:39 2015 +0100 -- .../java/org/apache/syncope/common/lib/types/Entitlement.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/207d93c7/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java -- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java b/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java index 20b8347..746a95b 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/types/Entitlement.java @@ -23,6 +23,7 @@ import java.lang.reflect.Modifier; import java.util.Collections; import java.util.HashSet; import java.util.Set; +import java.util.TreeSet; public final class Entitlement { @@ -253,7 +254,7 @@ public final class Entitlement { private static final Set ENTITLEMENTS; static { -Set values = new HashSet<>(); +Set values = new TreeSet<>(); for (Field field : Entitlement.class.getDeclaredFields()) { if (Modifier.isStatic(field.getModifiers()) && String.class.equals(field.getType())) { values.add(field.getName());
syncope git commit: Fixed SYNCOPE-589
Repository: syncope Updated Branches: refs/heads/master 47b9f64bd -> 74e867e8c Fixed SYNCOPE-589 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/74e867e8 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/74e867e8 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/74e867e8 Branch: refs/heads/master Commit: 74e867e8ccde9d184b7986b8329907ef51e4372b Parents: 47b9f64 Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 28 10:27:58 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 28 10:27:58 2015 +0100 -- .../cli/commands/role/AbstractRoleCommand.java | 27 + .../client/cli/commands/role/RoleCommand.java | 109 +++ .../client/cli/commands/role/RoleDelete.java| 57 ++ .../client/cli/commands/role/RoleList.java | 32 ++ .../client/cli/commands/role/RoleRead.java | 61 +++ .../cli/commands/role/RoleResultManager.java| 57 ++ .../commands/role/RoleSyncopeOperations.java| 42 +++ .../client/cli/commands/user/UserRead.java | 7 +- 8 files changed, 389 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/74e867e8/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/AbstractRoleCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/AbstractRoleCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/AbstractRoleCommand.java new file mode 100644 index 000..b4709a0 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/AbstractRoleCommand.java @@ -0,0 +1,27 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.role; + +public class AbstractRoleCommand { + +protected RoleSyncopeOperations roleSyncopeOperations = new RoleSyncopeOperations(); + +protected RoleResultManager roleResultManager = new RoleResultManager(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/74e867e8/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleCommand.java new file mode 100644 index 000..bb2f988 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/role/RoleCommand.java @@ -0,0 +1,109 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.role; + +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.apache.syncope.client.cli.Command; +import org.apache.syncope.client.cli.Input; +import org.apache.syncope.client.cli.commands.AbstractCommand; + +@Command(name = "role") +public class RoleCommand extends AbstractCommand { + +private static final String HELP_MESSAGE = "Usage: role [o
[2/2] syncope git commit: Fixed SYNCOPE-580, refactoring and added realm stack, SYNCOPE-158
Fixed SYNCOPE-580, refactoring and added realm stack, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/47b9f64b Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/47b9f64b Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/47b9f64b Branch: refs/heads/master Commit: 47b9f64bd1aeb9ec9260f809a83c042cbf09b9fd Parents: 7866cdb Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Oct 27 18:07:06 2015 +0100 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Oct 27 18:07:24 2015 +0100 -- .../org/apache/syncope/client/cli/Input.java| 6 + .../cli/commands/CommonsResultManager.java | 2 +- .../AbstractConfigurationCommand.java | 6 +- .../configuration/ConfigurationDelete.java | 2 +- .../configuration/ConfigurationExport.java | 2 +- .../configuration/ConfigurationGet.java | 2 +- .../configuration/ConfigurationRead.java| 2 +- .../ConfigurationSyncopeOperations.java | 50 +++ .../configuration/ConfigurationUpdate.java | 4 +- .../connector/AbstractConnectorCommand.java | 5 +- .../cli/commands/connector/ConnectorDelete.java | 4 +- .../cli/commands/connector/ConnectorList.java | 2 +- .../connector/ConnectorListBundles.java | 2 +- .../ConnectorListConfigurationProperties.java | 4 +- .../cli/commands/connector/ConnectorRead.java | 4 +- .../connector/ConnectorReadByResource.java | 2 +- .../connector/ConnectorSyncopeOperations.java | 50 +++ .../commands/domain/AbstractDomainCommand.java | 5 +- .../cli/commands/domain/DomainDelete.java | 2 +- .../client/cli/commands/domain/DomainList.java | 2 +- .../client/cli/commands/domain/DomainRead.java | 4 +- .../domain/DomainSyncopeOperations.java | 41 ++ .../cli/commands/install/InstallSetup.java | 3 +- .../commands/logger/AbstractLoggerCommand.java | 7 +- .../cli/commands/logger/LoggerCreate.java | 3 +- .../cli/commands/logger/LoggerDelete.java | 3 +- .../client/cli/commands/logger/LoggerList.java | 3 +- .../client/cli/commands/logger/LoggerRead.java | 3 +- .../logger/LoggerSyncopeOperations.java | 46 ++ .../cli/commands/logger/LoggerUpdate.java | 5 +- .../cli/commands/logger/LoggerUpdateAll.java| 5 +- .../AbstractNotificationCommand.java| 5 +- .../notification/NotificationDelete.java| 2 +- .../commands/notification/NotificationList.java | 2 +- .../commands/notification/NotificationRead.java | 2 +- .../NotificationSyncopeOperations.java | 41 ++ .../commands/policy/AbstractPolicyCommand.java | 7 +- .../cli/commands/policy/PolicyDelete.java | 2 +- .../client/cli/commands/policy/PolicyList.java | 2 +- .../client/cli/commands/policy/PolicyRead.java | 2 +- .../policy/PolicySyncopeOperations.java | 42 ++ .../commands/realm/AbstractRealmCommand.java| 27 .../client/cli/commands/realm/RealmCommand.java | 96 + .../client/cli/commands/realm/RealmList.java| 36 + .../cli/commands/realm/RealmResultManager.java | 39 + .../commands/realm/RealmSyncopeOperations.java | 44 ++ .../commands/report/AbstractReportCommand.java | 5 +- .../cli/commands/report/ReportDelete.java | 4 +- .../commands/report/ReportDeleteExecution.java | 4 +- .../cli/commands/report/ReportExecute.java | 7 +- .../commands/report/ReportExportExecution.java | 10 +- .../client/cli/commands/report/ReportList.java | 2 +- .../cli/commands/report/ReportListJobs.java | 2 +- .../client/cli/commands/report/ReportRead.java | 4 +- .../commands/report/ReportReadExecution.java| 4 +- .../report/ReportSyncopeOperations.java | 65 + .../resource/AbstractResourceCommand.java | 7 +- .../cli/commands/resource/ResourceDelete.java | 4 +- .../cli/commands/resource/ResourceList.java | 2 +- .../cli/commands/resource/ResourceRead.java | 4 +- .../resource/ResourceResultManager.java | 5 +- .../resource/ResourceSyncopeOperations.java | 51 +++ .../commands/schema/AbstractSchemaCommand.java | 7 +- .../cli/commands/schema/SchemaDelete.java | 2 +- .../client/cli/commands/schema/SchemaList.java | 2 +- .../cli/commands/schema/SchemaListAll.java | 2 +- .../cli/commands/schema/SchemaListDerived.java | 3 +- .../cli/commands/schema/SchemaListPlain.java| 3 +- .../cli/commands/schema/SchemaListVirtual.java | 3 +- .../client/cli/commands/schema/SchemaRead.java | 2 +- .../schema/SchemaSyncopeOperations.java | 54 +++ .../cli/commands/task/AbstractTaskCommand.java | 5 +- .../client/cli/commands/task/TaskDelete.java| 2 +- ..
syncope git commit: Fixed SYNCOPE-582
Repository: syncope Updated Branches: refs/heads/master 7a11bf3b9 -> 9a1474770 Fixed SYNCOPE-582 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/9a147477 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/9a147477 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/9a147477 Branch: refs/heads/master Commit: 9a1474770d0f77cd5655072e43280b2176cdc404 Parents: 7a11bf3 Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Oct 23 15:56:32 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Oct 23 15:56:32 2015 +0200 -- .../syncope/client/cli/AvailableServices.java | 31 - .../connector/AbstractConnectorCommand.java | 30 + .../commands/connector/ConnectorCommand.java| 123 +++ .../cli/commands/connector/ConnectorDelete.java | 62 ++ .../cli/commands/connector/ConnectorList.java | 32 + .../connector/ConnectorListBundles.java | 32 + .../ConnectorListConfigurationProperties.java | 58 + .../cli/commands/connector/ConnectorRead.java | 61 + .../connector/ConnectorReadByResource.java | 60 + .../connector/ConnectorResultManager.java | 114 + .../commands/policy/PolicyResultManager.java| 3 + .../client/cli/commands/report/ReportList.java | 2 +- .../client/cli/commands/report/ReportRead.java | 2 +- .../commands/report/ReportResultManager.java| 17 +-- 14 files changed, 586 insertions(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/9a147477/client/cli/src/main/java/org/apache/syncope/client/cli/AvailableServices.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/AvailableServices.java b/client/cli/src/main/java/org/apache/syncope/client/cli/AvailableServices.java deleted file mode 100644 index 7d326a8..000 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/AvailableServices.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -package org.apache.syncope.client.cli; - -public enum AvailableServices { - -logger, -config, -notification, -report, -policy, -entitlement, -schema; - -} http://git-wip-us.apache.org/repos/asf/syncope/blob/9a147477/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/AbstractConnectorCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/AbstractConnectorCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/AbstractConnectorCommand.java new file mode 100644 index 000..0605c46 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/connector/AbstractConnectorCommand.java @@ -0,0 +1,30 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.connector; + +import org.apache.syncope.client.cli.SyncopeServices; +import org.apache.syncope.common.rest.api.service.ConnectorSer
[2/2] syncope git commit: refactoring of the report stack , SYNCOPE-158
refactoring of the report stack , SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7a11bf3b Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7a11bf3b Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7a11bf3b Branch: refs/heads/master Commit: 7a11bf3b911a9ca96dcd4a9b15158dc1d47fd814 Parents: 73f73f2 Author: massi <massimiliano.perr...@tirasa.net> Authored: Fri Oct 23 12:11:56 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Fri Oct 23 12:11:56 2015 +0200 -- .../cli/commands/CommonsResultManager.java | 6 +- .../client/cli/commands/ReportCommand.java | 352 --- .../ConfigurationResultManager.java | 2 +- .../commands/logger/LoggerResultManager.java| 2 +- .../notification/NotificationDelete.java| 2 +- .../commands/policy/PolicyResultManager.java| 6 +- .../commands/report/AbstractReportCommand.java | 30 ++ .../cli/commands/report/ReportCommand.java | 137 .../cli/commands/report/ReportDelete.java | 58 +++ .../commands/report/ReportDeleteExecution.java | 61 .../cli/commands/report/ReportExecute.java | 64 .../commands/report/ReportExportExecution.java | 100 ++ .../client/cli/commands/report/ReportList.java | 33 ++ .../cli/commands/report/ReportListJobs.java | 35 ++ .../client/cli/commands/report/ReportRead.java | 59 .../commands/report/ReportReadExecution.java| 62 .../commands/report/ReportResultManager.java| 75 .../commands/schema/SchemaResultManager.java| 2 +- .../syncope/client/cli/messages/Messages.java | 94 - .../syncope/client/cli/messages/Table.java | 194 -- .../client/cli/messages/TwoColumnTable.java | 262 -- .../syncope/client/cli/view/Messages.java | 94 + .../apache/syncope/client/cli/view/Table.java | 194 ++ 23 files changed, 1014 insertions(+), 910 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/7a11bf3b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java index c316e13..7c17550 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java @@ -18,10 +18,14 @@ */ package org.apache.syncope.client.cli.commands; -import org.apache.syncope.client.cli.messages.Messages; +import org.apache.syncope.client.cli.view.Messages; public abstract class CommonsResultManager { +public void managerNumberFormatException(final String what, final String key) { +Messages.printIdNotNumberDeletedMessage(what, key); +} + public void deletedMessage(final String what, final String key) { Messages.printDeletedMessage(what, key); } http://git-wip-us.apache.org/repos/asf/syncope/blob/7a11bf3b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ReportCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ReportCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ReportCommand.java deleted file mode 100644 index 30be7fb..000 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/ReportCommand.java +++ /dev/null @@ -1,352 +0,0 @@ -/* - * 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. - */ -package org.apache.syncope.client.cli.commands; - -import java.io.IOException; -import java.io.SequenceInputStream; -import java.util.ArrayList; -import java.util.Arrays;
[2/2] syncope git commit: refactoring of the schema and notification stack + bugfixing, SYNCOPE-158
refactoring of the schema and notification stack + bugfixing, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/80f2548a Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/80f2548a Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/80f2548a Branch: refs/heads/master Commit: 80f2548a004db0970fbfbd0773a068a8f9c9a836 Parents: 171c0ae Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Oct 22 11:12:50 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Oct 22 11:12:50 2015 +0200 -- .../cli/commands/CommonsResultManager.java | 10 +- .../client/cli/commands/HelpCommand.java| 113 --- .../client/cli/commands/InfoCommand.java| 339 --- .../cli/commands/NotificationCommand.java | 169 - .../client/cli/commands/SchemaCommand.java | 309 - .../AbstractConfigurationCommand.java | 2 +- .../commands/domain/AbstractDomainCommand.java | 2 +- .../syncope/client/cli/commands/help/Help.java | 43 +++ .../client/cli/commands/help/HelpCommand.java | 90 + .../cli/commands/help/HelpResultManager.java| 25 ++ .../syncope/client/cli/commands/info/Info.java | 243 + .../client/cli/commands/info/InfoCommand.java | 180 ++ .../cli/commands/info/InfoResultManager.java| 25 ++ .../commands/logger/AbstractLoggerCommand.java | 2 +- .../cli/commands/logger/LoggerCreate.java | 4 +- .../cli/commands/logger/LoggerUpdate.java | 6 +- .../cli/commands/logger/LoggerUpdateAll.java| 6 +- .../AbstractNotificationCommand.java| 30 ++ .../notification/NotificationCommand.java | 109 ++ .../notification/NotificationDelete.java| 56 +++ .../commands/notification/NotificationList.java | 35 ++ .../commands/notification/NotificationRead.java | 54 +++ .../notification/NotificationResultManager.java | 25 ++ .../commands/schema/AbstractSchemaCommand.java | 30 ++ .../cli/commands/schema/SchemaCommand.java | 127 +++ .../cli/commands/schema/SchemaDelete.java | 64 .../client/cli/commands/schema/SchemaList.java | 70 .../cli/commands/schema/SchemaListAll.java | 55 +++ .../cli/commands/schema/SchemaListDerived.java | 40 +++ .../cli/commands/schema/SchemaListPlain.java| 40 +++ .../cli/commands/schema/SchemaListVirtual.java | 40 +++ .../client/cli/commands/schema/SchemaRead.java | 78 + .../commands/schema/SchemaResultManager.java| 96 ++ .../syncope/client/cli/messages/Table.java | 12 +- 34 files changed, 1585 insertions(+), 944 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/80f2548a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java index 255b99b..c316e13 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java @@ -19,8 +19,6 @@ package org.apache.syncope.client.cli.commands; import org.apache.syncope.client.cli.messages.Messages; -import org.apache.syncope.client.cli.util.CommandUtils; -import org.apache.syncope.common.lib.types.LoggerLevel; public abstract class CommonsResultManager { @@ -32,8 +30,12 @@ public abstract class CommonsResultManager { Messages.printNofFoundMessage(what, parameter); } -public void typeNotValidError(final String parameter) { -Messages.printTypeNotValidMessage("logger level", parameter, CommandUtils.fromEnumToArray(LoggerLevel.class)); +public void notBooleanDeletedError(final String what, final String key) { +Messages.printNotBooleanDeletedMessage(what, key); +} + +public void typeNotValidError(final String what, final String parameter, final String[] options) { +Messages.printTypeNotValidMessage(what, parameter, options); } public void commandOptionError(final String message) { http://git-wip-us.apache.org/repos/asf/syncope/blob/80f2548a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/HelpCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/HelpCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/HelpCommand.java deleted file mode 100644 index d167de4..000 --- a/client
[1/2] syncope git commit: refactoring of the schema and notification stack + bugfixing, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 171c0ae36 -> 80f2548a0 http://git-wip-us.apache.org/repos/asf/syncope/blob/80f2548a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/notification/NotificationDelete.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/notification/NotificationDelete.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/notification/NotificationDelete.java new file mode 100644 index 000..1e4b96d --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/notification/NotificationDelete.java @@ -0,0 +1,56 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.notification; + +import javax.xml.ws.WebServiceException; +import org.apache.syncope.client.cli.Input; +import org.apache.syncope.client.cli.messages.Messages; +import org.apache.syncope.common.lib.SyncopeClientException; + +public class NotificationDelete extends AbstractNotificationCommand { + +private static final String DELETE_HELP_MESSAGE = "notification --delete {NOTIFICATION-ID} {NOTIFICATION-ID} [...]"; + +private final Input input; + +public NotificationDelete(final Input input) { +this.input = input; +} + +public void delete() { +if (input.parameterNumber() >= 1) { +for (final String parameter : input.getParameters()) { +try { +notificationService.delete(Long.valueOf(parameter)); +notificationResultManager.deletedMessage("Notification", parameter); +} catch (final WebServiceException | SyncopeClientException ex) { +if (ex.getMessage().startsWith("NotFound")) { + notificationResultManager.notFoundError("Notification", parameter); +} else { +Messages.printMessage(ex.getMessage()); +} +} catch (final NumberFormatException ex) { + notificationResultManager.notBooleanDeletedError("notification", parameter); +} +} +} else { +notificationResultManager.commandOptionError(DELETE_HELP_MESSAGE); +} +} +} http://git-wip-us.apache.org/repos/asf/syncope/blob/80f2548a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/notification/NotificationList.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/notification/NotificationList.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/notification/NotificationList.java new file mode 100644 index 000..ff9561c --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/notification/NotificationList.java @@ -0,0 +1,35 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.notification; + +import org.apache.syncope.common.lib.SyncopeClientException; +import org.apache.syncope.common.lib.to.NotificationTO; + +public class NotificationList extends AbstractNotificationCommand { + +public void list() { +try { +for (final NotificationTO notificationTO : notificationService.list()) { +
[2/2] syncope git commit: refactoring of the policy stack , SYNCOPE-158
refactoring of the policy stack , SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/49313303 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/49313303 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/49313303 Branch: refs/heads/master Commit: 493133037c867b335f1e5f046bba8fa78ad40f55 Parents: 79d0316 Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Oct 22 15:45:18 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Oct 22 15:45:18 2015 +0200 -- .../commands/policy/AbstractPolicyCommand.java | 30 + .../cli/commands/policy/PolicyDelete.java | 59 + .../client/cli/commands/policy/PolicyList.java | 59 + .../client/cli/commands/policy/PolicyRead.java | 58 + .../commands/policy/PolicyResultManager.java| 120 +++ 5 files changed, 326 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/49313303/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/AbstractPolicyCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/AbstractPolicyCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/AbstractPolicyCommand.java new file mode 100644 index 000..0bab4e5 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/AbstractPolicyCommand.java @@ -0,0 +1,30 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.policy; + +import org.apache.syncope.client.cli.SyncopeServices; +import org.apache.syncope.common.rest.api.service.PolicyService; + +public abstract class AbstractPolicyCommand { + +protected final PolicyService policyService = SyncopeServices.get(PolicyService.class); + +protected final PolicyResultManager policyResultManager = new PolicyResultManager(); + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/49313303/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDelete.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDelete.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDelete.java new file mode 100644 index 000..15ffa8d --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/policy/PolicyDelete.java @@ -0,0 +1,59 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli.commands.policy; + +import javax.xml.ws.WebServiceException; +import org.apache.syncope.client.cli.Input; +import org.apache.syncope.common.lib.SyncopeClientException; + +public class PolicyDelete extends AbstractPolicyCommand { + +private static final String DELETE_HELP_MESSAGE = "policy --delete {POLICY-ID} {POLICY-ID} [...]"; + +private final Input input; + +public PolicyDelete(final Input input) { +this.input = input; +} + +public void delete() { +if (
[1/2] syncope git commit: refactoring of the policy stack , SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 15f6d19dc -> 493133037 refactoring of the policy stack , SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/79d03167 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/79d03167 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/79d03167 Branch: refs/heads/master Commit: 79d0316744dd868f3b9a489a4ead6885a8a8d65a Parents: 15f6d19 Author: massi <massimiliano.perr...@tirasa.net> Authored: Thu Oct 22 15:44:59 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Thu Oct 22 15:45:08 2015 +0200 -- .../client/cli/commands/PolicyCommand.java | 187 --- .../cli/commands/policy/PolicyCommand.java | 111 +++ 2 files changed, 111 insertions(+), 187 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/79d03167/client/cli/src/main/java/org/apache/syncope/client/cli/commands/PolicyCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/PolicyCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/PolicyCommand.java deleted file mode 100644 index fc3a8c0..000 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/PolicyCommand.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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. - */ -package org.apache.syncope.client.cli.commands; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.ws.WebServiceException; -import org.apache.commons.lang3.StringUtils; -import org.apache.syncope.client.cli.Command; -import org.apache.syncope.client.cli.Input; -import org.apache.syncope.client.cli.SyncopeServices; -import org.apache.syncope.client.cli.messages.Messages; -import org.apache.syncope.client.cli.util.CommandUtils; -import org.apache.syncope.common.lib.SyncopeClientException; -import org.apache.syncope.common.lib.policy.AbstractPolicyTO; -import org.apache.syncope.common.lib.types.PolicyType; -import org.apache.syncope.common.rest.api.service.PolicyService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -@Command(name = "policy") -public class PolicyCommand extends AbstractCommand { - -private static final Logger LOG = LoggerFactory.getLogger(PolicyCommand.class); - -private static final String HELP_MESSAGE = "Usage: policy [options]\n" -+ " Options:\n" -+ "--help \n" -+ "--list-policy \n" -+ " Syntax: --list-policy {POLICY-TYPE} \n" -+ " Policy type: ACCOUNT / PASSWORD / SYNC / PUSH\n" -+ "--read \n" -+ " Syntax: --read {POLICY-ID} {POLICY-ID} [...]\n" -+ "--delete \n" -+ " Syntax: --delete {POLICY-ID} {POLICY-ID} [...]"; - -@Override -public void execute(final Input input) { -LOG.debug("Option: {}", input.getOption()); -LOG.debug("Parameters:"); -for (final String parameter : input.getParameters()) { -LOG.debug(" > " + parameter); -} - -final String[] parameters = input.getParameters(); - -if (StringUtils.isBlank(input.getOption())) { -input.setOption(Options.HELP.getOptionName()); -} - -final PolicyService policyService = SyncopeServices.get(PolicyService.class); -switch (Options.fromName(input.getOption())) { -case LIST_POLICY: -final String listPolicyErrorMessage = "policy --list-policy {POLICY-TYPE}\n" -+ " Policy type: ACCOUNT / PASSWORD / SYNC / PUSH"; - -if (parameters.length == 1) { -try { -for (final AbstractP
syncope git commit: refactoring of installation process, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 3f58b93c1 -> 4f543e8c0 refactoring of installation process, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/4f543e8c Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/4f543e8c Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/4f543e8c Branch: refs/heads/master Commit: 4f543e8c045edf6a321a1ac2bcf4b4ac7755b620 Parents: 3f58b93 Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 21 12:28:40 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 21 12:28:40 2015 +0200 -- .../cli/commands/install/InstallCommand.java| 215 +-- .../commands/install/InstallResultManager.java | 72 +++ .../cli/commands/install/InstallSetup.java | 161 ++ 3 files changed, 235 insertions(+), 213 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/4f543e8c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallCommand.java index 533c1ce..0caba9f 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallCommand.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallCommand.java @@ -18,21 +18,11 @@ */ package org.apache.syncope.client.cli.commands.install; -import java.io.FileNotFoundException; -import java.io.UnsupportedEncodingException; -import java.net.ConnectException; -import java.net.UnknownHostException; -import java.util.Scanner; -import javax.ws.rs.ProcessingException; import org.apache.commons.lang3.StringUtils; import org.apache.syncope.client.cli.Command; import org.apache.syncope.client.cli.Input; -import org.apache.syncope.client.cli.SyncopeServices; import org.apache.syncope.client.cli.commands.AbstractCommand; import org.apache.syncope.client.cli.commands.logger.LoggerCommand; -import org.apache.syncope.client.cli.util.FileSystemUtils; -import org.apache.syncope.client.cli.util.JasyptUtils; -import org.apache.syncope.common.rest.api.service.SyncopeService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -46,222 +36,21 @@ public class InstallCommand extends AbstractCommand { + "--help \n" + "--setup"; -private String syncopeAdminUser; - -private String syncopeAdminPassword; - -private String syncopeServerSchema; - -private String syncopeServerHostname = "localhost"; - -private String syncopeServerPort = "8080"; - -private String syncopeServerRestContext = "/syncope/rest/"; - @Override public void execute(final Input input) { -LOG.debug("Option: {}", input.getOption()); -LOG.debug("Parameters:"); -for (final String parameter : input.getParameters()) { -LOG.debug(" > " + parameter); -} - if (StringUtils.isBlank(input.getOption())) { input.setOption(Options.HELP.getOptionName()); } switch (Options.fromName(input.getOption())) { case INSTALL: -final Scanner scanIn = new Scanner(System.in); - -System.out.println(""); - System.out.println("###"); -System.out.println("# #"); -System.out.println("# Welcome to Syncope CLI installation process #"); -System.out.println("# #"); - System.out.println("###"); -System.out.println(""); - -System.out.println("Path to config files of Syncope CLI client will be: " -+ InstallConfigFileTemplate.DIR_PATH); - -if (!FileSystemUtils.canWrite(InstallConfigFileTemplate.DIR_PATH)) { -System.out.println("Permission denied on " + InstallConfigFileTemplate.DIR_PATH); -break; -} -System.out.println("- File system permission checked"); -System.out.println(""); - -System.out.println("Syncope server schema [http/https]:"); -String syncope
syncope git commit: Massi remember that you have to add the licence header to the files, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 4f543e8c0 -> 469b7497c Massi remember that you have to add the licence header to the files, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/469b7497 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/469b7497 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/469b7497 Branch: refs/heads/master Commit: 469b7497c989ca9a892065ac81ac664a71790f01 Parents: 4f543e8 Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 21 12:34:57 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 21 12:34:57 2015 +0200 -- .../commands/install/InstallResultManager.java| 18 ++ .../client/cli/commands/install/InstallSetup.java | 18 ++ 2 files changed, 36 insertions(+) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/469b7497/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java index 994aca6..8b96ae0 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallResultManager.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package org.apache.syncope.client.cli.commands.install; import java.net.ConnectException; http://git-wip-us.apache.org/repos/asf/syncope/blob/469b7497/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java index 2a4079e..1486b48 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/install/InstallSetup.java @@ -1,3 +1,21 @@ +/* + * 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. + */ package org.apache.syncope.client.cli.commands.install; import java.io.FileNotFoundException;
syncope git commit: Fixed SYNCOPE-713
Repository: syncope Updated Branches: refs/heads/master 6b9cd592b -> 3f58b93c1 Fixed SYNCOPE-713 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/3f58b93c Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/3f58b93c Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/3f58b93c Branch: refs/heads/master Commit: 3f58b93c195d2d80f010b3362aa8d445cfff6970 Parents: 6b9cd59 Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 21 12:13:45 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 21 12:13:45 2015 +0200 -- .../configuration/ConfigurationGet.java | 2 +- .../console/rest/ConfigurationRestClient.java | 15 -- .../apache/syncope/common/lib/to/ConfTO.java| 30 .../rest/api/service/ConfigurationService.java | 4 +-- .../syncope/core/logic/ConfigurationLogic.java | 8 +++--- .../api/data/ConfigurationDataBinder.java | 4 +-- .../java/data/ConfigurationDataBinderImpl.java | 21 +++--- .../cxf/service/ConfigurationServiceImpl.java | 4 +-- .../fit/core/reference/ConfigurationITCase.java | 6 ++-- 9 files changed, 31 insertions(+), 63 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/3f58b93c/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java index 91f3dce..472e40f 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/configuration/ConfigurationGet.java @@ -27,7 +27,7 @@ public class ConfigurationGet extends AbstractConfigurationCommand { public void get() { try { -configurationResultManager.fromGet(new LinkedList<>(configurationService.list().getPlainAttrs())); +configurationResultManager.fromGet(new LinkedList<>(configurationService.list())); } catch (final Exception ex) { configurationResultManager.genericError(ex.getMessage()); } http://git-wip-us.apache.org/repos/asf/syncope/blob/3f58b93c/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java -- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java index ade9408..c24cf53 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/ConfigurationRestClient.java @@ -18,14 +18,12 @@ */ package org.apache.syncope.client.console.rest; -import java.util.Iterator; import java.util.List; import javax.ws.rs.core.Response; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.syncope.client.console.commons.AttrLayoutType; import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.AttrTO; -import org.apache.syncope.common.lib.to.ConfTO; import org.apache.syncope.common.rest.api.service.ConfigurationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -38,19 +36,18 @@ public class ConfigurationRestClient extends BaseRestClient { @Autowired private SchemaRestClient schemaRestClient; -public ConfTO list() { -ConfTO conf = getService(ConfigurationService.class).list(); +public List list() { +final List attrTOs = getService(ConfigurationService.class).list(); -for (Iterator it = conf.getPlainAttrs().iterator(); it.hasNext();) { -AttrTO attr = it.next(); +for (AttrTO attrTO : attrTOs) { for (AttrLayoutType type : AttrLayoutType.values()) { -if (type.getConfKey().equals(attr.getSchema())) { -it.remove(); +if (type.getConfKey().equals(attrTO.getSchema())) { +attrTOs.remove(attrTO); } } } -return conf; +return attrTOs; } public AttrTO get(final String key) { http://git-wip-us.apache.org/repos/asf/syncope/blob/3f58b93c/common/lib/src/main/java/org/apache/syncop
[1/2] syncope git commit: refactoring of the domain stack, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 469b7497c -> 171c0ae36 refactoring of the domain stack, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/dfc1df48 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/dfc1df48 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/dfc1df48 Branch: refs/heads/master Commit: dfc1df48398e9b1421d23c1fb2ab8c3c6cb03ad8 Parents: 469b749 Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 21 13:28:46 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 21 13:28:46 2015 +0200 -- .../syncope/client/cli/ResultManager.java | 25 +++ .../apache/syncope/client/cli/SyncopeAdm.java | 9 +- .../cli/commands/CommonsResultManager.java | 2 +- .../client/cli/commands/DomainCommand.java | 165 --- .../cli/commands/NotificationCommand.java | 2 +- .../client/cli/commands/PolicyCommand.java | 2 +- .../client/cli/commands/ReportCommand.java | 2 +- .../client/cli/commands/SchemaCommand.java | 1 - .../client/cli/commands/TaskCommand.java| 2 +- .../configuration/ConfigurationCommand.java | 4 - .../configuration/ConfigurationDelete.java | 4 +- .../configuration/ConfigurationExport.java | 12 +- .../configuration/ConfigurationGet.java | 2 +- .../configuration/ConfigurationRead.java| 2 +- .../configuration/ConfigurationUpdate.java | 6 +- .../commands/domain/AbstractDomainCommand.java | 30 .../cli/commands/domain/DomainCommand.java | 101 .../cli/commands/domain/DomainDelete.java | 53 ++ .../client/cli/commands/domain/DomainList.java | 38 + .../client/cli/commands/domain/DomainRead.java | 53 ++ .../commands/domain/DomainResultManager.java| 25 +++ .../cli/commands/install/InstallCommand.java| 5 - .../cli/commands/install/InstallSetup.java | 3 + .../cli/commands/logger/LoggerDelete.java | 2 +- .../client/cli/commands/logger/LoggerList.java | 2 +- .../client/cli/commands/logger/LoggerRead.java | 2 +- .../cli/commands/logger/LoggerUpdate.java | 4 +- .../cli/commands/logger/LoggerUpdateAll.java| 2 +- 28 files changed, 357 insertions(+), 203 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/dfc1df48/client/cli/src/main/java/org/apache/syncope/client/cli/ResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/ResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/ResultManager.java new file mode 100644 index 000..de3d0f1 --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/ResultManager.java @@ -0,0 +1,25 @@ +/* + * 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. + */ +package org.apache.syncope.client.cli; + +import org.apache.syncope.client.cli.commands.CommonsResultManager; + +public class ResultManager extends CommonsResultManager { + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/dfc1df48/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java index b5a1365..ea11a22 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java @@ -20,7 +20,6 @@ package org.apache.syncope.client.cli; import javax.ws.rs.ProcessingException; import org.apache.syncope.client.cli.commands.AbstractCommand; -import org.apache.syncope.client.cli.commands.logger.LoggerResultManager; import org.apache.syncope.client.cli.util.CommandUtils; import org.slf4j.Logger; import org.slf4j.Logg
[2/2] syncope git commit: refactoring of the domain stack, SYNCOPE-158
refactoring of the domain stack, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/171c0ae3 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/171c0ae3 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/171c0ae3 Branch: refs/heads/master Commit: 171c0ae360d913c20c846a4a17983e5ca1540002 Parents: dfc1df4 Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 21 13:29:56 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 21 13:29:56 2015 +0200 -- .../main/java/org/apache/syncope/client/cli/SyncopeAdm.java | 8 1 file changed, 4 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/171c0ae3/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java index ea11a22..7308c57 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java @@ -28,7 +28,7 @@ public final class SyncopeAdm { private static final Logger LOG = LoggerFactory.getLogger(SyncopeAdm.class); -private static final ResultManager resultManager = new ResultManager(); +private static final ResultManager RESULT_MANAGER = new ResultManager(); public static void main(final String[] args) { LOG.debug("Starting with args \n"); @@ -50,12 +50,12 @@ public final class SyncopeAdm { System.out.println(helpMessage()); } catch (final IllegalArgumentException ex) { LOG.error("Error in main", ex); -resultManager.generic(ex.getMessage()); +RESULT_MANAGER.generic(ex.getMessage()); if (!ex.getMessage().startsWith("It seems you")) { System.out.println(helpMessage()); } } catch (final ProcessingException e) { -resultManager.generic("Syncope server offline", e.getCause().getMessage()); +RESULT_MANAGER.generic("Syncope server offline", e.getCause().getMessage()); } } @@ -73,7 +73,7 @@ public final class SyncopeAdm { helpMessageBuilder.append("\n"); } } catch (final IllegalAccessException | IllegalArgumentException | InstantiationException ex) { -resultManager.generic(ex.getMessage()); +RESULT_MANAGER.generic(ex.getMessage()); } return helpMessageBuilder.toString();
syncope git commit: refactoring for configuration stack, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 462289dce -> 6b9cd592b refactoring for configuration stack, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/6b9cd592 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/6b9cd592 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/6b9cd592 Branch: refs/heads/master Commit: 6b9cd592b21440d54fabd6012616c4f6a18a81f3 Parents: 462289d Author: massi <massimiliano.perr...@tirasa.net> Authored: Wed Oct 21 10:54:47 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Wed Oct 21 10:54:47 2015 +0200 -- .../apache/syncope/client/cli/SyncopeAdm.java | 8 +- .../cli/commands/CommonsResultManager.java | 50 .../cli/commands/ConfigurationCommand.java | 297 --- .../AbstractConfigurationCommand.java | 30 ++ .../configuration/ConfigurationCommand.java | 124 .../configuration/ConfigurationDelete.java | 57 .../configuration/ConfigurationExport.java | 71 + .../configuration/ConfigurationGet.java | 36 +++ .../configuration/ConfigurationRead.java| 62 .../ConfigurationResultManager.java | 53 .../configuration/ConfigurationUpdate.java | 76 + .../commands/logger/AbstractLoggerCommand.java | 2 +- .../cli/commands/logger/LoggerCommand.java | 3 +- .../cli/commands/logger/LoggerCreate.java | 6 +- .../cli/commands/logger/LoggerDelete.java | 15 +- .../client/cli/commands/logger/LoggerList.java | 4 +- .../client/cli/commands/logger/LoggerRead.java | 8 +- .../commands/logger/LoggerResultManager.java| 61 .../cli/commands/logger/LoggerUpdate.java | 12 +- .../cli/commands/logger/LoggerUpdateAll.java| 8 +- .../cli/commands/logger/ResultManager.java | 79 - 21 files changed, 649 insertions(+), 413 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/6b9cd592/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java index 78e2f54..b5a1365 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java @@ -20,7 +20,7 @@ package org.apache.syncope.client.cli; import javax.ws.rs.ProcessingException; import org.apache.syncope.client.cli.commands.AbstractCommand; -import org.apache.syncope.client.cli.commands.logger.ResultManager; +import org.apache.syncope.client.cli.commands.logger.LoggerResultManager; import org.apache.syncope.client.cli.util.CommandUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,12 +49,12 @@ public final class SyncopeAdm { System.out.println(helpMessage()); } catch (final IllegalArgumentException ex) { LOG.error("Error in main", ex); -new ResultManager().genericError(ex.getMessage()); +new LoggerResultManager().genericError(ex.getMessage()); if (!ex.getMessage().startsWith("It seems you")) { System.out.println(helpMessage()); } } catch (final ProcessingException e) { -new ResultManager().genericError("Syncope server offline", e.getCause().getMessage()); +new LoggerResultManager().genericError("Syncope server offline", e.getCause().getMessage()); } } @@ -72,7 +72,7 @@ public final class SyncopeAdm { helpMessageBuilder.append("\n"); } } catch (final IllegalAccessException | IllegalArgumentException | InstantiationException ex) { -new ResultManager().genericError(ex.getMessage()); +new LoggerResultManager().genericError(ex.getMessage()); } return helpMessageBuilder.toString(); http://git-wip-us.apache.org/repos/asf/syncope/blob/6b9cd592/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java new file mode 100644 index 000..9bfde8d --- /dev/null +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/CommonsResultManager.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one
[2/3] syncope git commit: introduced table view to print results (logger stack), SYNCOPE-158
introduced table view to print results (logger stack), SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/47392366 Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/47392366 Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/47392366 Branch: refs/heads/master Commit: 47392366e6f2cd04a8d016ef74f2bda408c86fe4 Parents: 2a99db9 Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Oct 20 14:53:16 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Oct 20 14:53:16 2015 +0200 -- .../org/apache/syncope/client/cli/Input.java| 4 + .../apache/syncope/client/cli/SyncopeAdm.java | 8 + .../client/cli/commands/AbstractCommand.java| 19 -- .../cli/commands/ConfigurationCommand.java | 124 - .../client/cli/commands/DomainCommand.java | 1 + .../client/cli/commands/HelpCommand.java| 4 +- .../client/cli/commands/InfoCommand.java| 7 +- .../client/cli/commands/LoggerCommand.java | 267 --- .../client/cli/commands/PolicyCommand.java | 3 +- .../client/cli/commands/ReportCommand.java | 3 +- .../client/cli/commands/SchemaCommand.java | 16 +- .../client/cli/commands/TaskCommand.java| 6 +- .../cli/commands/install/InstallCommand.java| 2 +- .../commands/logger/AbstractLoggerCommand.java | 30 +++ .../cli/commands/logger/LoggerCommand.java | 128 + .../cli/commands/logger/LoggerCreate.java | 71 + .../cli/commands/logger/LoggerDelete.java | 63 + .../client/cli/commands/logger/LoggerList.java | 38 +++ .../client/cli/commands/logger/LoggerRead.java | 63 + .../cli/commands/logger/LoggerUpdate.java | 78 ++ .../cli/commands/logger/LoggerUpdateAll.java| 69 + .../cli/commands/logger/ResultManager.java | 60 + .../syncope/client/cli/messages/Messages.java | 14 +- .../syncope/client/cli/messages/Table.java | 190 + .../client/cli/messages/TwoColumnTable.java | 262 ++ .../syncope/client/cli/util/CommandUtils.java | 20 +- 26 files changed, 1172 insertions(+), 378 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/47392366/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java b/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java index 6e2aeeb..c53eefd 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/Input.java @@ -72,6 +72,10 @@ public class Input { return parameters[parameters.length - 1]; } +public int parameterNumber() { +return parameters.length; +} + public PairParameter toPairParameter(final String parameter) throws IllegalArgumentException { if (!parameter.contains("=")) { throw new IllegalArgumentException("Parameter syntax error!"); http://git-wip-us.apache.org/repos/asf/syncope/blob/47392366/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java index d503498..e62e818 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java @@ -35,6 +35,14 @@ public final class SyncopeAdm { ArgsManager.validator(args); final Input input = new Input(args); final AbstractCommand command = input.getCommand(); + +LOG.debug("Command: {}", command.getClass().getAnnotation(Command.class).name()); +LOG.debug("Option: {}", input.getOption()); +LOG.debug("Parameters:"); +for (final String parameter : input.getParameters()) { +LOG.debug(" > " + parameter); +} + command.execute(input); } catch (final IllegalAccessException | InstantiationException e) { System.out.println(helpMessage()); http://git-wip-us.apache.org/repos/asf/syncope/blob/47392366/client/cli/src/main/java/org/apache/syncope/client/cli/commands/AbstractCommand.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/AbstractCommand.java b/client/cli/src/main/java/org/apache/syn
syncope git commit: Managed error messages from Logger stack and managed server down exception, SYNCOPE-158
Repository: syncope Updated Branches: refs/heads/master 5ebdcf7f5 -> 462289dce Managed error messages from Logger stack and managed server down exception, SYNCOPE-158 Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/462289dc Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/462289dc Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/462289dc Branch: refs/heads/master Commit: 462289dce937d9590947d1d9141bd75804288f03 Parents: 5ebdcf7 Author: massi <massimiliano.perr...@tirasa.net> Authored: Tue Oct 20 17:35:26 2015 +0200 Committer: massi <massimiliano.perr...@tirasa.net> Committed: Tue Oct 20 17:35:26 2015 +0200 -- .../apache/syncope/client/cli/SyncopeAdm.java| 9 ++--- .../client/cli/commands/logger/LoggerCreate.java | 7 ++- .../client/cli/commands/logger/LoggerDelete.java | 7 +++ .../client/cli/commands/logger/LoggerList.java | 3 +-- .../client/cli/commands/logger/LoggerRead.java | 7 +++ .../client/cli/commands/logger/LoggerUpdate.java | 14 +- .../cli/commands/logger/LoggerUpdateAll.java | 10 +++--- .../cli/commands/logger/ResultManager.java | 19 +++ .../syncope/client/cli/messages/Table.java | 2 +- 9 files changed, 43 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/syncope/blob/462289dc/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java index e62e818..78e2f54 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/SyncopeAdm.java @@ -18,8 +18,9 @@ */ package org.apache.syncope.client.cli; +import javax.ws.rs.ProcessingException; import org.apache.syncope.client.cli.commands.AbstractCommand; -import org.apache.syncope.client.cli.messages.Messages; +import org.apache.syncope.client.cli.commands.logger.ResultManager; import org.apache.syncope.client.cli.util.CommandUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,10 +49,12 @@ public final class SyncopeAdm { System.out.println(helpMessage()); } catch (final IllegalArgumentException ex) { LOG.error("Error in main", ex); -Messages.printMessage(ex.getMessage()); +new ResultManager().genericError(ex.getMessage()); if (!ex.getMessage().startsWith("It seems you")) { System.out.println(helpMessage()); } +} catch (final ProcessingException e) { +new ResultManager().genericError("Syncope server offline", e.getCause().getMessage()); } } @@ -69,7 +72,7 @@ public final class SyncopeAdm { helpMessageBuilder.append("\n"); } } catch (final IllegalAccessException | IllegalArgumentException | InstantiationException ex) { -Messages.printMessage(ex.getMessage()); +new ResultManager().genericError(ex.getMessage()); } return helpMessageBuilder.toString(); http://git-wip-us.apache.org/repos/asf/syncope/blob/462289dc/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java -- diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java index 1444938..d70aad1 100644 --- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java +++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/logger/LoggerCreate.java @@ -21,8 +21,6 @@ package org.apache.syncope.client.cli.commands.logger; import java.util.LinkedList; import javax.xml.ws.WebServiceException; import org.apache.syncope.client.cli.Input; -import org.apache.syncope.client.cli.messages.Messages; -import org.apache.syncope.client.cli.util.CommandUtils; import org.apache.syncope.common.lib.SyncopeClientException; import org.apache.syncope.common.lib.to.LoggerTO; import org.apache.syncope.common.lib.types.LoggerLevel; @@ -54,8 +52,7 @@ public class LoggerCreate extends AbstractLoggerCommand { loggerService.update(LoggerType.LOG, loggerTO); loggerTOs.add(loggerTO); } catch (final WebServiceException | SyncopeClientException | IllegalArgumentException ex) { -Messages.printTypeNotV