aboutsummaryrefslogtreecommitdiffstats
path: root/appc-dispatcher/appc-request-handler/appc-request-handler-api
diff options
context:
space:
mode:
authorAnand <ac204h@att.com>2018-01-04 19:35:51 -0500
committerSkip Wonnell <skip@att.com>2018-01-08 22:09:50 +0000
commit36bcd566167f2f91c0e8e7a304fce5f6bc150776 (patch)
tree7ba7acfee7e520da83a2b6286ea464285bc8cf67 /appc-dispatcher/appc-request-handler/appc-request-handler-api
parent38d293d605b42f88c9c82319ba848b4b81e45b64 (diff)
Include impacted changes for APPC-346,APPC-348
Issue-ID: APPC-347 Change-Id: I399bc2a1e0dfd481e103032a373bb80fce5baf41 Signed-off-by: Anand <ac204h@att.com>
Diffstat (limited to 'appc-dispatcher/appc-request-handler/appc-request-handler-api')
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-api/pom.xml116
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/RequestHandler.java20
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/objects/RequestHandlerInput.java22
3 files changed, 87 insertions, 71 deletions
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-api/pom.xml b/appc-dispatcher/appc-request-handler/appc-request-handler-api/pom.xml
index 87cabf6ee..14f1de123 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-api/pom.xml
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-api/pom.xml
@@ -1,42 +1,68 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.onap.appc</groupId>
- <artifactId>appc-request-handler</artifactId>
- <version>1.3.0-SNAPSHOT</version>
- </parent>
- <artifactId>appc-request-handler-api</artifactId>
- <packaging>bundle</packaging>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ ONAP : APPC
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Copyright (C) 2017 Amdocs
+ =============================================================================
+ 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
- <name>appc-request-handler-api</name>
- <url>http://maven.apache.org</url>
+ http://www.apache.org/licenses/LICENSE-2.0
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- </properties>
+ 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.
- <dependencies>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- </dependency>
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ ============LICENSE_END=========================================================
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-request-handler</artifactId>
+ <version>1.3.0-SNAPSHOT</version>
+ </parent>
- <dependency>
- <groupId>org.onap.appc</groupId>
- <artifactId>appc-data-access-lib</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.appc</groupId>
- <artifactId>appc-command-executor-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.onap.appc</groupId>
- <artifactId>appc-common</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
+ <artifactId>appc-request-handler-api</artifactId>
+ <packaging>bundle</packaging>
+ <name>APPC Request Handler- API</name>
+ <url>http://maven.apache.org</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-data-access-lib</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-command-executor-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.appc</groupId>
+ <artifactId>appc-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
<build>
<plugins>
<plugin>
@@ -46,15 +72,17 @@
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Version>${project.version}</Bundle-Version>
- <Export-Package>org.onap.appc.requesthandler,org.onap.appc.requesthandler.objects,org.onap.appc.transactionrecorder,org.onap.appc.message</Export-Package>
- <Embed-Dependency>
- javax.json;scope=compile|runtime;inline=false
- </Embed-Dependency>
- <Embed-Transitive>true</Embed-Transitive>
- <Import-Package>
- org.onap.appc.domainmodel.lcm,
- *;resolution:=optional
- </Import-Package>
+ <Export-Package>
+ org.onap.appc.requesthandler,org.onap.appc.requesthandler.objects,org.onap.appc.transactionrecorder,org.onap.appc.message
+ </Export-Package>
+ <Embed-Dependency>
+ javax.json;scope=compile|runtime;inline=false
+ </Embed-Dependency>
+ <Embed-Transitive>true</Embed-Transitive>
+ <Import-Package>
+ org.onap.appc.domainmodel.lcm,
+ *;resolution:=optional
+ </Import-Package>
</instructions>
</configuration>
</plugin>
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/RequestHandler.java b/appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/RequestHandler.java
index d8aba25b2..3193bcba8 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/RequestHandler.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/RequestHandler.java
@@ -25,7 +25,7 @@
package org.onap.appc.requesthandler;
import org.onap.appc.domainmodel.lcm.RuntimeContext;
-import org.onap.appc.executor.UnstableVNFException;
+import org.onap.appc.exceptions.APPCException;
import org.onap.appc.requesthandler.objects.RequestHandlerInput;
import org.onap.appc.requesthandler.objects.RequestHandlerOutput;
@@ -50,11 +50,10 @@ public interface RequestHandler {
/**
* This method perform operations required before execution of workflow starts. It retrieves next state for current operation from Lifecycle manager and update it in AAI.
* @param vnf_id vnf id or target Id on which updates required
- * @param requestIdentifierString - string contains id uniquely represents the request
* @param forceFlag
* @return true in case AAI updates are successful. false for any error or exception.
*/
- void onRequestExecutionStart(String vnf_id, boolean readOnlyActivity, String requestIdentifierString, boolean forceFlag) throws UnstableVNFException;
+ void onRequestExecutionStart(String vnf_id, boolean readOnlyActivity, boolean forceFlag) ;
/**
* This method perform following operations required after execution of workflow.
@@ -64,23 +63,12 @@ public interface RequestHandler {
* Generate audit logs.
* Adds transaction record to database id if transaction logging is enabled.
* @param runtimeContext RuntimeContext object which contains all parameters from request, response and few parameters from AA&I
- * @param isAAIUpdated boolean flag which indicate AAI upodate status after request completion.
*/
- void onRequestExecutionEnd(RuntimeContext runtimeContext, boolean isAAIUpdated);
-
- /**
- * This method perform following operations required if TTL ends when request still waiting in execution queue .
- * It posts asynchronous response to message bus (DMaaP).
- * Unlock VNF Id
- * Removes request from request registry.
- * @param runtimeContext RuntimeContext object which contains all parameters from request, response and few parameters from AA&I;
- * @param updateAAI boolean flag which indicate AAI upodate status after request completion.
- */
- void onRequestTTLEnd(RuntimeContext runtimeContext, boolean updateAAI);
+ void onRequestExecutionEnd(RuntimeContext runtimeContext);
/**
* This method returns the count of in progress requests
* * @return in progress requests count
*/
- int getInprogressRequestCount();
+ int getInprogressRequestCount() throws APPCException;
}
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/objects/RequestHandlerInput.java b/appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/objects/RequestHandlerInput.java
index 94d35028b..7400b4853 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/objects/RequestHandlerInput.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-api/src/main/java/org/onap/appc/requesthandler/objects/RequestHandlerInput.java
@@ -30,32 +30,32 @@ public class RequestHandlerInput {
private RequestContext requestContext;
- private String rpcName;
+ private String rpcName;
public String getRpcName() {
return rpcName;
- }
+ }
public void setRpcName(String rpcName) {
this.rpcName = rpcName;
- }
+ }
public RequestContext getRequestContext() {
return requestContext;
- }
+ }
public RequestHandlerInput(){
- }
+ }
public void setRequestContext(RequestContext requestContext) {
this.requestContext = requestContext;
- }
+ }
- @Override
- public String toString() {
- return "RequestHandlerInput{" +
+ @Override
+ public String toString() {
+ return "RequestHandlerInput{" +
"requestContext=" + requestContext +
- '}';
- }
+ '}';
+ }
}