use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class DoWhileTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
ConditionMetadata condition = new ConditionMetadata();
condition.setMetadataKey("key1");
condition.setOperator(new NotNull());
ConditionMetadata condition2 = new ConditionMetadata();
condition2.setMetadataKey("key2");
condition2.setOperator(new IsNull());
ConditionOr conditionOr = new ConditionOr();
conditionOr.getConditions().add(condition);
conditionOr.getConditions().add(condition2);
ThenService thenSrvc = new ThenService();
thenSrvc.setService(new LogMessageService());
doWhile.setCondition(conditionOr);
doWhile.setThen(thenSrvc);
DoWhile doWhile = new DoWhile();
doWhile.setCondition(conditionOr);
doWhile.setThen(thenSrvc);
return doWhile;
}
use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class ForEachTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
ForEach forEach = new ForEach();
ThenService then = new ThenService();
then.setService(new LogMessageService());
forEach.setThen(then);
return forEach;
}
use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class ServiceFromCacheTest method createCache.
private CacheConnection createCache(String key) throws Exception {
ExpiringMapCache cacheInstance = new ExpiringMapCache();
CacheConnection conn = new CacheConnection();
conn.setCacheInstance(cacheInstance);
LifecycleHelper.initAndStart(conn);
conn.retrieveCache().put(key, DynamicServiceExecutorTest.createMessage(new ServiceList(new LogMessageService())).getContent());
return conn;
}
use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class WhileTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
ConditionMetadata condition = new ConditionMetadata();
condition.setMetadataKey("key1");
condition.setOperator(new NotNull());
ConditionMetadata condition2 = new ConditionMetadata();
condition2.setMetadataKey("key2");
condition2.setOperator(new IsNull());
ConditionOr conditionOr = new ConditionOr();
conditionOr.getConditions().add(condition);
conditionOr.getConditions().add(condition2);
ThenService thenSrvc = new ThenService();
thenSrvc.setService(new LogMessageService());
logicalExpression.setCondition(conditionOr);
logicalExpression.setThen(thenSrvc);
// We init and start the service in the setup, lets stop it.
try {
StopMe(logicalExpression);
} catch (Exception e) {
}
return logicalExpression;
}
use of com.adaptris.core.services.LogMessageService in project interlok by adaptris.
the class CheckMetadataValueServiceTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
CheckMetadataValueService s = createChecker();
s.setNextServiceIdIfDuplicate("duplicate");
s.setNextServiceIdIfUnique("unique");
s.setUniqueId("CheckMetadataAgainstPreviousValues");
BranchingServiceCollection sl = new BranchingServiceCollection();
sl.addService(s);
sl.setFirstServiceId(s.getUniqueId());
sl.addService(new LogMessageService("duplicate"));
sl.addService(new LogMessageService("unique"));
return sl;
}
Aggregations