ciao-core

CIAO Core Framework

License

License

GroupId

GroupId

uk.nhs.ciao
ArtifactId

ArtifactId

ciao-core
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

ciao-core
CIAO Core Framework
Project URL

Project URL

https://github.com/nhs-ciao/ciao-core
Project Organization

Project Organization

The Apache Software Foundation
Source Code Management

Source Code Management

https://github.com/nhs-ciao/ciao-core

Download ciao-core

How to add to project

<!-- https://jarcasting.com/artifacts/uk.nhs.ciao/ciao-core/ -->
<dependency>
    <groupId>uk.nhs.ciao</groupId>
    <artifactId>ciao-core</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/uk.nhs.ciao/ciao-core/
implementation 'uk.nhs.ciao:ciao-core:0.1'
// https://jarcasting.com/artifacts/uk.nhs.ciao/ciao-core/
implementation ("uk.nhs.ciao:ciao-core:0.1")
'uk.nhs.ciao:ciao-core:jar:0.1'
<dependency org="uk.nhs.ciao" name="ciao-core" rev="0.1">
  <artifact name="ciao-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='uk.nhs.ciao', module='ciao-core', version='0.1')
)
libraryDependencies += "uk.nhs.ciao" % "ciao-core" % "0.1"
[uk.nhs.ciao/ciao-core "0.1"]

Dependencies

compile (3)

Group / Artifact Type Version
uk.nhs.ciao : ciao-configuration jar 0.1
org.slf4j : slf4j-api jar 1.6.6
org.apache.camel : camel-spring jar 2.13.4

test (5)

Group / Artifact Type Version
org.apache.camel : camel-jetty jar 2.13.4
org.apache.camel : camel-test jar 2.13.4
org.mockito : mockito-core jar 1.10.19
org.slf4j : slf4j-simple jar 1.6.6
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

Overview

This is the core framework for ciao, linking in with camel and adding functionality for CIPs. It links the configuration functionality in ciao-configuration into camel so that standard camel property placeholders can be used in camel routes - for example:

.log("***** Config value = {{ConfigValue}} *****")

Usage

To use this in your CIP code, you will need to subclass two classes:

CIPRoutes

Override the configure() method - this is where you will define your camel routes. For example:

@Override
public void configure() {
	from("jetty:http://0.0.0.0:8080/test?traceEnabled=true").routeId("testRouteHTTP")
		.log("***** Config value = {{ConfigValue}} *****")
		.to("bean:loggingBean?method=logValue({{ConfigValue}})");
	super.configure();
}

Note: you should always call super.configure at the end of your method to ensure any common routes for all CIPs are also initialised.

RunCIP

Override the populateCamelRegistry() to configure your custom beans and other custom components - for example:

@Override
protected void populateCamelRegistry(JndiContext jndi)
		throws NamingException {
	jndi.bind("loggingBean", new LoggingBean());
}

Call super.init to initialise the camel context, and then call super.startCamel to start your CIP - for example:

CamelContext context = super.init(args, "testCIP.properties");
context.addRoutes(new Route());
super.startCamel(context);

You can see a working example of the above in the unit test code included in this project.

uk.nhs.ciao

Care Integration And Orchestration (CIAO)

An open source, flexible middleware solution, with a catalogue of health and social care components for NHS systems and standards

Versions

Version
0.1