11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.camel.component.cxf.blueprint.bus;
19 |
20 | public interface BlueprintNameSpaceHandlerFactory {
21 | /**
22 | * Creates aries blueprint NamespaceHandler.
23 | * The return type is untyped as aries blueprint is an
24 | * optional import
25 | *
26 | * @return handler
27 | */
28 | Object createNamespaceHandler();
29 | }
30 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/java/org/apache/camel/component/cxf/blueprint/bus/Messages.properties:
--------------------------------------------------------------------------------
1 | #
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 | #
21 | NO_MATCHING_BEAN_MSG = Could not find a definition for bean with id {0} - no injection will be performed.
22 | COULD_NOT_DETERMINE_BEAN_NAME_MSG = Could not determine bean name for instance of class {0}.
23 | ERROR_DETERMINING_BEAN_NAME_EXC = Failed to determine bean name.
24 | JAXB_PROPERTY_EDITOR_EXC = Property editor failed to bind element {0}.
25 | WILDCARD_BEAN_ID_WITH_NO_CLASS_MSG = Configuration bean with id {0} that uses a ''*'' or wildcard must have a class attribute.
26 | ONE_WILDCARD_BEAN_ID_PER_CLASS_MSG = A wildcard configuration bean with id {0} already exists for class {1}. The wildcard bean with id {2} will be ignored.
27 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/java/org/apache/camel/component/cxf/blueprint/configuration/InterceptorTypeConverter.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.camel.component.cxf.blueprint.configuration;
19 |
20 | import org.apache.cxf.interceptor.Interceptor;
21 | import org.osgi.service.blueprint.container.Converter;
22 | import org.osgi.service.blueprint.container.ReifiedType;
23 |
24 | /**
25 | *
26 | */
27 | public class InterceptorTypeConverter implements Converter {
28 |
29 | /** {@inheritDoc}*/
30 | public boolean canConvert(Object sourceObject, ReifiedType targetType) {
31 | return sourceObject instanceof Interceptor
32 | && targetType.getRawClass().isInstance(sourceObject);
33 | }
34 |
35 | /** {@inheritDoc}*/
36 | public Object convert(Object sourceObject, ReifiedType targetType) throws Exception {
37 | return sourceObject;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/java/org/apache/camel/component/cxf/blueprint/helpers/BaseNamespaceHandler.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.camel.component.cxf.blueprint.helpers;
19 |
20 | import java.net.URL;
21 |
22 | import org.apache.aries.blueprint.NamespaceHandler;
23 |
24 | public abstract class BaseNamespaceHandler implements NamespaceHandler {
25 |
26 | private final NamespaceHandler cxfApiNamespaceHandler = new CXFAPINamespaceHandler();
27 |
28 | /**
29 | * If namespace handler's schema imports other schemas from cxf-core bundle, this method
30 | * may be used to delegate to CXFAPINamespaceHandler to resolve imported schema.
31 | * @param namespace
32 | * @return if namespace may be resolved by CXFAPINamespaceHandler valid URL is returned. Otherwise
33 | * returns null
34 | */
35 | protected URL findCoreSchemaLocation(String namespace) {
36 | return cxfApiNamespaceHandler.getSchemaLocation(namespace);
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/java/org/apache/camel/component/cxf/blueprint/helpers/BlueprintSupport.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.camel.component.cxf.blueprint.helpers;
18 |
19 | import org.osgi.framework.BundleContext;
20 | import org.osgi.service.blueprint.container.BlueprintContainer;
21 |
22 | public interface BlueprintSupport {
23 |
24 | void setBlueprintContainer(BlueprintContainer blueprintContainer);
25 |
26 | BlueprintContainer getBlueprintContainer();
27 |
28 | BundleContext getBundleContext();
29 |
30 | void setBundleContext(BundleContext bundleContext);
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/java/org/apache/camel/component/cxf/blueprint/jaxrs/CxfRsBlueprintEndpointFactoryBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.camel.component.cxf.blueprint.jaxrs;
18 |
19 | import org.apache.camel.Component;
20 | import org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint;
21 | import org.apache.camel.component.cxf.jaxrs.CxfRsEndpointFactoryBean;
22 | import org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean;
23 |
24 | public class CxfRsBlueprintEndpointFactoryBean implements CxfRsEndpointFactoryBean {
25 |
26 | @Override
27 | public CxfRsEndpoint createEndpoint(Component component, String uri, AbstractJAXRSFactoryBean bean) throws Exception {
28 | return new CxfRsBlueprintEndpoint(component, uri, bean);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/java/org/apache/camel/component/cxf/jaxrs/blueprint/CxfRsBlueprintEndpointFactoryBean.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.camel.component.cxf.jaxrs.blueprint;
19 |
20 | /**
21 | * Only used for backward compatibility until it is fixed in Camel.
22 | * @deprecated use {@link org.apache.camel.component.cxf.blueprint.jaxrs.CxfRsBlueprintEndpointFactoryBean} instead
23 | */
24 | @Deprecated(since = "4.8.2", forRemoval = true)
25 | public class CxfRsBlueprintEndpointFactoryBean extends org.apache.camel.component.cxf.blueprint.jaxrs.CxfRsBlueprintEndpointFactoryBean{
26 | }
27 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/META-INF/blueprint.handlers:
--------------------------------------------------------------------------------
1 | #
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 | #
21 | org.apache.camel.component.cxf.blueprint.helpers.CXFAPINamespaceHandler
22 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/schemas/configuration/security.xjb:
--------------------------------------------------------------------------------
1 |
19 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/schemas/ws-addr-conf.xsd:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/schemas/ws-policy-200409.xjb:
--------------------------------------------------------------------------------
1 |
2 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/schemas/ws-policy-200607.xjb:
--------------------------------------------------------------------------------
1 |
2 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/schemas/ws-policy-200702.xjb:
--------------------------------------------------------------------------------
1 |
2 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/schemas/wsdl/addressing.xjb:
--------------------------------------------------------------------------------
1 |
2 |
20 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/schemas/wsdl/http-conf.xjb:
--------------------------------------------------------------------------------
1 |
2 |
20 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-blueprint/src/main/resources/schemas/wsdl/wsdl.xjb:
--------------------------------------------------------------------------------
1 |
2 |
20 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-transport-blueprint/src/generated/resources/META-INF/services/org/apache/camel/other.properties:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | name=cxf-transport-blueprint
3 | groupId=org.apache.camel.karaf
4 | artifactId=camel-cxf-transport-blueprint
5 | version=3.22.0-SNAPSHOT
6 | projectName=Camel Karaf :: CXF Transport Blueprint
7 | projectDescription=Camel CXF Transport for OSGi Blueprint
8 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-transport-blueprint/src/generated/resources/cxf-transport-blueprint.json:
--------------------------------------------------------------------------------
1 | {
2 | "other": {
3 | "kind": "other",
4 | "name": "cxf-transport-blueprint",
5 | "title": "Cxf Transport Blueprint",
6 | "description": "Camel CXF Transport for OSGi Blueprint",
7 | "deprecated": false,
8 | "firstVersion": "3.2.0",
9 | "supportLevel": "Stable",
10 | "groupId": "org.apache.camel.karaf",
11 | "artifactId": "camel-cxf-transport-blueprint",
12 | "version": "3.22.0-SNAPSHOT"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-transport-blueprint/src/main/java/org/apache/camel/component/cxf/transport/blueprint/CamelConduitDefinitionParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.camel.component.cxf.transport.blueprint;
18 |
19 | import org.w3c.dom.Element;
20 |
21 | import org.apache.aries.blueprint.ParserContext;
22 | import org.apache.camel.component.cxf.transport.CamelConduit;
23 | import org.osgi.service.blueprint.reflect.Metadata;
24 |
25 | public class CamelConduitDefinitionParser extends AbstractBeanDefinitionParser {
26 | public Metadata parse(Element element, ParserContext context) {
27 | return parse(element, context, CamelConduit.class);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-transport-blueprint/src/main/java/org/apache/camel/component/cxf/transport/blueprint/CamelDestinationDefinitionParser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.camel.component.cxf.transport.blueprint;
18 |
19 | import org.w3c.dom.Element;
20 |
21 | import org.apache.aries.blueprint.ParserContext;
22 | import org.apache.camel.component.cxf.transport.CamelDestination;
23 | import org.osgi.service.blueprint.reflect.Metadata;
24 |
25 | public class CamelDestinationDefinitionParser extends AbstractBeanDefinitionParser {
26 | public Metadata parse(Element element, ParserContext context) {
27 | return parse(element, context, CamelDestination.class);
28 | }
29 |
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/components/camel-cxf/camel-cxf-transport-blueprint/src/main/resources/OSGI-INF/blueprint/camel-transport.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/components/camel-directvm/src/generated/resources/META-INF/services/org/apache/camel/component/direct-vm:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | class=org.apache.camel.karaf.component.directvm.DirectVmComponent
3 |
--------------------------------------------------------------------------------
/components/camel-directvm/src/generated/resources/META-INF/services/org/apache/camel/configurer/direct-vm-component:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | class=org.apache.camel.karaf.component.directvm.DirectVmComponentConfigurer
3 |
--------------------------------------------------------------------------------
/components/camel-directvm/src/generated/resources/META-INF/services/org/apache/camel/configurer/direct-vm-endpoint:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | class=org.apache.camel.karaf.component.directvm.DirectVmEndpointConfigurer
3 |
--------------------------------------------------------------------------------
/components/camel-directvm/src/generated/resources/META-INF/services/org/apache/camel/urifactory/direct-vm-endpoint:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | class=org.apache.camel.karaf.component.directvm.DirectVmEndpointUriFactory
3 |
--------------------------------------------------------------------------------
/components/camel-directvm/src/main/java/org/apache/camel/karaf/component/directvm/DirectVmConsumerNotAvailableException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.camel.karaf.component.directvm;
18 |
19 | import org.apache.camel.CamelExchangeException;
20 | import org.apache.camel.Exchange;
21 |
22 | public class DirectVmConsumerNotAvailableException extends CamelExchangeException {
23 |
24 | private static final long serialVersionUID = 1L;
25 |
26 | public DirectVmConsumerNotAvailableException(String message, Exchange exchange) {
27 | super(message, exchange);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/components/camel-infinispan/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | 4.0.0
23 |
24 |
25 | org.apache.camel.karaf
26 | camel-karaf-components
27 | 4.10.4-SNAPSHOT
28 | ../pom.xml
29 |
30 |
31 | camel-infinispan-parent
32 | pom
33 | Apache Camel :: Karaf :: Components :: Infinispan :: Parent
34 |
35 |
36 | camel-infinispan
37 | camel-infinispan-common
38 | camel-infinispan-embedded
39 |
40 |
41 |
--------------------------------------------------------------------------------
/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/osgi/Activator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.camel.component.jcache.osgi;
18 |
19 | import org.apache.camel.component.jcache.JCacheManagerFactory;
20 | import org.osgi.framework.BundleActivator;
21 | import org.osgi.framework.BundleContext;
22 | import org.osgi.framework.ServiceRegistration;
23 |
24 | public class Activator implements BundleActivator {
25 | private ServiceRegistration> registration;
26 |
27 | @Override
28 | public void start(BundleContext context) throws Exception {
29 | Object factory = new OSGiCacheManagerFactory();
30 | registration = context.registerService(JCacheManagerFactory.class.getName(), factory, null);
31 | }
32 |
33 | @Override
34 | public void stop(BundleContext context) throws Exception {
35 | // release the reference
36 | if (registration != null) {
37 | registration.unregister();
38 | }
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/components/camel-jcache/src/main/java/org/apache/camel/component/jcache/osgi/OSGiCacheManagerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.camel.component.jcache.osgi;
18 |
19 | import org.apache.camel.component.jcache.JCacheConfiguration;
20 | import org.apache.camel.component.jcache.JCacheManager;
21 | import org.apache.camel.component.jcache.JCacheManagerFactory;
22 |
23 | public class OSGiCacheManagerFactory implements JCacheManagerFactory {
24 |
25 | @Override
26 | @SuppressWarnings("unchecked")
27 | public JCacheManager createManager(JCacheConfiguration configuration) {
28 | return new OSGiCacheManager<>(configuration);
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/components/camel-knative/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | 4.0.0
23 |
24 |
25 | org.apache.camel.karaf
26 | camel-karaf-components
27 | 4.10.4-SNAPSHOT
28 | ../pom.xml
29 |
30 |
31 | camel-knative-parent
32 | pom
33 | Apache Camel :: Karaf :: Components :: Knative :: Parent
34 |
35 |
36 | camel-knative
37 | camel-knative-http
38 |
39 |
40 |
--------------------------------------------------------------------------------
/components/camel-microprofile/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | 4.0.0
23 |
24 |
25 | org.apache.camel.karaf
26 | camel-karaf-components
27 | 4.10.4-SNAPSHOT
28 | ../pom.xml
29 |
30 |
31 | camel-microprofile-parent
32 | pom
33 | Apache Camel :: Karaf :: Components :: Microprofile :: Parent
34 |
35 |
36 | camel-microprofile-config
37 | camel-microprofile-fault-tolerance
38 | camel-microprofile-health
39 |
40 |
41 |
--------------------------------------------------------------------------------
/components/camel-vertx/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | 4.0.0
23 |
24 |
25 | org.apache.camel.karaf
26 | camel-karaf-components
27 | 4.10.4-SNAPSHOT
28 | ../pom.xml
29 |
30 |
31 | camel-vertx-parent
32 | pom
33 | Apache Camel :: Karaf :: Components :: Vertx :: Parent
34 |
35 |
36 | camel-vertx-common
37 | camel-vertx
38 | camel-vertx-http
39 | camel-vertx-websocket
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/components/camel-vm/src/generated/java/org/apache/camel/karaf/component/vm/VmComponentConfigurer.java:
--------------------------------------------------------------------------------
1 | /* Generated by camel build tools - do NOT edit this file! */
2 | package org.apache.camel.karaf.component.vm;
3 |
4 | import javax.annotation.processing.Generated;
5 | import java.util.Map;
6 |
7 | import org.apache.camel.CamelContext;
8 | import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
9 | import org.apache.camel.spi.PropertyConfigurerGetter;
10 | import org.apache.camel.spi.ConfigurerStrategy;
11 | import org.apache.camel.spi.GeneratedPropertyConfigurer;
12 | import org.apache.camel.util.CaseInsensitiveMap;
13 | import org.apache.camel.component.seda.SedaComponentConfigurer;
14 |
15 | /**
16 | * Generated by camel build tools - do NOT edit this file!
17 | */
18 | @Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
19 | @SuppressWarnings("unchecked")
20 | public class VmComponentConfigurer extends SedaComponentConfigurer implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/components/camel-vm/src/generated/java/org/apache/camel/karaf/component/vm/VmEndpointConfigurer.java:
--------------------------------------------------------------------------------
1 | /* Generated by camel build tools - do NOT edit this file! */
2 | package org.apache.camel.karaf.component.vm;
3 |
4 | import javax.annotation.processing.Generated;
5 | import java.util.Map;
6 |
7 | import org.apache.camel.CamelContext;
8 | import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
9 | import org.apache.camel.spi.PropertyConfigurerGetter;
10 | import org.apache.camel.spi.ConfigurerStrategy;
11 | import org.apache.camel.spi.GeneratedPropertyConfigurer;
12 | import org.apache.camel.util.CaseInsensitiveMap;
13 | import org.apache.camel.component.seda.SedaEndpointConfigurer;
14 |
15 | /**
16 | * Generated by camel build tools - do NOT edit this file!
17 | */
18 | @Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
19 | @SuppressWarnings("unchecked")
20 | public class VmEndpointConfigurer extends SedaEndpointConfigurer implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/components/camel-vm/src/generated/resources/META-INF/services/org/apache/camel/component/vm:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | class=org.apache.camel.karaf.component.vm.VmComponent
3 |
--------------------------------------------------------------------------------
/components/camel-vm/src/generated/resources/META-INF/services/org/apache/camel/configurer/vm-component:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | class=org.apache.camel.karaf.component.vm.VmComponentConfigurer
3 |
--------------------------------------------------------------------------------
/components/camel-vm/src/generated/resources/META-INF/services/org/apache/camel/configurer/vm-endpoint:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | class=org.apache.camel.karaf.component.vm.VmEndpointConfigurer
3 |
--------------------------------------------------------------------------------
/components/camel-vm/src/generated/resources/META-INF/services/org/apache/camel/urifactory/vm-endpoint:
--------------------------------------------------------------------------------
1 | # Generated by camel build tools - do NOT edit this file!
2 | class=org.apache.camel.karaf.component.vm.VmEndpointUriFactory
3 |
--------------------------------------------------------------------------------
/components/camel-vm/src/test/resources/log4j2.properties:
--------------------------------------------------------------------------------
1 | ## ---------------------------------------------------------------------------
2 | ## Licensed to the Apache Software Foundation (ASF) under one or more
3 | ## contributor license agreements. See the NOTICE file distributed with
4 | ## this work for additional information regarding copyright ownership.
5 | ## The ASF licenses this file to You under the Apache License, Version 2.0
6 | ## (the "License"); you may not use this file except in compliance with
7 | ## the License. You may obtain a copy of the License at
8 | ##
9 | ## http://www.apache.org/licenses/LICENSE-2.0
10 | ##
11 | ## Unless required by applicable law or agreed to in writing, software
12 | ## distributed under the License is distributed on an "AS IS" BASIS,
13 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | ## See the License for the specific language governing permissions and
15 | ## limitations under the License.
16 | ## ---------------------------------------------------------------------------
17 |
18 | appender.file.type = File
19 | appender.file.name = file
20 | appender.file.fileName = target/camel-vm-test.log
21 | appender.file.layout.type = PatternLayout
22 | appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
23 | appender.out.type = Console
24 | appender.out.name = out
25 | appender.out.layout.type = PatternLayout
26 | appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
27 | rootLogger.level = INFO
28 | rootLogger.appenderRef.file.ref = file
29 |
--------------------------------------------------------------------------------
/docs/README_local_build.adoc:
--------------------------------------------------------------------------------
1 | = Local/partial build of docs
2 |
3 | See https://camel.apache.org/manual/improving-the-documentation.html for initial setup instructions and more details.
4 |
5 | After initial setup, there are three local build options:
6 |
7 | == Quick: `./local-build.sh quick`
8 |
9 | This will build this project only.
10 | Links out of this component will go to the published Camel website, and there will be no links back.
11 | This is primarily intended to check for errors.
12 |
13 | == Full: `./local-build.sh full`
14 |
15 | This will build the full site locally, with your changes in this project.
16 | Running this (at least) once is a prerequisite for the partial build.
17 | This should show the site exactly as it would be should your changes be merged.
18 |
19 | == Partial: `./local-build.sh`
20 |
21 | This will build this project only, replacing this component in the locally built "full" build, and start a local server to view with, rebuild the project when file changes are detected, and sync your browser with the rebuilt site.
22 | This is intended for documentation development.
23 |
--------------------------------------------------------------------------------
/docs/antora.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | name: camel-karaf
19 | title: Camel Karaf
20 | version: 4.9.x
21 | display_version: 4.9.x
22 | nav:
23 | - modules/ROOT/nav.adoc
24 |
25 | asciidoc:
26 | attributes:
27 | requires: "'util=camel-website-util,karaf=xref:js/karaf.js'"
28 |
29 |
--------------------------------------------------------------------------------
/docs/local-build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one or more
5 | # contributor license agreements. See the NOTICE file distributed with
6 | # this work for additional information regarding copyright ownership.
7 | # The ASF licenses this file to You under the Apache License, Version 2.0
8 | # (the "License"); you may not use this file except in compliance with
9 | # the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing, software
14 | # distributed under the License is distributed on an "AS IS" BASIS,
15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | # See the License for the specific language governing permissions and
17 | # limitations under the License.
18 | #
19 |
20 | CW=./../../camel-website
21 | LOCAL=./../camel-karaf
22 |
23 | cd $CW || (echo 'camel-website not in expected location $CW' && exit)
24 | ./antora-local-build.sh $LOCAL $*
25 |
--------------------------------------------------------------------------------
/docs/modules/ROOT/nav.adoc:
--------------------------------------------------------------------------------
1 | * xref:index.adoc[User Guide]
2 | ** xref:components.adoc[Supported Components]
3 |
--------------------------------------------------------------------------------
/docs/modules/ROOT/pages/components.adoc:
--------------------------------------------------------------------------------
1 | = Apache Camel Karaf features
2 |
3 | You can find the list of features directly in the repository: https://github.com/apache/camel-karaf/blob/main/features/src/main/feature/camel-features.xml
4 |
--------------------------------------------------------------------------------
/docs/modules/ROOT/pages/index.adoc:
--------------------------------------------------------------------------------
1 | = Support for Apache Karaf
2 |
3 | Apache Camel Karaf is for running Camel in the
4 | http://karaf.apache.org[Apache Karaf] OSGi container.
5 |
6 | It includes:
7 |
8 | * Camel features repository allowing to install Camel in Karaf.
9 | * Camel Karaf commands allowing you to view, start, stop, get info, about the
10 | Camel contexts and routes running in the Karaf instance.
11 |
12 | NB: Camel Karaf 4.x needs at least Apache Karaf 4.4.6 to run.
13 |
14 | == Install Camel in Karaf
15 |
16 | Assuming that you have a running Karaf instance, you can register the
17 | Camel features repository:
18 |
19 | [source,sh]
20 | ----
21 | karaf@root> feature:repo-add camel 4.5.0
22 | ----
23 |
24 | where 4.5.0 is the Camel version
25 |
26 | Now, we have all Camel features available:
27 |
28 | To install Camel, just install the `camel` feature:
29 |
30 | [source,sh]
31 | ----
32 | karaf@root> feature:install camel
33 | ----
34 |
35 | You have to install the Camel features depending of your requirements.
36 |
37 | If, in your route, you use an endpoint like `stream:out`, you have to
38 | install the `camel-stream` feature:
39 |
40 | [source,sh]
41 | ----
42 | karaf@root> feature:install camel-stream
43 | ----
44 |
45 | And so on, for example if you use the sql, and http components:
46 |
47 | [source,sh]
48 | ----
49 | karaf@root> feature:install camel-sql camel-http
50 | ----
51 |
52 | == Camel Karaf commands
53 |
54 | When you install the camel feature, new Camel Karaf commands become available
55 | automatically.
56 |
57 | For example to list all running Camel contexts:
58 | [source,sh]
59 | ----
60 | karaf@root> camel:context-list
61 | ----
62 |
63 | You can see all the Camel commands by typing `camel:` and then pressing TAB key.
64 |
65 | TIP: use kbd:[TAB] key for completion on the Camel context name.
66 |
--------------------------------------------------------------------------------
/docs/source-map.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | - require: '@djencks/antora-source-map'
19 | # log_level: trace
20 | source-map:
21 | - url: 'https://github.com/apache/camel-karaf.git'
22 | mapped-url: './../camel-karaf'
23 | branches:
24 | - branch: main
25 | mapped-branch: HEAD
26 |
--------------------------------------------------------------------------------
/docs/source-watch.yml:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one or more
3 | # contributor license agreements. See the NOTICE file distributed with
4 | # this work for additional information regarding copyright ownership.
5 | # The ASF licenses this file to You under the Apache License, Version 2.0
6 | # (the "License"); you may not use this file except in compliance with
7 | # the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | - require: '@djencks/antora-source-watch'
19 | # log_level: trace
20 | sources:
21 | - url: ./../camel-karaf
22 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache Camel Karaf
2 | Copyright 2025 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
7 | Apache Camel
8 | Copyright 2007-2024 The Apache Software Foundation
9 |
--------------------------------------------------------------------------------
/tests/camel-integration-test/src/main/java/org/apache/karaf/camel/itests/AbstractCamelSingleFeatureResultFileBasedRouteITest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.karaf.camel.itests;
18 |
19 | import org.junit.Before;
20 |
21 | public abstract class AbstractCamelSingleFeatureResultFileBasedRouteITest extends AbstractCamelSingleFeatureRouteITest
22 | implements CamelSingleFeatureResultFileBasedRoute {
23 |
24 | @Override
25 | @Before
26 | public void triggerProducerRoute() {
27 | super.triggerProducerRoute();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/tests/camel-integration-test/src/main/java/org/apache/karaf/camel/itests/AbstractCamelSingleFeatureResultFileBasedRouteSupplier.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.karaf.camel.itests;
19 |
20 | import org.apache.camel.model.RouteDefinition;
21 |
22 | public abstract class AbstractCamelSingleFeatureResultFileBasedRouteSupplier extends AbstractCamelSingleFeatureRouteSupplier {
23 |
24 | public String getBaseDir() {
25 | return System.getProperty("project.target");
26 | }
27 |
28 | protected String getResultFileName() {
29 | return getTestComponentName();
30 | }
31 |
32 | @Override
33 | protected void configureConsumer(RouteDefinition consumerRoute) {
34 | consumerRoute.toF("file:%s?fileName=%s", getBaseDir(), getResultFileName());
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tests/camel-integration-test/src/main/java/org/apache/karaf/camel/itests/AbstractCamelSingleFeatureResultMockBasedRouteITest.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.karaf.camel.itests;
18 |
19 | import org.junit.After;
20 | import org.junit.Before;
21 |
22 | public abstract class AbstractCamelSingleFeatureResultMockBasedRouteITest extends AbstractCamelSingleFeatureRouteITest
23 | implements CamelSingleFeatureResultMockBasedRoute {
24 |
25 | @Override
26 | @Before
27 | public void setupMock() {
28 | CamelSingleFeatureResultMockBasedRoute.super.setupMock();
29 | triggerProducerRoute();
30 | }
31 |
32 | @Override
33 | @After
34 | public void cleanMock() {
35 | CamelSingleFeatureResultMockBasedRoute.super.cleanMock();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tests/camel-integration-test/src/main/java/org/apache/karaf/camel/itests/AbstractCamelSingleFeatureResultMockBasedRouteSupplier.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.karaf.camel.examples.test;
19 |
20 | import org.apache.camel.builder.RouteBuilder;
21 | import org.apache.karaf.camel.itests.CamelRouteSupplier;
22 | import org.osgi.service.component.annotations.Component;
23 |
24 | @Component(
25 | name = "camel-karaf-examples-java-dsl-only-test-1",
26 | immediate = true,
27 | service = CamelRouteSupplier.class
28 | )
29 | public class CamelExampleRouteFirstSupplier implements CamelRouteSupplier {
30 | @Override
31 | public void createRoutes(RouteBuilder builder) {
32 | builder.from("direct:example1")
33 | .to("mock:example1");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/tests/examples/java-dsl-only/src/main/java/org/apache/karaf/camel/examples/test/CamelExampleRouteSecondSupplier.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | package org.apache.karaf.camel.examples.test;
19 |
20 | import org.apache.camel.builder.RouteBuilder;
21 | import org.apache.karaf.camel.itests.CamelRouteSupplier;
22 | import org.osgi.service.component.annotations.Component;
23 |
24 | @Component(
25 | name = "camel-karaf-examples-java-dsl-only-test-2",
26 | immediate = true,
27 | service = CamelRouteSupplier.class
28 | )
29 | public class CamelExampleRouteSecondSupplier implements CamelRouteSupplier {
30 | @Override
31 | public void createRoutes(RouteBuilder builder) {
32 | builder.from("direct:example2")
33 | .to("mock:example2");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/tests/features/camel-asn1/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-asn1-test
29 | Apache Camel :: Karaf :: Tests :: Features :: ASN1
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/features/camel-asn1/src/test/resources/asn1_data/SMS_SINGLE.tt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/camel-karaf/a6759154f4deaed3ecd321a47de3ca61e2c2775d/tests/features/camel-asn1/src/test/resources/asn1_data/SMS_SINGLE.tt
--------------------------------------------------------------------------------
/tests/features/camel-avro/src/test/java/org/apache/karaf/camel/itest/CamelAvroITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 | import org.ops4j.pax.exam.junit.PaxExam;
21 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
22 | import org.ops4j.pax.exam.spi.reactors.PerClass;
23 |
24 | @RunWith(PaxExam.class)
25 | @ExamReactorStrategy(PerClass.class)
26 | public class CamelAvroITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
27 |
28 | @Override
29 | public void configureMock(MockEndpoint mock) {
30 | mock.expectedBodiesReceived("{\"value\": \"OK\"}");
31 | }
32 |
33 | @Test
34 | public void testResultMock() throws Exception {
35 | assertMockEndpointsSatisfied();
36 | }
37 | }
--------------------------------------------------------------------------------
/tests/features/camel-base64/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | 4.0.0
19 |
20 | org.apache.camel.karaf
21 | camel-karaf-features-test
22 | 4.10.4-SNAPSHOT
23 |
24 |
25 | camel-base64-test
26 | Apache Camel :: Karaf :: Tests :: Features :: Base64
27 |
28 |
29 |
30 |
31 | ../../../src/main/resources
32 | false
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/tests/features/camel-bean-validator/src/test/java/org/apache/karaf/camel/itest/CamelBeanValidatorITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 | import org.ops4j.pax.exam.junit.PaxExam;
21 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
22 | import org.ops4j.pax.exam.spi.reactors.PerClass;
23 |
24 | @RunWith(PaxExam.class)
25 | @ExamReactorStrategy(PerClass.class)
26 | public class CamelBeanValidatorITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
27 |
28 | @Override
29 | public void configureMock(MockEndpoint mock) {
30 | mock.expectedBodiesReceived("User[name=John, age=90]");
31 | }
32 |
33 | @Test
34 | public void testResultMock() throws Exception {
35 | assertMockEndpointsSatisfied();
36 | }
37 | }
--------------------------------------------------------------------------------
/tests/features/camel-bindy/src/test/java/org/apache/karaf/camel/itest/CamelBindyITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 | import org.ops4j.pax.exam.junit.PaxExam;
21 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
22 | import org.ops4j.pax.exam.spi.reactors.PerClass;
23 |
24 | @RunWith(PaxExam.class)
25 | @ExamReactorStrategy(PerClass.class)
26 | public class CamelBindyITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
27 |
28 | public static final String CSV = "1,B2,Keira,Knightley,ISIN,XX23456789,BUY,Share,400.25,EUR,14-01-2009,17-02-2011 23:21:59\r\n";
29 |
30 | @Override
31 | public void configureMock(MockEndpoint mock) {
32 | mock.expectedBodiesReceived(CSV);
33 | }
34 |
35 | @Test
36 | public void testResultMock() throws Exception {
37 | assertMockEndpointsSatisfied();
38 | }
39 | }
--------------------------------------------------------------------------------
/tests/features/camel-caffeine/src/test/java/org/apache/karaf/camel/itest/CamelCaffeineITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.caffeine.CaffeineConstants;
17 | import org.apache.camel.component.mock.MockEndpoint;
18 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 | @RunWith(PaxExam.class)
26 | @ExamReactorStrategy(PerClass.class)
27 | public class CamelCaffeineITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
28 |
29 | @Override
30 | public void configureMock(MockEndpoint mock) {
31 | mock.expectedBodiesReceived("OK");
32 | mock.expectedHeaderReceived(CaffeineConstants.ACTION_HAS_RESULT, true);
33 | mock.expectedHeaderReceived(CaffeineConstants.ACTION_SUCCEEDED, true);
34 | }
35 |
36 | @Test
37 | public void testResultMock() throws Exception {
38 | assertMockEndpointsSatisfied();
39 | }
40 | }
--------------------------------------------------------------------------------
/tests/features/camel-cbor/src/test/java/org/apache/karaf/camel/itest/CamelCborITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import java.util.HashMap;
17 | import java.util.Map;
18 |
19 | import org.apache.camel.component.mock.MockEndpoint;
20 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
21 | import org.junit.Test;
22 | import org.junit.runner.RunWith;
23 | import org.ops4j.pax.exam.junit.PaxExam;
24 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
25 | import org.ops4j.pax.exam.spi.reactors.PerClass;
26 |
27 | @RunWith(PaxExam.class)
28 | @ExamReactorStrategy(PerClass.class)
29 | public class CamelCborITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
30 |
31 | @Override
32 | public void configureMock(MockEndpoint mock) {
33 | Map in = new HashMap<>();
34 | in.put("name", "OK");
35 | mock.expectedMessageCount(1);
36 | mock.message(0).body().isInstanceOf(Map.class);
37 | mock.message(0).body().isEqualTo(in);
38 | }
39 |
40 | @Test
41 | public void testResultMock() throws Exception {
42 | assertMockEndpointsSatisfied();
43 | }
44 |
45 |
46 | }
--------------------------------------------------------------------------------
/tests/features/camel-coap/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-coap-test
29 | Apache Camel :: Karaf :: Tests :: Features :: Coap
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/tests/features/camel-cometd/src/test/resources/webapp/dojo/dojox/cometd.js.uncompressed.js:
--------------------------------------------------------------------------------
1 | *
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
--------------------------------------------------------------------------------
/tests/features/camel-cometd/src/test/resources/webapp/dojo/dojox/cometd.xd.js:
--------------------------------------------------------------------------------
1 | *
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
--------------------------------------------------------------------------------
/tests/features/camel-cometd/src/test/resources/webapp/dojo/dojox/cometd.xd.js.uncompressed.js:
--------------------------------------------------------------------------------
1 | *
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
--------------------------------------------------------------------------------
/tests/features/camel-cometd/src/test/resources/webapp/dojo/dojox/cometd/ack.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | /**
18 | * Dual licensed under the Apache License 2.0 and the MIT license.
19 | * $Revision$ $Date: 2009-05-10 13:06:45 +1000 (Sun, 10 May 2009) $
20 | */
21 |
22 | dojo.provide("dojox.cometd.ack");
23 | dojo.require("dojox.cometd");
24 |
25 | dojo.require("org.cometd.AckExtension");
26 |
27 | dojox.cometd.registerExtension('ack', new org.cometd.AckExtension());
--------------------------------------------------------------------------------
/tests/features/camel-cometd/src/test/resources/webapp/dojo/dojox/cometd/reload.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | /**
18 | * Dual licensed under the Apache License 2.0 and the MIT license.
19 | * $Revision$ $Date: 2009-05-10 13:06:45 +1000 (Sun, 10 May 2009) $
20 | */
21 |
22 | dojo.provide("dojox.cometd.reload");
23 | dojo.require("dojox.cometd");
24 |
25 | dojo.require("dojo.cookie");
26 | dojo.require("org.cometd.ReloadExtension");
27 |
28 | // Remap cometd COOKIE functions to dojo cookie functions
29 | org.cometd.COOKIE.set = dojo.cookie;
30 | org.cometd.COOKIE.get = dojo.cookie;
31 |
32 | dojox.cometd.registerExtension('reload', new org.cometd.ReloadExtension());
33 |
34 |
35 |
--------------------------------------------------------------------------------
/tests/features/camel-cometd/src/test/resources/webapp/dojo/dojox/cometd/timestamp.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | /**
18 | * Dual licensed under the Apache License 2.0 and the MIT license.
19 | * $Revision$ $Date: 2009-05-10 13:06:45 +1000 (Sun, 10 May 2009) $
20 | */
21 |
22 | dojo.provide("dojox.cometd.timestamp");
23 | dojo.require("dojox.cometd");
24 | dojo.require("org.cometd.TimeStampExtension");
25 |
26 | dojox.cometd.registerExtension('timestamp', new org.cometd.TimeStampExtension());
--------------------------------------------------------------------------------
/tests/features/camel-cometd/src/test/resources/webapp/dojo/dojox/cometd/timesync.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | /**
18 | * Dual licensed under the Apache License 2.0 and the MIT license.
19 | * $Revision$ $Date: 2009-05-10 13:06:45 +1000 (Sun, 10 May 2009) $
20 | */
21 | dojo.provide("dojox.cometd.timesync");
22 | dojo.require("dojox.cometd");
23 | dojo.require("org.cometd.TimeSyncExtension");
24 |
25 | dojox.cometd.timesync=new org.cometd.TimeSyncExtension();
26 | dojox.cometd.registerExtension('timesync', dojox.cometd.timesync);
--------------------------------------------------------------------------------
/tests/features/camel-cometd/src/test/resources/webapp/index.html:
--------------------------------------------------------------------------------
1 |
19 |
20 |
21 |
22 |
23 | My Simple Ajax Example
24 |
25 |
26 |
43 |
44 |
45 |
46 |
CAMEL TEST PAGE
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/tests/features/camel-core/src/main/resources/OSGI-INF/blueprint/route1.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/tests/features/camel-core/src/main/resources/OSGI-INF/blueprint/route2.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/tests/features/camel-core/src/main/resources/OSGI-INF/blueprint/route3.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | OK
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/tests/features/camel-cxf/src/main/java/org/apache/karaf/camel/test/jaxws/HelloService.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package org.apache.karaf.camel.test.jaxws;
18 |
19 | import java.util.List;
20 |
21 | public interface HelloService {
22 | String sayHello();
23 |
24 | void ping();
25 |
26 | int getInvocationCount();
27 |
28 | String echo(String text) throws Exception;
29 |
30 | Boolean echoBoolean(Boolean bool);
31 |
32 | String complexParameters(List par1, List par2);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/tests/features/camel-disruptor/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-disruptor-test
29 | Apache Camel :: Karaf :: Tests :: Features :: Disruptor
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/tests/features/camel-disruptor/src/test/resources/OSGI-INF/blueprint/route1.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/tests/features/camel-disruptor/src/test/resources/OSGI-INF/blueprint/route2.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | OK
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/tests/features/camel-ehcache/src/test/java/org/apache/karaf/camel/itest/CamelEhcacheITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 | import org.ops4j.pax.exam.junit.PaxExam;
21 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
22 | import org.ops4j.pax.exam.spi.reactors.PerClass;
23 |
24 | @RunWith(PaxExam.class)
25 | @ExamReactorStrategy(PerClass.class)
26 | public class CamelEhcacheITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
27 |
28 | @Override
29 | public void configureMock(MockEndpoint mock) {
30 | mock.expectedBodiesReceived("OK");
31 | }
32 |
33 | @Test
34 | public void testResultMock() throws Exception {
35 | assertMockEndpointsSatisfied();
36 | }
37 | }
--------------------------------------------------------------------------------
/tests/features/camel-exec/src/main/java/org/apache/karaf/camel/test/CamelExecRouteSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.karaf.camel.test;
17 |
18 | import org.apache.camel.builder.RouteBuilder;
19 | import org.apache.camel.model.RouteDefinition;
20 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteSupplier;
21 | import org.apache.karaf.camel.itests.CamelRouteSupplier;
22 | import org.osgi.service.component.annotations.Component;
23 |
24 | @Component(
25 | name = "karaf-camel-exec-test",
26 | immediate = true,
27 | service = CamelRouteSupplier.class
28 | )
29 | public class CamelExecRouteSupplier extends AbstractCamelSingleFeatureResultMockBasedRouteSupplier {
30 |
31 | @Override
32 | protected boolean consumerEnabled() {
33 | return false;
34 | }
35 |
36 | @Override
37 | protected void configureProducer(RouteBuilder builder, RouteDefinition producerRoute) {
38 | configureConsumer(producerRoute.to("exec:java?args=-server -version"));
39 | }
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/tests/features/camel-fastjson/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-fastjson-test
29 | Apache Camel :: Karaf :: Tests :: Features :: Fastjson
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/features/camel-fastjson/src/test/java/org/apache/karaf/camel/itest/CamelFastjsonITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.apache.karaf.camel.itests.CamelKarafTestHint;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 | @CamelKarafTestHint
26 | @RunWith(PaxExam.class)
27 | @ExamReactorStrategy(PerClass.class)
28 | public class CamelFastjsonITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
29 |
30 | @Override
31 | public void configureMock(MockEndpoint mock) {
32 | mock.expectedBodiesReceived("OK");
33 | }
34 |
35 | @Test
36 | public void testResultMock() throws Exception {
37 | assertMockEndpointsSatisfied();
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/tests/features/camel-flatpack/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-flatpack-test
29 | Apache Camel :: Karaf :: Tests :: Features :: Flatpack
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/features/camel-flatpack/src/test/resources/INVENTORY-Delimited.pzmap.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/tests/features/camel-groovy/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-groovy-test
29 | Apache Camel :: Karaf :: Tests :: Features :: Groovy
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/features/camel-groovy/src/test/java/org/apache/karaf/camel/itest/CamelGroovyITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 | import org.ops4j.pax.exam.junit.PaxExam;
21 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
22 | import org.ops4j.pax.exam.spi.reactors.PerClass;
23 |
24 | @RunWith(PaxExam.class)
25 | @ExamReactorStrategy(PerClass.class)
26 | public class CamelGroovyITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
27 |
28 | @Override
29 | public void configureMock(MockEndpoint mock) {
30 | mock.expectedBodiesReceived("OK");
31 | }
32 |
33 | @Test
34 | public void testResultMock() throws Exception {
35 | assertMockEndpointsSatisfied();
36 | }
37 |
38 | @Override
39 | public String getBodyToSend() {
40 | return "Hello Groovy";
41 | }
42 | }
--------------------------------------------------------------------------------
/tests/features/camel-gson/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-gson-test
29 | Apache Camel :: Karaf :: Tests :: Features :: Gson
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/features/camel-gson/src/test/java/org/apache/karaf/camel/itest/CamelGsonITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.apache.karaf.camel.itests.CamelKarafTestHint;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 | @CamelKarafTestHint
26 | @RunWith(PaxExam.class)
27 | @ExamReactorStrategy(PerClass.class)
28 | public class CamelGsonITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
29 |
30 | @Override
31 | public void configureMock(MockEndpoint mock) {
32 | mock.expectedBodiesReceived("OK");
33 | }
34 |
35 | @Test
36 | public void testResultMock() throws Exception {
37 | assertMockEndpointsSatisfied();
38 | }
39 |
40 |
41 | }
--------------------------------------------------------------------------------
/tests/features/camel-hazelcast/src/test/java/org/apache/karaf/camel/itest/CamelHazelcastITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 | import org.ops4j.pax.exam.junit.PaxExam;
21 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
22 | import org.ops4j.pax.exam.spi.reactors.PerClass;
23 |
24 | @RunWith(PaxExam.class)
25 | @ExamReactorStrategy(PerClass.class)
26 | public class CamelHazelcastITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
27 |
28 | @Override
29 | public void configureMock(MockEndpoint mock) {
30 | //Map + replicated Map + 2 for list + Queue + Set + Topic
31 | mock.expectedBodiesReceivedInAnyOrder("OK_List", "OK_List", "OK_Map", "OK_RMap", "OK_Queue", "OK_Set", "OK_Topic");
32 | }
33 |
34 | @Test
35 | public void testResultMock() throws Exception {
36 | assertMockEndpointsSatisfied();
37 | }
38 | }
--------------------------------------------------------------------------------
/tests/features/camel-jackson-avro/src/test/java/org/apache/karaf/camel/itest/CamelJacksonAvroITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.apache.karaf.camel.itests.CamelKarafTestHint;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 | @CamelKarafTestHint
26 | @RunWith(PaxExam.class)
27 | @ExamReactorStrategy(PerClass.class)
28 | public class CamelJacksonAvroITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
29 |
30 | @Override
31 | public void configureMock(MockEndpoint mock) {
32 | mock.expectedMessageCount(2);
33 | }
34 |
35 | @Test
36 | public void testResultMock() throws Exception {
37 | assertMockEndpointsSatisfied();
38 | }
39 |
40 | }
--------------------------------------------------------------------------------
/tests/features/camel-jackson-protobuf/src/test/java/org/apache/karaf/camel/itest/CamelJacksonProtobufITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.apache.karaf.camel.itests.CamelKarafTestHint;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 | @CamelKarafTestHint
26 | @RunWith(PaxExam.class)
27 | @ExamReactorStrategy(PerClass.class)
28 | public class CamelJacksonProtobufITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
29 |
30 | @Override
31 | public void configureMock(MockEndpoint mock) {
32 | mock.expectedMessageCount(2);
33 | }
34 |
35 | @Test
36 | public void testResultMock() throws Exception {
37 | assertMockEndpointsSatisfied();
38 | }
39 | }
--------------------------------------------------------------------------------
/tests/features/camel-jcache/src/main/java/org/apache/karaf/camel/test/CamelJcacheEhRouteSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.karaf.camel.test;
17 |
18 | import org.apache.karaf.camel.itests.CamelRouteSupplier;
19 | import org.osgi.service.component.annotations.Component;
20 |
21 | @Component(
22 | name = "karaf-camel-jcache-eh-test",
23 | immediate = true,
24 | service = CamelRouteSupplier.class
25 | )
26 | public class CamelJcacheEhRouteSupplier extends AbstractCamelJcacheRouteSupplier {
27 |
28 | public static final String PROVIDER_CLASS = "org.ehcache.jsr107.EhcacheCachingProvider";
29 |
30 | @Override
31 | protected String getProvider() {
32 | return PROVIDER_CLASS;
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/tests/features/camel-jcache/src/main/java/org/apache/karaf/camel/test/CamelJcacheHzRouteSupplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package org.apache.karaf.camel.test;
17 |
18 | import org.apache.camel.CamelContext;
19 | import org.apache.karaf.camel.itests.CamelRouteSupplier;
20 | import org.osgi.service.component.annotations.Component;
21 |
22 | import com.hazelcast.spi.properties.ClusterProperty;
23 |
24 | @Component(
25 | name = "karaf-camel-jcache-hz-test",
26 | immediate = true,
27 | service = CamelRouteSupplier.class
28 | )
29 | public class CamelJcacheHzRouteSupplier extends AbstractCamelJcacheRouteSupplier {
30 |
31 | public static final String PROVIDER_CLASS = "com.hazelcast.cache.HazelcastCachingProvider";
32 |
33 | @Override
34 | public void configure(CamelContext camelContext) {
35 | ClusterProperty.JCACHE_PROVIDER_TYPE.setSystemProperty("member");
36 | }
37 |
38 | @Override
39 | protected String getProvider() {
40 | return PROVIDER_CLASS;
41 | }
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/tests/features/camel-jetty/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-jetty-test
29 | Apache Camel :: Karaf :: Tests :: Features :: Jetty
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/features/camel-jetty/src/test/java/org/apache/karaf/camel/itest/CamelJettyITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 | import org.ops4j.pax.exam.junit.PaxExam;
21 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
22 | import org.ops4j.pax.exam.spi.reactors.PerClass;
23 |
24 |
25 | @RunWith(PaxExam.class)
26 | @ExamReactorStrategy(PerClass.class)
27 | public class CamelJettyITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
28 |
29 | @Override
30 | public void configureMock(MockEndpoint mock) {
31 | mock.expectedBodiesReceived("OK");
32 | }
33 |
34 | @Test
35 | public void testResultMock() throws Exception {
36 | assertMockEndpointsSatisfied();
37 | }
38 | }
--------------------------------------------------------------------------------
/tests/features/camel-leveldb/src/test/java/org/apache/karaf/camel/itest/CamelLeveldbITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 | import org.ops4j.pax.exam.junit.PaxExam;
21 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
22 | import org.ops4j.pax.exam.spi.reactors.PerClass;
23 |
24 | @RunWith(PaxExam.class)
25 | @ExamReactorStrategy(PerClass.class)
26 | public class CamelLeveldbITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
27 |
28 | @Override
29 | public void configureMock(MockEndpoint mock) {
30 | mock.expectedBodiesReceived("OK");
31 | }
32 |
33 | @Test
34 | public void testResultMock() throws Exception {
35 | assertMockEndpointsSatisfied();
36 | }
37 | }
--------------------------------------------------------------------------------
/tests/features/camel-netty-http/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 | 4.0.0
22 |
23 | org.apache.camel.karaf
24 | camel-karaf-features-test
25 | 4.10.4-SNAPSHOT
26 |
27 |
28 | camel-netty-http-test
29 | Apache Camel :: Karaf :: Tests :: Features :: Netty Http
30 |
31 |
32 |
33 |
34 | ../../../src/main/resources
35 | false
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/tests/features/camel-paho-mqtt5/src/test/resources/mosquitto.conf:
--------------------------------------------------------------------------------
1 | allow_anonymous true
2 | listener 1883
3 |
--------------------------------------------------------------------------------
/tests/features/camel-quartz/src/test/java/org/apache/karaf/camel/itest/CamelQuartzITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.apache.karaf.camel.itests.CamelKarafTestHint;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 |
26 | @CamelKarafTestHint(isBlueprintTest = true)
27 | @RunWith(PaxExam.class)
28 | @ExamReactorStrategy(PerClass.class)
29 | public class CamelQuartzITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
30 |
31 | @Override
32 | public void configureMock(MockEndpoint mock) {
33 | mock.expectedBodiesReceived("OK");
34 | }
35 |
36 | @Test
37 | public void testResultMock() throws Exception {
38 | assertMockEndpointsSatisfied();
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/tests/features/camel-saxon/src/main/resources/myTransform.xq:
--------------------------------------------------------------------------------
1 | (:
2 | Licensed to the Apache Software Foundation (ASF) under one or more
3 | contributor license agreements. See the NOTICE file distributed with
4 | this work for additional information regarding copyright ownership.
5 | The ASF licenses this file to You under the Apache License, Version 2.0
6 | (the "License"); you may not use this file except in compliance with
7 | the License. You may obtain a copy of the License at
8 |
9 | http://www.apache.org/licenses/LICENSE-2.0
10 |
11 | Unless required by applicable law or agreed to in writing, software
12 | distributed under the License is distributed on an "AS IS" BASIS,
13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | See the License for the specific language governing permissions and
15 | limitations under the License.
16 | :)
17 |
18 | {/person/firstName/text()} {/person/lastName/text()}
19 | {/person/city/text()}
20 |
21 |
--------------------------------------------------------------------------------
/tests/features/camel-saxon/src/test/java/org/apache/karaf/camel/itest/CamelSaxonITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.apache.karaf.camel.itests.CamelKarafTestHint;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 |
26 | @CamelKarafTestHint
27 | @RunWith(PaxExam.class)
28 | @ExamReactorStrategy(PerClass.class)
29 | public class CamelSaxonITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
30 |
31 | @Override
32 | public void configureMock(MockEndpoint mock) {
33 | mock.expectedBodiesReceived("James StrachanLondon");
34 | }
35 |
36 | @Test
37 | public void testResultMock() throws Exception {
38 | assertMockEndpointsSatisfied();
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/tests/features/camel-velocity/src/main/resources/greeting.vm:
--------------------------------------------------------------------------------
1 | ${headers.greeting}, ${body}!
2 |
--------------------------------------------------------------------------------
/tests/features/camel-velocity/src/test/test/org/apache/karaf/camel/itest/CamelVelocityITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.apache.karaf.camel.itests.CamelKarafTestHint;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 |
26 | @CamelKarafTestHint(isBlueprintTest = true)
27 | @RunWith(PaxExam.class)
28 | @ExamReactorStrategy(PerClass.class)
29 | public class CamelVelocityITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
30 |
31 | @Override
32 | public void configureMock(MockEndpoint mock) {
33 | mock.expectedBodiesReceived("Hello, World!");
34 | }
35 |
36 | @Test
37 | public void testResultMock() throws Exception {
38 | assertMockEndpointsSatisfied();
39 | }
40 |
41 |
42 | }
--------------------------------------------------------------------------------
/tests/features/camel-weather/src/test/java/org/apache/karaf/camel/itest/CamelWeatherITest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed under the Apache License, Version 2.0 (the "License");
3 | * you may not use this file except in compliance with the License.
4 | * You may obtain a copy of the License at
5 | *
6 | * http://www.apache.org/licenses/LICENSE-2.0
7 | *
8 | * Unless required by applicable law or agreed to in writing, software
9 | * distributed under the License is distributed on an "AS IS" BASIS,
10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | * See the License for the specific language governing permissions and
12 | * limitations under the License.
13 | */
14 | package org.apache.karaf.camel.itest;
15 |
16 | import org.apache.camel.component.mock.MockEndpoint;
17 | import org.apache.karaf.camel.itests.AbstractCamelSingleFeatureResultMockBasedRouteITest;
18 | import org.apache.karaf.camel.itests.CamelKarafTestHint;
19 | import org.junit.Test;
20 | import org.junit.runner.RunWith;
21 | import org.ops4j.pax.exam.junit.PaxExam;
22 | import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
23 | import org.ops4j.pax.exam.spi.reactors.PerClass;
24 |
25 |
26 | @CamelKarafTestHint(isBlueprintTest = true)
27 | @RunWith(PaxExam.class)
28 | @ExamReactorStrategy(PerClass.class)
29 | public class CamelWeatherITest extends AbstractCamelSingleFeatureResultMockBasedRouteITest {
30 |
31 | @Override
32 | public void configureMock(MockEndpoint mock) {
33 | mock.expectedBodiesReceivedInAnyOrder("OK-Producer", "OK-Consumer");
34 | }
35 |
36 | @Test
37 | public void testResultMock() throws Exception {
38 | assertMockEndpointsSatisfied();
39 | }
40 |
41 | }
--------------------------------------------------------------------------------
/tests/features/camel-xslt-saxon/src/main/resources/transform.xsl:
--------------------------------------------------------------------------------
1 |
2 |
20 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/tests/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 | 4.0.0
23 |
24 |
25 | org.apache.camel.karaf
26 | camel-karaf
27 | 4.10.4-SNAPSHOT
28 | ../pom.xml
29 |
30 |
31 | camel-karaf-tests
32 | pom
33 | Apache Camel :: Karaf :: Tests
34 |
35 |
36 | camel-test-scr
37 | camel-integration-test
38 | features
39 | examples
40 |
41 |
42 |
--------------------------------------------------------------------------------
/tooling/camel-karaf-maven-plugin-integration-test/src/it/configure-spi/verify.groovy:
--------------------------------------------------------------------------------
1 | /**
2 | * Licensed to the Apache Software Foundation (ASF) under one or more
3 | * contributor license agreements. See the NOTICE file distributed with
4 | * this work for additional information regarding copyright ownership.
5 | * The ASF licenses this file to You under the Apache License, Version 2.0
6 | * (the "License"); you may not use this file except in compliance with
7 | * the License. You may obtain a copy of the License at
8 | *