* 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
+ *
+ * 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.
* ============LICENSE_END=========================================================
- * <p>
+ *
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
package org.onap.crud.service;
import com.google.gson.JsonElement;
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)) {
- 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();
String propertiesKey = CrudProperties.get(CrudServiceConstants.CRD_COLLECTION_PROPERTIES_KEY);
Map<String, String> filter = new HashMap<String, String>();
- for (Map.Entry<String, List<String>> e : uriInfo.getQueryParameters().entrySet()) {
- filter.put(e.getKey(), e.getValue().get(0));
- }
for (Map.Entry<String, List<String>> e : uriInfo.getQueryParameters().entrySet()) {
if (!e.getKey().equals(propertiesKey)) {
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)) {
- 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();