2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Modifications Copyright (C) 2018 IBM.
8 * ================================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=========================================================
23 package org.onap.so.adapters.tenant;
27 import javax.jws.WebMethod;
28 import javax.jws.WebParam;
29 import javax.jws.WebParam.Mode;
30 import javax.jws.WebService;
31 import javax.xml.bind.annotation.XmlElement;
32 import javax.xml.ws.Holder;
33 import org.onap.so.adapters.tenant.exceptions.TenantException;
34 import org.onap.so.adapters.tenantrest.TenantRollback;
35 import org.onap.so.entity.MsoRequest;
37 @WebService(name = "TenantAdapter", targetNamespace = "http://org.onap.so/tenant")
38 public interface MsoTenantAdapter {
40 * This is the "Create Tenant" Web Service Endpoint definition.
43 public void createTenant(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId,
44 @WebParam(name = "tenantName") @XmlElement(required = true) String tenantName,
45 @WebParam(name = "metadata") Map<String, String> metadata,
46 @WebParam(name = "failIfExists") Boolean failIfExists, @WebParam(name = "backout") Boolean backout,
47 @WebParam(name = "request") MsoRequest msoRequest,
48 @WebParam(name = "tenantId", mode = Mode.OUT) Holder<String> tenantId,
49 @WebParam(name = "rollback", mode = Mode.OUT) Holder<TenantRollback> rollback) throws TenantException;
52 public void queryTenant(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId,
53 @WebParam(name = "tenantNameOrId") @XmlElement(required = true) String tenantNameOrId,
54 @WebParam(name = "request") MsoRequest msoRequest,
55 @WebParam(name = "tenantId", mode = Mode.OUT) Holder<String> tenantId,
56 @WebParam(name = "tenantName", mode = Mode.OUT) Holder<String> tenantName,
57 @WebParam(name = "metadata", mode = Mode.OUT) Holder<Map<String, String>> metadata) throws TenantException;
60 public void deleteTenant(@WebParam(name = "cloudSiteId") @XmlElement(required = true) String cloudSiteId,
61 @WebParam(name = "tenantId") @XmlElement(required = true) String tenantId,
62 @WebParam(name = "request") MsoRequest msoRequest,
63 @WebParam(name = "tenantDeleted", mode = Mode.OUT) Holder<Boolean> tenantDeleted) throws TenantException;
66 public void rollbackTenant(@WebParam(name = "rollback") @XmlElement(required = true) TenantRollback rollback)
67 throws TenantException;
70 public void healthCheck();