/*******************************************************************************
 *                                                                              
 *  Copyright FUJITSU LIMITED 2016                                             
 *                                                                                                                                 
 *  Creation Date: 19.03.2014                                                      
 *                                                                              
 *******************************************************************************/

package org.oscm.applicationservice.provisioning.adapter;

import java.net.URL;
import java.util.List;

import org.oscm.applicationservice.adapter.ProvisioningServiceAdapter;
import org.oscm.provisioning.data.BaseResult;
import org.oscm.provisioning.data.InstanceRequest;
import org.oscm.provisioning.data.InstanceResult;
import org.oscm.provisioning.data.ServiceAttribute;
import org.oscm.provisioning.data.ServiceParameter;
import org.oscm.provisioning.data.User;
import org.oscm.provisioning.data.UserResult;
import org.oscm.provisioning.intf.ProvisioningService;

/**
 * @author goebel
 * 
 */
public class ProvisioningServiceAdapterV1_8 implements
        ProvisioningServiceAdapter {

    private ProvisioningService service;

    @Override
    public URL getLocalWSDL() {
        return this.getClass().getResource(
                "/wsdl/provisioning/ProvisioningService.wsdl");
    }

    @Override
    public void setProvisioningService(Object provServ) {
        this.service = ProvisioningService.class.cast(provServ);
    }

    @Override
    public BaseResult asyncCreateInstance(InstanceRequest request,
            User requestingUser) {
        return service.asyncCreateInstance(request, requestingUser);
    }

    @Override
    public InstanceResult createInstance(InstanceRequest request,
            User requestingUser) {
        return service.createInstance(request, requestingUser);
    }

    @Override
    public UserResult createUsers(String instanceId, List<User> users,
            User requestingUser) {
        return service.createUsers(instanceId, users, requestingUser);
    }

    @Override
    public BaseResult deleteInstance(String instanceId, String organizationId,
            String subscriptionId, User requestingUser) {
        return service.deleteInstance(instanceId, organizationId,
                subscriptionId, requestingUser);
    }

    @Override
    public BaseResult deleteUsers(String instanceId, List<User> users,
            User requestingUser) {
        return service.deleteUsers(instanceId, users, requestingUser);
    }

    @Override
    public String sendPing(String arg) {
        return service.sendPing(arg);
    }

    @Override
    public BaseResult modifySubscription(String instanceId,
            String subscriptionId, String referenceId,
            List<ServiceParameter> parameterValues,
            List<ServiceAttribute> attributeValues, User requestingUser) {
        return service.modifySubscription(instanceId, referenceId,
                subscriptionId, parameterValues, attributeValues,
                requestingUser);
    }

    @Override
    public BaseResult updateUsers(String instanceId, List<User> users,
            User requestingUser) {
        return service.updateUsers(instanceId, users, requestingUser);
    }

    @Override
    public BaseResult activateInstance(String instanceId, User requestingUser) {
        return service.activateInstance(instanceId, requestingUser);
    }

    @Override
    public BaseResult deactivateInstance(String instanceId, User requestingUser) {
        return service.deactivateInstance(instanceId, requestingUser);
    }

    @Override
    public BaseResult asyncModifySubscription(String instanceId,
            String subscriptionId, String referenceId,
            List<ServiceParameter> parameterValues,
            List<ServiceAttribute> attributeValues, User requestingUser) {
        return service.asyncModifySubscription(instanceId, referenceId,
                subscriptionId, parameterValues, attributeValues,
                requestingUser);
    }

    @Override
    public BaseResult asyncUpgradeSubscription(String instanceId,
            String subscriptionId, String referenceId,
            List<ServiceParameter> parameterValues,
            List<ServiceAttribute> attributeValues, User requestingUser) {
        return service.asyncUpgradeSubscription(instanceId, referenceId,
                subscriptionId, parameterValues, attributeValues,
                requestingUser);
    }

    @Override
    public BaseResult upgradeSubscription(String instanceId,
            String subscriptionId, String referenceId,
            List<ServiceParameter> parameterValues,
            List<ServiceAttribute> attributeValues, User requestingUser) {
        return service.upgradeSubscription(instanceId, referenceId,
                subscriptionId, parameterValues, attributeValues,
                requestingUser);
    }

    @Override
    public BaseResult saveAttributes(String organizationId,
            List<ServiceAttribute> attributeValues, User requestingUser) {
        return service.saveAttributes(organizationId, attributeValues,
                requestingUser);
    }

}

@@ -1256,16 +1256,24 @@
 pterV1_8
+%0A       
  impleme
@@ -1275,24 +1275,16 @@
 plements
-%0A       
  Provisi
@@ -1428,21 +1428,8 @@
 ss()
-.getResource(
 %0A   
@@ -1441,16 +1441,29 @@
         
+.getResource(
 %22/wsdl/p
@@ -3106,33 +3106,36 @@
 instanceId, 
-reference
+subscription
 Id,%0A        
@@ -3138,36 +3138,33 @@
             
-subscription
+reference
 Id, paramete
@@ -3188,32 +3188,16 @@
 eValues,
-%0A               
  request
@@ -3647,32 +3647,44 @@
 ring instanceId,
+%0A           
  User requesting
@@ -4085,33 +4085,36 @@
 instanceId, 
-reference
+subscription
 Id,%0A        
@@ -4117,36 +4117,33 @@
             
-subscription
+reference
 Id, paramete
@@ -4167,32 +4167,16 @@
 eValues,
-%0A               
  request
@@ -4510,33 +4510,36 @@
 instanceId, 
-reference
+subscription
 Id,%0A        
@@ -4542,36 +4542,33 @@
             
-subscription
+reference
 Id, paramete
@@ -4592,32 +4592,16 @@
 eValues,
-%0A               
  request
@@ -4929,25 +4929,28 @@
 anceId, 
-reference
+subscription
 Id,%0A    
@@ -4957,36 +4957,33 @@
             
-subscription
+reference
 Id, paramete
@@ -5007,32 +5007,16 @@
 eValues,
-%0A               
  request

fix switched parameters in provisioning service adapter