ENTAXY-374 release 1.8.2
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -19,7 +19,9 @@
|
||||
*/
|
||||
package ru.entaxy.esb.platform.runtime.base.connecting.adapter.core.management;
|
||||
|
||||
public interface AdapterMBean {
|
||||
import ru.entaxy.esb.platform.base.management.core.api.RuntimeTypedMBean;
|
||||
|
||||
public interface AdapterMBean extends RuntimeTypedMBean {
|
||||
|
||||
public boolean isInited();
|
||||
|
||||
|
@ -22,8 +22,11 @@ package ru.entaxy.esb.platform.runtime.base.connecting.adapter.core.management;
|
||||
import javax.management.NotCompliantMBeanException;
|
||||
import javax.management.StandardMBean;
|
||||
|
||||
import ru.entaxy.esb.platform.base.management.core.api.EntaxyRuntimeTyped;
|
||||
import ru.entaxy.esb.platform.runtime.base.connecting.adapter.core.api.Adapter;
|
||||
|
||||
//@TODO move string to constant
|
||||
@EntaxyRuntimeTyped(name = "entaxy.runtime.adapter")
|
||||
public class AdapterMBeanImpl extends StandardMBean implements AdapterMBean {
|
||||
|
||||
protected Adapter adapter;
|
||||
|
@ -24,9 +24,9 @@ import ru.entaxy.esb.platform.base.management.core.Qualifier;
|
||||
|
||||
public interface AdaptersMBean {
|
||||
|
||||
public static final String ADAPTERS_KEY = "categrory";
|
||||
public static final String ADAPTERS_KEY = "category";
|
||||
|
||||
public static final String ADAPTERS_VALUE = "adapters";
|
||||
public static final String ADAPTERS_VALUE = "adapter";
|
||||
|
||||
public static final Qualifier Q_ADAPTERS = ManagementCore.Q_PLATFORM.qualifier(ADAPTERS_KEY, ADAPTERS_VALUE);
|
||||
|
||||
|
@ -67,7 +67,7 @@ public class AdaptersMBeanImpl extends StandardMBean implements AdaptersMBean {
|
||||
|
||||
@Activate
|
||||
public void activate(ComponentContext componentContext) {
|
||||
log.info(" >> ACTIVATE <<");
|
||||
log.debug(" >> ACTIVATE <<");
|
||||
this.bundleContext = componentContext.getBundleContext();
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -55,7 +55,7 @@
|
||||
"type": "pathParameter",
|
||||
"generator": "",
|
||||
"config": {
|
||||
"expession": "${destinationType}:${destinationName}"
|
||||
"expression": "${destinationType}:${destinationName}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -665,7 +665,7 @@
|
||||
"type": "pathParameter",
|
||||
"generator": "",
|
||||
"config": {
|
||||
"expession": "${destinationType}:${destinationName}"
|
||||
"expression": "${destinationType}:${destinationName}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -55,7 +55,7 @@
|
||||
"type": "pathParameter",
|
||||
"generator": "",
|
||||
"config": {
|
||||
"expession": "${destinationType}:${destinationName}"
|
||||
"expression": "${destinationType}:${destinationName}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@ -19,6 +18,9 @@
|
||||
|
||||
<properties>
|
||||
<bundle.osgi.dynamicimport.pkg>*</bundle.osgi.dynamicimport.pkg>
|
||||
<bundle.osgi.export.pkg>ru.entaxy.platform.adapter.file</bundle.osgi.export.pkg>
|
||||
<bundle.osgi.private.pkg>template,
|
||||
ru.entaxy.adapter</bundle.osgi.private.pkg>
|
||||
<!-- <bundle.osgi.private.pkg>ru.entaxy.adapter</bundle.osgi.private.pkg>-->
|
||||
</properties>
|
||||
|
||||
@ -30,11 +32,30 @@
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Entaxy-Adapter>true</Entaxy-Adapter>
|
||||
<Entaxy-Adapter-Class/>
|
||||
<!-- Entaxy-Adapter>true</Entaxy-Adapter>
|
||||
<Entaxy-Adapter-Class / -->
|
||||
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
|
||||
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-file</artifactId>
|
||||
<version>${camel.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-util</artifactId>
|
||||
<version>${camel.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
|
||||
<artifactId>base-support</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
@ -0,0 +1,69 @@
|
||||
/*-
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* file-adapter
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2022 EmDev LLC
|
||||
* ==========
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ~~~~~~/licensing~~~~~~
|
||||
*/
|
||||
package ru.entaxy.platform.adapter.file;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.camel.component.file.FileComponent;
|
||||
import org.apache.camel.component.file.GenericFileEndpoint;
|
||||
import org.apache.camel.util.StringHelper;
|
||||
|
||||
import ru.entaxy.platform.base.support.CommonUtils;
|
||||
|
||||
public class ExtendedFileComponent extends FileComponent {
|
||||
|
||||
protected String rootDirectory = "";
|
||||
|
||||
@Override
|
||||
protected GenericFileEndpoint<File> buildFileEndpoint(String uri, String remaining, Map<String, Object> parameters)
|
||||
throws Exception {
|
||||
|
||||
// copied from parent
|
||||
if (StringHelper.hasStartToken(remaining, "simple")) {
|
||||
throw new IllegalArgumentException("Invalid directory: " + remaining + ". Dynamic expressions with ${ } placeholders is not allowed."
|
||||
+ " Use the fileName option to set the dynamic expression.");
|
||||
}
|
||||
|
||||
String current = remaining;
|
||||
if (CommonUtils.isValid(rootDirectory)) {
|
||||
current = rootDirectory;
|
||||
if (CommonUtils.isValid(remaining) && !".".equals(remaining)) {
|
||||
if (!current.endsWith("/"))
|
||||
current += "/";
|
||||
if (remaining.startsWith("/"))
|
||||
current += remaining.substring(1);
|
||||
else
|
||||
current += remaining;
|
||||
}
|
||||
}
|
||||
log.debug("CREATING ENDPOINT FOR [{}]", current);
|
||||
return super.buildFileEndpoint(uri, current, parameters);
|
||||
}
|
||||
|
||||
public String getRootDirectory() {
|
||||
return rootDirectory;
|
||||
}
|
||||
|
||||
public void setRootDirectory(String rootDirectory) {
|
||||
this.rootDirectory = rootDirectory;
|
||||
}
|
||||
|
||||
}
|
@ -516,7 +516,7 @@
|
||||
"type": "pathParameter",
|
||||
"generator": "",
|
||||
"config": {
|
||||
"expession": "${directoryName}"
|
||||
"expression": "${directoryName}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,47 @@
|
||||
[#ftl attributes={"generated.type":"blueprint"}]
|
||||
[#--
|
||||
|
||||
~~~~~~licensing~~~~~~
|
||||
file-adapter
|
||||
==========
|
||||
Copyright (C) 2020 - 2021 EmDev LLC
|
||||
==========
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
~~~~~~/licensing~~~~~~
|
||||
|
||||
--]
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
|
||||
xsi:schemaLocation="
|
||||
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
|
||||
>
|
||||
|
||||
<service interface="org.apache.camel.Component" ref="[=objectId]">
|
||||
<service-properties>
|
||||
<entry key="connection.name" value="[=objectId]"/>
|
||||
</service-properties>
|
||||
</service>
|
||||
|
||||
<bean id="[=objectId]" class="ru.entaxy.platform.adapter.file.ExtendedFileComponent">
|
||||
[#if properties??]
|
||||
[#list properties as key, value]
|
||||
[#if !key?starts_with("##") && !key?starts_with("__")] [#-- we skip additional properties --]
|
||||
<property name="[=key]" value="[=value]"/>
|
||||
[/#if]
|
||||
[/#list]
|
||||
[/#if]
|
||||
</bean>
|
||||
|
||||
</blueprint>
|
@ -45,7 +45,7 @@
|
||||
</service-properties>
|
||||
</service>
|
||||
|
||||
<bean id="[=connection.name]" class="org.apache.camel.component.file.FileComponent">
|
||||
<bean id="[=connection.name]" class="ru.entaxy.platform.adapter.file.ExtendedFileComponent">
|
||||
[#if connection.properties??]
|
||||
[#list connection.properties as key, value]
|
||||
<property name="[=key]" value="[='$']{[=connection.configurationPid].[=key]}"/>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -110,7 +110,7 @@
|
||||
"type": "pathParameter",
|
||||
"generator": "",
|
||||
"config": {
|
||||
"expession": "${dataSourceName}"
|
||||
"expression": "${dataSourceName}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -665,7 +665,7 @@
|
||||
"type": "pathParameter",
|
||||
"generator": "",
|
||||
"config": {
|
||||
"expession": "${destinationType}:${destinationName}"
|
||||
"expression": "${destinationType}:${destinationName}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
|
||||
<artifactId>connecting</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -110,7 +110,7 @@
|
||||
"type": "pathParameter",
|
||||
"generator": "",
|
||||
"config": {
|
||||
"expession": "${dataSourceName}"
|
||||
"expression": "${dataSourceName}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>adapter</artifactId>
|
||||
<version>1.8.1</version>
|
||||
<version>1.8.2</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -55,7 +55,7 @@
|
||||
"type": "pathParameter",
|
||||
"generator": "",
|
||||
"config": {
|
||||
"expession": "${destinationType}:${destinationName}"
|
||||
"expression": "${destinationType}:${destinationName}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user