Package com.betfair.testingservice.v1.rescript

Source Code of com.betfair.testingservice.v1.rescript.TestingRescriptServiceBindingDescriptor

/*
* Copyright 2013, The Sporting Exchange Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* Copyright 2013, The Sporting Exchange Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


// Generated from rescriptServiceBindingDescriptor.ftl
package com.betfair.testingservice.v1.rescript;

import com.betfair.testingservice.v1.TestingServiceDefinition;

import java.util.ArrayList;
import java.util.List;

import com.betfair.cougar.api.export.Protocol;
import com.betfair.cougar.core.api.ServiceVersion;
import com.betfair.cougar.core.api.ev.OperationKey;

import com.betfair.cougar.transport.api.protocol.http.HttpServiceBindingDescriptor;

import com.betfair.cougar.transport.api.protocol.http.rescript.RescriptOperationBindingDescriptor;
import com.betfair.cougar.transport.api.protocol.http.rescript.RescriptParamBindingDescriptor;
import com.betfair.cougar.transport.api.protocol.http.rescript.RescriptParamBindingDescriptor.ParamSource;

public class TestingRescriptServiceBindingDescriptor implements HttpServiceBindingDescriptor {

    private final ServiceVersion serviceVersion = new ServiceVersion("v1.0");
    private final String serviceName = "Testing";

    public TestingRescriptServiceBindingDescriptor() {
        List<RescriptParamBindingDescriptor> refreshAllCachesParamBindings = new ArrayList<RescriptParamBindingDescriptor>();
        refreshAllCachesDescriptor = new RescriptOperationBindingDescriptor(TestingServiceDefinition.refreshAllCachesKey, "/refreshAllCaches", "GET", refreshAllCachesParamBindings , RefreshAllCachesResponse.class);       
        List<RescriptParamBindingDescriptor> refreshCacheParamBindings = new ArrayList<RescriptParamBindingDescriptor>();
        refreshCacheParamBindings.add(new RescriptParamBindingDescriptor("name", ParamSource.QUERY));
        refreshCacheDescriptor = new RescriptOperationBindingDescriptor(TestingServiceDefinition.refreshCacheKey, "/refresh", "GET", refreshCacheParamBindings , RefreshCacheResponse.class);       
        List<RescriptParamBindingDescriptor> getIDDParamBindings = new ArrayList<RescriptParamBindingDescriptor>();
        getIDDParamBindings.add(new RescriptParamBindingDescriptor("name", ParamSource.QUERY));
        getIDDDescriptor = new RescriptOperationBindingDescriptor(TestingServiceDefinition.getIDDKey, "/idd", "GET", getIDDParamBindings , GetIDDResponse.class);       
        List<RescriptParamBindingDescriptor> getLogEntriesParamBindings = new ArrayList<RescriptParamBindingDescriptor>();
        getLogEntriesParamBindings.add(new RescriptParamBindingDescriptor("logFileName", ParamSource.QUERY));
        getLogEntriesParamBindings.add(new RescriptParamBindingDescriptor("numberOfLines", ParamSource.QUERY));
        getLogEntriesDescriptor = new RescriptOperationBindingDescriptor(TestingServiceDefinition.getLogEntriesKey, "/logEntries", "GET", getLogEntriesParamBindings , GetLogEntriesResponse.class);       
        List<RescriptParamBindingDescriptor> getLogEntriesByDateRangeParamBindings = new ArrayList<RescriptParamBindingDescriptor>();
        getLogEntriesByDateRangeParamBindings.add(new RescriptParamBindingDescriptor("logFileName", ParamSource.QUERY));
        getLogEntriesByDateRangeParamBindings.add(new RescriptParamBindingDescriptor("startDateTime", ParamSource.QUERY));
        getLogEntriesByDateRangeParamBindings.add(new RescriptParamBindingDescriptor("endDateTime", ParamSource.QUERY));
        getLogEntriesByDateRangeDescriptor = new RescriptOperationBindingDescriptor(TestingServiceDefinition.getLogEntriesByDateRangeKey, "/logEntriesDateTime", "GET", getLogEntriesByDateRangeParamBindings , GetLogEntriesByDateRangeResponse.class);       
        operations = new RescriptOperationBindingDescriptor[] {
                refreshAllCachesDescriptor,
                refreshCacheDescriptor,
                getIDDDescriptor,
                getLogEntriesDescriptor,
                getLogEntriesByDateRangeDescriptor
        };
    }
   
    @Override
    public Protocol getServiceProtocol() {
        return Protocol.RESCRIPT;
    }

    @Override
    public String getServiceContextPath() {
        return "/testing-services/";
    }

    @Override
    public RescriptOperationBindingDescriptor[] getOperationBindings() {
        return operations;
    }

    @Override
    public ServiceVersion getServiceVersion() {
        return serviceVersion;
    }

    @Override
    public String getServiceName() {
        return serviceName;
    }


    private final RescriptOperationBindingDescriptor[] operations;
   
        private final RescriptOperationBindingDescriptor refreshAllCachesDescriptor;
        private final RescriptOperationBindingDescriptor refreshCacheDescriptor;
        private final RescriptOperationBindingDescriptor getIDDDescriptor;
        private final RescriptOperationBindingDescriptor getLogEntriesDescriptor;
        private final RescriptOperationBindingDescriptor getLogEntriesByDateRangeDescriptor;

}
TOP

Related Classes of com.betfair.testingservice.v1.rescript.TestingRescriptServiceBindingDescriptor

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.