use of joynr.interlanguagetest.namedTypeCollection2.BaseStruct in project joynr by bmwcarit.
the class IltProviderBean method methodWithMultipleStructParameters.
/*
* methodWithMultipleStructParameters
*/
@Override
public MethodWithMultipleStructParametersReturned methodWithMultipleStructParameters(ExtendedStructOfPrimitives extendedStructOfPrimitivesArg, BaseStruct baseStructArg) {
logger.warn("*******************************************************");
logger.warn("* IltProvider.methodWithMultipleStructParameters called");
logger.warn("*******************************************************");
// check input parameter
if (!IltUtil.checkExtendedStructOfPrimitives(extendedStructOfPrimitivesArg)) {
throw new ProviderRuntimeException("methodWithMultipleStructParameters: invalid parameter extendedStructOfPrimitivesArg");
}
if (!IltUtil.checkBaseStruct(baseStructArg)) {
throw new ProviderRuntimeException("methodWithMultipleStructParameters: invalid parameter baseStructArg");
}
// set output values
BaseStructWithoutElements baseStructWithoutElementsOut = IltUtil.createBaseStructWithoutElements();
ExtendedExtendedBaseStruct extendedExtendedBaseStructOut = IltUtil.createExtendedExtendedBaseStruct();
return new MethodWithMultipleStructParametersReturned(baseStructWithoutElementsOut, extendedExtendedBaseStructOut);
}
use of joynr.interlanguagetest.namedTypeCollection2.BaseStruct in project joynr by bmwcarit.
the class IltProvider method methodWithMultipleStructParameters.
/*
* methodWithMultipleStructParameters
*/
@Override
public Promise<MethodWithMultipleStructParametersDeferred> methodWithMultipleStructParameters(ExtendedStructOfPrimitives extendedStructOfPrimitivesArg, BaseStruct baseStructArg) {
MethodWithMultipleStructParametersDeferred deferred = new MethodWithMultipleStructParametersDeferred();
logger.warn("*******************************************************");
logger.warn("* IltProvider.methodWithMultipleStructParameters called");
logger.warn("*******************************************************");
// check input parameter
if (!IltUtil.checkExtendedStructOfPrimitives(extendedStructOfPrimitivesArg)) {
deferred.reject(new ProviderRuntimeException("methodWithMultipleStructParameters: invalid parameter extendedStructOfPrimitivesArg"));
return new Promise<MethodWithMultipleStructParametersDeferred>(deferred);
}
if (!IltUtil.checkBaseStruct(baseStructArg)) {
deferred.reject(new ProviderRuntimeException("methodWithMultipleStructParameters: invalid parameter baseStructArg"));
return new Promise<MethodWithMultipleStructParametersDeferred>(deferred);
}
// set output values
BaseStructWithoutElements baseStructWithoutElementsOut = IltUtil.createBaseStructWithoutElements();
ExtendedExtendedBaseStruct extendedExtendedBaseStructOut = IltUtil.createExtendedExtendedBaseStruct();
deferred.resolve(baseStructWithoutElementsOut, extendedExtendedBaseStructOut);
return new Promise<MethodWithMultipleStructParametersDeferred>(deferred);
}
use of joynr.interlanguagetest.namedTypeCollection2.BaseStruct in project joynr by bmwcarit.
the class IltProvider method overloadedMethod.
/*
* overloadedMethod (3)
*/
@Override
public Promise<OverloadedMethod2Deferred> overloadedMethod(ExtendedExtendedEnumeration[] enumArrayArg, Long int64Arg, BaseStruct baseStructArg, Boolean booleanArg) {
logger.warn("*****************************************");
logger.warn("* IltProvider.overloadedMethod called (3)");
logger.warn("*****************************************");
OverloadedMethod2Deferred deferred = new OverloadedMethod2Deferred();
// check input parameter
if (int64Arg != 1L || booleanArg != false) {
logger.warn("overloadedMethod_3: invalid argument int64Arg or booleanArg");
deferred.reject(new ProviderRuntimeException("overloadedMethod_3: invalid parameter int64Arg or booleanArg"));
return new Promise<OverloadedMethod2Deferred>(deferred);
}
// check enumArrayArg
if (!IltUtil.checkExtendedExtendedEnumerationArray(enumArrayArg)) {
deferred.reject(new ProviderRuntimeException("overloadedMethod_3: invalid parameter enumArrayArg"));
return new Promise<OverloadedMethod2Deferred>(deferred);
}
// check baseStructArg
if (!IltUtil.checkBaseStruct(baseStructArg)) {
logger.warn("overloadedMethod_3: invalid argument baseStructArg");
deferred.reject(new ProviderRuntimeException("overloadedMethod_3: invalid parameter baseStructArg"));
return new Promise<OverloadedMethod2Deferred>(deferred);
}
// setup output parameter
Double doubleOut = 0d;
String[] stringArrayOut = IltUtil.createStringArray();
ExtendedBaseStruct extendedBaseStructOut = IltUtil.createExtendedBaseStruct();
deferred.resolve(doubleOut, stringArrayOut, extendedBaseStructOut);
return new Promise<OverloadedMethod2Deferred>(deferred);
}
use of joynr.interlanguagetest.namedTypeCollection2.BaseStruct in project joynr by bmwcarit.
the class IltConsumerGetterSetterTest method callSetAttributeBaseStruct.
@Test
public void callSetAttributeBaseStruct() {
LOG.info(name.getMethodName() + "");
try {
BaseStruct baseStructArg = IltUtil.createBaseStruct();
testInterfaceProxy.setAttributeBaseStruct(baseStructArg);
} catch (Exception e) {
fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
return;
}
LOG.info(name.getMethodName() + " - OK");
}
use of joynr.interlanguagetest.namedTypeCollection2.BaseStruct in project joynr by bmwcarit.
the class IltConsumerSyncMethodTest method callMethodWithMultipleStructParameters.
@Test
public void callMethodWithMultipleStructParameters() {
LOG.info(name.getMethodName() + "");
try {
MethodWithMultipleStructParametersReturned result;
// setup input parameters
ExtendedStructOfPrimitives extendedStructOfPrimitivesOut = IltUtil.createExtendedStructOfPrimitives();
BaseStruct baseStructOut = IltUtil.createBaseStruct();
result = testInterfaceProxy.methodWithMultipleStructParameters(extendedStructOfPrimitivesOut, baseStructOut);
if (result == null) {
fail(name.getMethodName() + " - FAILED - got no result");
return;
}
if (!IltUtil.checkBaseStructWithoutElements(result.baseStructWithoutElementsOut)) {
fail(name.getMethodName() + " - FAILED - got invalid result - baseStructWithoutElementsOut");
return;
}
if (!IltUtil.checkExtendedExtendedBaseStruct(result.extendedExtendedBaseStructOut)) {
fail(name.getMethodName() + " - FAILED - got invalid result - extendedExtendedBaseStructOut");
return;
}
} catch (Exception e) {
fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
return;
}
LOG.info(name.getMethodName() + " - OK");
}
Aggregations