--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
--- /dev/null
+!SESSION 2018-05-31 21:07:40.069 -----------------------------------------------
+eclipse.buildId=3.9.2.201712210947-RELEASE-e47
+java.version=1.8.0_151
+java.vendor=Oracle Corporation
+BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
+Framework arguments: -product org.springsource.sts.ide -product org.springsource.sts.ide
+Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springsource.sts.ide -data C:\Users\bbadavenkatappagari.MAJESTY\Downloads\demo -product org.springsource.sts.ide
+
+!ENTRY org.eclipse.ui 2 0 2018-05-31 21:07:45.642
+!MESSAGE Warnings while parsing the images from the 'org.eclipse.ui.commandImages' extension point.
+!SUBENTRY 1 org.eclipse.ui 2 0 2018-05-31 21:07:45.642
+!MESSAGE Cannot bind to an undefined command: plug-in='org.eclipse.lsp4e', id='org.eclipse.lsp4e.togglehighlight'
+
+!ENTRY org.eclipse.jface 2 0 2018-05-31 21:07:48.544
+!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
+!SUBENTRY 1 org.eclipse.jface 2 0 2018-05-31 21:07:48.544
+!MESSAGE A conflict occurred for CTRL+SHIFT+T:
+Binding(CTRL+SHIFT+T,
+ ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
+ Open a type in a Java editor,
+ Category(org.eclipse.ui.category.navigate,Navigate,null,true),
+ org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@6b60d99c,
+ ,,true),null),
+ org.eclipse.ui.defaultAcceleratorConfiguration,
+ org.eclipse.ui.contexts.window,,,system)
+Binding(CTRL+SHIFT+T,
+ ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
+ ,
+ Category(org.eclipse.lsp4e.category,Language Servers,null,true),
+ org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@543a7605,
+ ,,true),null),
+ org.eclipse.ui.defaultAcceleratorConfiguration,
+ org.eclipse.ui.contexts.window,,,system)
+
+!ENTRY org.eclipse.ui 2 2 2018-05-31 21:07:50.456
+!MESSAGE org.eclipse.jdt.junit.ResultView: Deprecated relationship "fast" should be converted to "stack".
+
+!ENTRY org.eclipse.ui 2 2 2018-05-31 21:07:50.456
+!MESSAGE org.springframework.ide.eclipse.aop.ui.navigator.aopReferenceModelNavigator: Deprecated relationship "fast" should be converted to "stack".
+
+!ENTRY org.eclipse.ui 2 2 2018-05-31 21:07:50.466
+!MESSAGE org.eclipse.contribution.xref.ui.views.XReferenceView: Deprecated relationship "fast" should be converted to "stack".
+
+!ENTRY org.eclipse.jface.text 2 0 2018-05-31 21:07:51.807
+!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number'
+
+!ENTRY org.eclipse.jface.text 2 0 2018-05-31 21:07:51.817
+!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round'
+
+!ENTRY org.eclipse.egit.ui 2 0 2018-05-31 21:08:00.999
+!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
+user global configuration and to define the default location to store repositories: 'C:\Users\bbadavenkatappagari.MAJESTY'. If this is
+not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
+EGit might behave differently since they see different configuration options.
+This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
+
+!ENTRY org.eclipse.oomph.setup.core 4 0 2018-05-31 21:08:06.846
+!MESSAGE C:\Users\bbadavenkatappagari.MAJESTY\.eclipse\org.eclipse.oomph.setup\setups\locations.setup (Access is denied)
+!STACK 0
+java.io.FileNotFoundException: C:\Users\bbadavenkatappagari.MAJESTY\.eclipse\org.eclipse.oomph.setup\setups\locations.setup (Access is denied)
+ at java.io.FileOutputStream.open0(Native Method)
+ at java.io.FileOutputStream.open(FileOutputStream.java:270)
+ at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
+ at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
+ at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl$1.<init>(FileURIHandlerImpl.java:65)
+ at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.createOutputStream(FileURIHandlerImpl.java:65)
+ at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:349)
+ at org.eclipse.oomph.setup.internal.core.util.UserURIHandlerImpl.createOutputStream(UserURIHandlerImpl.java:92)
+ at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:349)
+ at org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1234)
+ at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:985)
+ at org.eclipse.oomph.setup.internal.core.SetupContext.associate(SetupContext.java:491)
+ at org.eclipse.oomph.setup.internal.core.SetupContext.access$0(SetupContext.java:408)
+ at org.eclipse.oomph.setup.internal.core.SetupContext$1.run(SetupContext.java:392)
+ at org.eclipse.oomph.base.util.BaseUtil.execute(BaseUtil.java:279)
+ at org.eclipse.oomph.setup.internal.core.SetupContext.associate(SetupContext.java:388)
+ at org.eclipse.oomph.setup.internal.core.SetupContext.createSelf(SetupContext.java:268)
+ at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:667)
+ at org.eclipse.oomph.setup.ui.SetupUIPlugin.access$5(SetupUIPlugin.java:416)
+ at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:253)
+ at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
+
+!ENTRY org.springsource.ide.eclipse.commons.browser 4 0 2018-05-31 21:08:07.611
+!MESSAGE Could not call browser function extension: addHtml
+!STACK 0
+org.eclipse.swt.SWTException: Widget is disposed
+ at org.eclipse.swt.SWT.error(SWT.java:4533)
+ at org.eclipse.swt.SWT.error(SWT.java:4448)
+ at org.eclipse.swt.SWT.error(SWT.java:4419)
+ at org.eclipse.swt.widgets.Widget.error(Widget.java:482)
+ at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:354)
+ at org.eclipse.swt.browser.Browser.checkWidget(Browser.java:207)
+ at org.eclipse.swt.browser.Browser.execute(Browser.java:532)
+ at org.springsource.ide.eclipse.commons.browser.swt.StsBrowserManager.lambda$0(StsBrowserManager.java:145)
+ at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
+ at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
+ at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213)
+ at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820)
+ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
+ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
+ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
+ at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
+ at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
+ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
+ at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
+ at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
+ at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
+ at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
+ at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
+ at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
+ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
+ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke(Method.java:498)
+ at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
+ at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
+ at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
+
+!ENTRY org.springsource.ide.eclipse.commons.browser 4 0 2018-05-31 21:08:07.628
+!MESSAGE Could not call browser function extension: addHtml
+!STACK 0
+org.eclipse.swt.SWTException: Widget is disposed
+ at org.eclipse.swt.SWT.error(SWT.java:4533)
+ at org.eclipse.swt.SWT.error(SWT.java:4448)
+ at org.eclipse.swt.SWT.error(SWT.java:4419)
+ at org.eclipse.swt.widgets.Widget.error(Widget.java:482)
+ at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:354)
+ at org.eclipse.swt.browser.Browser.checkWidget(Browser.java:207)
+ at org.eclipse.swt.browser.Browser.execute(Browser.java:532)
+ at org.springsource.ide.eclipse.commons.browser.swt.StsBrowserManager.lambda$0(StsBrowserManager.java:145)
+ at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
+ at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
+ at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4213)
+ at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820)
+ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
+ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
+ at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
+ at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
+ at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
+ at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
+ at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
+ at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
+ at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
+ at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
+ at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
+ at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
+ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
+ at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke(Method.java:498)
+ at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
+ at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
+ at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
+!SESSION 2018-05-31 21:10:00.864 -----------------------------------------------
+eclipse.buildId=3.9.2.201712210947-RELEASE-e47
+java.version=1.8.0_151
+java.vendor=Oracle Corporation
+BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
+Framework arguments: -product org.springsource.sts.ide -product org.springsource.sts.ide -product org.springsource.sts.ide
+Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springsource.sts.ide -product org.springsource.sts.ide -data C:\Users\bbadavenkatappagari.MAJESTY\Downloads\demo -product org.springsource.sts.ide
+
+!ENTRY org.eclipse.ui 2 0 2018-05-31 21:10:07.183
+!MESSAGE Warnings while parsing the images from the 'org.eclipse.ui.commandImages' extension point.
+!SUBENTRY 1 org.eclipse.ui 2 0 2018-05-31 21:10:07.183
+!MESSAGE Cannot bind to an undefined command: plug-in='org.eclipse.lsp4e', id='org.eclipse.lsp4e.togglehighlight'
+
+!ENTRY org.eclipse.jface 2 0 2018-05-31 21:10:11.487
+!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
+!SUBENTRY 1 org.eclipse.jface 2 0 2018-05-31 21:10:11.487
+!MESSAGE A conflict occurred for CTRL+SHIFT+T:
+Binding(CTRL+SHIFT+T,
+ ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
+ Open a type in a Java editor,
+ Category(org.eclipse.ui.category.navigate,Navigate,null,true),
+ org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@5cdf61d,
+ ,,true),null),
+ org.eclipse.ui.defaultAcceleratorConfiguration,
+ org.eclipse.ui.contexts.window,,,system)
+Binding(CTRL+SHIFT+T,
+ ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
+ ,
+ Category(org.eclipse.lsp4e.category,Language Servers,null,true),
+ org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@4509414e,
+ ,,true),null),
+ org.eclipse.ui.defaultAcceleratorConfiguration,
+ org.eclipse.ui.contexts.window,,,system)
+
+!ENTRY org.eclipse.egit.ui 2 0 2018-05-31 21:10:20.579
+!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
+user global configuration and to define the default location to store repositories: 'C:\Users\bbadavenkatappagari.MAJESTY'. If this is
+not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
+EGit might behave differently since they see different configuration options.
+This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.
+
+!ENTRY org.eclipse.oomph.setup.core 4 0 2018-05-31 21:10:28.942
+!MESSAGE C:\Users\bbadavenkatappagari.MAJESTY\.eclipse\org.eclipse.oomph.setup\setups\locations.setup (Access is denied)
+!STACK 0
+java.io.FileNotFoundException: C:\Users\bbadavenkatappagari.MAJESTY\.eclipse\org.eclipse.oomph.setup\setups\locations.setup (Access is denied)
+ at java.io.FileOutputStream.open0(Native Method)
+ at java.io.FileOutputStream.open(FileOutputStream.java:270)
+ at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
+ at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
+ at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl$1.<init>(FileURIHandlerImpl.java:65)
+ at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.createOutputStream(FileURIHandlerImpl.java:65)
+ at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:349)
+ at org.eclipse.oomph.setup.internal.core.util.UserURIHandlerImpl.createOutputStream(UserURIHandlerImpl.java:92)
+ at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createOutputStream(ExtensibleURIConverterImpl.java:349)
+ at org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1234)
+ at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:985)
+ at org.eclipse.oomph.setup.internal.core.SetupContext.associate(SetupContext.java:491)
+ at org.eclipse.oomph.setup.internal.core.SetupContext.access$0(SetupContext.java:408)
+ at org.eclipse.oomph.setup.internal.core.SetupContext$1.run(SetupContext.java:392)
+ at org.eclipse.oomph.base.util.BaseUtil.execute(BaseUtil.java:279)
+ at org.eclipse.oomph.setup.internal.core.SetupContext.associate(SetupContext.java:388)
+ at org.eclipse.oomph.setup.internal.core.SetupContext.createSelf(SetupContext.java:268)
+ at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:667)
+ at org.eclipse.oomph.setup.ui.SetupUIPlugin.access$5(SetupUIPlugin.java:416)
+ at org.eclipse.oomph.setup.ui.SetupUIPlugin$1$1.run(SetupUIPlugin.java:253)
+ at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
--- /dev/null
+#Thu May 31 21:10:05 EDT 2018
+org.eclipse.core.runtime=2
+org.eclipse.platform=4.7.2.v20171130-0510
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>camunda-spring-boot</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beansProjectDescription>\r
- <version>1</version>\r
- <pluginVersion><![CDATA[3.9.2.201712210913-RELEASE]]></pluginVersion>\r
- <configSuffixes>\r
- <configSuffix><![CDATA[xml]]></configSuffix>\r
- </configSuffixes>\r
- <enableImports><![CDATA[false]]></enableImports>\r
- <configs>\r
- <config>java:com.akraino.bpm.AkrainoSpringBootApplication</config>\r
- </configs>\r
- <autoconfigs>\r
- </autoconfigs>\r
- <configSets>\r
- </configSets>\r
-</beansProjectDescription>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<beansProjectDescription>
+ <version>1</version>
+ <pluginVersion><![CDATA[3.9.2.201712210913-RELEASE]]></pluginVersion>
+ <configSuffixes>
+ <configSuffix><![CDATA[xml]]></configSuffix>
+ </configSuffixes>
+ <enableImports><![CDATA[false]]></enableImports>
+ <configs>
+ <config>java:com.akraino.bpm.AkrainoSpringBootApplication</config>
+ </configs>
+ <autoconfigs>
+ </autoconfigs>
+ <configSets>
+ </configSets>
+</beansProjectDescription>
<version>2.7.0</version>
</dependency>
-
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ <version>1.5.3.RELEASE</version>
+ </dependency>
</dependencies>
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.config;\r
-\r
-\r
-import java.io.IOException;\r
-\r
-\r
-import javax.sql.DataSource;\r
-\r
-import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;\r
-import org.camunda.bpm.engine.impl.jobexecutor.CallerRunsRejectedJobsHandler;\r
-import org.camunda.bpm.engine.impl.jobexecutor.JobExecutor;\r
-import org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration;\r
-import org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.beans.factory.annotation.Qualifier;\r
-import org.springframework.beans.factory.annotation.Value;\r
-import org.springframework.boot.web.client.RestTemplateBuilder;\r
-import org.springframework.context.annotation.Bean;\r
-import org.springframework.context.annotation.Configuration;\r
-import org.springframework.context.annotation.Primary;\r
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;\r
-import org.springframework.core.task.TaskExecutor;\r
-import org.springframework.jdbc.datasource.DataSourceTransactionManager;\r
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;\r
-import org.springframework.transaction.PlatformTransactionManager;\r
-import org.springframework.web.client.RestTemplate;\r
-import org.springframework.web.cors.CorsConfiguration;\r
-import org.springframework.web.cors.UrlBasedCorsConfigurationSource;\r
-import org.springframework.web.filter.CorsFilter;\r
-\r
-\r
-\r
-@Configuration\r
-\r
- public class CamundaCorsFilter {\r
- \r
- \r
- @Value("${camunda.bpm.buildresponseurl}") \r
- private String buildresponseurl;\r
- \r
- @Value("${camunda.bpm.tokenId}") \r
- private String tokenId;\r
- \r
- @Autowired \r
- private DataSource dataSource;\r
- \r
- @Autowired\r
- private PlatformTransactionManager transactionManager;\r
- \r
- @Autowired \r
- private JobExecutor jobExecutor;\r
- \r
- public String getBuildresponseurl() {\r
- return buildresponseurl;\r
- }\r
-\r
- public void setBuildresponseurl(String buildresponseurl) {\r
- this.buildresponseurl = buildresponseurl;\r
- }\r
- \r
- public String getTokenId() {\r
- return tokenId;\r
- }\r
-\r
- public void setTokenId(String tokenId) {\r
- this.tokenId = tokenId;\r
- }\r
-\r
- @Bean\r
- public RestTemplate restTemplate(RestTemplateBuilder builder) {\r
- // Do any additional configuration here\r
- return builder.build();\r
- }\r
- \r
- \r
- \r
- \r
- /*@Bean\r
- public JobExecutor jobExecutor() {\r
- final JobExecutor jobExecutor = new RuntimeContainerJobExecutor();\r
- jobExecutor.setWaitTimeInMillis(5000);\r
- jobExecutor.setLockTimeInMillis(18000000);\r
- return jobExecutor;\r
- } \r
- @Bean \r
- \r
- public ProcessEngineConfiguration SpringProcessEngineConfiguration () {\r
- \r
- ProcessEngineConfiguration ProcessEngineConfiguration=new SpringProcessEngineConfiguration().setJobExecutor(jobexecutor).setProcessEngineName("default");\r
- return ProcessEngineConfiguration;\r
- }*/\r
- \r
- @Bean\r
- @Primary\r
- public static JobExecutor jobExecutor(@Qualifier("camundaTaskExecutor") final TaskExecutor taskExecutor) {\r
- final SpringJobExecutor springJobExecutor = new SpringJobExecutor();\r
- springJobExecutor.setTaskExecutor(taskExecutor);\r
- springJobExecutor.setRejectedJobsHandler(new CallerRunsRejectedJobsHandler());\r
- springJobExecutor.setWaitTimeInMillis(5000);\r
- springJobExecutor.setLockTimeInMillis(36000000);\r
- return springJobExecutor;\r
- }\r
- \r
- @Bean\r
- @Primary\r
- public ProcessEngineConfigurationImpl processEngineConfiguration() throws IOException {\r
- SpringProcessEngineConfiguration config = (SpringProcessEngineConfiguration) new SpringProcessEngineConfiguration().setJobExecutor(jobExecutor);\r
- config.setDataSource(dataSource);\r
- config.setTransactionManager(transactionManager);\r
- config.setDatabaseSchemaUpdate("true");\r
- config.setJobExecutorActivate(true);\r
- config.setAuthorizationEnabled(true);\r
- config.setDefaultSerializationFormat("application/json");\r
- PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();\r
- config.setDeploymentResources(resolver.getResources("classpath:*.bpmn"));\r
- //config.setProcessEnginePlugins();\r
- return config;\r
- }\r
- \r
- @Bean\r
- public PlatformTransactionManager getTransactionManager() {\r
- PlatformTransactionManager ptm=new DataSourceTransactionManager(dataSource);\r
- return ptm;\r
- } \r
- \r
- \r
- @Bean\r
- public CorsFilter corsFilter() {\r
- UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();\r
- CorsConfiguration config = new CorsConfiguration();\r
- config.setAllowCredentials(true);\r
- config.addAllowedOrigin("*");\r
- config.addAllowedHeader("*");\r
- config.addAllowedMethod("OPTIONS");\r
- config.addAllowedMethod("GET");\r
- config.addAllowedMethod("POST");\r
- config.addAllowedMethod("PATCH");\r
- config.addAllowedMethod("PUT");\r
- config.addAllowedMethod("DELETE");\r
- source.registerCorsConfiguration("/**", config);\r
- return new CorsFilter(source);\r
- }\r
- \r
- @Bean(name="akrainoprocessExecutor")\r
- public TaskExecutor workExecutor() {\r
- ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();\r
- threadPoolTaskExecutor.setThreadNamePrefix("Async-");\r
- threadPoolTaskExecutor.setCorePoolSize(10);\r
- threadPoolTaskExecutor.setMaxPoolSize(50);\r
- threadPoolTaskExecutor.setQueueCapacity(600);\r
- threadPoolTaskExecutor.afterPropertiesSet();\r
- return threadPoolTaskExecutor;\r
- } \r
- }\r
-\r
-\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.config;
+
+
+import java.io.IOException;
+
+
+import javax.sql.DataSource;
+
+import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl;
+import org.camunda.bpm.engine.impl.jobexecutor.CallerRunsRejectedJobsHandler;
+import org.camunda.bpm.engine.impl.jobexecutor.JobExecutor;
+import org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration;
+import org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.core.task.TaskExecutor;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.cors.CorsConfiguration;
+import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
+import org.springframework.web.filter.CorsFilter;
+
+
+
+@Configuration
+
+ public class CamundaCorsFilter {
+
+
+ @Value("${camunda.bpm.buildresponseurl}")
+ private String buildresponseurl;
+
+ @Value("${camunda.bpm.tokenId}")
+ private String tokenId;
+
+ @Autowired
+ private DataSource dataSource;
+
+ @Autowired
+ private PlatformTransactionManager transactionManager;
+
+ @Autowired
+ private JobExecutor jobExecutor;
+
+ public String getBuildresponseurl() {
+ return buildresponseurl;
+ }
+
+ public void setBuildresponseurl(String buildresponseurl) {
+ this.buildresponseurl = buildresponseurl;
+ }
+
+ public String getTokenId() {
+ return tokenId;
+ }
+
+ public void setTokenId(String tokenId) {
+ this.tokenId = tokenId;
+ }
+
+ @Bean
+ public RestTemplate restTemplate(RestTemplateBuilder builder) {
+ // Do any additional configuration here
+ return builder.build();
+ }
+
+
+
+
+ /*@Bean
+ public JobExecutor jobExecutor() {
+ final JobExecutor jobExecutor = new RuntimeContainerJobExecutor();
+ jobExecutor.setWaitTimeInMillis(5000);
+ jobExecutor.setLockTimeInMillis(18000000);
+ return jobExecutor;
+ }
+ @Bean
+
+ public ProcessEngineConfiguration SpringProcessEngineConfiguration () {
+
+ ProcessEngineConfiguration ProcessEngineConfiguration=new SpringProcessEngineConfiguration().setJobExecutor(jobexecutor).setProcessEngineName("default");
+ return ProcessEngineConfiguration;
+ }*/
+
+ @Bean
+ @Primary
+ public static JobExecutor jobExecutor(@Qualifier("camundaTaskExecutor") final TaskExecutor taskExecutor) {
+ final SpringJobExecutor springJobExecutor = new SpringJobExecutor();
+ springJobExecutor.setTaskExecutor(taskExecutor);
+ springJobExecutor.setRejectedJobsHandler(new CallerRunsRejectedJobsHandler());
+ springJobExecutor.setWaitTimeInMillis(5000);
+ springJobExecutor.setLockTimeInMillis(36000000);
+ return springJobExecutor;
+ }
+
+ @Bean
+ @Primary
+ public ProcessEngineConfigurationImpl processEngineConfiguration() throws IOException {
+ SpringProcessEngineConfiguration config = (SpringProcessEngineConfiguration) new SpringProcessEngineConfiguration().setJobExecutor(jobExecutor);
+ config.setDataSource(dataSource);
+ config.setTransactionManager(transactionManager);
+ config.setDatabaseSchemaUpdate("true");
+ config.setJobExecutorActivate(true);
+ config.setAuthorizationEnabled(true);
+ config.setDefaultSerializationFormat("application/json");
+ PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
+ config.setDeploymentResources(resolver.getResources("classpath:*.bpmn"));
+ //config.setProcessEnginePlugins();
+ return config;
+ }
+
+ @Bean
+ public PlatformTransactionManager getTransactionManager() {
+ PlatformTransactionManager ptm=new DataSourceTransactionManager(dataSource);
+ return ptm;
+ }
+
+
+ @Bean
+ public CorsFilter corsFilter() {
+ UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
+ CorsConfiguration config = new CorsConfiguration();
+ config.setAllowCredentials(true);
+ config.addAllowedOrigin("*");
+ config.addAllowedHeader("*");
+ config.addAllowedMethod("OPTIONS");
+ config.addAllowedMethod("GET");
+ config.addAllowedMethod("POST");
+ config.addAllowedMethod("PATCH");
+ config.addAllowedMethod("PUT");
+ config.addAllowedMethod("DELETE");
+ source.registerCorsConfiguration("/**", config);
+ return new CorsFilter(source);
+ }
+
+ @Bean(name="akrainoprocessExecutor")
+ public TaskExecutor workExecutor() {
+ ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();
+ threadPoolTaskExecutor.setThreadNamePrefix("Async-");
+ threadPoolTaskExecutor.setCorePoolSize(10);
+ threadPoolTaskExecutor.setMaxPoolSize(50);
+ threadPoolTaskExecutor.setQueueCapacity(600);
+ threadPoolTaskExecutor.afterPropertiesSet();
+ return threadPoolTaskExecutor;
+ }
+ }
+
+
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.controller;\r
-\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.http.HttpStatus;\r
-import org.springframework.http.ResponseEntity;\r
-import org.springframework.web.bind.annotation.PostMapping;\r
-import org.springframework.web.bind.annotation.RequestBody;\r
-import org.springframework.web.bind.annotation.RestController;\r
-\r
-\r
-import com.akraino.bpm.model.Airship;\r
-import com.akraino.bpm.model.Apache;\r
-import com.akraino.bpm.model.Build;\r
-import com.akraino.bpm.model.BuildResponse;\r
-import com.akraino.bpm.model.Deploy;\r
-import com.akraino.bpm.model.Onap;\r
-import com.akraino.bpm.model.Tempest;\r
-import com.akraino.bpm.service.AsyncProcessExecutorService;\r
-\r
-import io.swagger.annotations.Api;\r
-\r
-@Api\r
-@RestController\r
-public class CamundaRestController {\r
- \r
- \r
- \r
- @Autowired \r
- private AsyncProcessExecutorService asyncProcessExecutorService;\r
- \r
- private static Logger logger = LoggerFactory.getLogger(CamundaRestController.class);\r
- \r
- @PostMapping("/build/")\r
- public ResponseEntity<BuildResponse> build(@RequestBody Build build) {\r
- logger.debug("Request received for Build ",build.toString());\r
- asyncProcessExecutorService.executeBuildProcess(build);\r
- return new ResponseEntity<BuildResponse>(new BuildResponse("in progress",null,null,null,null,build.getSitename(),null,null,null),HttpStatus.OK);\r
- \r
- }\r
-\r
- \r
- \r
- \r
- @PostMapping("/deploy/")\r
- public ResponseEntity<BuildResponse> deploy(@RequestBody Deploy deploy) {\r
- logger.debug("Request received for executing {} and targetDirectory {} ",deploy.toString());\r
- asyncProcessExecutorService.executeDeployProcess(deploy);\r
- return new ResponseEntity<BuildResponse>(new BuildResponse(null,"in progress","not started","not started","not started",deploy.getSitename(),null,null,null),HttpStatus.OK);\r
- }\r
-\r
- \r
- \r
- \r
- @PostMapping("/airship/")\r
- public ResponseEntity<BuildResponse> airship(@RequestBody Airship airship) {\r
- logger.debug("Request received for airship {} ",airship.toString());\r
- asyncProcessExecutorService.executeAirshipProcess(airship);\r
- return new ResponseEntity<BuildResponse>(new BuildResponse(null,null,null,null,"in progress",airship.getSitename(),null,null,null),HttpStatus.OK);\r
- }\r
-\r
- \r
- \r
- @PostMapping("/tempest/")\r
- public ResponseEntity<BuildResponse> tempest(@RequestBody Tempest tempest) {\r
- logger.debug("Request received for onap ",tempest.toString());\r
- asyncProcessExecutorService.executeTempestProcess(tempest);\r
- return new ResponseEntity<BuildResponse>(new BuildResponse(null,null,null,null,null,tempest.getSitename(),null,null,"in progress"),HttpStatus.OK);\r
- }\r
- \r
- \r
- \r
- \r
- @PostMapping("/apache/")\r
- public ResponseEntity<BuildResponse> apache(@RequestBody Apache apache) {\r
- logger.debug("Request received for onap ",apache.toString());\r
- asyncProcessExecutorService.executeApacheProcess(apache);\r
- return new ResponseEntity<BuildResponse>(new BuildResponse(null,null,null,null,null,apache.getSitename(),null,"in progress",null),HttpStatus.OK);\r
- }\r
- \r
- \r
- \r
- \r
- @PostMapping("/onap/")\r
- public ResponseEntity<BuildResponse> onap(@RequestBody Onap onap) {\r
- logger.debug("Request received for onap ",onap.toString());\r
- asyncProcessExecutorService.executeOnapProcess(onap);\r
- return new ResponseEntity<BuildResponse>(new BuildResponse(null,null,null,null,null,onap.getSitename(),"in progress",null,null),HttpStatus.OK);\r
- }\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.controller;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+
+import com.akraino.bpm.model.Airship;
+import com.akraino.bpm.model.Apache;
+import com.akraino.bpm.model.Build;
+import com.akraino.bpm.model.BuildResponse;
+import com.akraino.bpm.model.Deploy;
+import com.akraino.bpm.model.Onap;
+import com.akraino.bpm.model.Tempest;
+import com.akraino.bpm.service.AsyncProcessExecutorService;
+
+import io.swagger.annotations.Api;
+
+@Api
+@RestController
+public class CamundaRestController {
+
+
+
+ @Autowired
+ private AsyncProcessExecutorService asyncProcessExecutorService;
+
+ private static Logger logger = LoggerFactory.getLogger(CamundaRestController.class);
+
+ @PostMapping("/build/")
+ public ResponseEntity<BuildResponse> build(@RequestBody Build build) {
+ logger.debug("Request received for Build ",build.toString());
+ asyncProcessExecutorService.executeBuildProcess(build);
+ return new ResponseEntity<BuildResponse>(new BuildResponse("in progress",null,null,null,null,build.getSitename(),null,null,null),HttpStatus.OK);
+
+ }
+
+
+
+
+ @PostMapping("/deploy/")
+ public ResponseEntity<BuildResponse> deploy(@RequestBody Deploy deploy) {
+ logger.debug("Request received for executing {} and targetDirectory {} ",deploy.toString());
+ asyncProcessExecutorService.executeDeployProcess(deploy);
+ return new ResponseEntity<BuildResponse>(new BuildResponse(null,"in progress","not started","not started","not started",deploy.getSitename(),null,null,null),HttpStatus.OK);
+ }
+
+
+
+
+ @PostMapping("/airship/")
+ public ResponseEntity<BuildResponse> airship(@RequestBody Airship airship) {
+ logger.debug("Request received for airship {} ",airship.toString());
+ asyncProcessExecutorService.executeAirshipProcess(airship);
+ return new ResponseEntity<BuildResponse>(new BuildResponse(null,null,null,null,"in progress",airship.getSitename(),null,null,null),HttpStatus.OK);
+ }
+
+
+
+ @PostMapping("/tempest/")
+ public ResponseEntity<BuildResponse> tempest(@RequestBody Tempest tempest) {
+ logger.debug("Request received for onap ",tempest.toString());
+ asyncProcessExecutorService.executeTempestProcess(tempest);
+ return new ResponseEntity<BuildResponse>(new BuildResponse(null,null,null,null,null,tempest.getSitename(),null,null,"in progress"),HttpStatus.OK);
+ }
+
+
+
+
+ @PostMapping("/apache/")
+ public ResponseEntity<BuildResponse> apache(@RequestBody Apache apache) {
+ logger.debug("Request received for onap ",apache.toString());
+ asyncProcessExecutorService.executeApacheProcess(apache);
+ return new ResponseEntity<BuildResponse>(new BuildResponse(null,null,null,null,null,apache.getSitename(),null,"in progress",null),HttpStatus.OK);
+ }
+
+
+
+
+ @PostMapping("/onap/")
+ public ResponseEntity<BuildResponse> onap(@RequestBody Onap onap) {
+ logger.debug("Request received for onap ",onap.toString());
+ asyncProcessExecutorService.executeOnapProcess(onap);
+ return new ResponseEntity<BuildResponse>(new BuildResponse(null,null,null,null,null,onap.getSitename(),"in progress",null,null),HttpStatus.OK);
+ }
+
+}
ScriptExecutionService scriptExecutionService;
public void execute(DelegateExecution ctx) throws Exception {
- String filepath=(String)ctx.getVariable("filepath");
- logger.debug("task execution started :"+filepath);
- scriptExecutionService.executeScript(filepath);
+ String filename=(String)ctx.getVariable("scpfilename");
+ String scpdir=(String)ctx.getVariable("scpdir");
+ logger.debug("task execution started filename:{}, directory:{}",filename,scpdir);
+ scriptExecutionService.executeCDScript(scpdir, filename);
}
}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.delegate;\r
-\r
-import org.camunda.bpm.engine.delegate.DelegateExecution;\r
-import org.camunda.bpm.engine.delegate.JavaDelegate;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Component;\r
-\r
-import com.akraino.bpm.model.BuildResponse;\r
-import com.akraino.bpm.service.DeployResponseSenderService;\r
-import com.akraino.bpm.service.RemoteScriptExecutionService;\r
-\r
-\r
-\r
-@Component\r
-public class DeployPostVerficationRemoteScriptExecutor implements JavaDelegate {\r
-\r
- \r
- \r
- private static Logger logger = LoggerFactory.getLogger(DeployPostVerficationRemoteScriptExecutor.class);\r
- \r
- @Autowired\r
- RemoteScriptExecutionService remoteScriptExecutionService;\r
- \r
- @Autowired \r
- DeployResponseSenderService deployResponseSenderService;\r
- \r
- public void execute(DelegateExecution ctx) throws Exception {\r
- String remotserver=(String)ctx.getVariable("remotserver");\r
- int portnumner=(Integer)ctx.getVariable("port");\r
- String username=(String)ctx.getVariable("username");\r
- String password=(String)ctx.getVariable("password");\r
- String filename=(String)ctx.getVariable("postverificationscript");\r
- String fileparams=(String)ctx.getVariable("postverificationScriptparams");\r
- String srcdir=(String)ctx.getVariable("srcdir");\r
- String destdir=(String)ctx.getVariable("destdir");\r
- String sitename=(String)ctx.getVariable("sitename");\r
- \r
- deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "completed","inprogress",sitename,null,null,null));\r
- logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}",\r
- remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir);\r
- \r
- String command="sh " +destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");\r
- logger.debug("Execution command {}",command);\r
- remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command);\r
- \r
- \r
- }\r
-\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.delegate;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.akraino.bpm.model.BuildResponse;
+import com.akraino.bpm.service.DeployResponseSenderService;
+import com.akraino.bpm.service.RemoteScriptExecutionService;
+
+
+
+@Component
+public class DeployPostVerficationRemoteScriptExecutor implements JavaDelegate {
+
+
+
+ private static Logger logger = LoggerFactory.getLogger(DeployPostVerficationRemoteScriptExecutor.class);
+
+ @Autowired
+ RemoteScriptExecutionService remoteScriptExecutionService;
+
+ @Autowired
+ DeployResponseSenderService deployResponseSenderService;
+
+ public void execute(DelegateExecution ctx) throws Exception {
+ String remotserver=(String)ctx.getVariable("remotserver");
+ int portnumner=(Integer)ctx.getVariable("port");
+ String username=(String)ctx.getVariable("username");
+ String password=(String)ctx.getVariable("password");
+ String filename=(String)ctx.getVariable("postverificationscript");
+ String fileparams=(String)ctx.getVariable("postverificationScriptparams");
+ String srcdir=(String)ctx.getVariable("srcdir");
+ String destdir=(String)ctx.getVariable("destdir");
+ String sitename=(String)ctx.getVariable("sitename");
+
+ deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "completed","inprogress",sitename,null,null,null));
+ logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}",
+ remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir);
+
+ String command="sh " +destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");
+ logger.debug("Execution command {}",command);
+ remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command);
+
+
+ }
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.delegate;\r
-\r
-\r
-import org.camunda.bpm.engine.delegate.DelegateExecution;\r
-import org.camunda.bpm.engine.delegate.JavaDelegate;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Component;\r
-\r
-import com.akraino.bpm.Exception.TaskExecutorException;\r
-import com.akraino.bpm.model.BuildResponse;\r
-import com.akraino.bpm.service.DeployResponseSenderService;\r
-import com.akraino.bpm.service.RemoteDeploymentVerificationService;\r
-\r
-\r
-\r
-@Component\r
-public class DeployRemoteDeploymentVerificationDelegate implements JavaDelegate {\r
-\r
- private static Logger logger = LoggerFactory.getLogger(DeployRemoteDeploymentVerificationDelegate.class);\r
- \r
- @Autowired\r
- RemoteDeploymentVerificationService remotedeploymentVerificationService;\r
- \r
- @Autowired \r
- DeployResponseSenderService deployResponseSenderService;\r
- \r
-\r
- public void execute(DelegateExecution ctx) throws Exception {\r
- \r
- try {\r
- String verifierFilename=(String)ctx.getVariable("verifier");\r
- int waittime=(Integer)ctx.getVariable("waittime");\r
- int iterations=(Integer)ctx.getVariable("iterations");\r
- String remotserver=(String)ctx.getVariable("remotserver");\r
- int portnumner=(Integer)ctx.getVariable("port");\r
- String username=(String)ctx.getVariable("username");\r
- String password=(String)ctx.getVariable("password");\r
- String srcdir=(String)ctx.getVariable("srcdir");\r
- String destdir=(String)ctx.getVariable("destdir");\r
- String filepparams=(String)ctx.getVariable("verifierfileparams");\r
- String sitename=(String)ctx.getVariable("sitename");\r
- \r
- deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "inprogress","not started", sitename,null,null,null));\r
- \r
- logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} , waittime : {},No of iterations :{}",\r
- remotserver,portnumner,username,password,verifierFilename,srcdir,destdir,waittime,iterations);\r
- \r
- String command="sh " +destdir+"/"+verifierFilename+" "+(filepparams!=null?filepparams.replaceAll(",", " "):" ");\r
- logger.debug("Execution command {}",command);\r
- remotedeploymentVerificationService.executeScript(remotserver,username,password,portnumner,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command);\r
- }catch(TaskExecutorException ex) {\r
- throw ex;\r
- }\r
- \r
- \r
- }\r
-\r
-}\r
-\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.delegate;
+
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.akraino.bpm.Exception.TaskExecutorException;
+import com.akraino.bpm.model.BuildResponse;
+import com.akraino.bpm.service.DeployResponseSenderService;
+import com.akraino.bpm.service.RemoteDeploymentVerificationService;
+
+
+
+@Component
+public class DeployRemoteDeploymentVerificationDelegate implements JavaDelegate {
+
+ private static Logger logger = LoggerFactory.getLogger(DeployRemoteDeploymentVerificationDelegate.class);
+
+ @Autowired
+ RemoteDeploymentVerificationService remotedeploymentVerificationService;
+
+ @Autowired
+ DeployResponseSenderService deployResponseSenderService;
+
+
+ public void execute(DelegateExecution ctx) throws Exception {
+
+ try {
+ String verifierFilename=(String)ctx.getVariable("verifier");
+ int waittime=(Integer)ctx.getVariable("waittime");
+ int iterations=(Integer)ctx.getVariable("iterations");
+ String remotserver=(String)ctx.getVariable("remotserver");
+ int portnumner=(Integer)ctx.getVariable("port");
+ String username=(String)ctx.getVariable("username");
+ String password=(String)ctx.getVariable("password");
+ String srcdir=(String)ctx.getVariable("srcdir");
+ String destdir=(String)ctx.getVariable("destdir");
+ String filepparams=(String)ctx.getVariable("verifierfileparams");
+ String sitename=(String)ctx.getVariable("sitename");
+
+ deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "inprogress","not started", sitename,null,null,null));
+
+ logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} , waittime : {},No of iterations :{}",
+ remotserver,portnumner,username,password,verifierFilename,srcdir,destdir,waittime,iterations);
+
+ String command="sh " +destdir+"/"+verifierFilename+" "+(filepparams!=null?filepparams.replaceAll(",", " "):" ");
+ logger.debug("Execution command {}",command);
+ remotedeploymentVerificationService.executeScript(remotserver,username,password,portnumner,verifierFilename,filepparams,srcdir,destdir,waittime,iterations,command);
+ }catch(TaskExecutorException ex) {
+ throw ex;
+ }
+
+
+ }
+
+}
+
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.delegate;\r
-\r
-import org.camunda.bpm.engine.delegate.DelegateExecution;\r
-import org.camunda.bpm.engine.delegate.JavaDelegate;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Component;\r
-\r
-import com.akraino.bpm.model.BuildResponse;\r
-import com.akraino.bpm.service.DeployResponseSenderService;\r
-import com.akraino.bpm.service.RemoteScriptExecutionService;\r
-\r
-\r
-\r
-@Component\r
-public class DeployRemoteScriptExecutorTaskDelegate implements JavaDelegate {\r
-\r
- \r
- \r
- private static Logger logger = LoggerFactory.getLogger(DeployRemoteScriptExecutorTaskDelegate.class);\r
- \r
- @Autowired\r
- RemoteScriptExecutionService remoteScriptExecutionService;\r
- \r
- @Autowired \r
- DeployResponseSenderService deployResponseSenderService;\r
- \r
- public void execute(DelegateExecution ctx) throws Exception {\r
- String remotserver=(String)ctx.getVariable("remotserver");\r
- int portnumner=(Integer)ctx.getVariable("port");\r
- String username=(String)ctx.getVariable("username");\r
- String password=(String)ctx.getVariable("password");\r
- String filename=(String)ctx.getVariable("filename");\r
- String fileparams=(String)ctx.getVariable("fileparams");\r
- String srcdir=(String)ctx.getVariable("srcdir");\r
- String destdir=(String)ctx.getVariable("destdir");\r
- String sitename=(String)ctx.getVariable("sitename");\r
- \r
- deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "inprogress", "not started","not started", sitename,null,null,null));\r
- logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}",\r
- remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir);\r
- \r
- String command="sh " +destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");\r
- logger.debug("Execution command {}",command);\r
- remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command);\r
- }\r
-\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.delegate;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.akraino.bpm.model.BuildResponse;
+import com.akraino.bpm.service.DeployResponseSenderService;
+import com.akraino.bpm.service.RemoteScriptExecutionService;
+
+
+
+@Component
+public class DeployRemoteScriptExecutorTaskDelegate implements JavaDelegate {
+
+
+
+ private static Logger logger = LoggerFactory.getLogger(DeployRemoteScriptExecutorTaskDelegate.class);
+
+ @Autowired
+ RemoteScriptExecutionService remoteScriptExecutionService;
+
+ @Autowired
+ DeployResponseSenderService deployResponseSenderService;
+
+ public void execute(DelegateExecution ctx) throws Exception {
+ String remotserver=(String)ctx.getVariable("remotserver");
+ int portnumner=(Integer)ctx.getVariable("port");
+ String username=(String)ctx.getVariable("username");
+ String password=(String)ctx.getVariable("password");
+ String filename=(String)ctx.getVariable("filename");
+ String fileparams=(String)ctx.getVariable("fileparams");
+ String srcdir=(String)ctx.getVariable("srcdir");
+ String destdir=(String)ctx.getVariable("destdir");
+ String sitename=(String)ctx.getVariable("sitename");
+
+ deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "inprogress", "not started","not started", sitename,null,null,null));
+ logger.debug("task execution started remotserver {} , portnumner {},username {}, password {},filename : {} ,fileparams={},src dir={},dest dir={}",
+ remotserver,portnumner,username,password,filename,fileparams,srcdir,destdir);
+
+ String command="sh " +destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");
+ logger.debug("Execution command {}",command);
+ remoteScriptExecutionService.executeRemoteScript(remotserver,username,password,portnumner,filename,fileparams,srcdir,destdir,command);
+ }
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.delegate;\r
-\r
-\r
-import org.camunda.bpm.engine.delegate.DelegateExecution;\r
-import org.camunda.bpm.engine.delegate.JavaDelegate;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Component;\r
-\r
-import com.akraino.bpm.service.DeployResponseSenderService;\r
-import com.akraino.bpm.service.ScriptExecutionService;\r
-\r
-\r
-@Component\r
-public class DeployScriptExecutorTaskDelegate implements JavaDelegate {\r
-\r
- private static Logger logger = LoggerFactory.getLogger(DeployScriptExecutorTaskDelegate.class);\r
- \r
- @Autowired\r
- ScriptExecutionService scriptExecutionService;\r
- \r
- @Autowired \r
- DeployResponseSenderService deployResponseSenderService;\r
- \r
- public void execute(DelegateExecution ctx) throws Exception {\r
- \r
- String filepath=(String)ctx.getVariable("filepath");\r
- logger.debug("task execution started :"+filepath);\r
- scriptExecutionService.executeScript(filepath);\r
- \r
- }\r
-\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.delegate;
+
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.akraino.bpm.service.DeployResponseSenderService;
+import com.akraino.bpm.service.ScriptExecutionService;
+
+
+@Component
+public class DeployScriptExecutorTaskDelegate implements JavaDelegate {
+
+ private static Logger logger = LoggerFactory.getLogger(DeployScriptExecutorTaskDelegate.class);
+
+ @Autowired
+ ScriptExecutionService scriptExecutionService;
+
+ @Autowired
+ DeployResponseSenderService deployResponseSenderService;
+
+ public void execute(DelegateExecution ctx) throws Exception {
+
+ String filepath=(String)ctx.getVariable("filepath");
+ logger.debug("task execution started :"+filepath);
+ scriptExecutionService.executeScript(filepath);
+
+ }
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.delegate;\r
-\r
-\r
-import org.camunda.bpm.engine.delegate.DelegateExecution;\r
-import org.camunda.bpm.engine.delegate.JavaDelegate;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Component;\r
-\r
-import com.akraino.bpm.Exception.TaskExecutorException;\r
-import com.akraino.bpm.model.BuildResponse;\r
-import com.akraino.bpm.service.DeployResponseSenderService;\r
-import com.akraino.bpm.service.DeploymentVerificationService;\r
-\r
-\r
-\r
-@Component\r
-public class DeploymentVerificationDelegate implements JavaDelegate {\r
-\r
- private static Logger logger = LoggerFactory.getLogger(DeploymentVerificationDelegate.class);\r
- \r
- @Autowired\r
- DeploymentVerificationService deploymentVerificationService;\r
- \r
- @Autowired \r
- DeployResponseSenderService deployResponseSenderService;\r
- \r
- public void execute(DelegateExecution ctx) throws Exception {\r
- \r
- String sitename=(String)ctx.getVariable("sitename");\r
- deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "inprogress","not started",sitename,null,null,null));\r
- \r
- try {\r
- String verifierFilepath=(String)ctx.getVariable("verifier");\r
- int waittime=(Integer)ctx.getVariable("waittime");\r
- int iterations=(Integer)ctx.getVariable("iterations");\r
- \r
- \r
- logger.debug("task execution started filename : {} , waittime : {},No of iterations :{}",verifierFilepath,waittime,iterations);\r
- deploymentVerificationService.executeScript(verifierFilepath,waittime,iterations);\r
- }catch(TaskExecutorException ex) {\r
- throw ex;\r
- }\r
- \r
- deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "completed","not started",sitename,null,null,null));\r
- }\r
-\r
-}\r
-\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.delegate;
+
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.akraino.bpm.Exception.TaskExecutorException;
+import com.akraino.bpm.model.BuildResponse;
+import com.akraino.bpm.service.DeployResponseSenderService;
+import com.akraino.bpm.service.DeploymentVerificationService;
+
+
+
+@Component
+public class DeploymentVerificationDelegate implements JavaDelegate {
+
+ private static Logger logger = LoggerFactory.getLogger(DeploymentVerificationDelegate.class);
+
+ @Autowired
+ DeploymentVerificationService deploymentVerificationService;
+
+ @Autowired
+ DeployResponseSenderService deployResponseSenderService;
+
+ public void execute(DelegateExecution ctx) throws Exception {
+
+ String sitename=(String)ctx.getVariable("sitename");
+ deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "inprogress","not started",sitename,null,null,null));
+
+ try {
+ String verifierFilepath=(String)ctx.getVariable("verifier");
+ int waittime=(Integer)ctx.getVariable("waittime");
+ int iterations=(Integer)ctx.getVariable("iterations");
+
+
+ logger.debug("task execution started filename : {} , waittime : {},No of iterations :{}",verifierFilepath,waittime,iterations);
+ deploymentVerificationService.executeScript(verifierFilepath,waittime,iterations);
+ }catch(TaskExecutorException ex) {
+ throw ex;
+ }
+
+ deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "completed", "completed","not started",sitename,null,null,null));
+ }
+
+}
+
ScriptExecutionService scriptExecutionService;
public void execute(DelegateExecution ctx) throws Exception {
- String filepath=(String)ctx.getVariable("filepath");
- logger.debug("task execution started :"+filepath);
- scriptExecutionService.executeScript(filepath);
+ String filename=(String)ctx.getVariable("ScpScriptFilepath");
+ String dir=(String)ctx.getVariable("scpsrcdir");
+
+ logger.debug("task execution started filename:{},srcdir:{} :",filename,dir);
+ scriptExecutionService.executeCDScript(dir,filename);
}
}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.delegate;\r
-\r
-\r
-import org.camunda.bpm.engine.delegate.DelegateExecution;\r
-import org.camunda.bpm.engine.delegate.JavaDelegate;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Component;\r
-\r
-import com.akraino.bpm.model.BuildResponse;\r
-import com.akraino.bpm.service.DeployResponseSenderService;\r
-import com.akraino.bpm.service.ScriptExecutionService;\r
-\r
-\r
-@Component\r
-public class WinScpScriptDelegate implements JavaDelegate {\r
-\r
- private static Logger logger = LoggerFactory.getLogger(WinScpScriptDelegate.class);\r
- \r
- @Autowired \r
- DeployResponseSenderService deployResponseSenderService;\r
- \r
- @Autowired\r
- ScriptExecutionService scriptExecutionService;\r
- \r
- public void execute(DelegateExecution ctx) throws Exception {\r
- \r
- String sitename=(String)ctx.getVariable("sitename");\r
- deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "inprogress", "not started","not started",sitename,null,null,null));\r
- String filepath=(String)ctx.getVariable("ScpScriptFilepath");\r
- logger.debug("Win SCP task execution started :"+filepath);\r
- scriptExecutionService.executeScript(filepath);\r
- \r
- \r
- }\r
-\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.delegate;
+
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.camunda.bpm.engine.delegate.JavaDelegate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.akraino.bpm.model.BuildResponse;
+import com.akraino.bpm.service.DeployResponseSenderService;
+import com.akraino.bpm.service.ScriptExecutionService;
+
+
+@Component
+public class WinScpScriptDelegate implements JavaDelegate {
+
+ private static Logger logger = LoggerFactory.getLogger(WinScpScriptDelegate.class);
+
+ @Autowired
+ DeployResponseSenderService deployResponseSenderService;
+
+ @Autowired
+ ScriptExecutionService scriptExecutionService;
+
+ public void execute(DelegateExecution ctx) throws Exception {
+
+ String sitename=(String)ctx.getVariable("sitename");
+ deployResponseSenderService.sendResponse(new BuildResponse("completed", "completed", "inprogress", "not started","not started",sitename,null,null,null));
+ String filename=(String)ctx.getVariable("ScpScriptFilepath");
+ String dir=(String)ctx.getVariable("scpsrcdir");
+ logger.debug("Win SCP task execution started filename:{},directory:{}",filename,dir);
+
+ scriptExecutionService.executeCDScript(dir, filename);
+
+
+ }
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.model;\r
-\r
-public class Airship {\r
- \r
- private String sitename;\r
- private String filepath;\r
- private String fileparams;\r
- private String winscpdir;\r
- private String winscpfilepath;\r
- private String winscpfileparams;\r
- private String remotserver;\r
- private int port;\r
- private String username;\r
- private String password;\r
- private String destdir;\r
- private String remotefilename;\r
- private String remotefileparams;\r
- \r
- \r
- public String getFilepath() {\r
- return filepath;\r
- }\r
- public void setFilepath(String filepath) {\r
- this.filepath = filepath;\r
- }\r
- public String getFileparams() {\r
- return fileparams;\r
- }\r
- public void setFileparams(String fileparams) {\r
- this.fileparams = fileparams;\r
- }\r
- public String getWinscpfilepath() {\r
- return winscpfilepath;\r
- }\r
- public void setWinscpfilepath(String winscpfilepath) {\r
- this.winscpfilepath = winscpfilepath;\r
- }\r
- public String getWinscpfileparams() {\r
- return winscpfileparams;\r
- }\r
- public void setWinscpfileparams(String winscpfileparams) {\r
- this.winscpfileparams = winscpfileparams;\r
- }\r
- public String getDestdir() {\r
- return destdir;\r
- }\r
- public void setDestdir(String destdir) {\r
- this.destdir = destdir;\r
- }\r
- \r
- public String getRemotserver() {\r
- return remotserver;\r
- }\r
- public void setRemotserver(String remotserver) {\r
- this.remotserver = remotserver;\r
- }\r
- public int getPort() {\r
- return port;\r
- }\r
- public void setPort(int port) {\r
- this.port = port;\r
- }\r
- public String getUsername() {\r
- return username;\r
- }\r
- public void setUsername(String username) {\r
- this.username = username;\r
- }\r
- public String getPassword() {\r
- return password;\r
- }\r
- public void setPassword(String password) {\r
- this.password = password;\r
- }\r
- public String getRemotefilename() {\r
- return remotefilename;\r
- }\r
- public void setRemotefilename(String remotefilename) {\r
- this.remotefilename = remotefilename;\r
- }\r
- public String getRemotefileparams() {\r
- return remotefileparams;\r
- }\r
- public void setRemotefileparams(String remotefileparams) {\r
- this.remotefileparams = remotefileparams;\r
- }\r
- public String getWinscpdir() {\r
- return winscpdir;\r
- }\r
- public void setWinscpdir(String winscpdir) {\r
- this.winscpdir = winscpdir;\r
- }\r
- public String getSitename() {\r
- return sitename;\r
- }\r
- public void setSitename(String sitename) {\r
- this.sitename = sitename;\r
- }\r
- @Override\r
- public String toString() {\r
- return "Airship [sitename=" + sitename + ", filepath=" + filepath + ", fileparams=" + fileparams\r
- + ", winscpdir=" + winscpdir + ", winscpfilepath=" + winscpfilepath + ", winscpfileparams="\r
- + winscpfileparams + ", remotserver=" + remotserver + ", port=" + port + ", username=" + username\r
- + ", password=" + password + ", destdir=" + destdir + ", remotefilename=" + remotefilename\r
- + ", remotefileparams=" + remotefileparams + "]";\r
- }\r
- \r
- \r
- \r
- \r
- \r
- }\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.model;
+
+public class Airship {
+
+ private String sitename;
+ private String filepath;
+ private String fileparams;
+ private String winscpdir;
+ private String winscpfilepath;
+ private String winscpfileparams;
+ private String remotserver;
+ private int port;
+ private String username;
+ private String password;
+ private String destdir;
+ private String remotefilename;
+ private String remotefileparams;
+
+
+ public String getFilepath() {
+ return filepath;
+ }
+ public void setFilepath(String filepath) {
+ this.filepath = filepath;
+ }
+ public String getFileparams() {
+ return fileparams;
+ }
+ public void setFileparams(String fileparams) {
+ this.fileparams = fileparams;
+ }
+ public String getWinscpfilepath() {
+ return winscpfilepath;
+ }
+ public void setWinscpfilepath(String winscpfilepath) {
+ this.winscpfilepath = winscpfilepath;
+ }
+ public String getWinscpfileparams() {
+ return winscpfileparams;
+ }
+ public void setWinscpfileparams(String winscpfileparams) {
+ this.winscpfileparams = winscpfileparams;
+ }
+ public String getDestdir() {
+ return destdir;
+ }
+ public void setDestdir(String destdir) {
+ this.destdir = destdir;
+ }
+
+ public String getRemotserver() {
+ return remotserver;
+ }
+ public void setRemotserver(String remotserver) {
+ this.remotserver = remotserver;
+ }
+ public int getPort() {
+ return port;
+ }
+ public void setPort(int port) {
+ this.port = port;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+ public String getRemotefilename() {
+ return remotefilename;
+ }
+ public void setRemotefilename(String remotefilename) {
+ this.remotefilename = remotefilename;
+ }
+ public String getRemotefileparams() {
+ return remotefileparams;
+ }
+ public void setRemotefileparams(String remotefileparams) {
+ this.remotefileparams = remotefileparams;
+ }
+ public String getWinscpdir() {
+ return winscpdir;
+ }
+ public void setWinscpdir(String winscpdir) {
+ this.winscpdir = winscpdir;
+ }
+ public String getSitename() {
+ return sitename;
+ }
+ public void setSitename(String sitename) {
+ this.sitename = sitename;
+ }
+ @Override
+ public String toString() {
+ return "Airship [sitename=" + sitename + ", filepath=" + filepath + ", fileparams=" + fileparams
+ + ", winscpdir=" + winscpdir + ", winscpfilepath=" + winscpfilepath + ", winscpfileparams="
+ + winscpfileparams + ", remotserver=" + remotserver + ", port=" + port + ", username=" + username
+ + ", password=" + password + ", destdir=" + destdir + ", remotefilename=" + remotefilename
+ + ", remotefileparams=" + remotefileparams + "]";
+ }
+
+
+
+
+
+ }
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.model;\r
-\r
-public class Apache {\r
- \r
- private String sitename;\r
- private String remoteserver;\r
- private String username;\r
- private String password;\r
- private int portnumber;\r
- private String srcdir;\r
- private String destdir;\r
- private String filename;\r
- private String fileparams;\r
- private String deploymentverifier;\r
- private String verifierparams;\r
- int noofiterations;\r
- int waittime;\r
- String filetrasferscript;\r
- String filetransferparams;\r
- \r
- \r
- public String getSrcdir() {\r
- return srcdir;\r
- }\r
-\r
-\r
- public void setSrcdir(String srcdir) {\r
- this.srcdir = srcdir;\r
- }\r
-\r
-\r
- public String getDestdir() {\r
- return destdir;\r
- }\r
-\r
-\r
- public void setDestdir(String destdir) {\r
- this.destdir = destdir;\r
- }\r
-\r
-\r
- public String getRemoteserver() {\r
- return remoteserver;\r
- }\r
-\r
-\r
- public void setRemoteserver(String remoteserver) {\r
- this.remoteserver = remoteserver;\r
- }\r
-\r
-\r
- public String getUsername() {\r
- return username;\r
- }\r
-\r
-\r
- public void setUsername(String username) {\r
- this.username = username;\r
- }\r
-\r
-\r
- public String getPassword() {\r
- return password;\r
- }\r
-\r
-\r
- public void setPassword(String password) {\r
- this.password = password;\r
- }\r
-\r
-\r
- public int getPortnumber() {\r
- return portnumber;\r
- }\r
-\r
-\r
- public void setPortnumber(int portnumber) {\r
- this.portnumber = portnumber;\r
- }\r
-\r
-\r
- \r
-\r
-\r
- public String getFilename() {\r
- return filename;\r
- }\r
-\r
-\r
- public void setFilename(String filename) {\r
- this.filename = filename;\r
- }\r
-\r
-\r
- public String getFileparams() {\r
- return fileparams;\r
- }\r
-\r
-\r
- public void setFileparams(String fileparams) {\r
- this.fileparams = fileparams;\r
- }\r
-\r
-\r
- public String getDeploymentverifier() {\r
- return deploymentverifier;\r
- }\r
-\r
-\r
- public void setDeploymentverifier(String deploymentverifier) {\r
- this.deploymentverifier = deploymentverifier;\r
- }\r
-\r
-\r
- public int getNoofiterations() {\r
- return noofiterations;\r
- }\r
-\r
-\r
- public void setNoofiterations(int noofiterations) {\r
- this.noofiterations = noofiterations;\r
- }\r
-\r
-\r
- public int getWaittime() {\r
- return waittime;\r
- }\r
-\r
-\r
- public void setWaittime(int waittime) {\r
- this.waittime = waittime;\r
- }\r
-\r
-\r
- \r
-\r
- public String getVerifierparams() {\r
- return verifierparams;\r
- }\r
-\r
-\r
- public void setVerifierparams(String verifierparams) {\r
- this.verifierparams = verifierparams;\r
- }\r
-\r
-\r
- public String getFiletrasferscript() {\r
- return filetrasferscript;\r
- }\r
-\r
-\r
- public void setFiletrasferscript(String filetrasferscript) {\r
- this.filetrasferscript = filetrasferscript;\r
- }\r
-\r
-\r
- public String getFiletransferparams() {\r
- return filetransferparams;\r
- }\r
-\r
-\r
- public void setFiletransferparams(String filetransferparams) {\r
- this.filetransferparams = filetransferparams;\r
- }\r
-\r
-\r
- public String getSitename() {\r
- return sitename;\r
- }\r
-\r
-\r
- public void setSitename(String sitename) {\r
- this.sitename = sitename;\r
- }\r
-\r
-\r
- @Override\r
- public String toString() {\r
- return "Apache [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username\r
- + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir="\r
- + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier="\r
- + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations\r
- + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams="\r
- + filetransferparams + "]";\r
- }\r
-\r
-\r
- \r
- \r
- \r
-\r
- }\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.model;
+
+public class Apache {
+
+ private String sitename;
+ private String remoteserver;
+ private String username;
+ private String password;
+ private int portnumber;
+ private String srcdir;
+ private String destdir;
+ private String filename;
+ private String fileparams;
+ private String deploymentverifier;
+ private String verifierparams;
+ int noofiterations;
+ int waittime;
+ String filetrasferscript;
+ String filetransferparams;
+
+
+ public String getSrcdir() {
+ return srcdir;
+ }
+
+
+ public void setSrcdir(String srcdir) {
+ this.srcdir = srcdir;
+ }
+
+
+ public String getDestdir() {
+ return destdir;
+ }
+
+
+ public void setDestdir(String destdir) {
+ this.destdir = destdir;
+ }
+
+
+ public String getRemoteserver() {
+ return remoteserver;
+ }
+
+
+ public void setRemoteserver(String remoteserver) {
+ this.remoteserver = remoteserver;
+ }
+
+
+ public String getUsername() {
+ return username;
+ }
+
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+
+ public String getPassword() {
+ return password;
+ }
+
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ public int getPortnumber() {
+ return portnumber;
+ }
+
+
+ public void setPortnumber(int portnumber) {
+ this.portnumber = portnumber;
+ }
+
+
+
+
+
+ public String getFilename() {
+ return filename;
+ }
+
+
+ public void setFilename(String filename) {
+ this.filename = filename;
+ }
+
+
+ public String getFileparams() {
+ return fileparams;
+ }
+
+
+ public void setFileparams(String fileparams) {
+ this.fileparams = fileparams;
+ }
+
+
+ public String getDeploymentverifier() {
+ return deploymentverifier;
+ }
+
+
+ public void setDeploymentverifier(String deploymentverifier) {
+ this.deploymentverifier = deploymentverifier;
+ }
+
+
+ public int getNoofiterations() {
+ return noofiterations;
+ }
+
+
+ public void setNoofiterations(int noofiterations) {
+ this.noofiterations = noofiterations;
+ }
+
+
+ public int getWaittime() {
+ return waittime;
+ }
+
+
+ public void setWaittime(int waittime) {
+ this.waittime = waittime;
+ }
+
+
+
+
+ public String getVerifierparams() {
+ return verifierparams;
+ }
+
+
+ public void setVerifierparams(String verifierparams) {
+ this.verifierparams = verifierparams;
+ }
+
+
+ public String getFiletrasferscript() {
+ return filetrasferscript;
+ }
+
+
+ public void setFiletrasferscript(String filetrasferscript) {
+ this.filetrasferscript = filetrasferscript;
+ }
+
+
+ public String getFiletransferparams() {
+ return filetransferparams;
+ }
+
+
+ public void setFiletransferparams(String filetransferparams) {
+ this.filetransferparams = filetransferparams;
+ }
+
+
+ public String getSitename() {
+ return sitename;
+ }
+
+
+ public void setSitename(String sitename) {
+ this.sitename = sitename;
+ }
+
+
+ @Override
+ public String toString() {
+ return "Apache [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username
+ + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir="
+ + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier="
+ + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations
+ + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams="
+ + filetransferparams + "]";
+ }
+
+
+
+
+
+
+ }
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.model;\r
-\r
-public class Build {\r
- \r
- private String sitename;\r
- private String filepath;\r
- private String fileparams;\r
- private String targetfolder;\r
- \r
- \r
- \r
- \r
- public String getSitename() {\r
- return sitename;\r
- }\r
- public void setSitename(String sitename) {\r
- this.sitename = sitename;\r
- }\r
- public String getFilepath() {\r
- return filepath;\r
- }\r
- public void setFilepath(String filepath) {\r
- this.filepath = filepath;\r
- }\r
- public String getFileparams() {\r
- return fileparams;\r
- }\r
- public void setFileparams(String fileparams) {\r
- this.fileparams = fileparams;\r
- }\r
- public String getTargetfolder() {\r
- return targetfolder;\r
- }\r
- public void setTargetfolder(String targetfolder) {\r
- this.targetfolder = targetfolder;\r
- }\r
- \r
- @Override\r
- public String toString() {\r
- return "Build [sitename=" + sitename + ", filepath=" + filepath + ", fileparams=" + fileparams\r
- + ", targetfolder=" + targetfolder + "]";\r
- }\r
- \r
- \r
- \r
- \r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.model;
+
+public class Build {
+
+ private String sitename;
+ private String filepath;
+ private String fileparams;
+ private String targetfolder;
+
+
+
+
+ public String getSitename() {
+ return sitename;
+ }
+ public void setSitename(String sitename) {
+ this.sitename = sitename;
+ }
+ public String getFilepath() {
+ return filepath;
+ }
+ public void setFilepath(String filepath) {
+ this.filepath = filepath;
+ }
+ public String getFileparams() {
+ return fileparams;
+ }
+ public void setFileparams(String fileparams) {
+ this.fileparams = fileparams;
+ }
+ public String getTargetfolder() {
+ return targetfolder;
+ }
+ public void setTargetfolder(String targetfolder) {
+ this.targetfolder = targetfolder;
+ }
+
+ @Override
+ public String toString() {
+ return "Build [sitename=" + sitename + ", filepath=" + filepath + ", fileparams=" + fileparams
+ + ", targetfolder=" + targetfolder + "]";
+ }
+
+
+
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.model;\r
-\r
-public class BuildResponse {\r
- \r
- private String siteName;\r
- private String buildStatus;\r
- private String createTarStatus;\r
- private String genesisNodeStatus;\r
- private String deployToolsStatus;\r
- private String deployStatus;\r
- private String onapStatus;\r
- private String vCDNStatus;\r
- private String tempestStatus;\r
- \r
- public BuildResponse(String buildStatus, String createTarStatus, String genesisNodeStatus, String deployToolsStatus,String deployStatus,\r
- String siteName,String onapStatus,String vCDNStatus,String tempestStatus) {\r
- super();\r
- this.buildStatus = buildStatus;\r
- this.createTarStatus = createTarStatus;\r
- this.genesisNodeStatus = genesisNodeStatus;\r
- this.deployToolsStatus = deployToolsStatus;\r
- this.deployStatus=deployStatus;\r
- this.siteName = siteName;\r
- this.onapStatus=onapStatus;\r
- this.vCDNStatus=vCDNStatus;\r
- this.tempestStatus=tempestStatus;\r
- }\r
-\r
-\r
- public String getBuildStatus() {\r
- return buildStatus;\r
- }\r
-\r
-\r
- public void setBuildStatus(String buildStatus) {\r
- this.buildStatus = buildStatus;\r
- }\r
-\r
- public String getCreateTarStatus() {\r
- return createTarStatus;\r
- }\r
-\r
- public void setCreateTarStatus(String createTarStatus) {\r
- this.createTarStatus = createTarStatus;\r
- }\r
-\r
-\r
- public String getGenesisNodeStatus() {\r
- return genesisNodeStatus;\r
- }\r
-\r
-\r
- public void setGenesisNodeStatus(String genesisNodeStatus) {\r
- this.genesisNodeStatus = genesisNodeStatus;\r
- }\r
-\r
-\r
- public String getDeployToolsStatus() {\r
- return deployToolsStatus;\r
- }\r
-\r
-\r
- public void setDeployToolsStatus(String deployToolsStatus) {\r
- this.deployToolsStatus = deployToolsStatus;\r
- }\r
-\r
-\r
- public String getSiteName() {\r
- return siteName;\r
- }\r
-\r
- public void setSiteName(String siteName) {\r
- this.siteName = siteName;\r
- }\r
-\r
- \r
- \r
-\r
- public String getDeployStatus() {\r
- return deployStatus;\r
- }\r
-\r
-\r
- public void setDeployStatus(String deployStatus) {\r
- this.deployStatus = deployStatus;\r
- }\r
-\r
-\r
- public String getOnapStatus() {\r
- return onapStatus;\r
- }\r
-\r
-\r
- public void setOnapStatus(String onapStatus) {\r
- this.onapStatus = onapStatus;\r
- }\r
-\r
-\r
- public String getvCDNStatus() {\r
- return vCDNStatus;\r
- }\r
-\r
-\r
- public void setvCDNStatus(String vCDNStatus) {\r
- this.vCDNStatus = vCDNStatus;\r
- }\r
-\r
-\r
- public String getTempestStatus() {\r
- return tempestStatus;\r
- }\r
-\r
-\r
- public void setTempestStatus(String tempestStatus) {\r
- this.tempestStatus = tempestStatus;\r
- }\r
-\r
- \r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.model;
+
+public class BuildResponse {
+
+ private String siteName;
+ private String buildStatus;
+ private String createTarStatus;
+ private String genesisNodeStatus;
+ private String deployToolsStatus;
+ private String deployStatus;
+ private String onapStatus;
+ private String vCDNStatus;
+ private String tempestStatus;
+
+ public BuildResponse(String buildStatus, String createTarStatus, String genesisNodeStatus, String deployToolsStatus,String deployStatus,
+ String siteName,String onapStatus,String vCDNStatus,String tempestStatus) {
+ super();
+ this.buildStatus = buildStatus;
+ this.createTarStatus = createTarStatus;
+ this.genesisNodeStatus = genesisNodeStatus;
+ this.deployToolsStatus = deployToolsStatus;
+ this.deployStatus=deployStatus;
+ this.siteName = siteName;
+ this.onapStatus=onapStatus;
+ this.vCDNStatus=vCDNStatus;
+ this.tempestStatus=tempestStatus;
+ }
+
+
+ public String getBuildStatus() {
+ return buildStatus;
+ }
+
+
+ public void setBuildStatus(String buildStatus) {
+ this.buildStatus = buildStatus;
+ }
+
+ public String getCreateTarStatus() {
+ return createTarStatus;
+ }
+
+ public void setCreateTarStatus(String createTarStatus) {
+ this.createTarStatus = createTarStatus;
+ }
+
+
+ public String getGenesisNodeStatus() {
+ return genesisNodeStatus;
+ }
+
+
+ public void setGenesisNodeStatus(String genesisNodeStatus) {
+ this.genesisNodeStatus = genesisNodeStatus;
+ }
+
+
+ public String getDeployToolsStatus() {
+ return deployToolsStatus;
+ }
+
+
+ public void setDeployToolsStatus(String deployToolsStatus) {
+ this.deployToolsStatus = deployToolsStatus;
+ }
+
+
+ public String getSiteName() {
+ return siteName;
+ }
+
+ public void setSiteName(String siteName) {
+ this.siteName = siteName;
+ }
+
+
+
+
+ public String getDeployStatus() {
+ return deployStatus;
+ }
+
+
+ public void setDeployStatus(String deployStatus) {
+ this.deployStatus = deployStatus;
+ }
+
+
+ public String getOnapStatus() {
+ return onapStatus;
+ }
+
+
+ public void setOnapStatus(String onapStatus) {
+ this.onapStatus = onapStatus;
+ }
+
+
+ public String getvCDNStatus() {
+ return vCDNStatus;
+ }
+
+
+ public void setvCDNStatus(String vCDNStatus) {
+ this.vCDNStatus = vCDNStatus;
+ }
+
+
+ public String getTempestStatus() {
+ return tempestStatus;
+ }
+
+
+ public void setTempestStatus(String tempestStatus) {
+ this.tempestStatus = tempestStatus;
+ }
+
+
+ @Override
+ public String toString() {
+ return "BuildResponse [siteName=" + siteName + ", buildStatus=" + buildStatus + ", createTarStatus="
+ + createTarStatus + ", genesisNodeStatus=" + genesisNodeStatus + ", deployToolsStatus="
+ + deployToolsStatus + ", deployStatus=" + deployStatus + ", onapStatus=" + onapStatus + ", vCDNStatus="
+ + vCDNStatus + ", tempestStatus=" + tempestStatus + "]";
+ }
+
+
+
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.model;\r
-\r
-public class Deploy {\r
- \r
- private String sitename;\r
- private String filepath;\r
- private String fileparams;\r
- private String winscpfilepath;\r
- private String winscpfileparams;\r
- private String remotserver;\r
- private int port;\r
- private String username;\r
- private String password;\r
- private String destdir;\r
- private String remotefilename;\r
- private String remotefileparams;\r
- private String deploymentverifier;\r
- private String deploymentverifierfileparams;\r
- int noofiterations;\r
- int waittime;\r
- String postverificationscript;\r
- String postverificationScriptparams;\r
- \r
- \r
- \r
-\r
- public String getSitename() {\r
- return sitename;\r
- }\r
- public void setSitename(String sitename) {\r
- this.sitename = sitename;\r
- }\r
- public String getFilepath() {\r
- return filepath;\r
- }\r
- public void setFilepath(String filepath) {\r
- this.filepath = filepath;\r
- }\r
- public String getFileparams() {\r
- return fileparams;\r
- }\r
- public void setFileparams(String fileparams) {\r
- this.fileparams = fileparams;\r
- }\r
- public String getWinscpfilepath() {\r
- return winscpfilepath;\r
- }\r
- public void setWinscpfilepath(String winscpfilepath) {\r
- this.winscpfilepath = winscpfilepath;\r
- }\r
- public String getWinscpfileparams() {\r
- return winscpfileparams;\r
- }\r
- public void setWinscpfileparams(String winscpfileparams) {\r
- this.winscpfileparams = winscpfileparams;\r
- }\r
- public String getDestdir() {\r
- return destdir;\r
- }\r
- public void setDestdir(String destdir) {\r
- this.destdir = destdir;\r
- }\r
- \r
- \r
- \r
- public String getRemotserver() {\r
- return remotserver;\r
- }\r
- public void setRemotserver(String remotserver) {\r
- this.remotserver = remotserver;\r
- }\r
- public int getPort() {\r
- return port;\r
- }\r
- public void setPort(int port) {\r
- this.port = port;\r
- }\r
- public String getUsername() {\r
- return username;\r
- }\r
- public void setUsername(String username) {\r
- this.username = username;\r
- }\r
- public String getPassword() {\r
- return password;\r
- }\r
- public void setPassword(String password) {\r
- this.password = password;\r
- }\r
- public String getRemotefilename() {\r
- return remotefilename;\r
- }\r
- public void setRemotefilename(String remotefilename) {\r
- this.remotefilename = remotefilename;\r
- }\r
- public String getRemotefileparams() {\r
- return remotefileparams;\r
- }\r
- public void setRemotefileparams(String remotefileparams) {\r
- this.remotefileparams = remotefileparams;\r
- }\r
- public String getDeploymentverifier() {\r
- return deploymentverifier;\r
- }\r
- public void setDeploymentverifier(String deploymentverifier) {\r
- this.deploymentverifier = deploymentverifier;\r
- }\r
- public int getNoofiterations() {\r
- return noofiterations;\r
- }\r
- public void setNoofiterations(int noofiterations) {\r
- this.noofiterations = noofiterations;\r
- }\r
- public int getWaittime() {\r
- return waittime;\r
- }\r
- public void setWaittime(int waittime) {\r
- this.waittime = waittime;\r
- }\r
- \r
- public String getDeploymentverifierfileparams() {\r
- return deploymentverifierfileparams;\r
- }\r
- \r
- public void setDeploymentverifierfileparams(String deploymentverifierfileparams) {\r
- this.deploymentverifierfileparams = deploymentverifierfileparams;\r
- }\r
- \r
- public String getPostverificationscript() {\r
- return postverificationscript;\r
- }\r
- \r
- public void setPostverificationscript(String postverificationscript) {\r
- this.postverificationscript = postverificationscript;\r
- }\r
- \r
- public String getPostverificationScriptparams() {\r
- return postverificationScriptparams;\r
- }\r
- \r
- \r
- public void setPostverificationScriptparams(String postverificationScriptparams) {\r
- this.postverificationScriptparams = postverificationScriptparams;\r
- }\r
- \r
- \r
- @Override\r
- public String toString() {\r
- return "Deploy [sitename=" + sitename + ", filepath=" + filepath + ", fileparams=" + fileparams\r
- + ", winscpfilepath=" + winscpfilepath + ", winscpfileparams=" + winscpfileparams + ", remotserver="\r
- + remotserver + ", port=" + port + ", username=" + username + ", password=" + password + ", destdir="\r
- + destdir + ", remotefilename=" + remotefilename + ", remotefileparams=" + remotefileparams\r
- + ", deploymentverifier=" + deploymentverifier + ", deploymentverifierfileparams="\r
- + deploymentverifierfileparams + ", noofiterations=" + noofiterations + ", waittime=" + waittime\r
- + ", postverificationscript=" + postverificationscript + ", postverificationScriptparams="\r
- + postverificationScriptparams + "]";\r
- }\r
- \r
- \r
- \r
- \r
- }\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.model;
+
+public class Deploy {
+
+ private String sitename;
+ private String filepath;
+ private String fileparams;
+ private String winscpfilepath;
+ private String winscpfileparams;
+ private String remotserver;
+ private int port;
+ private String username;
+ private String password;
+ private String destdir;
+ private String remotefilename;
+ private String remotefileparams;
+ private String deploymentverifier;
+ private String deploymentverifierfileparams;
+ int noofiterations;
+ int waittime;
+ String postverificationscript;
+ String postverificationScriptparams;
+
+
+
+
+ public String getSitename() {
+ return sitename;
+ }
+ public void setSitename(String sitename) {
+ this.sitename = sitename;
+ }
+ public String getFilepath() {
+ return filepath;
+ }
+ public void setFilepath(String filepath) {
+ this.filepath = filepath;
+ }
+ public String getFileparams() {
+ return fileparams;
+ }
+ public void setFileparams(String fileparams) {
+ this.fileparams = fileparams;
+ }
+ public String getWinscpfilepath() {
+ return winscpfilepath;
+ }
+ public void setWinscpfilepath(String winscpfilepath) {
+ this.winscpfilepath = winscpfilepath;
+ }
+ public String getWinscpfileparams() {
+ return winscpfileparams;
+ }
+ public void setWinscpfileparams(String winscpfileparams) {
+ this.winscpfileparams = winscpfileparams;
+ }
+ public String getDestdir() {
+ return destdir;
+ }
+ public void setDestdir(String destdir) {
+ this.destdir = destdir;
+ }
+
+
+
+ public String getRemotserver() {
+ return remotserver;
+ }
+ public void setRemotserver(String remotserver) {
+ this.remotserver = remotserver;
+ }
+ public int getPort() {
+ return port;
+ }
+ public void setPort(int port) {
+ this.port = port;
+ }
+ public String getUsername() {
+ return username;
+ }
+ public void setUsername(String username) {
+ this.username = username;
+ }
+ public String getPassword() {
+ return password;
+ }
+ public void setPassword(String password) {
+ this.password = password;
+ }
+ public String getRemotefilename() {
+ return remotefilename;
+ }
+ public void setRemotefilename(String remotefilename) {
+ this.remotefilename = remotefilename;
+ }
+ public String getRemotefileparams() {
+ return remotefileparams;
+ }
+ public void setRemotefileparams(String remotefileparams) {
+ this.remotefileparams = remotefileparams;
+ }
+ public String getDeploymentverifier() {
+ return deploymentverifier;
+ }
+ public void setDeploymentverifier(String deploymentverifier) {
+ this.deploymentverifier = deploymentverifier;
+ }
+ public int getNoofiterations() {
+ return noofiterations;
+ }
+ public void setNoofiterations(int noofiterations) {
+ this.noofiterations = noofiterations;
+ }
+ public int getWaittime() {
+ return waittime;
+ }
+ public void setWaittime(int waittime) {
+ this.waittime = waittime;
+ }
+
+ public String getDeploymentverifierfileparams() {
+ return deploymentverifierfileparams;
+ }
+
+ public void setDeploymentverifierfileparams(String deploymentverifierfileparams) {
+ this.deploymentverifierfileparams = deploymentverifierfileparams;
+ }
+
+ public String getPostverificationscript() {
+ return postverificationscript;
+ }
+
+ public void setPostverificationscript(String postverificationscript) {
+ this.postverificationscript = postverificationscript;
+ }
+
+ public String getPostverificationScriptparams() {
+ return postverificationScriptparams;
+ }
+
+
+ public void setPostverificationScriptparams(String postverificationScriptparams) {
+ this.postverificationScriptparams = postverificationScriptparams;
+ }
+
+
+ @Override
+ public String toString() {
+ return "Deploy [sitename=" + sitename + ", filepath=" + filepath + ", fileparams=" + fileparams
+ + ", winscpfilepath=" + winscpfilepath + ", winscpfileparams=" + winscpfileparams + ", remotserver="
+ + remotserver + ", port=" + port + ", username=" + username + ", password=" + password + ", destdir="
+ + destdir + ", remotefilename=" + remotefilename + ", remotefileparams=" + remotefileparams
+ + ", deploymentverifier=" + deploymentverifier + ", deploymentverifierfileparams="
+ + deploymentverifierfileparams + ", noofiterations=" + noofiterations + ", waittime=" + waittime
+ + ", postverificationscript=" + postverificationscript + ", postverificationScriptparams="
+ + postverificationScriptparams + "]";
+ }
+
+
+
+
+ }
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.model;\r
-\r
-public class Onap {\r
- \r
- private String sitename;\r
- private String remoteserver;\r
- private String username;\r
- private String password;\r
- private int portnumber;\r
- private String srcdir;\r
- private String destdir;\r
- private String filename;\r
- private String fileparams;\r
- private String deploymentverifier;\r
- private String verifierparams;\r
- int noofiterations;\r
- int waittime;\r
- String filetrasferscript;\r
- String filetransferparams;\r
- \r
- \r
- \r
- \r
- \r
- \r
- public String getSitename() {\r
- return sitename;\r
- }\r
-\r
-\r
- public void setSitename(String sitename) {\r
- this.sitename = sitename;\r
- }\r
-\r
-\r
- public String getSrcdir() {\r
- return srcdir;\r
- }\r
-\r
-\r
- public void setSrcdir(String srcdir) {\r
- this.srcdir = srcdir;\r
- }\r
-\r
-\r
- public String getDestdir() {\r
- return destdir;\r
- }\r
-\r
-\r
- public void setDestdir(String destdir) {\r
- this.destdir = destdir;\r
- }\r
-\r
-\r
- public String getRemoteserver() {\r
- return remoteserver;\r
- }\r
-\r
-\r
- public void setRemoteserver(String remoteserver) {\r
- this.remoteserver = remoteserver;\r
- }\r
-\r
-\r
- public String getUsername() {\r
- return username;\r
- }\r
-\r
-\r
- public void setUsername(String username) {\r
- this.username = username;\r
- }\r
-\r
-\r
- public String getPassword() {\r
- return password;\r
- }\r
-\r
-\r
- public void setPassword(String password) {\r
- this.password = password;\r
- }\r
-\r
-\r
- public int getPortnumber() {\r
- return portnumber;\r
- }\r
-\r
-\r
- public void setPortnumber(int portnumber) {\r
- this.portnumber = portnumber;\r
- }\r
-\r
-\r
- \r
-\r
-\r
- public String getFilename() {\r
- return filename;\r
- }\r
-\r
-\r
- public void setFilename(String filename) {\r
- this.filename = filename;\r
- }\r
-\r
-\r
- public String getFileparams() {\r
- return fileparams;\r
- }\r
-\r
-\r
- public void setFileparams(String fileparams) {\r
- this.fileparams = fileparams;\r
- }\r
-\r
-\r
- public String getDeploymentverifier() {\r
- return deploymentverifier;\r
- }\r
-\r
-\r
- public void setDeploymentverifier(String deploymentverifier) {\r
- this.deploymentverifier = deploymentverifier;\r
- }\r
-\r
-\r
- public int getNoofiterations() {\r
- return noofiterations;\r
- }\r
-\r
-\r
- public void setNoofiterations(int noofiterations) {\r
- this.noofiterations = noofiterations;\r
- }\r
-\r
-\r
- public int getWaittime() {\r
- return waittime;\r
- }\r
-\r
-\r
- public void setWaittime(int waittime) {\r
- this.waittime = waittime;\r
- }\r
-\r
-\r
- \r
-\r
- public String getVerifierparams() {\r
- return verifierparams;\r
- }\r
-\r
-\r
- public void setVerifierparams(String verifierparams) {\r
- this.verifierparams = verifierparams;\r
- }\r
-\r
-\r
- public String getFiletrasferscript() {\r
- return filetrasferscript;\r
- }\r
-\r
-\r
- public void setFiletrasferscript(String filetrasferscript) {\r
- this.filetrasferscript = filetrasferscript;\r
- }\r
-\r
- \r
-\r
- public String getFiletransferparams() {\r
- return filetransferparams;\r
- }\r
-\r
-\r
- public void setFiletransferparams(String filetransferparams) {\r
- this.filetransferparams = filetransferparams;\r
- }\r
-\r
-\r
- @Override\r
- public String toString() {\r
- return "Onap [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username\r
- + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir="\r
- + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier="\r
- + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations\r
- + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams="\r
- + filetransferparams + "]";\r
- }\r
-\r
-\r
-\r
- }\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.model;
+
+public class Onap {
+
+ private String sitename;
+ private String remoteserver;
+ private String username;
+ private String password;
+ private int portnumber;
+ private String srcdir;
+ private String destdir;
+ private String filename;
+ private String fileparams;
+ private String deploymentverifier;
+ private String verifierparams;
+ int noofiterations;
+ int waittime;
+ String filetrasferscript;
+ String filetransferparams;
+
+
+
+
+
+
+ public String getSitename() {
+ return sitename;
+ }
+
+
+ public void setSitename(String sitename) {
+ this.sitename = sitename;
+ }
+
+
+ public String getSrcdir() {
+ return srcdir;
+ }
+
+
+ public void setSrcdir(String srcdir) {
+ this.srcdir = srcdir;
+ }
+
+
+ public String getDestdir() {
+ return destdir;
+ }
+
+
+ public void setDestdir(String destdir) {
+ this.destdir = destdir;
+ }
+
+
+ public String getRemoteserver() {
+ return remoteserver;
+ }
+
+
+ public void setRemoteserver(String remoteserver) {
+ this.remoteserver = remoteserver;
+ }
+
+
+ public String getUsername() {
+ return username;
+ }
+
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+
+ public String getPassword() {
+ return password;
+ }
+
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ public int getPortnumber() {
+ return portnumber;
+ }
+
+
+ public void setPortnumber(int portnumber) {
+ this.portnumber = portnumber;
+ }
+
+
+
+
+
+ public String getFilename() {
+ return filename;
+ }
+
+
+ public void setFilename(String filename) {
+ this.filename = filename;
+ }
+
+
+ public String getFileparams() {
+ return fileparams;
+ }
+
+
+ public void setFileparams(String fileparams) {
+ this.fileparams = fileparams;
+ }
+
+
+ public String getDeploymentverifier() {
+ return deploymentverifier;
+ }
+
+
+ public void setDeploymentverifier(String deploymentverifier) {
+ this.deploymentverifier = deploymentverifier;
+ }
+
+
+ public int getNoofiterations() {
+ return noofiterations;
+ }
+
+
+ public void setNoofiterations(int noofiterations) {
+ this.noofiterations = noofiterations;
+ }
+
+
+ public int getWaittime() {
+ return waittime;
+ }
+
+
+ public void setWaittime(int waittime) {
+ this.waittime = waittime;
+ }
+
+
+
+
+ public String getVerifierparams() {
+ return verifierparams;
+ }
+
+
+ public void setVerifierparams(String verifierparams) {
+ this.verifierparams = verifierparams;
+ }
+
+
+ public String getFiletrasferscript() {
+ return filetrasferscript;
+ }
+
+
+ public void setFiletrasferscript(String filetrasferscript) {
+ this.filetrasferscript = filetrasferscript;
+ }
+
+
+
+ public String getFiletransferparams() {
+ return filetransferparams;
+ }
+
+
+ public void setFiletransferparams(String filetransferparams) {
+ this.filetransferparams = filetransferparams;
+ }
+
+
+ @Override
+ public String toString() {
+ return "Onap [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username
+ + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir="
+ + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier="
+ + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations
+ + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams="
+ + filetransferparams + "]";
+ }
+
+
+
+ }
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.model;\r
-\r
-public class Tempest {\r
- \r
- private String sitename;\r
- private String remoteserver;\r
- private String username;\r
- private String password;\r
- private int portnumber;\r
- private String srcdir;\r
- private String destdir;\r
- private String filename;\r
- private String fileparams;\r
- private String deploymentverifier;\r
- private String verifierparams;\r
- int noofiterations;\r
- int waittime;\r
- String filetrasferscript;\r
- String filetransferparams;\r
- \r
- \r
- \r
- \r
- \r
- public String getSitename() {\r
- return sitename;\r
- }\r
-\r
-\r
- public void setSitename(String sitename) {\r
- this.sitename = sitename;\r
- }\r
-\r
-\r
- public String getSrcdir() {\r
- return srcdir;\r
- }\r
-\r
-\r
- public void setSrcdir(String srcdir) {\r
- this.srcdir = srcdir;\r
- }\r
-\r
-\r
- public String getDestdir() {\r
- return destdir;\r
- }\r
-\r
-\r
- public void setDestdir(String destdir) {\r
- this.destdir = destdir;\r
- }\r
-\r
-\r
- public String getRemoteserver() {\r
- return remoteserver;\r
- }\r
-\r
-\r
- public void setRemoteserver(String remoteserver) {\r
- this.remoteserver = remoteserver;\r
- }\r
-\r
-\r
- public String getUsername() {\r
- return username;\r
- }\r
-\r
-\r
- public void setUsername(String username) {\r
- this.username = username;\r
- }\r
-\r
-\r
- public String getPassword() {\r
- return password;\r
- }\r
-\r
-\r
- public void setPassword(String password) {\r
- this.password = password;\r
- }\r
-\r
-\r
- public int getPortnumber() {\r
- return portnumber;\r
- }\r
-\r
-\r
- public void setPortnumber(int portnumber) {\r
- this.portnumber = portnumber;\r
- }\r
-\r
-\r
- \r
-\r
-\r
- public String getFilename() {\r
- return filename;\r
- }\r
-\r
-\r
- public void setFilename(String filename) {\r
- this.filename = filename;\r
- }\r
-\r
-\r
- public String getFileparams() {\r
- return fileparams;\r
- }\r
-\r
-\r
- public void setFileparams(String fileparams) {\r
- this.fileparams = fileparams;\r
- }\r
-\r
-\r
- public String getDeploymentverifier() {\r
- return deploymentverifier;\r
- }\r
-\r
-\r
- public void setDeploymentverifier(String deploymentverifier) {\r
- this.deploymentverifier = deploymentverifier;\r
- }\r
-\r
-\r
- public int getNoofiterations() {\r
- return noofiterations;\r
- }\r
-\r
-\r
- public void setNoofiterations(int noofiterations) {\r
- this.noofiterations = noofiterations;\r
- }\r
-\r
-\r
- public int getWaittime() {\r
- return waittime;\r
- }\r
-\r
-\r
- public void setWaittime(int waittime) {\r
- this.waittime = waittime;\r
- }\r
-\r
-\r
- \r
-\r
- public String getVerifierparams() {\r
- return verifierparams;\r
- }\r
-\r
-\r
- public void setVerifierparams(String verifierparams) {\r
- this.verifierparams = verifierparams;\r
- }\r
-\r
-\r
- public String getFiletrasferscript() {\r
- return filetrasferscript;\r
- }\r
-\r
-\r
- public void setFiletrasferscript(String filetrasferscript) {\r
- this.filetrasferscript = filetrasferscript;\r
- }\r
-\r
- \r
- \r
-\r
- public String getFiletransferparams() {\r
- return filetransferparams;\r
- }\r
-\r
-\r
- public void setFiletransferparams(String filetransferparams) {\r
- this.filetransferparams = filetransferparams;\r
- }\r
-\r
-\r
- @Override\r
- public String toString() {\r
- return "Tempest [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username\r
- + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir="\r
- + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier="\r
- + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations\r
- + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams="\r
- + filetransferparams + "]";\r
- }\r
-\r
-\r
-\r
-\r
- }\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.model;
+
+public class Tempest {
+
+ private String sitename;
+ private String remoteserver;
+ private String username;
+ private String password;
+ private int portnumber;
+ private String srcdir;
+ private String destdir;
+ private String filename;
+ private String fileparams;
+ private String deploymentverifier;
+ private String verifierparams;
+ int noofiterations;
+ int waittime;
+ String filetrasferscript;
+ String filetransferparams;
+
+
+
+
+
+ public String getSitename() {
+ return sitename;
+ }
+
+
+ public void setSitename(String sitename) {
+ this.sitename = sitename;
+ }
+
+
+ public String getSrcdir() {
+ return srcdir;
+ }
+
+
+ public void setSrcdir(String srcdir) {
+ this.srcdir = srcdir;
+ }
+
+
+ public String getDestdir() {
+ return destdir;
+ }
+
+
+ public void setDestdir(String destdir) {
+ this.destdir = destdir;
+ }
+
+
+ public String getRemoteserver() {
+ return remoteserver;
+ }
+
+
+ public void setRemoteserver(String remoteserver) {
+ this.remoteserver = remoteserver;
+ }
+
+
+ public String getUsername() {
+ return username;
+ }
+
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+
+ public String getPassword() {
+ return password;
+ }
+
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+
+ public int getPortnumber() {
+ return portnumber;
+ }
+
+
+ public void setPortnumber(int portnumber) {
+ this.portnumber = portnumber;
+ }
+
+
+
+
+
+ public String getFilename() {
+ return filename;
+ }
+
+
+ public void setFilename(String filename) {
+ this.filename = filename;
+ }
+
+
+ public String getFileparams() {
+ return fileparams;
+ }
+
+
+ public void setFileparams(String fileparams) {
+ this.fileparams = fileparams;
+ }
+
+
+ public String getDeploymentverifier() {
+ return deploymentverifier;
+ }
+
+
+ public void setDeploymentverifier(String deploymentverifier) {
+ this.deploymentverifier = deploymentverifier;
+ }
+
+
+ public int getNoofiterations() {
+ return noofiterations;
+ }
+
+
+ public void setNoofiterations(int noofiterations) {
+ this.noofiterations = noofiterations;
+ }
+
+
+ public int getWaittime() {
+ return waittime;
+ }
+
+
+ public void setWaittime(int waittime) {
+ this.waittime = waittime;
+ }
+
+
+
+
+ public String getVerifierparams() {
+ return verifierparams;
+ }
+
+
+ public void setVerifierparams(String verifierparams) {
+ this.verifierparams = verifierparams;
+ }
+
+
+ public String getFiletrasferscript() {
+ return filetrasferscript;
+ }
+
+
+ public void setFiletrasferscript(String filetrasferscript) {
+ this.filetrasferscript = filetrasferscript;
+ }
+
+
+
+
+ public String getFiletransferparams() {
+ return filetransferparams;
+ }
+
+
+ public void setFiletransferparams(String filetransferparams) {
+ this.filetransferparams = filetransferparams;
+ }
+
+
+ @Override
+ public String toString() {
+ return "Tempest [sitename=" + sitename + ", remoteserver=" + remoteserver + ", username=" + username
+ + ", password=" + password + ", portnumber=" + portnumber + ", srcdir=" + srcdir + ", destdir="
+ + destdir + ", filename=" + filename + ", fileparams=" + fileparams + ", deploymentverifier="
+ + deploymentverifier + ", verifierparams=" + verifierparams + ", noofiterations=" + noofiterations
+ + ", waittime=" + waittime + ", filetrasferscript=" + filetrasferscript + ", filetransferparams="
+ + filetransferparams + "]";
+ }
+
+
+
+
+ }
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.service;\r
-\r
-import com.akraino.bpm.model.Airship;\r
-import com.akraino.bpm.model.Apache;\r
-import com.akraino.bpm.model.Build;\r
-import com.akraino.bpm.model.Deploy;\r
-import com.akraino.bpm.model.Onap;\r
-import com.akraino.bpm.model.Tempest;\r
-\r
-public interface AsyncProcessExecutorService {\r
- \r
- public void executeAirshipProcess(Airship airship);\r
- \r
- public void executeBuildProcess(Build build);\r
- \r
- public void executeDeployProcess(Deploy deploy);\r
- \r
- public void executeOnapProcess(Onap onap);\r
- \r
- public void executeTempestProcess(Tempest tempest);\r
- \r
- public void executeApacheProcess(Apache apache);\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.service;
+
+import com.akraino.bpm.model.Airship;
+import com.akraino.bpm.model.Apache;
+import com.akraino.bpm.model.Build;
+import com.akraino.bpm.model.Deploy;
+import com.akraino.bpm.model.Onap;
+import com.akraino.bpm.model.Tempest;
+
+public interface AsyncProcessExecutorService {
+
+ public void executeAirshipProcess(Airship airship);
+
+ public void executeBuildProcess(Build build);
+
+ public void executeDeployProcess(Deploy deploy);
+
+ public void executeOnapProcess(Onap onap);
+
+ public void executeTempestProcess(Tempest tempest);
+
+ public void executeApacheProcess(Apache apache);
+}
package com.akraino.bpm.service;
+
import com.akraino.bpm.model.BuildResponse;
public interface DeployResponseSenderService {
public void sendResponse(BuildResponse response);
-
+
}
public void executeCDScript(String dir,String cmd);
+
+
//public void executeAirshipScript(String cmd);
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.service.impl;\r
-\r
-import org.camunda.bpm.engine.ProcessEngine;\r
-import org.camunda.bpm.engine.runtime.ProcessInstance;\r
-import org.camunda.bpm.engine.variable.Variables;\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.scheduling.annotation.Async;\r
-import org.springframework.stereotype.Service;\r
-\r
-import com.akraino.bpm.Exception.TaskExecutorException;\r
-import com.akraino.bpm.model.Airship;\r
-import com.akraino.bpm.model.Apache;\r
-import com.akraino.bpm.model.Build;\r
-import com.akraino.bpm.model.BuildResponse;\r
-import com.akraino.bpm.model.Deploy;\r
-import com.akraino.bpm.model.Onap;\r
-import com.akraino.bpm.model.Tempest;\r
-import com.akraino.bpm.service.AsyncProcessExecutorService;\r
-import com.akraino.bpm.service.DeployResponseSenderService;\r
-\r
-@Service("asyncProcessExecutorService")\r
-public class AsyncProcessExecutorServiceImpl implements AsyncProcessExecutorService{\r
-\r
- @Autowired\r
- private ProcessEngine camunda;\r
- \r
- @Autowired \r
- private DeployResponseSenderService deployResponseSenderService;\r
- \r
- private static Logger logger = LoggerFactory.getLogger(AsyncProcessExecutorServiceImpl.class);\r
- \r
- @Async\r
- public void executeAirshipProcess(Airship airship) {\r
- \r
- try {\r
- executeAirshipservice(airship);\r
- }catch(TaskExecutorException ex) {\r
- logger.error("Airship execution failed ",ex);\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,"exception: "+ex.getMessage(),airship.getSitename(),null,null,null));\r
- }\r
- logger.error("Airship execution sucess ");\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,"success",airship.getSitename(),null,null,null));\r
- \r
- \r
- \r
- }\r
-\r
- private ProcessInstance executeAirshipservice(Airship airship) {\r
- \r
- String filepath1=airship.getFilepath()+" "+(airship.getFileparams()!=null?airship.getFileparams().replaceAll(",", " "):" ");\r
- String filepath2=airship.getWinscpfilepath()+" "+(airship.getWinscpfileparams()!=null?airship.getWinscpfileparams().replaceAll(",", " "):" ");\r
- return camunda.getRuntimeService().startProcessInstanceByKey("airship",\r
- Variables.putValue("filepath", filepath1).putValue("scpdir", airship.getWinscpdir()).putValue("ScpScriptFilepath", filepath2).putValue("remotserver", airship.getRemotserver())\r
- .putValue("username", airship.getUsername())\r
- .putValue("password", airship.getPassword())\r
- .putValue("port", airship.getPort()).putValue("destdir",airship.getDestdir()).putValue("remotefilename", airship.getRemotefilename())\r
- .putValue("remotefileparams", airship.getRemotefileparams()).putValue("sitename", airship.getSitename()));\r
- \r
- }\r
-\r
- @Async\r
- public void executeBuildProcess(Build build) {\r
- \r
- try {\r
- executeBuildService(build);\r
- }catch(TaskExecutorException ex) {\r
- logger.error("Build execution failed ",ex);\r
- deployResponseSenderService.sendResponse(new BuildResponse("exception: "+ex.getMessage(),null,null,null,null,build.getSitename(),null,null,null));\r
- }\r
- logger.error("Build execution sucess ");\r
- deployResponseSenderService.sendResponse(new BuildResponse("success",null,null,null,null,build.getSitename(),null,null,null));\r
- }\r
-\r
- \r
- private ProcessInstance executeBuildService(Build build) {\r
- \r
- String filepath=build.getFilepath()+" "+(build.getFileparams()!=null?build.getFileparams().replaceAll(",", " "):" ");\r
- return camunda.getRuntimeService().startProcessInstanceByKey("build",\r
- Variables.putValue("filepath", filepath).putValue("targetfolder", build.getTargetfolder()));\r
- }\r
- \r
- @Async\r
- public void executeDeployProcess(Deploy deploy) {\r
- \r
- try {\r
- executeDeployService(deploy);\r
- }catch(TaskExecutorException ex) {\r
- logger.error("deploy execution failed ",ex);\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,"exception: "+ex.getMessage(),deploy.getSitename(),null,null,null));\r
- }\r
- logger.debug("deploy execution sucess ");\r
- deployResponseSenderService.sendResponse(new BuildResponse("success","success","success","success","success",deploy.getSitename(),null,null,null));\r
- }\r
- \r
- \r
- private ProcessInstance executeDeployService(Deploy deploy) {\r
- \r
- String filepath1=deploy.getFilepath()+" "+(deploy.getFileparams()!=null?deploy.getFileparams().replaceAll(",", " "):" ");\r
- String filepath2=deploy.getWinscpfilepath()+" "+(deploy.getWinscpfileparams()!=null?deploy.getWinscpfileparams().replaceAll(",", " "):" ");\r
- return camunda.getRuntimeService().startProcessInstanceByKey("deploy",\r
- Variables.putValue("filepath", filepath1).putValue("ScpScriptFilepath", filepath2).putValue("remotserver", deploy.getRemotserver())\r
- .putValue("username", deploy.getUsername())\r
- .putValue("password", deploy.getPassword())\r
- .putValue("port", deploy.getPort()).putValue("destdir",deploy.getDestdir()).putValue("remotefilename", deploy.getRemotefilename())\r
- .putValue("fileparams", deploy.getFileparams()).\r
- putValue("verifier", deploy.getDeploymentverifier()).putValue("verifierfileparams", \r
- deploy.getDeploymentverifierfileparams()).putValue("waittime", deploy.getWaittime()).\r
- putValue("iterations", deploy.getNoofiterations()).putValue("postverificationscript", deploy.getPostverificationscript()).\r
- putValue("postverificationScriptparams", deploy.getDeploymentverifierfileparams()).putValue("sitename", deploy.getSitename()));\r
- \r
- }\r
-\r
- @Async\r
- public void executeOnapProcess(Onap onap) {\r
- \r
- try {\r
- executeOnapService(onap);\r
- }catch(TaskExecutorException ex) {\r
- logger.error("Onap execution failed ",ex);\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,onap.getSitename(),"exception: "+ex.getMessage(),null,null));\r
- }\r
- logger.error("Onap execution sucess ");\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,onap.getSitename(),"succes",null,null));\r
- \r
- \r
- }\r
- \r
- \r
- private ProcessInstance executeOnapService(Onap onap) {\r
- \r
- String transferfile= onap.getFiletrasferscript()+" "+(onap.getFiletransferparams()!=null?onap.getFiletransferparams().replaceAll(",", " "):" ");\r
- return camunda.getRuntimeService().startProcessInstanceByKey("onap",\r
- Variables.putValue("filename", onap.getFilename()).putValue("fileparams", onap.getFileparams()).\r
- putValue("verifier", onap.getDeploymentverifier()).putValue("verifierfileparams", onap.getVerifierparams()).putValue("waittime", onap.getWaittime()).\r
- putValue("iterations", onap.getNoofiterations()).putValue("remotserver", onap.getRemoteserver())\r
- .putValue("username", onap.getUsername())\r
- .putValue("password", onap.getPassword())\r
- .putValue("port", onap.getPortnumber()).putValue("srcdir", onap.getSrcdir()).putValue("destdir",onap.getDestdir()).putValue("filepath", transferfile)\r
- );\r
- \r
- }\r
- \r
- \r
- @Async\r
- public void executeTempestProcess(Tempest tempest) {\r
- try {\r
- executeTempestService(tempest);\r
- }catch(TaskExecutorException ex) {\r
- logger.error("Tempest execution failed ",ex);\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,tempest.getSitename(),null,null,"exception: "+ex.getMessage()));\r
- }\r
- logger.error("Tempest execution sucess ");\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,tempest.getSitename(),null,null,"success"));\r
- \r
- }\r
- \r
- private ProcessInstance executeTempestService(Tempest tempest) {\r
- \r
- \r
- String transferfile= tempest.getFiletrasferscript()+" "+(tempest.getFiletransferparams()!=null?tempest.getFiletransferparams().replaceAll(",", " "):" ");\r
- \r
- return camunda.getRuntimeService().startProcessInstanceByKey("tempest",\r
- Variables.putValue("filename", tempest.getFilename()).putValue("fileparams", tempest.getFileparams()).\r
- putValue("verifier", tempest.getDeploymentverifier()).putValue("verifierfileparams", tempest.getVerifierparams()).putValue("waittime", tempest.getWaittime()).\r
- putValue("iterations", tempest.getNoofiterations()).putValue("remotserver", tempest.getRemoteserver())\r
- .putValue("username", tempest.getUsername())\r
- .putValue("password", tempest.getPassword())\r
- .putValue("port", tempest.getPortnumber()).putValue("srcdir", tempest.getSrcdir()).putValue("destdir",tempest.getDestdir()).putValue("filepath", transferfile)\r
- );\r
- \r
- }\r
- \r
- \r
- @Async\r
- public void executeApacheProcess(Apache apache) {\r
- try {\r
- executeApacheService(apache);\r
- }catch(TaskExecutorException ex) {\r
- logger.error("Apache execution failed ",ex);\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,apache.getSitename(),null,"exception: "+ex.getMessage(),null));\r
- }\r
- logger.error("Apache execution sucess ");\r
- deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,apache.getSitename(),null,"success",null));\r
- \r
- \r
- }\r
- \r
- \r
- private ProcessInstance executeApacheService(Apache apache) {\r
- \r
- String transferfile= apache.getFiletrasferscript()+" "+(apache.getFiletransferparams()!=null?apache.getFiletransferparams().replaceAll(",", " "):" ");\r
- \r
- return camunda.getRuntimeService().startProcessInstanceByKey("apache",\r
- Variables.putValue("filename", apache.getFilename()).putValue("fileparams", apache.getFileparams()).\r
- putValue("verifier", apache.getDeploymentverifier()).putValue("verifierfileparams", apache.getVerifierparams()).putValue("waittime", apache.getWaittime()).\r
- putValue("iterations", apache.getNoofiterations()).putValue("remotserver", apache.getRemoteserver())\r
- .putValue("username", apache.getUsername())\r
- .putValue("password", apache.getPassword())\r
- .putValue("port", apache.getPortnumber()).putValue("srcdir", apache.getSrcdir()).putValue("destdir",apache.getDestdir()).putValue("filepath", transferfile)\r
- );\r
- \r
- }\r
- \r
- \r
- \r
- \r
- \r
- \r
- \r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.service.impl;
+
+import org.camunda.bpm.engine.ProcessEngine;
+import org.camunda.bpm.engine.runtime.ProcessInstance;
+import org.camunda.bpm.engine.variable.Variables;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Async;
+import org.springframework.stereotype.Service;
+
+import com.akraino.bpm.Exception.TaskExecutorException;
+import com.akraino.bpm.model.Airship;
+import com.akraino.bpm.model.Apache;
+import com.akraino.bpm.model.Build;
+import com.akraino.bpm.model.BuildResponse;
+import com.akraino.bpm.model.Deploy;
+import com.akraino.bpm.model.Onap;
+import com.akraino.bpm.model.Tempest;
+import com.akraino.bpm.service.AsyncProcessExecutorService;
+import com.akraino.bpm.service.DeployResponseSenderService;
+
+@Service("asyncProcessExecutorService")
+public class AsyncProcessExecutorServiceImpl implements AsyncProcessExecutorService{
+
+ @Autowired
+ private ProcessEngine camunda;
+
+ @Autowired
+ private DeployResponseSenderService deployResponseSenderService;
+
+ private static Logger logger = LoggerFactory.getLogger(AsyncProcessExecutorServiceImpl.class);
+
+ @Async
+ public void executeAirshipProcess(Airship airship) {
+
+ try {
+ executeAirshipservice(airship);
+ }catch(TaskExecutorException ex) {
+ logger.error("Airship execution failed ",ex);
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,"exception: "+ex.getMessage(),airship.getSitename(),null,null,null));
+ return;
+ }
+ logger.debug("Airship execution sucess ");
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,"success",airship.getSitename(),null,null,null));
+
+
+
+ }
+
+ private ProcessInstance executeAirshipservice(Airship airship) {
+
+ String filepath1=airship.getFilepath()+" "+(airship.getFileparams()!=null?airship.getFileparams().replaceAll(",", " "):" ");
+ String filepath2=airship.getWinscpfilepath()+" "+(airship.getWinscpfileparams()!=null?airship.getWinscpfileparams().replaceAll(",", " "):" ");
+ return camunda.getRuntimeService().startProcessInstanceByKey("airship",
+ Variables.putValue("filepath", filepath1).putValue("scpdir", airship.getWinscpdir()).putValue("ScpScriptFilepath", filepath2).putValue("remotserver", airship.getRemotserver())
+ .putValue("username", airship.getUsername())
+ .putValue("password", airship.getPassword())
+ .putValue("port", airship.getPort()).putValue("destdir",airship.getDestdir()).putValue("remotefilename", airship.getRemotefilename())
+ .putValue("remotefileparams", airship.getRemotefileparams()).putValue("sitename", airship.getSitename()));
+
+ }
+
+ @Async
+ public void executeBuildProcess(Build build) {
+
+ try {
+ executeBuildService(build);
+ }catch(TaskExecutorException ex) {
+ logger.error("Build execution failed ",ex);
+ deployResponseSenderService.sendResponse(new BuildResponse("exception: "+ex.getMessage(),null,null,null,null,build.getSitename(),null,null,null));
+ return;
+ }
+ logger.debug("Build execution sucess ");
+ deployResponseSenderService.sendResponse(new BuildResponse("success",null,null,null,null,build.getSitename(),null,null,null));
+ }
+
+
+ private ProcessInstance executeBuildService(Build build) {
+
+ String filepath=build.getFilepath()+" "+(build.getFileparams()!=null?build.getFileparams().replaceAll(",", " "):" ");
+ return camunda.getRuntimeService().startProcessInstanceByKey("build",
+ Variables.putValue("filepath", filepath).putValue("targetfolder", build.getTargetfolder()));
+ }
+
+ @Async
+ public void executeDeployProcess(Deploy deploy) {
+
+ try {
+ executeDeployService(deploy);
+ }catch(TaskExecutorException ex) {
+ logger.error("deploy execution failed ",ex);
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,"exception: "+ex.getMessage(),deploy.getSitename(),null,null,null));
+ return;
+ }
+ logger.debug("deploy execution sucess ");
+ deployResponseSenderService.sendResponse(new BuildResponse("success","success","success","success","success",deploy.getSitename(),null,null,null));
+ }
+
+
+ private ProcessInstance executeDeployService(Deploy deploy) {
+
+ String filepath1=deploy.getFilepath()+" "+(deploy.getFileparams()!=null?deploy.getFileparams().replaceAll(",", " "):" ");
+
+
+ int lastindex=deploy.getWinscpfilepath().lastIndexOf("/");
+ String scpSrcDir=deploy.getWinscpfilepath().substring(0,lastindex);
+ String scpfilename=deploy.getWinscpfilepath().substring(lastindex+1,deploy.getWinscpfilepath().length());
+ String transferfile= scpfilename+" "+(deploy.getWinscpfileparams()!=null?deploy.getWinscpfileparams().replaceAll(",", " "):" ");
+
+
+
+ return camunda.getRuntimeService().startProcessInstanceByKey("deploy",
+ Variables.putValue("filepath", filepath1).putValue("scpsrcdir", scpSrcDir).
+ putValue("ScpScriptFilepath", transferfile).putValue("remotserver", deploy.getRemotserver())
+ .putValue("username", deploy.getUsername())
+ .putValue("password", deploy.getPassword())
+ .putValue("port", deploy.getPort()).putValue("destdir",deploy.getDestdir()).putValue("remotefilename", deploy.getRemotefilename())
+ .putValue("fileparams", deploy.getFileparams()).
+ putValue("verifier", deploy.getDeploymentverifier()).putValue("verifierfileparams",
+ deploy.getDeploymentverifierfileparams()).putValue("waittime", deploy.getWaittime()).
+ putValue("iterations", deploy.getNoofiterations()).putValue("postverificationscript", deploy.getPostverificationscript()).
+ putValue("postverificationScriptparams", deploy.getDeploymentverifierfileparams()).putValue("sitename", deploy.getSitename()));
+
+ }
+
+ @Async
+ public void executeOnapProcess(Onap onap) {
+
+ try {
+ executeOnapService(onap);
+ }catch(TaskExecutorException ex) {
+ logger.error("Onap execution failed ",ex);
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,onap.getSitename(),"exception: "+ex.getMessage(),null,null));
+ return;
+ }
+ logger.debug("Onap execution sucess ");
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,onap.getSitename(),"succes",null,null));
+
+
+ }
+
+
+ private ProcessInstance executeOnapService(Onap onap) {
+
+ int lastindex=onap.getFiletrasferscript().lastIndexOf("/");
+ String scpSrcDir=onap.getFiletrasferscript().substring(0,lastindex);
+ String scpfilename=onap.getFiletrasferscript().substring(lastindex+1,onap.getFiletrasferscript().length());
+ String transferfile= scpfilename+" "+(onap.getFiletransferparams()!=null?onap.getFiletransferparams().replaceAll(",", " "):" ");
+
+
+ return camunda.getRuntimeService().startProcessInstanceByKey("onap",
+ Variables.putValue("filename", onap.getFilename()).putValue("fileparams", onap.getFileparams()).
+ putValue("verifier", onap.getDeploymentverifier()).putValue("verifierfileparams", onap.getVerifierparams()).putValue("waittime", onap.getWaittime()).
+ putValue("iterations", onap.getNoofiterations()).putValue("remotserver", onap.getRemoteserver())
+ .putValue("username", onap.getUsername())
+ .putValue("password", onap.getPassword())
+ .putValue("port", onap.getPortnumber()).putValue("srcdir", onap.getSrcdir()).putValue("destdir",onap.getDestdir()).putValue("ScpScriptFilepath", transferfile).
+ putValue("scpsrcdir", scpSrcDir)
+ );
+
+ }
+
+
+ @Async
+ public void executeTempestProcess(Tempest tempest) {
+ try {
+ executeTempestService(tempest);
+ }catch(TaskExecutorException ex) {
+ logger.error("Tempest execution failed ",ex);
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,tempest.getSitename(),null,null,"exception: "+ex.getMessage()));
+ return;
+ }
+ logger.debug("Tempest execution sucess ");
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,tempest.getSitename(),null,null,"success"));
+
+ }
+
+ private ProcessInstance executeTempestService(Tempest tempest) {
+
+ int lastindex=tempest.getFiletrasferscript().lastIndexOf("/");
+ String scpSrcDir=tempest.getFiletrasferscript().substring(0,lastindex);
+ String scpfilename=tempest.getFiletrasferscript().substring(lastindex+1,tempest.getFiletrasferscript().length());
+ String transferfile= scpfilename+" "+(tempest.getFiletransferparams()!=null?tempest.getFiletransferparams().replaceAll(",", " "):" ");
+
+ return camunda.getRuntimeService().startProcessInstanceByKey("tempest",
+ Variables.putValue("filename", tempest.getFilename()).putValue("fileparams", tempest.getFileparams()).
+ putValue("verifier", tempest.getDeploymentverifier()).putValue("verifierfileparams", tempest.getVerifierparams()).putValue("waittime", tempest.getWaittime()).
+ putValue("iterations", tempest.getNoofiterations()).putValue("remotserver", tempest.getRemoteserver())
+ .putValue("username", tempest.getUsername())
+ .putValue("password", tempest.getPassword())
+ .putValue("port", tempest.getPortnumber()).putValue("srcdir", tempest.getSrcdir()).putValue("destdir",tempest.getDestdir()).putValue("ScpScriptFilepath", transferfile).
+ putValue("scpsrcdir", scpSrcDir)
+ );
+
+ }
+
+
+ @Async
+ public void executeApacheProcess(Apache apache) {
+ try {
+ executeApacheService(apache);
+ }catch(TaskExecutorException ex) {
+ logger.error("Apache execution failed ",ex);
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,apache.getSitename(),null,"exception: "+ex.getMessage(),null));
+ return;
+ }
+ logger.debug("Apache execution sucess ");
+ deployResponseSenderService.sendResponse(new BuildResponse(null,null,null,null,null,apache.getSitename(),null,"success",null));
+
+
+ }
+
+
+ private ProcessInstance executeApacheService(Apache apache) {
+
+ int lastindex=apache.getFiletrasferscript().lastIndexOf("/");
+ String scpSrcDir=apache.getFiletrasferscript().substring(0,lastindex);
+ String scpfilename=apache.getFiletrasferscript().substring(lastindex+1,apache.getFiletrasferscript().length());
+
+ String transferfile= scpfilename+" "+(apache.getFiletransferparams()!=null?apache.getFiletransferparams().replaceAll(",", " "):" ");
+
+ return camunda.getRuntimeService().startProcessInstanceByKey("apache",
+ Variables.putValue("filename", apache.getFilename()).putValue("fileparams", apache.getFileparams()).
+ putValue("verifier", apache.getDeploymentverifier()).putValue("verifierfileparams", apache.getVerifierparams()).putValue("waittime", apache.getWaittime()).
+ putValue("iterations", apache.getNoofiterations()).putValue("remotserver", apache.getRemoteserver())
+ .putValue("username", apache.getUsername())
+ .putValue("password", apache.getPassword())
+ .putValue("port", apache.getPortnumber()).
+ putValue("srcdir", apache.getSrcdir()).putValue("destdir",apache.getDestdir()).
+ putValue("scpfilename", transferfile).putValue("scpdir", scpSrcDir)
+ );
+
+ }
+
+
+ }
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.service.impl;\r
-\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.http.HttpEntity;\r
-import org.springframework.http.HttpHeaders;\r
-import org.springframework.http.HttpMethod;\r
-import org.springframework.http.ResponseEntity;\r
-import org.springframework.stereotype.Service;\r
-import org.springframework.web.client.RestTemplate;\r
-\r
-import com.akraino.bpm.Exception.TaskExecutorException;\r
-import com.akraino.bpm.config.CamundaCorsFilter;\r
-import com.akraino.bpm.model.BuildResponse;\r
-import com.akraino.bpm.service.DeployResponseSenderService;\r
-\r
-@Service("deployResponseSenderService")\r
-public class DeployResponseSenderServiceImpl implements DeployResponseSenderService {\r
- \r
- private static Logger logger = LoggerFactory.getLogger(DeployResponseSenderServiceImpl.class);\r
-\r
- @Autowired\r
- private RestTemplate restTemplate; \r
- \r
- @Autowired \r
- private CamundaCorsFilter camundaCorsFilter;\r
- \r
- public void sendResponse(BuildResponse response) {\r
- try {\r
- logger.debug(response.toString());\r
- HttpHeaders header = new HttpHeaders();\r
- header.add("tokenId", camundaCorsFilter.getTokenId());\r
- HttpEntity<BuildResponse> request = new HttpEntity<BuildResponse>(response,header); \r
- ResponseEntity<Void> httpresposne =restTemplate\r
- .exchange(camundaCorsFilter.getBuildresponseurl(), HttpMethod.POST, request, Void.class);\r
- \r
- logger.debug("Build response HttpResponseStatus :"+httpresposne.getStatusCodeValue());\r
- }catch (Exception e ) {\r
- logger.error("problem while sending response :"+e.getMessage());\r
- \r
- throw new TaskExecutorException("problem while sending response :"+e.getMessage());\r
- \r
- }\r
- }\r
- \r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.service.impl;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import com.akraino.bpm.Exception.TaskExecutorException;
+import com.akraino.bpm.config.CamundaCorsFilter;
+import com.akraino.bpm.model.BuildResponse;
+import com.akraino.bpm.service.DeployResponseSenderService;
+
+@Service("deployResponseSenderService")
+public class DeployResponseSenderServiceImpl implements DeployResponseSenderService {
+
+ private static Logger logger = LoggerFactory.getLogger(DeployResponseSenderServiceImpl.class);
+
+ @Autowired
+ private RestTemplate restTemplate;
+
+ @Autowired
+ private CamundaCorsFilter camundaCorsFilter;
+
+ public void sendResponse(BuildResponse response) {
+ try {
+ logger.debug(response.toString());
+ HttpHeaders header = new HttpHeaders();
+ header.add("tokenId", camundaCorsFilter.getTokenId());
+ HttpEntity<BuildResponse> request = new HttpEntity<BuildResponse>(response,header);
+ ResponseEntity<Void> httpresposne =restTemplate
+ .exchange(camundaCorsFilter.getBuildresponseurl(), HttpMethod.POST, request, Void.class);
+
+ logger.debug("Build response HttpResponseStatus :"+httpresposne.getStatusCodeValue());
+ }catch (Exception e ) {
+ logger.error("problem while sending response :"+e.getMessage());
+
+ throw new TaskExecutorException("problem while sending response :"+e.getMessage());
+
+ }
+ }
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.service.impl;\r
-\r
-import java.io.File;\r
-import java.io.FileInputStream;\r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.stereotype.Service;\r
-\r
-import com.akraino.bpm.Exception.TaskExecutorException;\r
-import com.akraino.bpm.service.FileTransferService;\r
-import com.jcraft.jsch.ChannelSftp;\r
-import com.jcraft.jsch.JSch;\r
-import com.jcraft.jsch.Session;\r
-\r
-@Service("fileTransferService")\r
-public class FileTransferServiceImpl implements FileTransferService {\r
- \r
- private static Logger logger = LoggerFactory.getLogger(FileTransferServiceImpl.class);\r
-\r
- public void transferFile(String srcdir, String destdir, String filename,String servername,String username,String password,int port) {\r
- \r
- logger.debug("file transfor filename={},srcdir={},destdir={}",filename,srcdir,destdir);\r
- ChannelSftp sftpChannel=null;\r
- try {\r
- JSch jsch = new JSch();\r
- Session session = jsch.getSession(username, servername, port);\r
- session.setConfig("StrictHostKeyChecking", "no");\r
- session.setPassword(password);\r
- session.connect();\r
- sftpChannel = (ChannelSftp)session.openChannel("sftp");\r
- sftpChannel.setPty(true);\r
- sftpChannel.connect();\r
- sftpChannel.cd(destdir);\r
- sftpChannel.put(new FileInputStream(new File (srcdir+"/"+filename)), filename);\r
- sftpChannel.chmod(Integer.parseInt("777", 8),filename);\r
- } catch (Exception e) {\r
- logger.error("Exception occured while ftp : "+e);\r
- throw new TaskExecutorException("problem while transfering the file to remote machine :"+e.getMessage());\r
- } finally {\r
- sftpChannel.disconnect();\r
- }\r
- }\r
- \r
-\r
- public void transferFile(String srcdir, String destdir,String servername,String username,String password,int port) {\r
- \r
- List<File> files=getAllfiles(new File(srcdir));\r
- for(File file: files) {\r
- transferFile(srcdir,destdir,file.getName(),servername,username,password,port);\r
- }\r
- \r
- \r
- }\r
- \r
- private List<File> getAllfiles(File rootDirectory){\r
- List<File> results = new ArrayList<File>();\r
- \r
- if(rootDirectory==null) {\r
- throw new TaskExecutorException("problem while transfering the file to remote machine : src diectory Not found");\r
- }\r
- \r
- for(File currentItem : rootDirectory.listFiles()){\r
- if(currentItem.isDirectory()){\r
- results.addAll(getAllfiles(currentItem));\r
- }\r
- else{\r
- results.add(currentItem);\r
- }\r
- }\r
- return results;\r
- }\r
- \r
-\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.service.impl;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import com.akraino.bpm.Exception.TaskExecutorException;
+import com.akraino.bpm.service.FileTransferService;
+import com.jcraft.jsch.ChannelSftp;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.Session;
+
+@Service("fileTransferService")
+public class FileTransferServiceImpl implements FileTransferService {
+
+ private static Logger logger = LoggerFactory.getLogger(FileTransferServiceImpl.class);
+
+ public void transferFile(String srcdir, String destdir, String filename,String servername,String username,String password,int port) {
+
+ logger.debug("file transfor filename={},srcdir={},destdir={}",filename,srcdir,destdir);
+ ChannelSftp sftpChannel=null;
+ try {
+ JSch jsch = new JSch();
+ Session session = jsch.getSession(username, servername, port);
+ session.setConfig("StrictHostKeyChecking", "no");
+ session.setPassword(password);
+ session.connect();
+ sftpChannel = (ChannelSftp)session.openChannel("sftp");
+ sftpChannel.setPty(true);
+ sftpChannel.connect();
+ sftpChannel.cd(destdir);
+ sftpChannel.put(new FileInputStream(new File (srcdir+"/"+filename)), filename);
+ sftpChannel.chmod(Integer.parseInt("777", 8),filename);
+ } catch (Exception e) {
+ logger.error("Exception occured while ftp : "+e);
+ throw new TaskExecutorException("problem while transfering the file to remote machine :"+e.getMessage());
+ } finally {
+ sftpChannel.disconnect();
+ }
+ }
+
+
+ public void transferFile(String srcdir, String destdir,String servername,String username,String password,int port) {
+
+ List<File> files=getAllfiles(new File(srcdir));
+ for(File file: files) {
+ transferFile(srcdir,destdir,file.getName(),servername,username,password,port);
+ }
+
+
+ }
+
+ private List<File> getAllfiles(File rootDirectory){
+ List<File> results = new ArrayList<File>();
+
+ if(rootDirectory==null) {
+ throw new TaskExecutorException("problem while transfering the file to remote machine : src diectory Not found");
+ }
+
+ for(File currentItem : rootDirectory.listFiles()){
+ if(currentItem.isDirectory()){
+ results.addAll(getAllfiles(currentItem));
+ }
+ else{
+ results.add(currentItem);
+ }
+ }
+ return results;
+ }
+
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.service.impl;\r
-\r
-import java.io.BufferedReader;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.io.InputStreamReader;\r
-\r
-\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.stereotype.Service;\r
-\r
-import com.akraino.bpm.Exception.TaskExecutorException;\r
-import com.akraino.bpm.service.RemoteDeploymentVerificationService;\r
-import com.jcraft.jsch.ChannelExec;\r
-import com.jcraft.jsch.JSch;\r
-import com.jcraft.jsch.Session;\r
-\r
-\r
-@Service("remoteDeploymentVerificationService")\r
-public class RemoteDeploymentverificationServiceImpl implements RemoteDeploymentVerificationService{\r
-\r
- private static Logger logger = LoggerFactory.getLogger(RemoteDeploymentverificationServiceImpl.class);\r
- \r
- public void executeScript(String remoteserver,String username,String password,int portnumber,\r
- String filename,String fileparams,String srcdir,String destdir,int waitttime,int iterations,String command) {\r
- \r
- boolean issuccess=false;\r
- //String filepath=destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");\r
- ChannelExec channelExec=null;\r
- BufferedReader reader =null;\r
- Session session=null;\r
- for( int i=0;i<=iterations;i++) {\r
- try {\r
- logger.debug("Executing the deployment verification script.............iteration : {}",i);\r
- Thread.sleep(waitttime*1000);\r
- JSch jsch = new JSch();\r
- session = jsch.getSession(username, remoteserver, portnumber);\r
- session.setConfig("StrictHostKeyChecking", "no");\r
- session.setPassword(password);\r
- session.connect();\r
- channelExec = (ChannelExec)session.openChannel("exec");\r
- InputStream in = channelExec.getInputStream();\r
- channelExec.setPty(true);\r
- channelExec.setCommand(command);\r
- channelExec.connect();\r
- reader = new BufferedReader(new InputStreamReader(in));\r
- String line;\r
- logger.debug("Script output......................");\r
- while ((line = reader.readLine()) != null){\r
- logger.debug(line);\r
- }\r
- channelExec.disconnect();\r
- while (!channelExec.isClosed()) {\r
-\r
- }\r
- int exitStatus = channelExec.getExitStatus();\r
- logger.debug("Script exit code :"+exitStatus);\r
- if(exitStatus==0) {\r
- issuccess=true;\r
- }\r
- }\r
- catch (IOException e) {\r
- throw new TaskExecutorException(filename + " not found.");\r
- } catch (Exception e) {\r
- throw new TaskExecutorException("problem while executing the script "+command);\r
- }finally{\r
- if(reader!=null) {\r
- try {\r
- reader.close();\r
- }catch(Exception e) {\r
- throw new TaskExecutorException("onap build failed");\r
- }\r
- }\r
- if(session!=null) {\r
- session.disconnect();\r
- }\r
- }\r
- \r
- if(issuccess) {\r
- break;\r
- }\r
- \r
- }\r
- \r
- if(!issuccess) {\r
- logger.debug("verification script returned 1 ");\r
- throw new TaskExecutorException(" verification script exit code : 1");\r
- }\r
- }\r
- \r
- \r
-\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.service.impl;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import com.akraino.bpm.Exception.TaskExecutorException;
+import com.akraino.bpm.service.RemoteDeploymentVerificationService;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.Session;
+
+
+@Service("remoteDeploymentVerificationService")
+public class RemoteDeploymentverificationServiceImpl implements RemoteDeploymentVerificationService{
+
+ private static Logger logger = LoggerFactory.getLogger(RemoteDeploymentverificationServiceImpl.class);
+
+ public void executeScript(String remoteserver,String username,String password,int portnumber,
+ String filename,String fileparams,String srcdir,String destdir,int waitttime,int iterations,String command) {
+
+ boolean issuccess=false;
+ //String filepath=destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");
+ ChannelExec channelExec=null;
+ BufferedReader reader =null;
+ Session session=null;
+ for( int i=0;i<=iterations;i++) {
+ try {
+ logger.debug("Executing the deployment verification script.............iteration : {}",i);
+ Thread.sleep(waitttime*1000);
+ JSch jsch = new JSch();
+ session = jsch.getSession(username, remoteserver, portnumber);
+ session.setConfig("StrictHostKeyChecking", "no");
+ session.setPassword(password);
+ session.connect();
+ channelExec = (ChannelExec)session.openChannel("exec");
+ InputStream in = channelExec.getInputStream();
+ channelExec.setPty(true);
+ channelExec.setCommand(command);
+ channelExec.connect();
+ reader = new BufferedReader(new InputStreamReader(in));
+ String line;
+ logger.debug("Script output......................");
+ while ((line = reader.readLine()) != null){
+ logger.debug(line);
+ }
+ channelExec.disconnect();
+ while (!channelExec.isClosed()) {
+
+ }
+ int exitStatus = channelExec.getExitStatus();
+ logger.debug("Script exit code :"+exitStatus);
+ if(exitStatus==0) {
+ issuccess=true;
+ }
+ }
+ catch (IOException e) {
+ throw new TaskExecutorException(filename + " not found.");
+ } catch (Exception e) {
+ throw new TaskExecutorException("problem while executing the script "+command);
+ }finally{
+ if(reader!=null) {
+ try {
+ reader.close();
+ }catch(Exception e) {
+ throw new TaskExecutorException("onap build failed");
+ }
+ }
+ if(session!=null) {
+ session.disconnect();
+ }
+ }
+
+ if(issuccess) {
+ break;
+ }
+
+ }
+
+ if(!issuccess) {
+ logger.debug("verification script returned 1 ");
+ throw new TaskExecutorException(" verification script exit code : 1");
+ }
+ }
+
+
+
+}
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.service.impl;\r
-\r
-import java.io.BufferedReader;\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.io.InputStreamReader;\r
-\r
-\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.stereotype.Service;\r
-\r
-import com.akraino.bpm.Exception.TaskExecutorException;\r
-import com.akraino.bpm.service.RemoteScriptExecutionService;\r
-import com.jcraft.jsch.ChannelExec;\r
-import com.jcraft.jsch.JSch;\r
-import com.jcraft.jsch.Session;\r
-\r
-@Service("remoteScriptExecutionService")\r
-public class RemoteScriptExecutionServiceImpl implements RemoteScriptExecutionService{\r
-\r
- private static Logger logger = LoggerFactory.getLogger(RemoteScriptExecutionServiceImpl.class);\r
- \r
- public void executeRemoteScript(String remoteserver,String username,String password,int portnumber,String filename,\r
- String fileparams,String srcdir,String destdir,String command) {\r
- \r
- //String filepath=destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");\r
- ChannelExec channelExec=null;\r
- Session session=null;\r
- BufferedReader reader =null;\r
- try {\r
- //tranferFile(remoteserver,portnumber,username,password,filename,srcdir,destdir);\r
- logger.debug("executing the script "+command);\r
- JSch jsch = new JSch();\r
- session = jsch.getSession(username, remoteserver, portnumber);\r
- session.setConfig("StrictHostKeyChecking", "no");\r
- session.setPassword(password);\r
- session.connect();\r
- session.setTimeout(36000000);\r
- channelExec = (ChannelExec)session.openChannel("exec");\r
- InputStream in = channelExec.getInputStream();\r
- channelExec.setCommand(command);\r
- channelExec.setPty(true);\r
- \r
- channelExec.connect(36000000);\r
- reader = new BufferedReader(new InputStreamReader(in));\r
- String line;\r
- logger.debug("Script output......................");\r
- while ((line = reader.readLine()) != null){\r
- logger.debug(line);\r
- }\r
- \r
- channelExec.disconnect();\r
- while (!channelExec.isClosed()) {\r
-\r
- }\r
-\r
- int exitStatus = channelExec.getExitStatus();\r
- \r
- logger.debug("Script exit code :"+exitStatus);\r
- if(exitStatus!=0) {\r
- throw new TaskExecutorException("problem while executing the script . exist code :"+exitStatus);\r
- }\r
- \r
- \r
- } catch (IOException e) {\r
- throw new TaskExecutorException(filename + " not found.");\r
- } catch (Exception e) {\r
- throw new TaskExecutorException("Problem while executing script"+e.getMessage());\r
- }finally{\r
- if(reader!=null) {\r
- try {\r
- reader.close();\r
- }catch(Exception e) {\r
- throw new TaskExecutorException("onap build failed");\r
- }\r
- }\r
- if(session!=null) {\r
- session.disconnect();\r
- }\r
- }\r
- \r
- \r
- \r
- }\r
- \r
- \r
- \r
-\r
-}\r
- \r
- \r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.service.impl;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import com.akraino.bpm.Exception.TaskExecutorException;
+import com.akraino.bpm.service.RemoteScriptExecutionService;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.JSch;
+import com.jcraft.jsch.Session;
+
+@Service("remoteScriptExecutionService")
+public class RemoteScriptExecutionServiceImpl implements RemoteScriptExecutionService{
+
+ private static Logger logger = LoggerFactory.getLogger(RemoteScriptExecutionServiceImpl.class);
+
+ public void executeRemoteScript(String remoteserver,String username,String password,int portnumber,String filename,
+ String fileparams,String srcdir,String destdir,String command) {
+
+ //String filepath=destdir+"/"+filename+" "+(fileparams!=null?fileparams.replaceAll(",", " "):" ");
+ ChannelExec channelExec=null;
+ Session session=null;
+ BufferedReader reader =null;
+ try {
+ //tranferFile(remoteserver,portnumber,username,password,filename,srcdir,destdir);
+ logger.debug("executing the script "+command);
+ JSch jsch = new JSch();
+ session = jsch.getSession(username, remoteserver, portnumber);
+ session.setConfig("StrictHostKeyChecking", "no");
+ session.setPassword(password);
+ session.connect();
+ session.setTimeout(36000000);
+ channelExec = (ChannelExec)session.openChannel("exec");
+ InputStream in = channelExec.getInputStream();
+ channelExec.setCommand(command);
+ channelExec.setPty(true);
+
+ channelExec.connect(36000000);
+ reader = new BufferedReader(new InputStreamReader(in));
+ String line;
+ logger.debug("Script output......................");
+ while ((line = reader.readLine()) != null){
+ logger.debug(line);
+ }
+
+ channelExec.disconnect();
+ while (!channelExec.isClosed()) {
+
+ }
+
+ int exitStatus = channelExec.getExitStatus();
+
+ logger.debug("Script exit code :"+exitStatus);
+ if(exitStatus!=0) {
+ throw new TaskExecutorException("problem while executing the script . exist code :"+exitStatus);
+ }
+
+
+ } catch (IOException e) {
+ throw new TaskExecutorException(filename + " not found.");
+ } catch (Exception e) {
+ throw new TaskExecutorException("Problem while executing script"+e.getMessage());
+ }finally{
+ if(reader!=null) {
+ try {
+ reader.close();
+ }catch(Exception e) {
+ throw new TaskExecutorException("onap build failed");
+ }
+ }
+ if(session!=null) {
+ session.disconnect();
+ }
+ }
+
+
+
+ }
+
+
+
+
+}
+
+
-/*\r
- * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-package com.akraino.bpm.service.impl;\r
-\r
-import java.io.BufferedReader;\r
-import java.io.File;\r
-import java.io.IOException;\r
-import java.io.InputStreamReader;\r
-\r
-import org.slf4j.Logger;\r
-import org.slf4j.LoggerFactory;\r
-import org.springframework.stereotype.Service;\r
-\r
-import com.akraino.bpm.Exception.TaskExecutorException;\r
-import com.akraino.bpm.service.ScriptExecutionService;\r
-\r
-@Service("scriptExecutionService")\r
-public class ScriptExecutionServiceImpl implements ScriptExecutionService{\r
-\r
- private static Logger logger = LoggerFactory.getLogger(ScriptExecutionServiceImpl.class);\r
- \r
- public void executeScript(String filepatch) {\r
- \r
- try {\r
- logger.debug("Executing the script.............");\r
- Process p = Runtime.getRuntime().exec(filepatch);\r
- BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));\r
- String line = "";\r
- while ((line = input.readLine()) != null) {\r
- logger.debug(line);\r
- }\r
- p.waitFor();\r
- logger.debug("Script exit code :"+p.exitValue());\r
- if(p.exitValue()!=0) {\r
- throw new TaskExecutorException("problem while executing the script . exist code :"+p.exitValue());\r
- }\r
- \r
- \r
- } catch (IOException e) {\r
- throw new TaskExecutorException(filepatch + " not found.");\r
- } catch (InterruptedException e) {\r
- throw new TaskExecutorException("problem while executing the script "+filepatch);\r
- }\r
- \r
- }\r
- public void executeCDScript(String dir,String cmd) {\r
- \r
- try {\r
- logger.debug("Executing the script.............dir:{},command:{}",dir,cmd);\r
- \r
- String[] command = { "/bin/sh", "-c", "sh "+cmd };\r
- Process p = Runtime.getRuntime().exec(command, null, new File(dir));\r
- p.waitFor();\r
- BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));\r
- String line = "";\r
- while ((line = input.readLine()) != null) {\r
- logger.debug(line);\r
- }\r
- logger.debug("Script exit code :"+p.exitValue());\r
- if(p.exitValue()!=0) {\r
- throw new TaskExecutorException("problem while executing the script . exist code :"+p.exitValue());\r
- }\r
- \r
- \r
- } catch (IOException e) {\r
- throw new TaskExecutorException(cmd + " not found.");\r
- } catch (InterruptedException e) {\r
- throw new TaskExecutorException("problem while executing the script "+cmd);\r
- }\r
- \r
- }\r
- \r
- \r
- /*public void executeAirshipScript(String cmd) {\r
- \r
- try {\r
- logger.debug("Executing the script.............{}",cmd);\r
- ProcessBuilder pb = new ProcessBuilder(cmd); \r
- Process shellProcess = pb.start();\r
- \r
- shellProcess.waitFor(); \r
- BufferedReader input = new BufferedReader(new InputStreamReader(shellProcess.getInputStream()));\r
- String line = "";\r
- while ((line = input.readLine()) != null) {\r
- logger.debug(line);\r
- }\r
- logger.debug("Script exit code :"+shellProcess.exitValue());\r
- if(shellProcess.exitValue()!=0) {\r
- throw new TaskExecutorException("problem while executing the script . exist code :"+shellProcess.exitValue());\r
- }\r
- \r
- \r
- } catch (IOException e) {\r
- throw new TaskExecutorException(cmd + " not found.");\r
- } catch (InterruptedException e) {\r
- throw new TaskExecutorException("problem while executing the script "+cmd);\r
- }\r
- \r
- }*/\r
-\r
-}\r
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * 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.
+ */
+
+package com.akraino.bpm.service.impl;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import com.akraino.bpm.Exception.TaskExecutorException;
+import com.akraino.bpm.service.ScriptExecutionService;
+
+@Service("scriptExecutionService")
+public class ScriptExecutionServiceImpl implements ScriptExecutionService{
+
+ private static Logger logger = LoggerFactory.getLogger(ScriptExecutionServiceImpl.class);
+
+ public void executeScript(String filepatch) {
+
+ try {
+ logger.debug("Executing the script.............");
+ Process p = Runtime.getRuntime().exec(filepatch);
+ BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
+ String line = "";
+ while ((line = input.readLine()) != null) {
+ logger.debug(line);
+ }
+ p.waitFor();
+ logger.debug("Script exit code :"+p.exitValue());
+ if(p.exitValue()!=0) {
+ throw new TaskExecutorException("problem while executing the script . exist code :"+p.exitValue());
+ }
+
+
+ } catch (IOException e) {
+ throw new TaskExecutorException(filepatch + " not found.");
+ } catch (InterruptedException e) {
+ throw new TaskExecutorException("problem while executing the script "+filepatch);
+ }
+
+ }
+ public void executeCDScript(String dir,String cmd) {
+
+ try {
+ logger.debug("Executing the script.............dir:{},command:{}",dir,cmd);
+
+ String[] command = { "/bin/sh", "-c", "sh "+cmd };
+ Process p = Runtime.getRuntime().exec(command, null, new File(dir));
+ p.waitFor();
+ BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
+ String line = "";
+ while ((line = input.readLine()) != null) {
+ logger.debug(line);
+ }
+ logger.debug("Script exit code :"+p.exitValue());
+ if(p.exitValue()!=0) {
+ throw new TaskExecutorException("problem while executing the script . exist code :"+p.exitValue());
+ }
+
+
+ } catch (IOException e) {
+ throw new TaskExecutorException(cmd + " not found.");
+ } catch (InterruptedException e) {
+ throw new TaskExecutorException("problem while executing the script "+cmd);
+ }
+
+ }
+
+
+ /*public void executeAirshipScript(String cmd) {
+
+ try {
+ logger.debug("Executing the script.............{}",cmd);
+ ProcessBuilder pb = new ProcessBuilder(cmd);
+ Process shellProcess = pb.start();
+
+ shellProcess.waitFor();
+ BufferedReader input = new BufferedReader(new InputStreamReader(shellProcess.getInputStream()));
+ String line = "";
+ while ((line = input.readLine()) != null) {
+ logger.debug(line);
+ }
+ logger.debug("Script exit code :"+shellProcess.exitValue());
+ if(shellProcess.exitValue()!=0) {
+ throw new TaskExecutorException("problem while executing the script . exist code :"+shellProcess.exitValue());
+ }
+
+
+ } catch (IOException e) {
+ throw new TaskExecutorException(cmd + " not found.");
+ } catch (InterruptedException e) {
+ throw new TaskExecutorException("problem while executing the script "+cmd);
+ }
+
+ }*/
+
+}
-camunda.bpm:\r
- admin-user:\r
- id: admin\r
- password: admin \r
- firstName: administrator\r
- filter:\r
- create: All tasks\r
- buildresponseurl: http://localhost:8069/AECPortalMgmt/install/status/\r
- tokenId: YWthZG1pbg==:9FCBA840BD274292F4DCC995BECE3D09\r
-logging:\r
- file: C:/tmp/scriptexecutor.log\r
- level:\r
- com.akraino.bpm: debug\r
- org.camunda.bpm: warn\r
+camunda.bpm:
+ admin-user:
+ id: admin
+ password: admin
+ firstName: administrator
+ filter:
+ create: All tasks
+ buildresponseurl: http://localhost:8080/status/
+ tokenId: YWthZG1pbg==:9FCBA840BD274292F4DCC995BECE3D09
+logging:
+ file: C:/tmp/scriptexecutor.log
+ level:
+ com.akraino.bpm: debug
+ org.camunda.bpm: warn
org.springframework: warn
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0ryxuei" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.14.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0ryxuei" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.0">
<bpmn:process id="onap" name="onap" isExecutable="true" camunda:versionTag="1">
<bpmn:startEvent id="StartEvent_1" name="ScriptExecutionStartingPoint">
<bpmn:outgoing>SequenceFlow_05ci0iu</bpmn:outgoing>
<bpmn:sequenceFlow id="SequenceFlow_1ssw8fq" sourceRef="Task_19usii1" targetRef="Task_0ss7pht" />
<bpmn:sequenceFlow id="SequenceFlow_0envlli" sourceRef="Task_1ahdja4" targetRef="Task_19usii1" />
<bpmn:sequenceFlow id="SequenceFlow_05ci0iu" sourceRef="StartEvent_1" targetRef="Task_1ahdja4" />
- <bpmn:serviceTask id="Task_1ahdja4" name="ScriptExecutorTask" camunda:delegateExpression="#{scriptExecutorTaskDelegate}">
+ <bpmn:serviceTask id="Task_1ahdja4" name="ScriptExecutorTask" camunda:delegateExpression="#{winScpScriptDelegate}">
<bpmn:incoming>SequenceFlow_05ci0iu</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0envlli</bpmn:outgoing>
</bpmn:serviceTask>
</bpmn:textAnnotation>
<bpmn:association id="Association_0h3xbpb" sourceRef="Task_0ss7pht" targetRef="TextAnnotation_0zgafn7" />
<bpmn:textAnnotation id="TextAnnotation_04jvs8x">
- <bpmn:text>File transfer script </bpmn:text>
+ <bpmn:text>File transfer script</bpmn:text>
</bpmn:textAnnotation>
<bpmn:association id="Association_0liuxn1" sourceRef="Task_1ahdja4" targetRef="TextAnnotation_04jvs8x" />
</bpmn:process>
* limitations under the License.
*/
-package com.akraino.bpm.model;
+package com.akraino.bpm;
-public class WorkflowResponse {
- int status;
- String message;
-
+import org.junit.runner.RunWith;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+public class AkrainoSpringBootApplicationIT {
- public WorkflowResponse(int status, String message) {
- super();
- this.status = status;
- this.message = message;
- }
- public int getStatus() {
- return status;
- }
- public void setStatus(int status) {
- this.status = status;
- }
- public String getMessage() {
- return message;
- }
- public void setMessage(String message) {
- this.message = message;
- }
+
}