Change the header to SO
[so.git] / adapters / mso-tenant-adapter / src / main / java / org / openecomp / mso / 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  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.mso.adapters.tenant;
22
23
24 import java.util.Map;
25
26 import javax.jws.WebMethod;
27 import javax.jws.WebParam;
28 import javax.jws.WebParam.Mode;
29 import javax.jws.WebService;
30 import javax.xml.bind.annotation.XmlElement;
31 import javax.xml.ws.Holder;
32
33 import org.openecomp.mso.adapters.tenant.exceptions.TenantAlreadyExists;
34 import org.openecomp.mso.adapters.tenant.exceptions.TenantException;
35 import org.openecomp.mso.adapters.tenantrest.TenantRollback;
36 import org.openecomp.mso.entity.MsoRequest;
37
38 @WebService (name="TenantAdapter", targetNamespace="http://org.openecomp.mso/tenant")
39 public interface MsoTenantAdapter
40 {
41         /**
42          * This is the "Create Tenant" Web Service Endpoint definition.
43          */
44         @WebMethod
45         public void createTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
46                                                         @WebParam(name="tenantName") @XmlElement(required=true) String tenantName,
47                                                         @WebParam(name="metadata") Map<String,String> metadata,
48                                                         @WebParam(name="failIfExists") Boolean failIfExists,
49                                                         @WebParam(name="backout") Boolean backout,
50                                                         @WebParam(name="request") MsoRequest msoRequest,
51                                                         @WebParam(name="tenantId", mode=Mode.OUT) Holder<String> tenantId,
52                                                         @WebParam(name="rollback", mode=Mode.OUT) Holder<TenantRollback> rollback )
53                 throws TenantException, TenantAlreadyExists;
54         
55         @WebMethod
56         public void queryTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
57                                                         @WebParam(name="tenantNameOrId") @XmlElement(required=true) String tenantNameOrId,
58                                                         @WebParam(name="request") MsoRequest msoRequest,
59                                                         @WebParam(name="tenantId", mode=Mode.OUT) Holder<String> tenantId,
60                                                         @WebParam(name="tenantName", mode=Mode.OUT) Holder<String> tenantName,
61                                                         @WebParam(name="metadata", mode=Mode.OUT) Holder<Map<String,String>> metadata )
62                 throws TenantException;
63         
64         @WebMethod
65         public void deleteTenant (@WebParam(name="cloudSiteId") @XmlElement(required=true) String cloudSiteId,
66                                                         @WebParam(name="tenantId") @XmlElement(required=true) String tenantId,
67                                                         @WebParam(name="request") MsoRequest msoRequest,
68                                                         @WebParam(name="tenantDeleted", mode=Mode.OUT) Holder<Boolean> tenantDeleted)
69                 throws TenantException;
70         
71         @WebMethod
72         public void rollbackTenant (@WebParam(name="rollback") @XmlElement(required=true) TenantRollback rollback)
73                 throws TenantException;
74         
75         @WebMethod
76         public void healthCheck ();
77 }