You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by il...@apache.org on 2018/09/25 12:32:32 UTC
[34/34] syncope git commit: [SYNCOPE-1369] Flowable support
refactored as extension + code review (now with variable cleanup)
[SYNCOPE-1369] Flowable support refactored as extension + code review (now with variable cleanup)
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/66b3a04e
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/66b3a04e
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/66b3a04e
Branch: refs/heads/2_1_X
Commit: 66b3a04eefea6c23a3f364fbf159bee7c7a00b1f
Parents: 8c103a8
Author: Francesco Chicchiriccò <il...@apache.org>
Authored: Tue Sep 25 14:16:59 2018 +0200
Committer: Francesco Chicchiriccò <il...@apache.org>
Committed: Tue Sep 25 14:31:46 2018 +0200
----------------------------------------------------------------------
archetype/pom.xml | 4 -
.../archetype-resources/console/pom.xml | 87 +-
.../resources/archetype-resources/core/pom.xml | 4 +-
archetype/src/main/resources/meta-pom.xml | 6 -
.../syncope/client/cli/commands/info/Info.java | 12 -
.../client/cli/commands/info/InfoCommand.java | 4 -
.../cli/commands/info/InfoResultManager.java | 9 -
.../commands/self/AbstractWorkflowCommand.java | 27 -
.../cli/commands/self/WorkflowCommand.java | 97 --
.../commands/self/WorkflowExportDefinition.java | 61 -
.../commands/self/WorkflowExportDiagram.java | 70 -
.../commands/self/WorkflowResultManager.java | 25 -
.../self/WorkflowSyncopeOperations.java | 41 -
.../cli/src/main/resources/messages.properties | 1 -
.../client/cli/util/CommandUtilsTest.java | 2 +-
.../console/SyncopeConsoleApplication.java | 54 +-
.../client/console/annotations/Resource.java | 41 +
.../client/console/approvals/Approval.java | 206 ---
.../console/approvals/ApprovalDetails.java | 63 -
.../approvals/ApprovalDirectoryPanel.java | 358 -----
.../client/console/approvals/ApprovalModal.java | 82 -
.../client/console/commons/Constants.java | 2 -
.../init/ClassPathScanImplementationLookup.java | 56 +-
.../syncope/client/console/pages/Approvals.java | 41 -
.../syncope/client/console/pages/BasePage.java | 52 +-
.../console/pages/FlowableModelerPopupPage.java | 27 -
.../syncope/client/console/pages/Workflow.java | 64 -
.../console/panels/NewWorkflowProcess.java | 87 --
.../panels/ParametersDirectoryPanel.java | 1 -
.../client/console/panels/TogglePanel.java | 6 -
.../console/panels/WorkflowDirectoryPanel.java | 333 ----
.../resources/AbstractWorkflowResource.java | 51 -
.../console/resources/FilesystemResource.java | 79 -
.../resources/WorkflowDefGETResource.java | 58 -
.../resources/WorkflowDefPUTResource.java | 74 -
.../console/rest/UserWorkflowRestClient.java | 59 -
.../client/console/rest/WorkflowRestClient.java | 73 -
.../wicket/markup/html/form/ActionLink.java | 4 +-
.../html/form/ActionLinksTogglePanel.java | 8 +-
.../wicket/markup/html/form/ActionPanel.java | 2 +-
.../client/console/widgets/ApprovalsWidget.java | 128 --
.../client/console/widgets/ExtAlertWidget.java | 30 +
.../src/main/resources/console.properties | 3 -
.../client/console/approvals/Approval.html | 31 -
.../console/approvals/Approval.properties | 18 -
.../console/approvals/ApprovalDetails.html | 23 -
.../client/console/approvals/ApprovalModal.html | 23 -
.../console/approvals/ApprovalModal.properties | 17 -
.../approvals/ApprovalModal_it.properties | 17 -
.../approvals/ApprovalModal_ja.properties | 17 -
.../approvals/ApprovalModal_pt_BR.properties | 17 -
.../approvals/ApprovalModal_ru.properties | 17 -
.../console/approvals/Approval_it.properties | 18 -
.../console/approvals/Approval_ja.properties | 18 -
.../console/approvals/Approval_pt_BR.properties | 18 -
.../console/approvals/Approval_ru.properties | 20 -
.../syncope/client/console/pages/Approvals.html | 35 -
.../client/console/pages/Approvals.properties | 34 -
.../console/pages/Approvals_it.properties | 34 -
.../console/pages/Approvals_ja.properties | 34 -
.../console/pages/Approvals_pt_BR.properties | 34 -
.../console/pages/Approvals_ru.properties | 52 -
.../syncope/client/console/pages/BasePage.html | 5 +-
.../console/pages/FlowableModelerPopupPage.html | 28 -
.../syncope/client/console/pages/Workflow.html | 37 -
.../client/console/pages/Workflow.properties | 19 -
.../client/console/pages/Workflow_it.properties | 19 -
.../client/console/pages/Workflow_ja.properties | 19 -
.../console/pages/Workflow_pt_BR.properties | 19 -
.../client/console/pages/Workflow_ru.properties | 19 -
.../console/panels/NewWorkflowProcess.html | 32 -
.../console/panels/WorkflowDirectoryPanel.html | 23 -
.../client/console/panels/empty.bpmn20.xml | 49 -
.../markup/html/form/ActionPanel.properties | 6 +-
.../markup/html/form/ActionPanel_it.properties | 6 +-
.../markup/html/form/ActionPanel_ja.properties | 6 +-
.../html/form/ActionPanel_pt_BR.properties | 6 +-
.../markup/html/form/ActionPanel_ru.properties | 6 +-
.../console/widgets/ApprovalsWidget.properties | 21 -
.../widgets/ApprovalsWidget_it.properties | 21 -
.../widgets/ApprovalsWidget_ja.properties | 21 -
.../widgets/ApprovalsWidget_pt_BR.properties | 21 -
.../widgets/ApprovalsWidget_ru.properties | 22 -
.../enduser/SyncopeEnduserApplication.java | 10 +-
.../syncope/common/lib/PropertyUtils.java | 17 +-
.../lib/report/ReconciliationReportletConf.java | 1 -
.../common/lib/report/UserReportletConf.java | 1 -
.../common/lib/to/WorkflowDefinitionTO.java | 71 -
.../common/lib/to/WorkflowFormPropertyTO.java | 124 --
.../syncope/common/lib/to/WorkflowFormTO.java | 147 --
.../syncope/common/lib/to/WorkflowTaskTO.java | 40 -
.../common/lib/types/StandardEntitlement.java | 18 -
.../lib/types/WorkflowFormPropertyType.java | 32 -
.../syncope/common/lib/types/WorkflowTasks.java | 47 -
.../org/apache/syncope/common/lib/JSONTest.java | 10 +-
.../rest/api/beans/WorkflowFormQuery.java | 32 -
.../common/rest/api/service/AnyService.java | 3 +
.../api/service/SecurityQuestionService.java | 2 +-
.../rest/api/service/UserWorkflowService.java | 118 --
.../rest/api/service/WorkflowService.java | 121 --
.../core/logic/SecurityQuestionLogic.java | 6 +-
.../syncope/core/logic/UserWorkflowLogic.java | 137 --
.../syncope/core/logic/WorkflowLogic.java | 113 --
.../core/persistence/api/dao/AnyDAO.java | 2 -
.../core/persistence/api/entity/Any.java | 4 -
.../core/persistence/api/entity/user/User.java | 9 -
.../persistence/jpa/dao/AbstractAnyDAO.java | 18 -
.../persistence/jpa/dao/JPAAnyObjectDAO.java | 4 +-
.../core/persistence/jpa/dao/JPAGroupDAO.java | 4 +-
.../jpa/dao/JPASecurityQuestionDAO.java | 10 +-
.../core/persistence/jpa/dao/JPAUserDAO.java | 4 +-
.../persistence/jpa/entity/AbstractAny.java | 12 -
.../jpa/entity/JPAEntityFactory.java | 1 +
.../jpa/entity/JPASecurityQuestion.java | 47 -
.../persistence/jpa/entity/conf/JPAConf.java | 10 -
.../jpa/entity/user/JPASecurityQuestion.java | 48 +
.../persistence/jpa/entity/user/JPAUser.java | 45 -
...ltiJarAwarePersistenceUnitPostProcessor.java | 6 +-
.../main/resources/domains/MasterContent.xml | 15 +-
.../jpa/inner/ImplementationTest.java | 4 +-
.../persistence/jpa/inner/MultitenancyTest.java | 2 +-
.../persistence/jpa/inner/PlainSchemaTest.java | 2 +-
.../core/persistence/jpa/inner/TaskTest.java | 2 +-
.../test/resources/domains/MasterContent.xml | 27 +-
.../src/test/resources/domains/TwoContent.xml | 14 -
core/pom.xml | 1 -
.../provisioning/api/event/AnyDeletedEvent.java | 8 +
.../java/job/IdentityRecertification.java | 126 --
.../job/report/ReconciliationReportlet.java | 5 -
.../java/job/report/UserReportlet.java | 5 -
.../cxf/service/UserWorkflowServiceImpl.java | 70 -
.../rest/cxf/service/WorkflowServiceImpl.java | 83 -
.../core/spring/security/AuthContextUtils.java | 29 +-
.../core/spring/security/SecureRandomUtils.java | 4 +
core/upgrade/src/main/resources/schema.xml | 5 -
.../core/upgrade/GeneratedUpgradeSQLTest.java | 2 +-
core/upgrade/src/test/resources/syncopedb20.sql | 76 +-
.../workflow/api/AnyObjectWorkflowAdapter.java | 9 -
.../api/AnyObjectWorkflowDefinitionAdapter.java | 22 -
.../core/workflow/api/GroupWorkflowAdapter.java | 9 -
.../api/GroupWorkflowDefinitionAdapter.java | 22 -
.../core/workflow/api/UserWorkflowAdapter.java | 18 -
.../api/UserWorkflowDefinitionAdapter.java | 22 -
.../core/workflow/api/WorkflowAdapter.java | 50 -
.../workflow/api/WorkflowDefinitionAdapter.java | 64 -
.../workflow/api/WorkflowDefinitionFormat.java | 29 -
core/workflow-flowable/pom.xml | 82 -
.../flowable/FlowableDefinitionLoader.java | 92 --
.../workflow/flowable/FlowableDeployUtils.java | 92 --
.../flowable/FlowableUserWorkflowAdapter.java | 1035 -------------
.../core/workflow/flowable/FlowableUtils.java | 31 -
.../flowable/SyncopeEntitiesVariableType.java | 35 -
.../flowable/SyncopeGroupQueryImpl.java | 89 --
.../flowable/SyncopeIdmIdentityService.java | 51 -
.../core/workflow/flowable/SyncopeSession.java | 26 -
.../flowable/SyncopeSessionFactory.java | 46 -
.../workflow/flowable/SyncopeUserQueryImpl.java | 101 --
.../flowable/spring/DomainProcessEngine.java | 114 --
.../spring/DomainProcessEngineFactoryBean.java | 111 --
.../task/AbstractFlowableServiceTask.java | 45 -
.../workflow/flowable/task/AutoActivate.java | 60 -
.../core/workflow/flowable/task/Create.java | 52 -
.../core/workflow/flowable/task/Delete.java | 41 -
.../workflow/flowable/task/GenerateToken.java | 44 -
.../core/workflow/flowable/task/Notify.java | 65 -
.../workflow/flowable/task/PasswordReset.java | 71 -
.../core/workflow/flowable/task/Reactivate.java | 29 -
.../core/workflow/flowable/task/Recertify.java | 58 -
.../core/workflow/flowable/task/Suspend.java | 29 -
.../core/workflow/flowable/task/Update.java | 54 -
.../src/main/resources/userWorkflow.bpmn20.xml | 287 ----
.../src/main/resources/workflow.properties | 21 -
.../main/resources/workflowFlowableContext.xml | 63 -
.../java/AbstractAnyObjectWorkflowAdapter.java | 4 +-
.../java/AbstractGroupWorkflowAdapter.java | 3 +-
.../java/AbstractUserWorkflowAdapter.java | 16 +-
.../java/DefaultAnyObjectWorkflowAdapter.java | 68 -
.../java/DefaultGroupWorkflowAdapter.java | 67 -
.../java/DefaultUserWorkflowAdapter.java | 70 -
deb/console/pom.xml | 5 +
deb/core/pom.xml | 4 +-
docker/console/pom.xml | 4 -
docker/console/src/main/resources/Dockerfile | 1 -
.../main/resources/console.properties.template | 2 -
ext/camel/persistence-jpa/pom.xml | 2 +-
.../rest/api/service/CamelRouteService.java | 2 +-
.../client/ElasticsearchUtils.java | 4 +-
ext/flowable/client-console/pom.xml | 137 ++
.../client/console/approvals/Approval.java | 206 +++
.../console/approvals/ApprovalDetails.java | 63 +
.../approvals/ApprovalDirectoryPanel.java | 355 +++++
.../client/console/approvals/ApprovalModal.java | 82 +
.../syncope/client/console/pages/Approvals.java | 41 +
.../syncope/client/console/pages/Flowable.java | 67 +
.../console/pages/FlowableModelerPopupPage.java | 27 +
.../panels/BpmnProcessDirectoryPanel.java | 308 ++++
.../client/console/panels/NewBpmnProcess.java | 87 ++
.../resources/AbstractBpmnProcessResource.java | 51 +
.../resources/BpmnProcessGETResource.java | 56 +
.../resources/BpmnProcessPUTResource.java | 73 +
.../console/rest/BpmnProcessRestClient.java | 72 +
.../console/rest/UserRequestRestClient.java | 54 +
.../rest/UserWorkflowTaskRestClient.java | 34 +
.../client/console/widgets/ApprovalsWidget.java | 130 ++
.../src/main/resources/app-cfg.js | 25 +
.../client/console/approvals/Approval.html | 31 +
.../console/approvals/Approval.properties | 18 +
.../console/approvals/ApprovalDetails.html | 23 +
.../client/console/approvals/ApprovalModal.html | 23 +
.../console/approvals/ApprovalModal.properties | 17 +
.../approvals/ApprovalModal_it.properties | 17 +
.../approvals/ApprovalModal_ja.properties | 17 +
.../approvals/ApprovalModal_pt_BR.properties | 17 +
.../approvals/ApprovalModal_ru.properties | 17 +
.../console/approvals/Approval_it.properties | 18 +
.../console/approvals/Approval_ja.properties | 18 +
.../console/approvals/Approval_pt_BR.properties | 18 +
.../console/approvals/Approval_ru.properties | 20 +
.../syncope/client/console/pages/Approvals.html | 35 +
.../client/console/pages/Approvals.properties | 34 +
.../console/pages/Approvals_it.properties | 34 +
.../console/pages/Approvals_ja.properties | 34 +
.../console/pages/Approvals_pt_BR.properties | 34 +
.../console/pages/Approvals_ru.properties | 52 +
.../syncope/client/console/pages/Flowable.html | 37 +
.../client/console/pages/Flowable.properties | 19 +
.../console/pages/FlowableModelerPopupPage.html | 28 +
.../client/console/pages/Flowable_it.properties | 19 +
.../client/console/pages/Flowable_ja.properties | 19 +
.../console/pages/Flowable_pt_BR.properties | 19 +
.../client/console/pages/Flowable_ru.properties | 19 +
.../panels/BpmnProcessDirectoryPanel.html | 23 +
.../client/console/panels/NewBpmnProcess.html | 32 +
.../client/console/panels/empty.bpmn20.xml | 49 +
.../console/widgets/ApprovalsWidget.properties | 21 +
.../widgets/ApprovalsWidget_it.properties | 21 +
.../widgets/ApprovalsWidget_ja.properties | 21 +
.../widgets/ApprovalsWidget_pt_BR.properties | 21 +
.../widgets/ApprovalsWidget_ru.properties | 22 +
.../src/main/resources/save-model.html | 132 ++
.../src/main/resources/toolbar.js | 181 +++
.../src/main/resources/url-config.js | 39 +
ext/flowable/common-lib/pom.xml | 56 +
.../syncope/common/lib/to/BpmnProcessTO.java | 72 +
.../syncope/common/lib/to/UserRequestForm.java | 147 ++
.../common/lib/to/UserRequestFormProperty.java | 124 ++
.../syncope/common/lib/to/UserRequestTO.java | 70 +
.../syncope/common/lib/to/WorkflowTask.java | 40 +
.../common/lib/to/WorkflowTaskExecInput.java | 55 +
.../common/lib/types/BpmnProcessFormat.java | 29 +
.../common/lib/types/FlowableEntitlement.java | 76 +
.../lib/types/UserRequestFormPropertyType.java | 32 +
.../syncope/common/lib/types/WorkflowTasks.java | 47 +
ext/flowable/flowable-bpmn/pom.xml | 87 ++
.../core/flowable/api/BpmnProcessManager.java | 65 +
.../core/flowable/api/UserRequestHandler.java | 108 ++
.../core/flowable/api/WorkflowTaskManager.java | 70 +
.../impl/FlowableBpmnProcessManager.java | 212 +++
.../core/flowable/impl/FlowableDeployUtils.java | 92 ++
.../flowable/impl/FlowableRuntimeUtils.java | 225 +++
.../impl/FlowableUserRequestHandler.java | 574 +++++++
.../impl/FlowableUserWorkflowAdapter.java | 488 ++++++
.../flowable/impl/FlowableWorkflowUtils.java | 47 +
.../flowable/impl/SyncopeTaskQueryImpl.java | 49 +
.../flowable/support/DomainProcessEngine.java | 114 ++
.../DomainProcessEngineConfiguration.java | 32 +
.../support/DomainProcessEngineFactoryBean.java | 112 ++
.../support/SyncopeEntitiesVariableType.java | 35 +
.../flowable/support/SyncopeGroupQueryImpl.java | 89 ++
.../support/SyncopeIdmIdentityService.java | 51 +
.../core/flowable/support/SyncopeSession.java | 26 +
.../flowable/support/SyncopeSessionFactory.java | 46 +
.../flowable/support/SyncopeUserQueryImpl.java | 101 ++
.../task/AbstractFlowableServiceTask.java | 45 +
.../core/flowable/task/AutoActivate.java | 60 +
.../syncope/core/flowable/task/Create.java | 55 +
.../syncope/core/flowable/task/Delete.java | 41 +
.../core/flowable/task/GenerateToken.java | 44 +
.../syncope/core/flowable/task/Notify.java | 64 +
.../core/flowable/task/PasswordReset.java | 70 +
.../syncope/core/flowable/task/Reactivate.java | 29 +
.../syncope/core/flowable/task/Suspend.java | 29 +
.../syncope/core/flowable/task/Update.java | 58 +
.../org/apache/syncope/ext/flowable/Task.xml | 1418 ++++++++++++++++++
.../apache/syncope/ext/flowable/mappings.xml | 73 +
.../src/main/resources/userWorkflow.bpmn20.xml | 228 +++
.../src/main/resources/workflow.properties | 21 +
.../main/resources/workflowFlowableContext.xml | 62 +
ext/flowable/logic/pom.xml | 61 +
.../syncope/core/logic/BpmnProcessLogic.java | 73 +
.../syncope/core/logic/UserRequestLogic.java | 160 ++
.../core/logic/UserWorkflowTaskLogic.java | 91 ++
.../syncope/core/logic/init/FlowableLoader.java | 98 ++
ext/flowable/pom.xml | 49 +
ext/flowable/rest-api/pom.xml | 76 +
.../rest/api/beans/UserRequestFormQuery.java | 32 +
.../rest/api/service/BpmnProcessService.java | 108 ++
.../rest/api/service/UserRequestService.java | 125 ++
.../api/service/UserWorkflowTaskService.java | 67 +
ext/flowable/rest-cxf/pom.xml | 72 +
.../cxf/service/BpmnProcessServiceImpl.java | 82 +
.../cxf/service/UserRequestServiceImpl.java | 73 +
.../service/UserWorkflowTaskServiceImpl.java | 45 +
.../client/console/pages/OIDCClient.java | 3 +-
ext/oidcclient/persistence-jpa/pom.xml | 2 +-
.../rest/api/service/OIDCClientService.java | 2 +-
.../rest/api/service/OIDCProviderService.java | 2 +-
ext/pom.xml | 1 +
.../syncope/client/console/pages/SAML2SP.java | 2 +-
.../syncope/core/logic/init/SAML2SPLoader.java | 7 +-
ext/saml2sp/persistence-jpa/pom.xml | 2 +-
.../rest/api/service/SAML2IdPService.java | 2 +-
.../common/rest/api/service/SAML2SPService.java | 2 +-
.../client/console/pages/SCIMConfPage.java | 2 +-
.../rest/api/service/SCIMConfService.java | 2 +-
fit/console-reference/pom.xml | 65 +-
.../src/main/resources/app-cfg.js | 25 -
.../src/main/resources/console.properties | 3 -
.../src/main/resources/save-model.html | 132 --
.../src/main/resources/toolbar.js | 181 ---
.../src/main/resources/url-config.js | 39 -
.../src/test/resources/hotswap-agent.properties | 1 +
fit/core-reference/pom.xml | 16 +-
.../fit/core/reference/AssignDirectorGroup.java | 63 +
.../src/main/resources/all/workflow.properties | 2 +-
.../main/resources/all/workflowTestContext.xml | 27 +
.../resources/directorGroupRequest.bpmn20.xml | 104 ++
.../src/main/resources/userWorkflow.bpmn20.xml | 726 +++++----
.../org/apache/syncope/fit/AbstractITCase.java | 16 +-
.../apache/syncope/fit/FlowableDetector.java | 10 +-
.../syncope/fit/console/AjaxBrowseITCase.java | 7 -
.../syncope/fit/core/AuthenticationITCase.java | 10 +-
.../syncope/fit/core/BpmnProcessITCase.java | 72 +
.../syncope/fit/core/MultitenancyITCase.java | 4 +-
.../apache/syncope/fit/core/PullTaskITCase.java | 2 +-
.../org/apache/syncope/fit/core/RoleITCase.java | 7 +-
.../syncope/fit/core/SchedTaskITCase.java | 26 -
.../org/apache/syncope/fit/core/UserITCase.java | 6 +-
.../syncope/fit/core/UserRequestITCase.java | 144 ++
.../apache/syncope/fit/core/UserSelfITCase.java | 352 ++++-
.../syncope/fit/core/UserWorkflowITCase.java | 361 -----
.../apache/syncope/fit/core/WorkflowITCase.java | 74 -
.../src/test/resources/addFlowableToContent.xsl | 10 +-
.../src/test/resources/console.properties | 3 -
.../src/test/resources/hotswap-agent.properties | 11 +-
.../syncope/installer/files/ConsolePom.java | 86 +-
.../apache/syncope/installer/files/CorePom.java | 6 +-
.../installer/processes/ArchetypeProcess.java | 28 +-
.../installer/processes/ContainerProcess.java | 33 +-
.../main/resources/izpack/ProcessPanel.Spec.xml | 51 +-
.../main/resources/izpack/userInputLang.xml_eng | 1 -
.../main/resources/izpack/userInputLang.xml_ita | 1 -
.../src/main/resources/izpack/userInputSpec.xml | 3 -
pom.xml | 1 -
.../reference-guide/concepts/workflow.adoc | 55 -
.../workingwithapachesyncope/customization.adoc | 15 +-
.../configurationparameters.adoc | 2 -
.../systemadministration/flowablemodeler.adoc | 46 -
.../systemadministration.adoc | 2 -
359 files changed, 11558 insertions(+), 9696 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/archetype/pom.xml
----------------------------------------------------------------------
diff --git a/archetype/pom.xml b/archetype/pom.xml
index ad9180c..d0bbd78 100644
--- a/archetype/pom.xml
+++ b/archetype/pom.xml
@@ -244,10 +244,6 @@ under the License.
<targetPath>${project.build.outputDirectory}/archetype-resources/console/src/main/resources</targetPath>
<includes>
<include>log4j2.xml</include>
- <include>save-model.html</include>
- <include>app-cfg.js</include>
- <include>url-config.js</include>
- <include>toolbar.js</include>
</includes>
</resource>
<resource>
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/archetype/src/main/resources/archetype-resources/console/pom.xml
----------------------------------------------------------------------
diff --git a/archetype/src/main/resources/archetype-resources/console/pom.xml b/archetype/src/main/resources/archetype-resources/console/pom.xml
index 51cec9b..fb5724c 100644
--- a/archetype/src/main/resources/archetype-resources/console/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/console/pom.xml
@@ -122,6 +122,12 @@ under the License.
<dependencies>
<dependency>
+ <groupId>org.apache.syncope.ext.flowable</groupId>
+ <artifactId>syncope-ext-flowable-client-console</artifactId>
+ <version>${syncope.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.syncope.ext.camel</groupId>
<artifactId>syncope-ext-camel-client-console</artifactId>
<version>${syncope.version}</version>
@@ -144,90 +150,9 @@ under the License.
<artifactId>syncope-ext-scimv2-client-console</artifactId>
<version>${syncope.version}</version>
</dependency>
-
- <dependency>
- <groupId>org.flowable</groupId>
- <artifactId>flowable-ui-modeler-app</artifactId>
- <type>war</type>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <inherited>true</inherited>
- <executions>
- <execution>
- <id>setupFlowableModeler</id>
- <phase>process-resources</phase>
- <configuration>
- <target>
- <unzip src="${settings.localRepository}/org/flowable/flowable-ui-modeler-app/${flowable.version}/flowable-ui-modeler-app-${flowable.version}.war"
- dest="${flowable-modeler.directory}">
- <patternset>
- <include name="WEB-INF/classes/static/**"/>
- <include name="WEB-INF/lib/flowable-ui-modeler-logic-${flowable.version}.jar"/>
- </patternset>
- </unzip>
-
- <unzip src="${flowable-modeler.directory}/WEB-INF/lib/flowable-ui-modeler-logic-${flowable.version}.jar"
- dest="${flowable-modeler.directory}">
- <patternset>
- <include name="stencilset_bpmn.json"/>
- </patternset>
- </unzip>
-
- <move todir="${flowable-modeler.directory}">
- <fileset dir="${flowable-modeler.directory}/WEB-INF/classes/static/">
- <include name="**"/>
- </fileset>
- </move>
- <delete dir="${flowable-modeler.directory}/WEB-INF"/>
-
- <replace file="${flowable-modeler.directory}/index.html"
- token="</head>"
- value="<script type="text/javascript">window.onunload = refreshParent; function refreshParent() { window.opener.location.reload(); }</script></head>"/>
- <replace file="${flowable-modeler.directory}/index.html"
- token=" ng-click="backToLanding()""
- value=" disabled="disabled""/>
- <replace file="${flowable-modeler.directory}/index.html"
- token="<ul class="nav navbar-nav" id="main-nav""
- value="<ul class="nav navbar-nav" id="main-nav" style="display: none;""/>
- <replace file="${flowable-modeler.directory}/index.html"
- token="<div class="pull-right"
- value="<div style="display: none;" class="pull-right"/>
- <replace file="${flowable-modeler.directory}/editor-app/editor.html"
- token="<div class="btn-group pull-right""
- value="<div style="display: none;" class="btn-group pull-right""/>
- <replace file="${flowable-modeler.directory}/editor-app/configuration/toolbar-default-actions.js"
- token="$location.path('/processes');"
- value="window.close();"/>
-
- <copy file="${basedir}/src/main/resources/app-cfg.js"
- todir="${flowable-modeler.directory}/scripts"
- overwrite="true"/>
- <copy file="${basedir}/src/main/resources/url-config.js"
- todir="${flowable-modeler.directory}/editor-app/configuration"
- overwrite="true"/>
- <copy file="${basedir}/src/main/resources/toolbar.js"
- todir="${flowable-modeler.directory}/editor-app/configuration"
- overwrite="true"/>
- <copy file="${basedir}/src/main/resources/save-model.html"
- todir="${flowable-modeler.directory}/editor-app/popups"
- overwrite="true"/>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
-
<resources>
<resource>
<directory>src/main/resources</directory>
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/archetype/src/main/resources/archetype-resources/core/pom.xml
----------------------------------------------------------------------
diff --git a/archetype/src/main/resources/archetype-resources/core/pom.xml b/archetype/src/main/resources/archetype-resources/core/pom.xml
index f248d9a..f951894 100644
--- a/archetype/src/main/resources/archetype-resources/core/pom.xml
+++ b/archetype/src/main/resources/archetype-resources/core/pom.xml
@@ -160,8 +160,8 @@ under the License.
<dependencies>
<dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-workflow-flowable</artifactId>
+ <groupId>org.apache.syncope.ext.flowable</groupId>
+ <artifactId>syncope-ext-flowable-rest-cxf</artifactId>
<version>${syncope.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/archetype/src/main/resources/meta-pom.xml
----------------------------------------------------------------------
diff --git a/archetype/src/main/resources/meta-pom.xml b/archetype/src/main/resources/meta-pom.xml
index 0b163ae..d68a0d0 100644
--- a/archetype/src/main/resources/meta-pom.xml
+++ b/archetype/src/main/resources/meta-pom.xml
@@ -69,12 +69,6 @@ under the License.
<artifactId>syncope-core-persistence-jpa</artifactId>
<version>${syncope.version}</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.syncope.core</groupId>
- <artifactId>syncope-core-workflow-flowable</artifactId>
- <version>${syncope.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.syncope.client</groupId>
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/Info.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/Info.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/Info.java
index 8167cc5..91cb879 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/Info.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/Info.java
@@ -82,18 +82,6 @@ public class Info {
}
}
- public void workflowAdapter() {
- try {
- infoResultManager.printWorkflowAdapter(
- platformInfo.getAnyObjectWorkflowAdapter(),
- platformInfo.getUserWorkflowAdapter(),
- platformInfo.getGroupWorkflowAdapter());
- } catch (final Exception ex) {
- LOG.error("Information error", ex);
- infoResultManager.genericError(ex.getMessage());
- }
- }
-
public void accountRules() {
platformInfo.getJavaImplInfo(ImplementationType.ACCOUNT_RULE).ifPresent(info -> {
try {
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java
index 28559be..460d54a 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoCommand.java
@@ -52,9 +52,6 @@ public class InfoCommand extends AbstractCommand {
case PROVISIONING_MANAGER:
info.provisioningManager();
break;
- case WORKFLOW_ADAPTER:
- info.workflowAdapter();
- break;
case ACCOUNT_RULES:
info.accountRules();
break;
@@ -122,7 +119,6 @@ public class InfoCommand extends AbstractCommand {
PWD_RESET_WITH_SECURITY_QUESTION("--pwd-reset-with-question"),
SELF_REG_ALLOWED("--self-reg-allowed"),
PROVISIONING_MANAGER("--provisioning-manager-classes"),
- WORKFLOW_ADAPTER("--workflow-adapter-classes"),
ACCOUNT_RULES("--account-rules-classes"),
CONNID_LOCATION("--connid-locations"),
RECON_FILTER_BUILDERS("--reconciliation-filter-builders"),
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoResultManager.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoResultManager.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoResultManager.java
index d19b0ae..65ba206 100644
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoResultManager.java
+++ b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/info/InfoResultManager.java
@@ -48,15 +48,6 @@ public class InfoResultManager extends CommonsResultManager {
"Group provisioning manager class: " + getGroupProvisioningManager);
}
- public void printWorkflowAdapter(final String anyObjectWorkflowAdapter,
- final String userWorkflowAdapter,
- final String groupWorkflowAdapter) {
- genericMessage(
- "Any object workflow adapter class: " + anyObjectWorkflowAdapter,
- "User workflow adapter class: " + userWorkflowAdapter,
- "Group workflow adapter class: " + groupWorkflowAdapter);
- }
-
public void printAccountRules(final Collection<String> rules) {
rules.forEach(accountRule -> {
genericMessage("Account rule: " + accountRule);
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/AbstractWorkflowCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/AbstractWorkflowCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/AbstractWorkflowCommand.java
deleted file mode 100644
index b21abf3..0000000
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/AbstractWorkflowCommand.java
+++ /dev/null
@@ -1,27 +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.self;
-
-public abstract class AbstractWorkflowCommand {
-
- protected final WorkflowResultManager workflowResultManager = new WorkflowResultManager();
-
- protected final WorkflowSyncopeOperations workflowSyncopeOperations = new WorkflowSyncopeOperations();
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowCommand.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowCommand.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowCommand.java
deleted file mode 100644
index 215c865..0000000
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowCommand.java
+++ /dev/null
@@ -1,97 +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.self;
-
-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 = "workflow")
-public class WorkflowCommand extends AbstractCommand {
-
- private final WorkflowResultManager workflowResultManager = new WorkflowResultManager();
-
- @Override
- public void execute(final Input input) {
- if (StringUtils.isBlank(input.getOption())) {
- input.setOption(UserWorkflowOptions.HELP.getOptionName());
- }
-
- switch (UserWorkflowOptions.fromName(input.getOption())) {
- case EXPORT_DIAGRAM:
- new WorkflowExportDiagram(input).export();
- break;
- case EXPORT_DEFINITION:
- new WorkflowExportDefinition(input).export();
- break;
- case HELP:
- System.out.println(getHelpMessage());
- break;
- default:
- workflowResultManager.defaultOptionMessage(input.getOption(), getHelpMessage());
- }
- }
-
- @Override
- public String getHelpMessage() {
- return workflowResultManager.commandHelpMessage(getClass());
- }
-
- private enum UserWorkflowOptions {
-
- HELP("--help"),
- EXPORT_DIAGRAM("--export-diagram"),
- EXPORT_DEFINITION("--export-definition");
-
- private final String optionName;
-
- UserWorkflowOptions(final String optionName) {
- this.optionName = optionName;
- }
-
- public String getOptionName() {
- return optionName;
- }
-
- public boolean equalsOptionName(final String otherName) {
- return (otherName == null) ? false : optionName.equals(otherName);
- }
-
- public static UserWorkflowOptions fromName(final String name) {
- UserWorkflowOptions optionToReturn = HELP;
- for (final UserWorkflowOptions option : UserWorkflowOptions.values()) {
- if (option.equalsOptionName(name)) {
- optionToReturn = option;
- }
- }
- return optionToReturn;
- }
-
- public static List<String> toList() {
- final List<String> options = new ArrayList<>();
- for (final UserWorkflowOptions value : values()) {
- options.add(value.getOptionName());
- }
- return options;
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowExportDefinition.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowExportDefinition.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowExportDefinition.java
deleted file mode 100644
index b855ae0..0000000
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowExportDefinition.java
+++ /dev/null
@@ -1,61 +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.self;
-
-import javax.xml.ws.WebServiceException;
-import org.apache.syncope.client.cli.Input;
-import org.apache.syncope.client.cli.util.CommandUtils;
-import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class WorkflowExportDefinition extends AbstractWorkflowCommand {
-
- private static final Logger LOG = LoggerFactory.getLogger(WorkflowExportDefinition.class);
-
- private static final String EXPORT_HELP_MESSAGE = "workflow --export-definition {ANY-TYPE-KIND}\n";
-
- private final Input input;
-
- public WorkflowExportDefinition(final Input input) {
- this.input = input;
- }
-
- public void export() {
- if (input.parameterNumber() == 1) {
- try {
- workflowSyncopeOperations.exportDefinition(input.firstParameter());
- } catch (final SyncopeClientException | WebServiceException ex) {
- LOG.error("Error", ex);
- if (ex.getMessage().startsWith("NotFound")) {
- workflowResultManager.notFoundError("Workflow", input.firstParameter());
- } else {
- workflowResultManager.genericError(ex.getMessage());
- }
- } catch (final IllegalArgumentException ex) {
- LOG.error("Error", ex);
- workflowResultManager.typeNotValidError(
- "workflow", input.firstParameter(), CommandUtils.fromEnumToArray(AnyTypeKind.class));
- }
- } else {
- workflowResultManager.commandOptionError(EXPORT_HELP_MESSAGE);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowExportDiagram.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowExportDiagram.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowExportDiagram.java
deleted file mode 100644
index 80b6e41..0000000
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowExportDiagram.java
+++ /dev/null
@@ -1,70 +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.self;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import javax.ws.rs.core.Response;
-import javax.xml.ws.WebServiceException;
-import org.apache.cxf.helpers.IOUtils;
-import org.apache.syncope.client.cli.Input;
-import org.apache.syncope.client.cli.util.CommandUtils;
-import org.apache.syncope.common.lib.SyncopeClientException;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-
-public class WorkflowExportDiagram extends AbstractWorkflowCommand {
-
- private static final String EXPORT_HELP_MESSAGE = "workflow --export-diagram {ANY-TYPE-KIND}\n";
-
- private final Input input;
-
- public WorkflowExportDiagram(final Input input) {
- this.input = input;
- }
-
- public void export() {
- if (input.parameterNumber() == 1) {
- try {
- final Response response = workflowSyncopeOperations.exportDiagram(input.firstParameter());
- final byte[] diagram = IOUtils.readBytesFromStream((InputStream) response.getEntity());
- try (final OutputStream os = Files.newOutputStream(Paths.get("/tmp/diagram.png"))) {
- os.write(diagram);
- os.close();
- }
- workflowResultManager.genericMessage("Diagram created: /tmp/diagram.png");
- } catch (final SyncopeClientException | WebServiceException ex) {
- if (ex.getMessage().startsWith("NotFound")) {
- workflowResultManager.notFoundError("Workflow", input.firstParameter());
- } else {
- workflowResultManager.genericError(ex.getMessage());
- }
- } catch (final IllegalArgumentException ex) {
- workflowResultManager.typeNotValidError(
- "workflow", input.firstParameter(), CommandUtils.fromEnumToArray(AnyTypeKind.class));
- } catch (final IOException ex) {
- workflowResultManager.genericError(ex.getMessage());
- }
- } else {
- workflowResultManager.commandOptionError(EXPORT_HELP_MESSAGE);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/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
deleted file mode 100644
index f46be07..0000000
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowResultManager.java
+++ /dev/null
@@ -1,25 +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.self;
-
-import org.apache.syncope.client.cli.commands.CommonsResultManager;
-
-public class WorkflowResultManager extends CommonsResultManager {
-
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowSyncopeOperations.java
----------------------------------------------------------------------
diff --git a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowSyncopeOperations.java b/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowSyncopeOperations.java
deleted file mode 100644
index 45025d4..0000000
--- a/client/cli/src/main/java/org/apache/syncope/client/cli/commands/self/WorkflowSyncopeOperations.java
+++ /dev/null
@@ -1,41 +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.self;
-
-import javax.ws.rs.core.Response;
-import org.apache.cxf.jaxrs.client.WebClient;
-import org.apache.syncope.client.cli.SyncopeServices;
-import org.apache.syncope.common.rest.api.RESTHeaders;
-import org.apache.syncope.common.rest.api.service.WorkflowService;
-
-public class WorkflowSyncopeOperations {
-
- private static final String DEFAULT = "userWorkflow";
-
- private final WorkflowService workflowService = SyncopeServices.get(WorkflowService.class);
-
- public Response exportDiagram(final String anyType) {
- WebClient.client(workflowService).accept(RESTHeaders.MEDIATYPE_IMAGE_PNG);
- return workflowService.exportDiagram(anyType, DEFAULT);
- }
-
- public Response exportDefinition(final String anyType) {
- return workflowService.get(anyType, DEFAULT);
- }
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/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 48cdc15..7bd62fa 100644
--- a/client/cli/src/main/resources/messages.properties
+++ b/client/cli/src/main/resources/messages.properties
@@ -31,5 +31,4 @@ role.help.message=\nUsage: role [options]\n Options:\n --help \n --detail
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}\n Schema 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 / PULL\n --list-running-jobs \n --list-scheduled-jobs \n --read \n Syntax: --read {TASK-TYPE} {TASK-KEY}\n Task type: PROPAGATION / NOTIFICATION / SCHEDULED / PULL / PUSH\n --delete \n Syntax: --delete {TASK-KEY} {TASK-KEY} [...]\n --delete-all-prop\n --delete-execution \n Syntax: --delete-execution {TASK-EXEC-KEY} {TASK-EXEC-KEY} [...]\n --execute \n Syntax: --execute {TASK-KEY} {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}\n --get-username\n Syntax: --get-username {USER-KEY}\n --read-by-userkey \n Syntax: --read-by-userkey {USER-KEY} {USER-KEY} [...]\n --read-by-username\n Syntax: --read-by-username {USERNAME} {USERNAME} [...]\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-KEY}\n --search-by-resource \n Syntax: --search-by-resource {REALM} {RESOURCE-KEY}\n --delete \n Syntax: --delete {USER-KEY} {USER-KEY} [...]\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}\n Any type kind: ANY_OBJECT / USER / GROUP\n --export-definition {ANY-TYPE-KIND}\n Any type kind: ANY_OBJECT / USER / GROUP\n
migrate.help.message=\nUsage: migrate [options]\n Options:\n --help \n --conf {SRC} {DST}\n Syncope 1.2.X content.xml SRC absolute path\n Syncope 2.0.X *Content.xml DST absolute path\n
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java
----------------------------------------------------------------------
diff --git a/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java b/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java
index 2b3c2ae..c752738 100644
--- a/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java
+++ b/client/cli/src/test/java/org/apache/syncope/client/cli/util/CommandUtilsTest.java
@@ -49,6 +49,6 @@ public class CommandUtilsTest {
public void commands() throws Exception {
List<AbstractCommand> commands = CommandUtils.commands();
assertFalse(commands.isEmpty());
- assertEquals(21, commands.size());
+ assertEquals(20, commands.size());
}
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
index 4ff40d2..cb866c0 100644
--- a/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
+++ b/client/console/src/main/java/org/apache/syncope/client/console/SyncopeConsoleApplication.java
@@ -35,6 +35,7 @@ import org.apache.commons.collections4.ListUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.ClassUtils;
import org.apache.commons.lang3.StringUtils;
+import org.apache.syncope.client.console.annotations.Resource;
import org.apache.syncope.client.console.commons.Constants;
import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup;
import org.apache.syncope.client.console.init.ConsoleInitializer;
@@ -42,9 +43,6 @@ import org.apache.syncope.client.console.pages.BasePage;
import org.apache.syncope.client.console.pages.Dashboard;
import org.apache.syncope.client.console.pages.MustChangePassword;
import org.apache.syncope.client.console.pages.Login;
-import org.apache.syncope.client.console.resources.FilesystemResource;
-import org.apache.syncope.client.console.resources.WorkflowDefGETResource;
-import org.apache.syncope.client.console.resources.WorkflowDefPUTResource;
import org.apache.syncope.client.console.themes.AdminLTE;
import org.apache.syncope.client.lib.AnonymousAuthenticationHandler;
import org.apache.syncope.client.lib.SyncopeClientFactoryBean;
@@ -61,6 +59,7 @@ import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDa
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.protocol.http.CsrfPreventionRequestCycleListener;
import org.apache.wicket.protocol.http.WebApplication;
+import org.apache.wicket.request.resource.AbstractResource;
import org.apache.wicket.request.resource.IResource;
import org.apache.wicket.request.resource.ResourceReference;
import org.apache.wicket.resource.DynamicJQueryResourceReference;
@@ -79,8 +78,6 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
Locale.ENGLISH, Locale.ITALIAN, new Locale("pt", "BR"), new Locale("ru"), Locale.JAPANESE
}));
- private static final String FLOWABLE_MODELER_CONTEXT = "flowable-modeler";
-
public static SyncopeConsoleApplication get() {
return (SyncopeConsoleApplication) WebApplication.get();
}
@@ -91,8 +88,6 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
private String anonymousKey;
- private String flowableModelerDirectory;
-
private String reconciliationReportKey;
private String scheme;
@@ -203,9 +198,6 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
mountPage("/login", getSignInPageClass());
- flowableModelerDirectory = props.getProperty("flowableModelerDirectory");
- Args.notNull(flowableModelerDirectory, "<flowableModelerDirectory>");
-
try {
reconciliationReportKey = props.getProperty("reconciliationReportKey");
} catch (NumberFormatException e) {
@@ -213,34 +205,24 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
}
Args.notNull(reconciliationReportKey, "<reconciliationReportKey>");
- mountResource("/" + FLOWABLE_MODELER_CONTEXT, new ResourceReference(FLOWABLE_MODELER_CONTEXT) {
+ for (Class<? extends AbstractResource> resource : lookup.getResources()) {
+ Resource annotation = resource.getAnnotation(Resource.class);
+ try {
+ AbstractResource instance = resource.getDeclaredConstructor().newInstance();
- private static final long serialVersionUID = -128426276529456602L;
+ mountResource(annotation.path(), new ResourceReference(annotation.key()) {
- @Override
- public IResource getResource() {
- return new FilesystemResource(FLOWABLE_MODELER_CONTEXT, flowableModelerDirectory);
- }
+ private static final long serialVersionUID = -128426276529456602L;
- });
- mountResource("/workflowDefGET", new ResourceReference("workflowDefGET") {
-
- private static final long serialVersionUID = -128426276529456602L;
-
- @Override
- public IResource getResource() {
- return new WorkflowDefGETResource();
- }
- });
- mountResource("/workflowDefPUT", new ResourceReference("workflowDefPUT") {
-
- private static final long serialVersionUID = -128426276529456602L;
-
- @Override
- public IResource getResource() {
- return new WorkflowDefPUTResource();
+ @Override
+ public IResource getResource() {
+ return instance;
+ }
+ });
+ } catch (Exception e) {
+ LOG.error("Could not instantiate {}", resource.getName(), e);
}
- });
+ }
// enable component path
if (getDebugSettings().isAjaxDebugModeEnabled()) {
@@ -282,10 +264,6 @@ public class SyncopeConsoleApplication extends AuthenticatedWebApplication {
return anonymousKey;
}
- public String getFlowableModelerDirectory() {
- return flowableModelerDirectory;
- }
-
public String getReconciliationReportKey() {
return reconciliationReportKey;
}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/console/src/main/java/org/apache/syncope/client/console/annotations/Resource.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/annotations/Resource.java b/client/console/src/main/java/org/apache/syncope/client/console/annotations/Resource.java
new file mode 100644
index 0000000..ebdba59
--- /dev/null
+++ b/client/console/src/main/java/org/apache/syncope/client/console/annotations/Resource.java
@@ -0,0 +1,41 @@
+/*
+ * 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.console.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target({ ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Resource {
+
+ /**
+ * @return string for {@link org.apache.wicket.request.resource.ResourceReference#ResourceReference}
+ */
+ String key();
+
+ /**
+ * @return path for{@link org.apache.wicket.protocol.http.WebApplication#mountResource}
+ */
+ String path();
+}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java b/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
deleted file mode 100644
index c34fb00..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/Approval.java
+++ /dev/null
@@ -1,206 +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.console.approvals;
-
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.commons.lang3.time.FastDateFormat;
-import org.apache.syncope.client.console.commons.MapChoiceRenderer;
-import org.apache.syncope.client.console.panels.MultilevelPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDropDownChoicePanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxSpinnerFieldPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxTextFieldPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.AjaxDateTimeFieldPanel;
-import org.apache.syncope.client.console.wicket.markup.html.form.FieldPanel;
-import org.apache.syncope.common.lib.to.WorkflowFormPropertyTO;
-import org.apache.syncope.common.lib.to.WorkflowFormTO;
-import org.apache.syncope.common.lib.types.StandardEntitlement;
-import org.apache.wicket.PageReference;
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.AjaxLink;
-import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy;
-import org.apache.wicket.markup.html.list.ListItem;
-import org.apache.wicket.markup.html.list.ListView;
-import org.apache.wicket.markup.html.panel.Panel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.LoadableDetachableModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.PropertyModel;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public abstract class Approval extends Panel {
-
- private static final long serialVersionUID = -8847854414429745216L;
-
- protected static final Logger LOG = LoggerFactory.getLogger(Approval.class);
-
- public Approval(final PageReference pageRef, final WorkflowFormTO formTO) {
- super(MultilevelPanel.FIRST_LEVEL_ID);
-
- IModel<List<WorkflowFormPropertyTO>> formProps = new LoadableDetachableModel<List<WorkflowFormPropertyTO>>() {
-
- private static final long serialVersionUID = 3169142472626817508L;
-
- @Override
- protected List<WorkflowFormPropertyTO> load() {
- return formTO.getProperties();
- }
- };
-
- final ListView<WorkflowFormPropertyTO> propView = new ListView<WorkflowFormPropertyTO>("propView", formProps) {
-
- private static final long serialVersionUID = 9101744072914090143L;
-
- @Override
- @SuppressWarnings({ "unchecked", "rawtypes" })
- protected void populateItem(final ListItem<WorkflowFormPropertyTO> item) {
- final WorkflowFormPropertyTO prop = item.getModelObject();
-
- String label = StringUtils.isBlank(prop.getName()) ? prop.getId() : prop.getName();
-
- FieldPanel field;
- switch (prop.getType()) {
- case Boolean:
- field = new AjaxDropDownChoicePanel("value", label, new PropertyModel<String>(prop, "value") {
-
- private static final long serialVersionUID = -3743432456095828573L;
-
- @Override
- public String getObject() {
- return StringUtils.isBlank(prop.getValue())
- ? null
- : prop.getValue().equals("true") ? "Yes" : "No";
- }
-
- @Override
- public void setObject(final String object) {
- prop.setValue(String.valueOf(object.equalsIgnoreCase("yes")));
- }
-
- }, false).setChoices(Arrays.asList(new String[] { "Yes", "No" }));
- break;
-
- case Date:
- final FastDateFormat formatter = FastDateFormat.getInstance(prop.getDatePattern());
- field = new AjaxDateTimeFieldPanel("value", label, new PropertyModel<Date>(prop, "value") {
-
- private static final long serialVersionUID = -3743432456095828573L;
-
- @Override
- public Date getObject() {
- try {
- if (StringUtils.isBlank(prop.getValue())) {
- return null;
- } else {
- return formatter.parse(prop.getValue());
- }
- } catch (ParseException e) {
- LOG.error("Unparsable date: {}", prop.getValue(), e);
- return null;
- }
- }
-
- @Override
- public void setObject(final Date object) {
- prop.setValue(formatter.format(object));
- }
-
- }, prop.getDatePattern());
- break;
-
- case Enum:
- MapChoiceRenderer<String, String> enumCR = new MapChoiceRenderer<>(prop.getEnumValues());
-
- field = new AjaxDropDownChoicePanel(
- "value", label, new PropertyModel<String>(prop, "value"), false).
- setChoiceRenderer(enumCR).setChoices(new Model<ArrayList<String>>() {
-
- private static final long serialVersionUID = -858521070366432018L;
-
- @Override
- public ArrayList<String> getObject() {
- return new ArrayList<>(prop.getEnumValues().keySet());
- }
- });
- break;
-
- case Long:
- field = new AjaxSpinnerFieldPanel.Builder<Long>().build(
- "value",
- label,
- Long.class,
- new PropertyModel<Long>(prop, "value") {
-
- private static final long serialVersionUID = -7688359318035249200L;
-
- @Override
- public Long getObject() {
- return StringUtils.isBlank(prop.getValue())
- ? null
- : NumberUtils.toLong(prop.getValue());
- }
-
- @Override
- public void setObject(final Long object) {
- prop.setValue(String.valueOf(object));
- }
- });
- break;
-
- case String:
- default:
- field = new AjaxTextFieldPanel("value", label, new PropertyModel<>(prop, "value"), false);
- break;
- }
-
- field.setReadOnly(!prop.isWritable());
- if (prop.isRequired()) {
- field.addRequiredLabel();
- }
-
- item.add(field);
- }
- };
-
- AjaxLink<String> userDetails = new AjaxLink<String>("userDetails") {
-
- private static final long serialVersionUID = -4804368561204623354L;
-
- @Override
- public void onClick(final AjaxRequestTarget target) {
- viewDetails(target);
- }
- };
- MetaDataRoleAuthorizationStrategy.authorize(userDetails, ENABLE, StandardEntitlement.USER_READ);
-
- boolean enabled = formTO.getUserTO() != null;
- userDetails.setVisible(enabled).setEnabled(enabled);
-
- add(propView);
- add(userDetails);
- }
-
- protected abstract void viewDetails(final AjaxRequestTarget target);
-}
http://git-wip-us.apache.org/repos/asf/syncope/blob/66b3a04e/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDetails.java
----------------------------------------------------------------------
diff --git a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDetails.java b/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDetails.java
deleted file mode 100644
index ec9dbab..0000000
--- a/client/console/src/main/java/org/apache/syncope/client/console/approvals/ApprovalDetails.java
+++ /dev/null
@@ -1,63 +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.console.approvals;
-
-import org.apache.syncope.client.console.layout.UserFormLayoutInfo;
-import org.apache.syncope.client.console.panels.MultilevelPanel;
-import org.apache.syncope.client.console.rest.AnyTypeRestClient;
-import org.apache.syncope.client.console.wizards.AjaxWizard;
-import org.apache.syncope.client.console.wizards.any.UserWizardBuilder;
-import org.apache.syncope.common.lib.AnyOperations;
-import org.apache.syncope.common.lib.to.UserTO;
-import org.apache.syncope.common.lib.to.WorkflowFormTO;
-import org.apache.syncope.common.lib.types.AnyTypeKind;
-import org.apache.wicket.PageReference;
-
-public class ApprovalDetails extends MultilevelPanel.SecondLevel {
-
- private static final long serialVersionUID = -8847854414429745216L;
-
- public ApprovalDetails(final PageReference pageRef, final WorkflowFormTO formTO) {
- super(MultilevelPanel.SECOND_LEVEL_ID);
-
- final UserTO newUserTO;
- final UserTO previousUserTO;
- if (formTO.getUserPatch() == null) {
- newUserTO = formTO.getUserTO();
- previousUserTO = null;
- } else if (formTO.getUserTO() == null) {
- // make it stronger by handling possible NPE
- previousUserTO = new UserTO();
- previousUserTO.setKey(formTO.getUserPatch().getKey());
- newUserTO = AnyOperations.patch(previousUserTO, formTO.getUserPatch());
- } else {
- formTO.getUserTO().setKey(formTO.getUserPatch().getKey());
- newUserTO = AnyOperations.patch(formTO.getUserTO(), formTO.getUserPatch());
- previousUserTO = formTO.getUserTO();
- }
-
- add(new UserWizardBuilder(
- previousUserTO,
- newUserTO,
- new AnyTypeRestClient().read(AnyTypeKind.USER.name()).getClasses(),
- new UserFormLayoutInfo(),
- pageRef).
- build(AjaxWizard.Mode.READONLY));
- }
-}