d82d478a933c64b688cbcaf579828c50f416f78b
[so.git] / adapters / mso-openstack-adapters / src / main / java / org / onap / so / adapters / tenant / MsoTenantAdapter.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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
12  * 
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  * 
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=========================================================
21  */
22
23 package org.onap.so.adapters.tenant;
24
25
26 import java.util.Map;
27
28 import javax.jws.WebMethod;
29 import javax.jws.WebParam;
30 import javax.jws.WebParam.Mode;
31 import javax.jws.WebService;
32 import javax.xml.bind.annotation.XmlElement;
33 import javax.xml.ws.Holder;
34
35 import org.onap.so.adapters.tenant.exceptions.TenantException;
36 import org.onap.so.adapters.tenantrest.TenantRollback;
37 import org.onap.so.entity.MsoRequest;
38
39 @WebService (name="TenantAdapter", targetNamespace="http://org.onap.so/tenant")
40 public interface MsoTenantAdapter
41 {
42         /**
43          * This is the "Create Tenant" Web Service Endpoint definition.
44          */
45         @WebMethod
46         public void createTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
47                                                         @WebParam(name="tenantName") @XmlElement(required=true) String tenantName,
48                                                         @WebParam(name="metadata") Map<String,String> metadata,
49                                                         @WebParam(name="failIfExists") Boolean failIfExists,
50                                                         @WebParam(name="backout") Boolean backout,
51                                                         @WebParam(name="request") MsoRequest msoRequest,
52                                                         @WebParam(name="tenantId", mode=Mode.OUT) Holder<String> tenantId,
53                                                         @WebParam(name="rollback", mode=Mode.OUT) Holder<TenantRollback> rollback )
54                 throws TenantException;
55         
56         @WebMethod
57         public void queryTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
58                                                         @WebParam(name="tenantNameOrId") @XmlElement(required=true) String tenantNameOrId,
59                                                         @WebParam(name="request") MsoRequest msoRequest,
60                                                         @WebParam(name="tenantId", mode=Mode.OUT) Holder<String> tenantId,
61                                                         @WebParam(name="tenantName", mode=Mode.OUT) Holder<String> tenantName,
62                                                         @WebParam(name="metadata", mode=Mode.OUT) Holder<Map<String,String>> metadata )
63                 throws TenantException;
64         
65         @WebMethod
66         public void deleteTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
67                                                         @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
68                                                         @WebParam(name="request") MsoRequest msoRequest,
69                                                         @WebParam(name="tenantDeleted", mode=Mode.OUT) Holder<Boolean> tenantDeleted)
70                 throws TenantException;
71         
72         @WebMethod
73         public void rollbackTenant (@WebParam(name="rollback") @XmlElement(required=true) TenantRollback rollback)
74                 throws TenantException;
75         
76         @WebMethod
77         public void healthCheck ();
78 }