Code Review
/
aai
/
gizmo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update license date and text
[aai/gizmo.git]
/
src
/
main
/
java
/
org
/
onap
/
crud
/
service
/
CrudRestService.java
diff --git
a/src/main/java/org/onap/crud/service/CrudRestService.java
b/src/main/java/org/onap/crud/service/CrudRestService.java
index
b3c5e7a
..
dbe9d68
100644
(file)
--- a/
src/main/java/org/onap/crud/service/CrudRestService.java
+++ b/
src/main/java/org/onap/crud/service/CrudRestService.java
@@
-1,16
+1,15
@@
/**
* ============LICENSE_START=======================================================
/**
* ============LICENSE_START=======================================================
- *
Gizmo
+ *
org.onap.aai
* ================================================================================
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property.
- * Copyright © 2017 Amdocs
- * All rights reserved.
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 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
*
* ================================================================================
* 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
+ *
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,
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@
-18,8
+17,6
@@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.crud.service;
*/
package org.onap.crud.service;
@@
-96,10
+93,14
@@
public class CrudRestService {
logger.debug("Incoming request..." + content);
Response response = null;
logger.debug("Incoming request..." + content);
Response response = null;
+ Map<String, String> params = new HashMap<String, String>();
+ for (Map.Entry<String, List<String>> e : uriInfo.getQueryParameters().entrySet()) {
+ params.put(e.getKey(), e.getValue().get(0));
+ }
try {
if (validateRequest(req, uri, content, Action.GET, CrudServiceConstants.CRD_AUTH_POLICY_NAME, headers)) {
try {
if (validateRequest(req, uri, content, Action.GET, CrudServiceConstants.CRD_AUTH_POLICY_NAME, headers)) {
-
String result = graphDataService.getVertex(version, id, type
);
+
String result = graphDataService.getVertex(version, id, type, params
);
response = Response.status(Status.OK).entity(result).type(mediaType).build();
} else {
response = Response.status(Status.FORBIDDEN).entity(content).type(MediaType.APPLICATION_JSON).build();
response = Response.status(Status.OK).entity(result).type(mediaType).build();
} else {
response = Response.status(Status.FORBIDDEN).entity(content).type(MediaType.APPLICATION_JSON).build();
@@
-174,11
+175,15
@@
public class CrudRestService {
logger.debug("Incoming request..." + content);
Response response = null;
logger.debug("Incoming request..." + content);
Response response = null;
+ Map<String, String> params = new HashMap<String, String>();
+ for (Map.Entry<String, List<String>> e : uriInfo.getQueryParameters().entrySet()) {
+ params.put(e.getKey(), e.getValue().get(0));
+ }
try {
if (validateRequest(req, uri, content, Action.GET, CrudServiceConstants.CRD_AUTH_POLICY_NAME, headers)) {
try {
if (validateRequest(req, uri, content, Action.GET, CrudServiceConstants.CRD_AUTH_POLICY_NAME, headers)) {
- String result = graphDataService.getEdge(version, id, type);
+ String result = graphDataService.getEdge(version, id, type
, params
);
response = Response.status(Status.OK).entity(result).type(mediaType).build();
} else {
response = Response.status(Status.FORBIDDEN).entity(content).type(MediaType.APPLICATION_JSON).build();
response = Response.status(Status.OK).entity(result).type(mediaType).build();
} else {
response = Response.status(Status.FORBIDDEN).entity(content).type(MediaType.APPLICATION_JSON).build();