2 * Copyright 2016 [ZTE] and others.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openo.commontosca.catalog.db.wrapper;
18 import java.util.ArrayList;
21 import org.openo.commontosca.catalog.db.common.CatalogResuorceType;
22 import org.openo.commontosca.catalog.db.exception.CatalogResourceException;
23 import org.openo.commontosca.catalog.db.entity.NodeTemplateData;
24 import org.slf4j.Logger;
25 import org.slf4j.LoggerFactory;
31 public class NodeTemplateHandler extends BaseHandler<NodeTemplateData> {
32 private static final Logger logger = LoggerFactory.getLogger(NodeTemplateHandler.class);
34 public ArrayList<NodeTemplateData> query(Map<String, String> queryParam)
35 throws CatalogResourceException {
36 logger.info("NodeTemplateHandler query nodeTemplate info.");
37 ArrayList<NodeTemplateData> data = new ArrayList<NodeTemplateData>();
38 Object result = query(queryParam, CatalogResuorceType.NODETEMPLATE.name());
40 data = (ArrayList<NodeTemplateData>) result;
42 logger.warn("NodeTemplateHandler: query nodeTemplate info is null.");
43 logger.info("NodeTemplateHandler: query nodeTemplate info end.");
49 public void check(NodeTemplateData nodeTemplateData) throws CatalogResourceException {