Search in sources :

Example 1 with SOAPEndpointProperties

use of io.irontest.models.endpoint.SOAPEndpointProperties in project irontest by zheng-wang.

the class EndpointDAO method createUnmanagedEndpoint_NoTransaction.

public Endpoint createUnmanagedEndpoint_NoTransaction(String teststepType, AppMode appMode) throws JsonProcessingException {
    Endpoint endpoint = null;
    if (!Teststep.TYPE_WAIT.equals(teststepType)) {
        endpoint = new Endpoint();
        endpoint.setName("Unmanaged Endpoint");
        if (Teststep.TYPE_SOAP.equals(teststepType)) {
            endpoint.setType(Endpoint.TYPE_SOAP);
            endpoint.setOtherProperties(new SOAPEndpointProperties());
        } else if (Teststep.TYPE_DB.equals(teststepType)) {
            endpoint.setType(Endpoint.TYPE_DB);
        } else if (Teststep.TYPE_MQ.equals(teststepType)) {
            endpoint.setType(Endpoint.TYPE_MQ);
            MQEndpointProperties endpointProperties = new MQEndpointProperties();
            endpointProperties.setConnectionMode(appMode == AppMode.LOCAL ? MQConnectionMode.BINDINGS : MQConnectionMode.CLIENT);
            endpoint.setOtherProperties(endpointProperties);
        } else if (Teststep.TYPE_IIB.equals(teststepType)) {
            endpoint.setType(Endpoint.TYPE_IIB);
        }
        long id = insertUnmanagedEndpoint_NoTransaction(endpoint);
        endpoint.setId(id);
    }
    return endpoint;
}
Also used : MQEndpointProperties(io.irontest.models.endpoint.MQEndpointProperties) Endpoint(io.irontest.models.endpoint.Endpoint) SOAPEndpointProperties(io.irontest.models.endpoint.SOAPEndpointProperties)

Example 2 with SOAPEndpointProperties

use of io.irontest.models.endpoint.SOAPEndpointProperties in project irontest by zheng-wang.

the class ManagedEndpointResource method create.

@POST
@Path("environments/{environmentId}/endpoints")
@PermitAll
public Endpoint create(@PathParam("environmentId") long environmentId, Endpoint endpoint) throws JsonProcessingException {
    Environment env = new Environment();
    env.setId(environmentId);
    endpoint.setEnvironment(env);
    if (Endpoint.TYPE_SOAP.equals(endpoint.getType())) {
        endpoint.setOtherProperties(new SOAPEndpointProperties());
    } else if (Endpoint.TYPE_MQ.equals(endpoint.getType())) {
        ((MQEndpointProperties) endpoint.getOtherProperties()).setConnectionMode(appInfo.getAppMode() == AppMode.LOCAL ? MQConnectionMode.BINDINGS : MQConnectionMode.CLIENT);
    }
    long id = endpointDAO.insertManagedEndpoint(endpoint);
    endpoint.setId(id);
    return endpoint;
}
Also used : SOAPEndpointProperties(io.irontest.models.endpoint.SOAPEndpointProperties) Environment(io.irontest.models.Environment) PermitAll(javax.annotation.security.PermitAll)

Aggregations

SOAPEndpointProperties (io.irontest.models.endpoint.SOAPEndpointProperties)2 Environment (io.irontest.models.Environment)1 Endpoint (io.irontest.models.endpoint.Endpoint)1 MQEndpointProperties (io.irontest.models.endpoint.MQEndpointProperties)1 PermitAll (javax.annotation.security.PermitAll)1