initial public commit

This commit is contained in:
2021-09-06 17:46:59 +03:00
commit b744b08829
824 changed files with 91593 additions and 0 deletions

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,53 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.system</groupId>
<artifactId>management</artifactId>
<version>1.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>ru.entaxy.esb.system.management.blueprint.generator</groupId>
<artifactId>blueprint-generator</artifactId>
<packaging>bundle</packaging>
<name>SYSTEM :: ENTAXY :: SYSTEM :: BLUEPRINT :: GENERATOR</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: BLUEPRINT :: GENERATOR</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.management.blueprint.generator
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
!com.sun.org.apache.xml.internal.dtm.ref,
freemarker.template;version="[2.3,3)",
org.apache.commons.logging,
org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
*
</bundle.osgi.import.pkg>
<freemarker.version>2.3.29</freemarker.version>
</properties>
<dependencies>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${freemarker.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.commons</groupId>
<artifactId>system-commons</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,54 @@
/*-
* ~~~~~~licensing~~~~~~
* blueprint-generator
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.blueprint.generator;
public class Blueprint {
private String name;
private byte[] body;
public Blueprint(String name, byte[] body) {
this.name = name;
this.body = body;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public byte[] getBody() {
return body;
}
public void setBody(byte[] body) {
this.body = body;
}
@Override
public String toString() {
return "Blueprint{" +
"name='" + name + '\'' +
'}';
}
}

View File

@ -0,0 +1,36 @@
/*-
* ~~~~~~licensing~~~~~~
* blueprint-generator
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.blueprint.generator;
import freemarker.template.TemplateException;
import ru.entaxy.esb.system.common.exception.TemplateNotFound;
import java.io.IOException;
import java.net.URL;
import java.util.Map;
public interface BlueprintGenerator {
Blueprint createBlueprint(URL templateUrl, String templateName, String systemName, Map<String, String> params)
throws TemplateNotFound, TemplateException, IOException;
Blueprint createBlueprint(String templateName, String systemName, Map<String, String> params)
throws TemplateNotFound, TemplateException, IOException;
}

View File

@ -0,0 +1,106 @@
/*-
* ~~~~~~licensing~~~~~~
* blueprint-generator
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.blueprint.generator;
import freemarker.cache.URLTemplateLoader;
import freemarker.template.Configuration;
import freemarker.template.DefaultObjectWrapper;
import freemarker.template.Template;
import freemarker.template.TemplateException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.BundleContext;
import ru.entaxy.esb.system.common.exception.TemplateNotFound;
import java.io.IOException;
import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Map;
import static freemarker.template.Configuration.SQUARE_BRACKET_INTERPOLATION_SYNTAX;
public class BlueprintGeneratorImpl implements BlueprintGenerator {
private static final Log LOG = LogFactory.getLog(BlueprintGeneratorImpl.class.getName());
private static final String SYSTEM_NAME = "systemName";
private static final String FTL_EXTENSION = ".ftl";
private static final String XML_EXTENSION = ".xml";
private BundleContext bundleContext;
@Override
public Blueprint createBlueprint(URL templateUrl, String templateName, String systemName, Map<String, String> params)
throws TemplateNotFound, TemplateException, IOException {
return writeBlueprint(templateUrl, templateName, systemName, params);
}
@Override
public Blueprint createBlueprint(String templateName, String systemName, Map<String, String> params) throws TemplateNotFound,
TemplateException, IOException {
return createBlueprint(bundleContext.getBundle().getEntry("/template/"), templateName, systemName, params);
}
private Blueprint writeBlueprint(URL templateUrl, String templateName, String systemName, Map<String, String> params)
throws IOException, TemplateException, TemplateNotFound {
Template temp = getTemplateByName(templateUrl, templateName);
addSystemParam(params, systemName);
try (StringWriter writer = new StringWriter()) {
temp.process(params, writer);
return new Blueprint(templateName + "-" + systemName + XML_EXTENSION, writer.toString().getBytes());
}
}
private void addSystemParam(Map<String, String> params, String systemName) {
params.put(SYSTEM_NAME, systemName);
}
private Template getTemplateByName(URL templateUrl, String templateName) throws IOException, TemplateNotFound {
Configuration cfg = getConfiguration(templateUrl);
return cfg.getTemplate(templateName + FTL_EXTENSION);
}
private Configuration getConfiguration(URL templateUrl) throws TemplateNotFound {
Configuration freemarkerConfig = new Configuration();
freemarkerConfig.setObjectWrapper(new DefaultObjectWrapper());
freemarkerConfig.setLocalizedLookup(false);
freemarkerConfig.setTemplateLoader(getURLTemplateLoader(templateUrl));
freemarkerConfig.setInterpolationSyntax(SQUARE_BRACKET_INTERPOLATION_SYNTAX);
return freemarkerConfig;
}
private URLTemplateLoader getURLTemplateLoader(URL templateUrl) {
return new URLTemplateLoader() {
@Override
protected URL getURL(String templateName) {
try {
return new URL(templateUrl + templateName);
} catch (MalformedURLException e) {
LOG.error(e);
}
return null;
}
};
}
public void setBundleContext(BundleContext bundleContext) {
this.bundleContext = bundleContext;
}
}

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
blueprint-generator
==========
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~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
">
<bean id="blueprintGenerator" class="ru.entaxy.esb.system.management.blueprint.generator.BlueprintGeneratorImpl"
activation="eager">
<property name="bundleContext" ref="blueprintBundleContext"/>
</bean>
<service ref="blueprintGenerator"
interface="ru.entaxy.esb.system.management.blueprint.generator.BlueprintGenerator"/>
</blueprint>

View File

@ -0,0 +1,57 @@
<#--
~~~~~~licensing~~~~~~
blueprint-generator
==========
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"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<bean id="inConnectorCollector" class="ru.entaxy.esb.system.profile.commons.InConnectorCollector"/>
<bean id="system-profile" class="ru.entaxy.esb.system.registry.systems.profile.impl.defaults.DefaultSystemProfile"
activation="eager">
<property name="systemName" value="[=systemName]"/>
<property name="profileOutput" ref="profileOutput"/>
</bean>
<bean id="profileOutput" class="ru.entaxy.esb.system.profile.commons.profile_output.ProfileOutputImpl"
activation="eager">
<property name="systemName" value="[=systemName]"/>
</bean>
<service activation="eager" auto-export="interfaces" ref="system-profile"/>
<reference id="pooledConnectionFactory" interface="javax.jms.ConnectionFactory"/>
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="pooledConnectionFactory"/>
</bean>
<camelContext id="profile-[=systemName]" xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="direct-vm:profile-[=systemName]-enter-point"/>
<log message="Message ${headers} send to bridge" loggingLevel="TRACE"/>
<toD uri="permission:checkSystemAccessException?objectId=${headers.X-SystemId}&amp;subjectId=[=systemName]"/>
<setHeader name="NTX_DestinationPointAfterBridge">
<simple>system:[=systemName]</simple>
</setHeader>
<to uri="jms:queue:entaxy.local.out.[=origin]"/>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,66 @@
<#--
~~~~~~licensing~~~~~~
blueprint-generator
==========
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"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<reference id="entaxy-broker" interface="org.apache.camel.Component"
filter="(connection.name=entaxy-broker)"/>
<camelContext id="route-[=systemName]" xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="direct-vm:profile-[=systemName]-exit-point"/>
<log message="Message ${headers} send to route" loggingLevel="TRACE"/>
<when>
<simple>${headers.ENTAXY_Destination} == 'nsi'
&amp;&amp; ${headers.ENTAXY_DestinationType} == null
</simple>
<setHeader name="NTX_NSI_Answer">
<simple>true</simple>
</setHeader>
<to uri="entaxy-broker:queue:entaxy.nsi.entry.point?exchangePattern=InOnly"/>
</when>
<choice>
<when>
<simple>${headers.ENTAXY_DestinationType} == 'system.name'</simple>
<toD uri="system:${headers.ENTAXY_Destination}"/>
</when>
<when>
<simple>${headers.ENTAXY_DestinationType} == 'system-group.name'</simple>
<toD uri="system-group:${headers.ENTAXY_Destination}"/>
</when>
<when>
<simple>${headers.ENTAXY_DestinationType} == 'queue.name'</simple>
<toD uri="entaxy-broker:queue:${headers.ENTAXY_Destination}"/>
</when>
<when>
<simple>${headers.ENTAXY_DestinationType} == 'topic.name'</simple>
<toD uri="entaxy-broker:topic:${headers.ENTAXY_Destination}"/>
</when>
<otherwise>
<toD uri="system:${headers.ENTAXY_Destination}"/>
</otherwise>
</choice>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,93 @@
<#--
~~~~~~licensing~~~~~~
blueprint-generator
==========
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"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<reference-list id="outConnector"
interface="ru.entaxy.esb.system.profile.commons.connectors.out.OutConnector"
filter="(systemName=[=systemName])" availability="optional">
<reference-listener ref="profileOutput"
bind-method="register" unbind-method="unregister"/>
</reference-list>
<reference-list id="inConnector"
interface="ru.entaxy.esb.system.profile.commons.connectors.in.InConnector"
filter="(systemName=[=systemName])" availability="optional">
<reference-listener ref="inConnectorCollector"
bind-method="register" unbind-method="unregister"/>
</reference-list>
<bean id="inConnectorCollector" class="ru.entaxy.esb.system.profile.commons.InConnectorCollector"/>
<bean id="system-profile" class="ru.entaxy.esb.system.registry.systems.profile.impl.defaults.DefaultSystemProfile"
activation="eager">
<property name="systemName" value="[=systemName]"/>
<property name="profileOutput" ref="profileOutput"/>
<property name="inConnectorCollector" ref="inConnectorCollector"/>
</bean>
<bean id="profileOutput" class="ru.entaxy.esb.system.profile.commons.profile_output.ProfileOutputImpl"
activation="eager">
<property name="systemName" value="[=systemName]"/>
</bean>
<service activation="eager" auto-export="interfaces" ref="system-profile"/>
<reference id="pooledConnectionFactory" interface="javax.jms.ConnectionFactory"/>
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="pooledConnectionFactory"/>
</bean>
<camelContext id="profile-[=systemName]" xmlns="http://camel.apache.org/schema/blueprint">
<route>
<from uri="direct-vm:profile-[=systemName]-exit-dispatcher"/>
<log message="Message ${headers} send to profile dispatcher" loggingLevel="TRACE"/>
<choice>
<when>
<simple>${headers.NTX_NextPoint} != null</simple>
<setProperty name="NTX_Tmp">
<simple>${headers.NTX_NextPoint}</simple>
</setProperty>
<removeHeader headerName="NTX_NextPoint"/>
<toD uri="${exchangeProperty.NTX_Tmp}"/>
</when>
<otherwise>
<to uri="direct-vm:profile-[=systemName]-exit-point"/>
</otherwise>
</choice>
</route>
<route>
<from uri="direct-vm:profile-[=systemName]-enter-point"/>
<log message="Message ${headers} send to profile output" loggingLevel="TRACE"/>
<choice>
<when>
<simple>${headers.NTX_Origin} == null</simple>
<toD uri="permission:checkSystemAccessException?objectId=${headers.X-SystemId}&amp;subjectId=[=systemName]"/>
</when>
</choice>
<to uri="bean:profileOutput?method=sendTo"/>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,126 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.system</groupId>
<artifactId>management</artifactId>
<version>1.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>ru.entaxy.esb.system.management.bridge.profile.manager</groupId>
<artifactId>bridge-profile-manager</artifactId>
<packaging>bundle</packaging>
<name>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: BRIDGE :: PROFILE :: MANAGER</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: BRIDGE :: PROFILE :: MANAGER</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.management.bridge.profile.manager.service,
ru.entaxy.esb.system.management.bridge.profile.manager.*
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
!com.sun.org.apache.xml.internal.dtm.ref,
!org.mapstruct.*,
!com.google.gson,
ru.entaxy.esb.system.management.bundle.manager,
ru.entaxy.esb.system.management.bundle.jpa,
ru.entaxy.esb.system.management.bundle.jpa.entity,
ru.entaxy.esb.system.management.bundle.jpa.dto,
ru.entaxy.esb.system.core.template,
ru.entaxy.esb.system.jpa,
ru.entaxy.esb.system.profile.commons,
ru.entaxy.esb.system.profile.commons.connectors,
ru.entaxy.esb.system.core.dispatcher,
org.apache.commons.logging,
org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
*
</bundle.osgi.import.pkg>
<bundle.osgi.embed.dependency>
gson
</bundle.osgi.embed.dependency>
</properties>
<dependencies>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.systems</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.profile.commons</groupId>
<artifactId>profile-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.core</groupId>
<artifactId>template</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.connector</groupId>
<artifactId>connector-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.jpa</groupId>
<artifactId>bundle-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.manager</groupId>
<artifactId>bundle-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,43 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager;
import ru.entaxy.esb.system.management.bridge.profile.manager.dto.BridgeProfileDto;
import ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileType;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import java.util.List;
public interface BridgeProfileManager {
BundleDto installBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception;
BundleDto startBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception;
BundleDto stopBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception;
BridgeProfileType getBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception;
List<BridgeProfileType> getBridgeProfiles() throws Exception;
BundleDto uninstallBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception;
List<String> getListEsb() throws Exception;
}

View File

@ -0,0 +1,136 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager;
import com.google.gson.Gson;
import ru.entaxy.esb.system.common.exception.EsbNotFound;
import ru.entaxy.esb.system.jpa.SystemService;
import ru.entaxy.esb.system.jpa.entity.System;
import ru.entaxy.esb.system.management.bridge.profile.manager.dto.BridgeProfileDto;
import ru.entaxy.esb.system.management.bridge.profile.manager.mapper.BridgeProfileMapper;
import ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileSender;
import ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileType;
import ru.entaxy.esb.system.management.bridge.profile.manager.service.BridgeService;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import java.util.List;
public class BridgeProfileManagerImpl implements BridgeProfileManager {
private static final Gson gson = new Gson();
private BridgeProfileSender bridgeProfileSender;
private SystemService systemService;
private BridgeProfileMapper bridgeProfileMapper;
private BridgeService bridgeService;
@Override
public BundleDto installBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception {
System system = systemService.getByUuid(bridgeProfileDto.getProfileUuid());
systemService.addExportAllowed(system, bridgeProfileDto.getEsbName());
BundleDto bundleDto;
try {
checkOnConnectEsbBridge(bridgeProfileDto.getEsbName());
bundleDto = gson.fromJson(sendOnOtherEsb(system, bridgeProfileDto.getEsbName(),
"create"), BundleDto.class);
} catch (Exception ex) {
systemService.removeExportAllowed(system, bridgeProfileDto.getEsbName());
throw ex;
}
return bundleDto;
}
@Override
public BundleDto startBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception {
System system = systemService.getByUuid(bridgeProfileDto.getProfileUuid());
checkOnConnectEsbBridge(bridgeProfileDto.getEsbName());
systemService.addExportAllowed(system, bridgeProfileDto.getEsbName());
BundleDto bundleDto = gson.fromJson(sendOnOtherEsb(system, bridgeProfileDto.getEsbName(),
"start"), BundleDto.class);
return bundleDto;
}
@Override
public BundleDto stopBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception {
System system = systemService.getByUuid(bridgeProfileDto.getProfileUuid());
checkOnConnectEsbBridge(bridgeProfileDto.getEsbName());
systemService.addExportAllowed(system, bridgeProfileDto.getEsbName());
BundleDto bundleDto = gson.fromJson(sendOnOtherEsb(system, bridgeProfileDto.getEsbName(),
"stop"), BundleDto.class);
return bundleDto;
}
@Override
public BridgeProfileType getBridgeProfile(BridgeProfileDto request) throws Exception {
System system = systemService.getByUuid(request.getProfileUuid());
checkOnConnectEsbBridge(request.getEsbName());
systemService.addExportAllowed(system, request.getEsbName());
BridgeProfileType response = gson.fromJson(sendOnOtherEsb(system, request.getEsbName(),
"get"), BridgeProfileType.class);
return response;
}
@Override
public List<BridgeProfileType> getBridgeProfiles() throws Exception {
return bridgeProfileMapper.toBridgeProfileTypes(systemService.getFullSystemListByNotOrigin());
}
@Override
public BundleDto uninstallBridgeProfile(BridgeProfileDto bridgeProfileDto) throws Exception {
System system = systemService.getByUuid(bridgeProfileDto.getProfileUuid());
checkOnConnectEsbBridge(bridgeProfileDto.getEsbName());
systemService.removeExportAllowed(system, bridgeProfileDto.getEsbName());
BundleDto bundleDto = gson.fromJson(sendOnOtherEsb(system, bridgeProfileDto.getEsbName(),
"uninstall"), BundleDto.class);
return bundleDto;
}
@Override
public List<String> getListEsb() throws Exception {
return bridgeService.getEsbList();
}
private String sendOnOtherEsb(System system, String exportAllowed, String command) {
return bridgeProfileSender.sendOnOtherEsb(bridgeProfileMapper.toBridgeProfileType(system),
exportAllowed, command);
}
public void checkOnConnectEsbBridge(String esbName) {
if (!bridgeService.getEsbList().contains(esbName)) {
throw new EsbNotFound("ESB not found {" + esbName + "}");
}
}
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
public void setBridgeProfileMapper(BridgeProfileMapper bridgeProfileMapper) {
this.bridgeProfileMapper = bridgeProfileMapper;
}
public void setBridgeService(BridgeService bridgeService) {
this.bridgeService = bridgeService;
}
public void setBridgeProfileSender(BridgeProfileSender bridgeProfileSender) {
this.bridgeProfileSender = bridgeProfileSender;
}
}

View File

@ -0,0 +1,69 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager.dto;
public class BridgeProfileDto {
private String profileUuid;
private String esbName;
private String status;
private String origin;
private String createdBy;
public String getProfileUuid() {
return profileUuid;
}
public void setProfileUuid(String profileUuid) {
this.profileUuid = profileUuid;
}
public String getEsbName() {
return esbName;
}
public void setEsbName(String esbName) {
this.esbName = esbName;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getOrigin() {
return origin;
}
public void setOrigin(String origin) {
this.origin = origin;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
}

View File

@ -0,0 +1,61 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager.mapper;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import ru.entaxy.esb.system.jpa.entity.System;
import ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileType;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleEntity;
import java.util.List;
@Mapper
public interface BridgeProfileMapper {
@Mappings({
@Mapping(source = "bundleName", target = "name"),
@Mapping(source = "bundleUrl", target = "url"),
})
BundleEntity toBundleEntity(BundleDto bundle);
@Mappings({
@Mapping(target = "bundleName", source = "name"),
@Mapping(target = "bundleUrl", source = "url"),
})
BundleDto toBundleDto(BundleEntity bundle);
@Mappings({
@Mapping(source = "name", target = "profileName"),
@Mapping(source = "bundleEntity.status", target = "status"),
})
BridgeProfileType toBridgeProfileType(System system);
@Mappings({
@Mapping(source = "profileName", target = "name"),
@Mapping(target = "createDate", expression = "java(new java.util.Date())"),
@Mapping(source = "status", target = "bundleEntity.status"),
})
System toSystemEntity(BridgeProfileType bridgeProfileType);
List<BridgeProfileType> toBridgeProfileTypes(List<System> systemList);
}

View File

@ -0,0 +1,35 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager.recipient;
public interface BridgeProfileRecipientManager {
String installBridgeProfile(String json, String origin) throws Exception;
String startBridgeProfile(String json, String origin) throws Exception;
String stopBridgeProfile(String json, String origin) throws Exception;
String getBridgeProfile(String json, String origin) throws Exception;
String uninstallBridgeProfile(String json, String origin) throws Exception;
void restore() throws Exception;
}

View File

@ -0,0 +1,152 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager.recipient;
import com.google.gson.Gson;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import ru.entaxy.esb.system.jpa.SystemService;
import ru.entaxy.esb.system.jpa.entity.System;
import ru.entaxy.esb.system.management.bridge.profile.manager.mapper.BridgeProfileMapper;
import ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileType;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleStatus;
import ru.entaxy.esb.system.management.bundle.manager.BundleManager;
import java.io.IOException;
import java.util.HashMap;
public class BridgeProfileRecipientManagerImpl implements BridgeProfileRecipientManager {
private static final Log LOG = LogFactory.getLog(BridgeProfileRecipientManagerImpl.class);
private static final String BRIDGE_PROFILE = "bridge-profile";
private static final String ORIGIN = "origin";
private static final Gson gson = new Gson();
private boolean isRestoreFromDB;
private BundleManager bundleManager;
private SystemService systemService;
private BridgeProfileMapper bridgeProfileMapper;
@Override
public String installBridgeProfile(String json, String origin) throws Exception {
System system = createSystem(gson.fromJson(json, BridgeProfileType.class), origin);
BundleDto bundle = bundleManager.installAndStartBundle(system.getName(), BRIDGE_PROFILE,
String.valueOf(system.getVersion()), getParam(origin));
systemService.setBundleEntity(system, bridgeProfileMapper.toBundleEntity(bundle));
return gson.toJson(bundle);
}
@Override
public String startBridgeProfile(String json, String origin) throws Exception {
BridgeProfileType bridgeProfileType = gson.fromJson(json, BridgeProfileType.class);
System system = systemService.getByUuid(bridgeProfileType.getUuid());
BundleDto bundle = bundleManager.startBundle(bridgeProfileMapper.toBundleDto(system.getBundleEntity()));
systemService.setBundleEntity(system, bridgeProfileMapper.toBundleEntity(bundle));
return gson.toJson(bundle);
}
@Override
public String stopBridgeProfile(String json, String origin) throws Exception {
BridgeProfileType bridgeProfileType = gson.fromJson(json, BridgeProfileType.class);
System system = systemService.getByUuid(bridgeProfileType.getUuid());
BundleDto bundle = bundleManager.stopBundle(bridgeProfileMapper.toBundleDto(system.getBundleEntity()));
systemService.setBundleEntity(system, bridgeProfileMapper.toBundleEntity(bundle));
return gson.toJson(bundle);
}
@Override
public String getBridgeProfile(String json, String origin) throws Exception {
BridgeProfileType bridgeProfileType = gson.fromJson(json, BridgeProfileType.class);
System system = systemService.getByUuid(bridgeProfileType.getUuid());
return gson.toJson(bridgeProfileMapper.toBridgeProfileType(system));
}
@Override
public String uninstallBridgeProfile(String json, String origin) throws Exception {
BridgeProfileType bridgeProfileType = gson.fromJson(json, BridgeProfileType.class);
System system = systemService.getByUuid(bridgeProfileType.getUuid());
bundleManager.uninstallBundle(system.getName(), BRIDGE_PROFILE,
String.valueOf(system.getVersion()));
systemService.remove(system);
return gson.toJson(new BundleDto(system.getName(), BundleStatus.UNINSTALL));
}
private HashMap<String, String> getParam(String origin) {
HashMap<String, String> param = new HashMap<>();
param.put(ORIGIN, origin);
return param;
}
private System createSystem(BridgeProfileType bridgeProfileType, String origin) {
System system = bridgeProfileMapper.toSystemEntity(bridgeProfileType);
system.setOrigin(origin);
system.setBundleEntity(null);
return systemService.create(system);
}
@Override
public void restore() throws Exception {
if (!isRestoreFromDB)
return;
for (System system : systemService.getSystemList()) {
if (system.getOrigin() != null && !system.getOrigin().isEmpty()) {
try {
LOG.info("Restore bridge profile of system " + system.getName());
bundleManager.restore(bridgeProfileMapper.toBundleDto(system.getBundleEntity()));
} catch (IOException e) {
LOG.warn("Recreate bridge profile of system " + system.getName());
restoreProfile(system);
}
} else {
LOG.info("No bridge brofile founded in system");
}
}
}
private void restoreProfile(System system) throws Exception {
BundleDto bundle = bundleManager.installBundle(system.getName(), BRIDGE_PROFILE,
String.valueOf(system.getVersion()), getParam(system.getOrigin()));
bundle.setStatus(bridgeProfileMapper.toBundleDto(system.getBundleEntity()).getStatus());
bundleManager.checkCurrentBundleStatus(bundle);
systemService.setBundleEntity(system, bridgeProfileMapper.toBundleEntity(bundle));
}
public void setBundleManager(BundleManager bundleManager) {
this.bundleManager = bundleManager;
}
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
public void setBridgeProfileMapper(BridgeProfileMapper bridgeProfileMapper) {
this.bridgeProfileMapper = bridgeProfileMapper;
}
public void setIsRestoreFromDB(String isRestoreFromDB) {
this.isRestoreFromDB = Boolean.parseBoolean(isRestoreFromDB);
}
}

View File

@ -0,0 +1,25 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager.sender;
public interface BridgeProfileSender {
String sendOnOtherEsb(BridgeProfileType bridgeProfileType, String esbName, String command);
}

View File

@ -0,0 +1,63 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager.sender;
import com.google.gson.Gson;
import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.ExchangeBuilder;
public class BridgeProfileSenderImpl implements BridgeProfileSender {
private static final String HEADER_BRIDGE_NAME = "NTX_Bridge";
private static final String HEADER_COMMAND = "NTX_CommandBridgeProfileManager";
private static final String HEADER_DESTINATION_SYSTEM = "NTX_DestinationQueueAfterBridge";
private static final Gson gson = new Gson();
private CamelContext context;
@Override
public String sendOnOtherEsb(BridgeProfileType bridgeProfileType, String esbName, String command) {
Exchange exchange = ExchangeBuilder.anExchange(context)
.withHeader(HEADER_DESTINATION_SYSTEM, "profile-controller-route")
.withHeader(HEADER_BRIDGE_NAME, esbName)
.withHeader(HEADER_COMMAND, command)
.withBody(gson.toJson(bridgeProfileType))
.build();
ProducerTemplate template = exchange.getContext().createProducerTemplate();
template.send("direct-vm:send-message", exchange);
return exchange.getOut() != null && exchange.getOut().getBody() != null ?
exchange.getOut().getBody().toString() : null;
}
public CamelContext getContext() {
return context;
}
public void setContext(CamelContext context) {
this.context = context;
}
}

View File

@ -0,0 +1,116 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager.sender;
import java.io.Serializable;
public class BridgeProfileType implements Serializable {
private String uuid;
private String profileName;
private String status;
private String description;
private String version;
private String createdBy;
private String createdDate;
private String editedBy;
private String editedDate;
private String origin;
public String getProfileName() {
return profileName;
}
public void setProfileName(String profileName) {
this.profileName = profileName;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedDate() {
return createdDate;
}
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
public String getEditedBy() {
return editedBy;
}
public void setEditedBy(String editedBy) {
this.editedBy = editedBy;
}
public String getEditedDate() {
return editedDate;
}
public void setEditedDate(String editedDate) {
this.editedDate = editedDate;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getOrigin() {
return origin;
}
public void setOrigin(String origin) {
this.origin = origin;
}
}

View File

@ -0,0 +1,27 @@
/*-
* ~~~~~~licensing~~~~~~
* bridge-profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bridge.profile.manager.service;
import java.util.List;
public interface BridgeService {
List<String> getEsbList();
}

View File

@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
bridge-profile-manager
==========
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~~~~~~
-->
<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">
<cm:property-placeholder persistent-id="ru.entaxy.esb" update-strategy="reload">
<cm:default-properties>
<cm:property name="is.restore.from.db" value="true"/>
</cm:default-properties>
</cm:property-placeholder>
<reference id="pooledConnectionFactory" interface="javax.jms.ConnectionFactory"/>
<bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="pooledConnectionFactory"/>
</bean>
<bean id="bridgeProfileManager"
class="ru.entaxy.esb.system.management.bridge.profile.manager.BridgeProfileManagerImpl">
<property name="systemService" ref="systemService"/>
<property name="bridgeService" ref="bridgeService"/>
<property name="bridgeProfileMapper" ref="bridgeProfileMapper"/>
<property name="bridgeProfileSender" ref="bridgeProfileSender"/>
</bean>
<bean id="bridgeProfileRecipientManager"
class="ru.entaxy.esb.system.management.bridge.profile.manager.recipient.BridgeProfileRecipientManagerImpl"
init-method="restore">
<property name="isRestoreFromDB" value="${is.restore.from.db}"/>
<property name="systemService" ref="systemService"/>
<property name="bundleManager" ref="bundleManager"/>
<property name="bridgeProfileMapper" ref="bridgeProfileMapper"/>
</bean>
<service ref="bridgeProfileManager"
interface="ru.entaxy.esb.system.management.bridge.profile.manager.BridgeProfileManager"/>
<bean id="bridgeProfileMapper"
class="ru.entaxy.esb.system.management.bridge.profile.manager.mapper.BridgeProfileMapperImpl"/>
<bean id="bridgeProfileSender"
class="ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileSenderImpl">
<property name="context" ref="system-management-service"/>
</bean>
<reference id="bridgeService" interface="ru.entaxy.esb.system.management.bridge.profile.manager.service.BridgeService"
timeout="30000"
availability="optional"/>
<reference id="systemService"
interface="ru.entaxy.esb.system.jpa.SystemService"
timeout="30000"
availability="mandatory"/>
<reference id="bundleManager"
interface="ru.entaxy.esb.system.management.bundle.manager.BundleManager"
timeout="30000"
availability="mandatory"/>
<camelContext id="system-management-service" xmlns="http://camel.apache.org/schema/blueprint">
<route id="direct-profile-controller-route">
<from uri="direct-vm:send-message"/>
<setHeader name="NTX_ExchangePattern">
<simple>InOut</simple>
</setHeader>
<toD uri="jms:queue:entaxy.local.out.${headers.NTX_Bridge}?exchangePattern=InOut"/>
</route>
<route id="profile-controller-route">
<from uri="jms:queue:entaxy.profile.controller.route"/>
<choice>
<when>
<simple>${headers.NTX_CommandBridgeProfileManager} == "create"</simple>
<to uri="bean:bridgeProfileRecipientManager?
method=installBridgeProfile(${body}, ${headers.NTX_Origin})"/>
</when>
<when>
<simple>${headers.NTX_CommandBridgeProfileManager} == "start"</simple>
<to uri="bean:bridgeProfileRecipientManager?
method=startBridgeProfile(${body}, ${headers.NTX_Origin})"/>
</when>
<when>
<simple>${headers.NTX_CommandBridgeProfileManager} == "stop"</simple>
<to uri="bean:bridgeProfileRecipientManager?
method=stopBridgeProfile(${body}, ${headers.NTX_Origin})"/>
</when>
<when>
<simple>${headers.NTX_CommandBridgeProfileManager} == "uninstall"</simple>
<to uri="bean:bridgeProfileRecipientManager?
method=uninstallBridgeProfile(${body})"/>
</when>
<when>
<simple>${headers.NTX_CommandBridgeProfileManager} == "get"</simple>
<to uri="bean:bridgeProfileRecipientManager?
method=getBridgeProfile(${body})"/>
</when>
</choice>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,100 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.system</groupId>
<artifactId>management</artifactId>
<version>1.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>ru.entaxy.esb.system.management.bundle.manager</groupId>
<artifactId>bundle-manager</artifactId>
<packaging>bundle</packaging>
<name>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: BUNDLE :: MANAGER</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: BUNDLE :: MANAGER</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.management.bundle.manager
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
!com.sun.org.apache.xml.internal.dtm.ref,
!org.mapstruct.*,
ru.entaxy.esb.system.management.blueprint.generator,
ru.entaxy.esb.system.management.bundle.jpa,
ru.entaxy.esb.system.management.bundle.jpa.entity,
ru.entaxy.esb.system.management.bundle.jpa.dto,
ru.entaxy.esb.system.core.template,
ru.entaxy.esb.system.jpa,
ru.entaxy.esb.system.profile.commons,
ru.entaxy.esb.system.profile.commons.connectors,
ru.entaxy.esb.system.core.dispatcher,
org.apache.commons.logging,
org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
*
</bundle.osgi.import.pkg>
<bundle.osgi.embed.dependency>
gson
</bundle.osgi.embed.dependency>
</properties>
<dependencies>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.systems</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.profile.commons</groupId>
<artifactId>profile-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.core</groupId>
<artifactId>template</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.connector</groupId>
<artifactId>connector-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.deployer</groupId>
<artifactId>nexus-deployer</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.jpa</groupId>
<artifactId>bundle-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.blueprint.generator</groupId>
<artifactId>blueprint-generator</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.deployer</groupId>
<artifactId>cellar-deployer</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.deployer</groupId>
<artifactId>deployer-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,66 @@
/*-
* ~~~~~~licensing~~~~~~
* bundle-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bundle.manager;
import ru.entaxy.esb.system.management.blueprint.generator.Blueprint;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import java.net.URL;
import java.util.Map;
public interface BundleManager {
BundleDto installAndStartBundle(String bundleName, String bundleType, String bundleVersion,
Map<String, String> param) throws Exception;
BundleDto installBundle(String bundleName, String templateName, String templateFileName, String bundleType, String bundleVersion,
URL templateUrl, Map<String, String> param) throws Exception;
BundleDto installAndStartBundle(String bundleName, String bundleType, String bundleVersion, Blueprint blueprint) throws Exception;
BundleDto installBundle(String bundleName, String bundleType, String bundleVersion, Blueprint blueprint) throws Exception;
BundleDto installAndStartBundle(String bundleName, String bundleType, String bundleVersion) throws Exception;
BundleDto installBundle(String bundleName, String bundleType, String bundleVersion) throws Exception;
BundleDto startBundle(BundleDto bundle) throws Exception;
BundleDto stopBundle(BundleDto bundle) throws Exception;
void uninstallBundle(String bundleName, String type, String bundleVersion) throws Exception;
BundleDto installAndStartBundle(String bundleName, String templateName, String templateFileName, String bundleType, String bundleVersion,
URL url, Map<String, String> param) throws Exception;
BundleDto installBundle(String bundleName, String bundleType, String bundleVersion, Map<String, String> param)
throws Exception;
void uninstallBundleByName(String bundleName, String type, String bundleVersion) throws Exception;
void restore(BundleDto bundle) throws Exception;
void checkCurrentBundleStatus(BundleDto bundle) throws Exception;
}

View File

@ -0,0 +1,197 @@
/*-
* ~~~~~~licensing~~~~~~
* bundle-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bundle.manager;
import ru.entaxy.esb.system.deployer.api.BundleRepository;
import ru.entaxy.esb.system.deployer.cellar.deployer.BundleController;
import ru.entaxy.esb.system.management.blueprint.generator.Blueprint;
import ru.entaxy.esb.system.management.blueprint.generator.BlueprintGenerator;
import ru.entaxy.esb.system.management.bundle.jpa.BundleService;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleStatus;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleType;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
public class BundleManagerImpl implements BundleManager {
private static final String GROUP_ID = "ru.entaxy.esb.";
private static final String XML_EXTENSION = "xml";
private BlueprintGenerator blueprintGenerator;
private BundleController bundleController;
private BundleRepository bundleRepository;
private BundleService bundleService;
@Override
public BundleDto installAndStartBundle(String bundleName, String templateName, String templateFileName, String bundleType, String bundleVersion,
URL templateUrl, Map<String, String> param) throws Exception {
return doInstallBundle(bundleName, templateName, templateFileName, bundleType, bundleVersion, templateUrl, param, true);
}
@Override
public BundleDto installBundle(String bundleName, String templateName, String templateFileName, String bundleType, String bundleVersion,
URL templateUrl, Map<String, String> param) throws Exception {
return doInstallBundle(bundleName, templateName, templateFileName, bundleType, bundleVersion, templateUrl, param, false);
}
private BundleDto doInstallBundle(String bundleName, String templateName, String templateFileName, String bundleType, String bundleVersion,
URL templateUrl, Map<String, String> param, boolean start) throws Exception {
BundleDto bundle = new BundleDto(templateName + "-" + bundleName, BundleType.getValueOf(bundleType.toUpperCase()));
Blueprint blueprint = blueprintGenerator.createBlueprint(templateUrl, templateFileName, bundleName, param);
installAndStartBundle(bundleType, bundleVersion, bundle, blueprint, start);
return bundle;
}
@Override
public BundleDto installAndStartBundle(String bundleName, String bundleType, String bundleVersion,
Map<String, String> param) throws Exception {
return doInstallBundle(bundleName, bundleType, bundleVersion, param, true);
}
@Override
public BundleDto installBundle(String bundleName, String bundleType, String bundleVersion,
Map<String, String> param) throws Exception {
return doInstallBundle(bundleName, bundleType, bundleVersion, param, false);
}
private BundleDto doInstallBundle(String bundleName, String bundleType, String bundleVersion,
Map<String, String> param, boolean start) throws Exception {
BundleDto bundle = new BundleDto(bundleType + "-" + bundleName, BundleType.getValueOf(bundleType.toUpperCase()));
Blueprint blueprint = blueprintGenerator.createBlueprint(bundleType, bundleName, param);
installAndStartBundle(bundleType, bundleVersion, bundle, blueprint, start);
return bundle;
}
@Override
public BundleDto installAndStartBundle(String bundleName, String bundleType, String bundleVersion, Blueprint blueprint) throws Exception {
return doInstallBundle(bundleName, bundleType, bundleVersion, blueprint, true);
}
@Override
public BundleDto installBundle(String bundleName, String bundleType, String bundleVersion, Blueprint blueprint) throws Exception {
return doInstallBundle(bundleName, bundleType, bundleVersion, blueprint, false);
}
private BundleDto doInstallBundle(String bundleName, String bundleType, String bundleVersion, Blueprint blueprint, boolean start)
throws Exception {
BundleDto bundle = new BundleDto(bundleType + "-" + bundleName, BundleType.getValueOf(bundleType.toUpperCase()));
installAndStartBundle(bundleType, bundleVersion, bundle, blueprint, start);
return bundle;
}
@Override
public BundleDto installAndStartBundle(String bundleName, String bundleType, String bundleVersion) throws Exception {
return doInstallBundle(bundleName, bundleType, bundleVersion, true);
}
@Override
public BundleDto installBundle(String bundleName, String bundleType, String bundleVersion) throws Exception {
return doInstallBundle(bundleName, bundleType, bundleVersion, false);
}
private BundleDto doInstallBundle(String bundleName, String bundleType, String bundleVersion, boolean start)
throws Exception {
BundleDto bundle = new BundleDto(bundleType + "-" + bundleName, BundleType.getValueOf(bundleType.toUpperCase()));
Blueprint blueprint = blueprintGenerator.createBlueprint(bundleType, bundleName, new HashMap<>());
installAndStartBundle(bundleType, bundleVersion, bundle, blueprint, start);
return bundle;
}
@Override
public BundleDto startBundle(BundleDto bundle) throws Exception {
bundle.setStatus(BundleStatus.valueOf(bundleController.startBundle(bundle.getBundleName())));
return bundle;
}
@Override
public BundleDto stopBundle(BundleDto bundle) throws Exception {
bundle.setStatus(BundleStatus.valueOf(bundleController.stopBundle(bundle.getBundleName())));
return bundle;
}
@Override
public void uninstallBundle(String bundleName, String type, String bundleVersion) throws Exception {
bundleRepository.delete(GROUP_ID + type, bundleVersion, type + "-" + bundleName, XML_EXTENSION);
bundleController.uninstallBundle(type + "-" + bundleName);
}
@Override
public void uninstallBundleByName(String bundleName, String type, String bundleVersion) throws Exception {
bundleRepository.delete(GROUP_ID + type, bundleVersion, bundleName, XML_EXTENSION);
bundleController.uninstallBundle(bundleName);
}
@Override
public void restore(BundleDto bundle) throws Exception {
bundleController.installAndStartBundle(bundle.getBundleUrl(), bundle.getBundleName());
checkCurrentBundleStatus(bundle);
}
@Override
public void checkCurrentBundleStatus(BundleDto bundle) throws Exception {
if (BundleStatus.RESOLVED.equals(bundle.getStatus())) {
bundleController.stopBundle(bundle.getBundleName());
} else if (BundleStatus.ACTIVE.equals(bundle.getStatus())) {
bundleController.startBundle(bundle.getBundleName());
}
}
private void installAndStartBundle(String bundleType, String bundleVersion, BundleDto bundle, Blueprint blueprint, boolean start)
throws Exception {
bundle.setBundleUrl(bundleRepository.deployBlueprint(GROUP_ID + bundleType, bundleVersion, bundle.getBundleName(),
XML_EXTENSION, blueprint.getBody()));
try {
if (start) {
bundle.setStatus(BundleStatus.valueOf(
bundleController.installAndStartBundle(bundle.getBundleUrl(), bundle.getBundleName())));
} else {
bundleController.installBundle(bundle.getBundleUrl());
}
} catch (Exception ex) {
bundleRepository.delete(GROUP_ID + bundleType, bundleVersion, bundle.getBundleName(),
XML_EXTENSION);
throw ex;
}
}
public void setBundleService(BundleService bundleService) {
this.bundleService = bundleService;
}
public void setBlueprintGenerator(BlueprintGenerator blueprintGenerator) {
this.blueprintGenerator = blueprintGenerator;
}
public void setBundleController(BundleController bundleController) {
this.bundleController = bundleController;
}
public void setBundleRepository(BundleRepository bundleRepository) {
this.bundleRepository = bundleRepository;
}
}

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
bundle-manager
==========
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~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
">
<bean id="bundleManager" class="ru.entaxy.esb.system.management.bundle.manager.BundleManagerImpl">
<property name="blueprintGenerator" ref="blueprintGenerator"/>
<property name="bundleController" ref="bundleController"/>
<property name="bundleRepository" ref="bundleRepository"/>
<property name="bundleService" ref="bundleService"/>
</bean>
<service ref="bundleManager" interface="ru.entaxy.esb.system.management.bundle.manager.BundleManager"/>
<reference id="blueprintGenerator"
interface="ru.entaxy.esb.system.management.blueprint.generator.BlueprintGenerator"
timeout="30000"
availability="mandatory"/>
<reference id="bundleController"
interface="ru.entaxy.esb.system.deployer.cellar.deployer.BundleController"
timeout="30000"
availability="mandatory"/>
<reference id="bundleRepository"
interface="ru.entaxy.esb.system.deployer.api.BundleRepository"
timeout="30000"
availability="mandatory"/>
<reference id="bundleService"
interface="ru.entaxy.esb.system.management.bundle.jpa.BundleService"
timeout="30000"
availability="mandatory"/>
</blueprint>

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,44 @@
<?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/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>management</artifactId>
<groupId>ru.entaxy.esb.system</groupId>
<version>1.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>ru.entaxy.esb.system.management.bundle.jpa</groupId>
<artifactId>bundle-service</artifactId>
<name>SYSTEM :: ENTAXY :: SYSTEM :: BUNDLE :: SERVICE</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: BUNDLE :: SERVICE</description>
<packaging>bundle</packaging>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.management.bundle.jpa.*
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
javax.persistence;version="[2,3)",
org.hibernate.proxy,
javassist.util.proxy,
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>${jpa.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
<version>${hibernate.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,40 @@
/*-
* ~~~~~~licensing~~~~~~
* bundle-service
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bundle.jpa;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleEntity;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleType;
import java.util.List;
public interface BundleService {
BundleEntity getByName(String name);
BundleEntity add(BundleEntity bundleEntity);
BundleEntity add(String name, String bundleUrl, String status);
BundleEntity add(String name, BundleType type, String bundleUrl, String status);
BundleEntity update(String name, String status);
List<BundleEntity> list();
}

View File

@ -0,0 +1,115 @@
/*-
* ~~~~~~licensing~~~~~~
* bundle-service
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bundle.jpa;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleEntity;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleType;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import java.util.List;
public class BundleServiceImpl implements BundleService {
private SessionFactory sessionFactory;
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
public Session getSession() {
return sessionFactory.openSession();
}
@Override
public List<BundleEntity> list() {
List<BundleEntity> list;
try (Session s = getSession()) {
s.getTransaction().begin();
CriteriaQuery<BundleEntity> cq = s.getCriteriaBuilder().createQuery(BundleEntity.class);
cq.from(BundleEntity.class);
list = s.createQuery(cq).getResultList();
s.getTransaction().commit();
s.close();
}
return list;
}
@Override
public BundleEntity add(BundleEntity bundleEntity) {
try (Session s = getSession()) {
s.getTransaction().begin();
s.saveOrUpdate(bundleEntity);
s.getTransaction().commit();
s.close();
}
return bundleEntity;
}
@Override
public BundleEntity add(String name, String bundleUrl, String status) {
BundleEntity bundleEntity = new BundleEntity();
bundleEntity.setName(name);
bundleEntity.setUrl(bundleUrl);
bundleEntity.setStatus(status);
return add(bundleEntity);
}
@Override
public BundleEntity add(String name, BundleType type, String bundleUrl, String status) {
BundleEntity bundleEntity = new BundleEntity();
bundleEntity.setName(name);
bundleEntity.setType(type);
bundleEntity.setUrl(bundleUrl);
bundleEntity.setStatus(status);
return add(bundleEntity);
}
@Override
public BundleEntity getByName(String name) {
BundleEntity bundleEntity;
try (Session s = getSession()) {
s.getTransaction().begin();
CriteriaBuilder builder = s.getCriteriaBuilder();
CriteriaQuery<BundleEntity> criteriaQuery = builder.createQuery(BundleEntity.class);
Root<BundleEntity> root = criteriaQuery.from(BundleEntity.class);
criteriaQuery.where(builder.equal(root.get("name"), name));
bundleEntity = s.createQuery(criteriaQuery).uniqueResult();
s.getTransaction().commit();
s.close();
}
return bundleEntity;
}
@Override
public BundleEntity update(String name, String status) {
BundleEntity bundleEntity = getByName(name);
bundleEntity.setStatus(status);
return add(bundleEntity);
}
}

View File

@ -0,0 +1,88 @@
/*-
* ~~~~~~licensing~~~~~~
* bundle-service
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bundle.jpa.dto;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleType;
public class BundleDto {
private String bundleName;
private String bundleUrl;
private String version;
private BundleType type;
private BundleStatus status;
public BundleDto() {
}
public BundleDto(String bundleName) {
this.bundleName = bundleName;
}
public BundleDto(String bundleName, BundleStatus status) {
this.bundleName = bundleName;
this.status = status;
}
public BundleDto(String bundleName, BundleType type) {
this.bundleName = bundleName;
this.type = type;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getBundleName() {
return bundleName;
}
public void setBundleName(String bundleName) {
this.bundleName = bundleName;
}
public String getBundleUrl() {
return bundleUrl;
}
public void setBundleUrl(String bundleUrl) {
this.bundleUrl = bundleUrl;
}
public BundleType getType() {
return type;
}
public void setType(BundleType type) {
this.type = type;
}
public BundleStatus getStatus() {
return status;
}
public void setStatus(BundleStatus status) {
this.status = status;
}
}

View File

@ -0,0 +1,43 @@
/*-
* ~~~~~~licensing~~~~~~
* bundle-service
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bundle.jpa.dto;
public enum BundleStatus {
ACTIVE("ACTIVE"),
INSTALL("INSTALL"),
RESOLVED("RESOLVED"),
UNINSTALL("UNINSTALL");
private final String status;
BundleStatus(String status) {
this.status = status;
}
public String getStatus() {
return status;
}
// public static BundleStatus getStatus(String name) {
// return valueOf(name.toUpperCase());
// }
}

View File

@ -0,0 +1,102 @@
/*-
* ~~~~~~licensing~~~~~~
* bundle-service
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bundle.jpa.entity;
import javax.persistence.*;
@Entity
@Table(name = "bundle")
public class BundleEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id")
private long id;
@Column(name = "name")
private String name;
@Column(name = "type")
@Enumerated(EnumType.STRING)
private BundleType type;
@Column(name = "status")
private String status;
@Column(name = "version")
private String version;
@Column(name = "url")
private String url;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public BundleType getType() {
return type;
}
public void setType(BundleType type) {
this.type = type;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public String toString() {
return "BundleEntity{" +
"id=" + id +
", name='" + name + '\'' +
", status='" + status + '\'' +
", version='" + version + '\'' +
", url='" + url + '\'' +
'}';
}
}

View File

@ -0,0 +1,53 @@
/*-
* ~~~~~~licensing~~~~~~
* bundle-service
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.bundle.jpa.entity;
import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
public enum BundleType {
PROFILE("PROFILE"),
BRIDGE_PROFILE("BRIDGE-PROFILE"),
CONNECTOR("CONNECTOR");
public static final Map<String, BundleType> map;
private final String type;
BundleType(String type) {
this.type = type;
}
public String getType() {
return type;
}
public static BundleType getValueOf(String type) {
return map.containsKey(type) ? map.get(type) : null;
}
static {
map = Arrays.stream(BundleType.values())
.collect(Collectors.toMap(BundleType::getType, Function.identity()));
}
}

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
bundle-service
==========
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~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v2.0.0"
xmlns:tx="http://aries.apache.org/xmlns/transactions/v1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<jpa:enable/>
<tx:enable-annotations/>
<reference id="sessionFactory"
interface="org.hibernate.SessionFactory"
timeout="30000"/>
<service ref="bundleService"
interface="ru.entaxy.esb.system.management.bundle.jpa.BundleService"/>
<bean id="bundleService"
class="ru.entaxy.esb.system.management.bundle.jpa.BundleServiceImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
</blueprint>

View File

@ -0,0 +1,39 @@
<?xml version='1.0' encoding='utf-8'?>
<!--
~~~~~~licensing~~~~~~
bundle-service
==========
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~~~~~~
-->
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">osgi:service/entaxy.esb.storage</property>
<property name="hibernate.hbm2ddl.auto">validate</property>
<property name="hibernate.enable_lazy_load_no_trans">true</property>
<property name="show_sql">${hibernate.show_sql}</property>
<property name="format_sql">${hibernate.format_sql}</property>
<mapping class="ru.entaxy.esb.system.management.bundle.jpa.entity.BundleEntity"/>
</session-factory>
</hibernate-configuration>

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,117 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.system</groupId>
<artifactId>management</artifactId>
<version>1.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>ru.entaxy.esb.system.management.connector.manager</groupId>
<artifactId>connector-manager</artifactId>
<packaging>bundle</packaging>
<name>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: CONNECTOR :: MANAGER</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: CONNECTOR :: MANAGER</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.management.connector.manager.*
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
ru.entaxy.esb.system.management.bundle.jpa,
ru.entaxy.esb.system.management.bundle.jpa.entity,
ru.entaxy.esb.system.management.bundle.jpa.dto,
ru.entaxy.esb.system.core.template,
ru.entaxy.esb.system.jpa,
ru.entaxy.esb.system.profile.commons,
ru.entaxy.esb.system.profile.commons.connectors,
ru.entaxy.esb.system.core.dispatcher,
org.apache.commons.logging,
org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.systems</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.profile.commons</groupId>
<artifactId>profile-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.core</groupId>
<artifactId>template</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.connector</groupId>
<artifactId>connector-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.jpa</groupId>
<artifactId>bundle-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.manager</groupId>
<artifactId>bundle-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.connector</groupId>
<artifactId>connector-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,50 @@
/*-
* ~~~~~~licensing~~~~~~
* connector-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.connector.manager;
import ru.entaxy.esb.system.connector.entity.Connector;
import ru.entaxy.esb.system.core.template.Template;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.connector.manager.dto.ConnectorDto;
import java.util.List;
public interface ConnectorManager {
BundleDto installConnector(ConnectorDto connectorDto) throws Exception;
BundleDto startConnector(ConnectorDto connectorDto) throws Exception;
BundleDto stopConnector(ConnectorDto connectorDto) throws Exception;
BundleDto stopConnector(Connector connector) throws Exception;
BundleDto uninstallConnector(ConnectorDto connectorDto) throws Exception;
BundleDto uninstallConnector(Connector connector) throws Exception;
List<ConnectorDto> getListConnector();
List<Template> getTemplates();
Template getTemplate(String templateName);
void restore() throws Exception;
}

View File

@ -0,0 +1,211 @@
/*-
* ~~~~~~licensing~~~~~~
* connector-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.connector.manager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import ru.entaxy.esb.system.common.exception.TemplateNotFound;
import ru.entaxy.esb.system.connector.entity.Connector;
import ru.entaxy.esb.system.connector.impl.ConnectorService;
import ru.entaxy.esb.system.core.template.Template;
import ru.entaxy.esb.system.core.template.TemplateCollector;
import ru.entaxy.esb.system.jpa.SystemService;
import ru.entaxy.esb.system.jpa.entity.System;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleStatus;
import ru.entaxy.esb.system.management.bundle.manager.BundleManager;
import ru.entaxy.esb.system.management.connector.manager.dto.ConnectorDto;
import ru.entaxy.esb.system.management.connector.manager.mapper.ConnectorMapper;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ConnectorManagerImpl implements ConnectorManager {
private static final Log LOG = LogFactory.getLog(ConnectorManagerImpl.class);
private static final String CONNECTOR = "connector";
private boolean isRestoreFromDB;
private BundleManager bundleManager;
private TemplateCollector templateCollector;
private SystemService systemService;
private ConnectorService connectorService;
private ConnectorMapper connectorMapper;
@Override
public BundleDto installConnector(ConnectorDto connectorDto)
throws Exception {
URL templateUrl = getTemplateLocation(connectorDto.getTemplateName());
System system = systemService.getByUuid(connectorDto.getSystemUuid());
Connector connector = connectorService.addConnector(system, connectorMapper.toConnectorEntity(connectorDto));
Template template = getTemplate(connectorDto.getTemplateName());
BundleDto bundle;
try {
bundle = bundleManager.installAndStartBundle(system.getName(), template.getTemplateName(), template.getTemplateFileName(),
CONNECTOR, String.valueOf(connector.getVersion()), templateUrl,
mergeParams(connectorDto.getTemplateName(), connectorDto.getConnectorParams()));
connectorService.setBundleEntity(connector, connectorMapper.toBundleEntity(bundle));
} catch (Exception ex) {
connectorService.removeConnector(connector);
throw ex;
}
return bundle;
}
@Override
public BundleDto startConnector(ConnectorDto connectorDto) throws Exception {
Connector connector = connectorService.getConnectorByName(connectorDto.getSystemUuid(), connectorDto.getTemplateName());
BundleDto bundle = bundleManager.startBundle(connectorMapper.toBundleDto(connector.getBundleEntity()));
connectorService.setBundleEntity(connector, connectorMapper.toBundleEntity(bundle));
return bundle;
}
@Override
public BundleDto stopConnector(ConnectorDto connectorDto) throws Exception {
Connector connector = connectorService.getConnectorByName(connectorDto.getSystemUuid(), connectorDto.getTemplateName());
BundleDto bundle = bundleManager.stopBundle(connectorMapper.toBundleDto(connector.getBundleEntity()));
connectorService.setBundleEntity(connector, connectorMapper.toBundleEntity(bundle));
return bundle;
}
@Override
public BundleDto stopConnector(Connector connector) throws Exception {
BundleDto bundle = bundleManager.stopBundle(connectorMapper.toBundleDto(connector.getBundleEntity()));
connectorService.setBundleEntity(connector, connectorMapper.toBundleEntity(bundle));
return bundle;
}
@Override
public BundleDto uninstallConnector(ConnectorDto connectorDto) throws Exception {
Connector connector = connectorService.getConnectorByName(connectorDto.getSystemUuid(), connectorDto.getTemplateName());
bundleManager.uninstallBundleByName(connector.getName(), CONNECTOR, String.valueOf(connector.getVersion()));
connectorService.removeConnector(connector);
return new BundleDto(connector.getName(), BundleStatus.UNINSTALL);
}
@Override
public BundleDto uninstallConnector(Connector connector) throws Exception {
bundleManager.uninstallBundleByName(connector.getName(), CONNECTOR, String.valueOf(connector.getVersion()));
return new BundleDto(connector.getName(), BundleStatus.UNINSTALL);
}
@Override
public List<ConnectorDto> getListConnector() {
return connectorMapper.toConnectorDtos(connectorService.getListConnector());
}
@Override
public List<Template> getTemplates() {
List<Template> templateList = new ArrayList<>();
for (String referenceName : templateCollector.getReferenceNames()) {
templateList.add(templateCollector.getReference(referenceName));
}
return templateList;
}
@Override
public Template getTemplate(String templateName) {
return templateCollector.getReference(templateName);
}
private Map<String, String> mergeParams(String templateName, Map<String, String> params) {
if (params == null) {
params = new HashMap<>();
}
if (templateCollector.getReference(templateName).getParams() == null) {
return params;
}
for (Map.Entry<String, String> entry : templateCollector.getReference(templateName).getParams().entrySet()) {
if (!params.containsKey(entry.getKey())) {
params.put(entry.getKey(), entry.getValue());
}
}
return params;
}
private URL getTemplateLocation(String templateName) throws TemplateNotFound {
try {
return templateCollector.getReference(templateName).getTemplateLocation();
} catch (NullPointerException e) {
throw new TemplateNotFound("Template " + templateName + " not found", e);
}
}
@Override
public void restore() throws Exception {
if (!isRestoreFromDB)
return;
for (Connector connector : connectorService.getListConnector()) {
try {
LOG.info("Restore connector " + connector.getName());
bundleManager.restore(connectorMapper.toBundleDto(connector.getBundleEntity()));
} catch (IOException e) {
LOG.warn("Recreate connector " + connector.getName());
restoreConnector(connector);
}
}
}
private void restoreConnector(Connector connector) throws Exception {
URL templateUrl = getTemplateLocation(connector.getTemplateName());
System system = systemService.get(connector.getSystemId());
Template template = getTemplate(connector.getTemplateName());
BundleDto bundle = bundleManager.installBundle(system.getName(), template.getTemplateName(), template.getTemplateFileName(),
CONNECTOR, String.valueOf(connector.getVersion()), templateUrl,
mergeParams(connector.getTemplateName(), connectorMapper.toConnectorParams(connector.getConnectorParams())));
bundle.setStatus(connectorMapper.toBundleDto(connector.getBundleEntity()).getStatus());
bundleManager.checkCurrentBundleStatus(connectorMapper.toBundleDto(connector.getBundleEntity()));
connectorService.setBundleEntity(connector, connectorMapper.toBundleEntity(bundle));
}
public void setBundleManager(BundleManager bundleManager) {
this.bundleManager = bundleManager;
}
public void setTemplateCollector(TemplateCollector templateCollector) {
this.templateCollector = templateCollector;
}
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
public void setConnectorService(ConnectorService connectorService) {
this.connectorService = connectorService;
}
public void setConnectorMapper(ConnectorMapper connectorMapper) {
this.connectorMapper = connectorMapper;
}
public void setIsRestoreFromDB(String isRestoreFromDB) {
this.isRestoreFromDB = Boolean.parseBoolean(isRestoreFromDB);
}
}

View File

@ -0,0 +1,98 @@
/*-
* ~~~~~~licensing~~~~~~
* connector-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.connector.manager.dto;
import java.util.Map;
public class ConnectorDto {
private String systemUuid;
private String name;
private String templateName;
private String type;
private String status;
private String createdBy;
private String createdDate;
private Map<String, String> connectorParams;
public String getSystemUuid() {
return systemUuid;
}
public void setSystemUuid(String systemUuid) {
this.systemUuid = systemUuid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getCreatedDate() {
return createdDate;
}
public void setCreatedDate(String createdDate) {
this.createdDate = createdDate;
}
public Map<String, String> getConnectorParams() {
return connectorParams;
}
public void setConnectorParams(Map<String, String> connectorParams) {
this.connectorParams = connectorParams;
}
}

View File

@ -0,0 +1,89 @@
/*-
* ~~~~~~licensing~~~~~~
* connector-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.connector.manager.mapper;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.Named;
import ru.entaxy.esb.system.connector.entity.Connector;
import ru.entaxy.esb.system.connector.entity.ConnectorParam;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleEntity;
import ru.entaxy.esb.system.management.connector.manager.dto.ConnectorDto;
import java.text.SimpleDateFormat;
import java.util.*;
@Mapper(componentModel = "spring")
public interface ConnectorMapper {
@Mappings({
@Mapping(target = "createDate", expression = "java(new java.util.Date())"),
@Mapping(target = "version", source = "name", qualifiedByName = "generateVersion"),
@Mapping(source = "connectorParams", target = "connectorParams", qualifiedByName = "toConnectorParams")
})
Connector toConnectorEntity(ConnectorDto connectorDto);
@Mappings({
@Mapping(source = "bundleEntity.status", target = "status"),
@Mapping(source = "connectorParams", target = "connectorParams", qualifiedByName = "toConnectorParams")
})
ConnectorDto toConnectorDto(Connector connector);
List<ConnectorDto> toConnectorDtos(List<Connector> connectorList);
@Mappings({
@Mapping(source = "bundleName", target = "name"),
@Mapping(source = "bundleUrl", target = "url"),
})
BundleEntity toBundleEntity(BundleDto bundle);
@Mappings({
@Mapping(target = "bundleName", source = "name"),
@Mapping(target = "bundleUrl", source = "url"),
})
BundleDto toBundleDto(BundleEntity bundle);
default List<ConnectorParam> toConnectorParams(Map<String, String> connectorParams) {
List<ConnectorParam> connectorParamList = new ArrayList<>();
for (Map.Entry<String, String> entry : connectorParams.entrySet()) {
ConnectorParam connectorParam = new ConnectorParam();
connectorParam.setName(entry.getKey());
connectorParam.setValue(entry.getValue());
connectorParamList.add(connectorParam);
}
return connectorParamList;
}
default Map<String, String> toConnectorParams(List<ConnectorParam> connectorParams) {
Map<String, String> connectorParamMap = new HashMap<>();
for (ConnectorParam connectorParam : connectorParams) {
connectorParamMap.put(connectorParam.getName(), connectorParam.getValue());
}
return connectorParamMap;
}
@Named("generateVersion")
default String generateVersion(String version) {
SimpleDateFormat format = new SimpleDateFormat("1.yyMMdd.HHmmss");
return format.format(new Date());
}
}

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
connector-manager
==========
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~~~~~~
-->
<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">
<cm:property-placeholder persistent-id="ru.entaxy.esb" update-strategy="reload">
<cm:default-properties>
<cm:property name="is.restore.from.db" value="true"/>
</cm:default-properties>
</cm:property-placeholder>
<bean id="connectorManager" class="ru.entaxy.esb.system.management.connector.manager.ConnectorManagerImpl">
<property name="isRestoreFromDB" value="${is.restore.from.db}"/>
<property name="systemService" ref="systemService"/>
<property name="connectorService" ref="connectorService"/>
<property name="bundleManager" ref="bundleManager"/>
<property name="connectorMapper" ref="connectorMapper"/>
<property name="templateCollector" ref="templateCollector"/>
</bean>
<service ref="connectorManager" interface="ru.entaxy.esb.system.management.connector.manager.ConnectorManager"/>
<bean id="connectorMapper" class="ru.entaxy.esb.system.management.connector.manager.mapper.ConnectorMapperImpl"/>
<reference id="systemService"
interface="ru.entaxy.esb.system.jpa.SystemService"
timeout="30000"
availability="mandatory"/>
<reference id="connectorService"
interface="ru.entaxy.esb.system.connector.impl.ConnectorService"
timeout="30000"
availability="mandatory"/>
<reference id="bundleManager"
interface="ru.entaxy.esb.system.management.bundle.manager.BundleManager"
timeout="30000"
availability="mandatory"/>
<reference-list id="templates"
interface="ru.entaxy.esb.system.core.template.Template"
availability="optional">
<reference-listener ref="templateCollector" bind-method="register" unbind-method="unregister"/>
</reference-list>
<bean id="templateCollector" class="ru.entaxy.esb.system.core.template.TemplateCollector"
activation="eager"/>
<camelContext id="connector-manager-context" xmlns="http://camel.apache.org/schema/blueprint">
<route id="restore_connector">
<from uri="timer:restore?repeatCount=1&amp;delay=60000"/>
<to uri="bean:connectorManager?method=restore"/>
</route>
</camelContext>
</blueprint>

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,120 @@
<?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/xsd/maven-4.0.0.xsd">
<parent>
<groupId>ru.entaxy.esb.system</groupId>
<artifactId>management</artifactId>
<version>1.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>ru.entaxy.esb.system.management.permission.manager</groupId>
<artifactId>permission-manager</artifactId>
<name>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: PERMISSION :: MANAGER</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: PERMISSION :: MANAGER</description>
<packaging>bundle</packaging>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.management.permission.manager.*
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
!com.sun.org.apache.xml.internal.dtm.ref,
!org.mapstruct.*,
org.springframework.beans.factory.annotation,
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<version>${osgi.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>${jpa.version}</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>${javax.transaction.version}</version>
</dependency>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.core.permission</groupId>
<artifactId>permission-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.commons</groupId>
<artifactId>system-commons</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.core.permission</groupId>
<artifactId>permission-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.systems</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,31 @@
/*-
* ~~~~~~licensing~~~~~~
* permission-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.permission.manager;
import ru.entaxy.esb.system.management.permission.manager.dto.PermissionDto;
public interface PermissionManager {
PermissionDto createPermission(PermissionDto permissionDto);
void removePermission(PermissionDto permissionDto);
void removeAllPermission(long id);
}

View File

@ -0,0 +1,72 @@
/*-
* ~~~~~~licensing~~~~~~
* permission-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.permission.manager;
import ru.entaxy.esb.system.core.permission.jpa.PermissionService;
import ru.entaxy.esb.system.core.permission.jpa.entity.Permission;
import ru.entaxy.esb.system.jpa.SystemService;
import ru.entaxy.esb.system.jpa.entity.System;
import ru.entaxy.esb.system.management.permission.manager.dto.PermissionDto;
import ru.entaxy.esb.system.management.permission.manager.mapper.PermissionMapper;
import static ru.entaxy.esb.system.core.permission.common.PermissionConstants.TYPE_SYSTEM;
public class PermissionManagerImpl implements PermissionManager {
private PermissionService permissionService;
private SystemService systemService;
private PermissionMapper permissionMapper;
@Override
public PermissionDto createPermission(PermissionDto permissionDto) {
System object = systemService.getByUuid(permissionDto.getObjectId());
System subject = systemService.getByUuid(permissionDto.getSubjectId());
Permission permission = permissionService.addIfNotExist(object.getId(),
TYPE_SYSTEM, String.valueOf(subject.getId()), TYPE_SYSTEM, null);
return permissionMapper.toPermissionDto(permission);
}
@Override
public void removePermission(PermissionDto permissionDto) {
System object = systemService.getByUuid(permissionDto.getObjectId());
System subject = systemService.getByUuid(permissionDto.getSubjectId());
permissionService.remove(object.getId(), TYPE_SYSTEM, String.valueOf(subject.getId()),
TYPE_SYSTEM, null);
}
@Override
public void removeAllPermission(long id) {
permissionService.removeAll(id, TYPE_SYSTEM);
}
public void setPermissionService(PermissionService permissionService) {
this.permissionService = permissionService;
}
public void setPermissionMapper(PermissionMapper permissionMapper) {
this.permissionMapper = permissionMapper;
}
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
}

View File

@ -0,0 +1,50 @@
/*-
* ~~~~~~licensing~~~~~~
* permission-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.permission.manager.dto;
public class PermissionDto {
private String objectId;
private String subjectId;
public PermissionDto() {
}
public PermissionDto(String objectId, String subjectId) {
this.objectId = objectId;
this.subjectId = subjectId;
}
public String getObjectId() {
return objectId;
}
public void setObjectId(String objectId) {
this.objectId = objectId;
}
public String getSubjectId() {
return subjectId;
}
public void setSubjectId(String subjectId) {
this.subjectId = subjectId;
}
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* permission-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.permission.manager.mapper;
import org.mapstruct.Mapper;
import ru.entaxy.esb.system.core.permission.jpa.entity.Permission;
import ru.entaxy.esb.system.management.permission.manager.dto.PermissionDto;
@Mapper(componentModel = "spring")
public interface PermissionMapper {
Permission toPermission(PermissionDto permissionDto);
PermissionDto toPermissionDto(Permission permission);
}

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
permission-manager
==========
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~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<bean id="permissionManager" class="ru.entaxy.esb.system.management.permission.manager.PermissionManagerImpl">
<property name="permissionService" ref="permissionService"/>
<property name="permissionMapper" ref="permissionMapper"/>
<property name="systemService" ref="systemService"/>
</bean>
<service ref="permissionManager" interface="ru.entaxy.esb.system.management.permission.manager.PermissionManager"/>
<reference id="permissionService"
interface="ru.entaxy.esb.system.core.permission.jpa.PermissionService"
timeout="30000"
availability="mandatory"/>
<reference id="systemService"
interface="ru.entaxy.esb.system.jpa.SystemService"
timeout="30000"
availability="mandatory"/>
<bean id="permissionMapper" class="ru.entaxy.esb.system.management.permission.manager.mapper.PermissionMapperImpl"/>
</blueprint>

View File

@ -0,0 +1,29 @@
<?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/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>system-parent</artifactId>
<groupId>ru.entaxy.esb.system</groupId>
<version>1.8.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>management</artifactId>
<packaging>pom</packaging>
<name>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT</description>
<modules>
<module>system-management-api</module>
<module>blueprint-generator</module>
<module>bundle-service</module>
<module>connector-manager</module>
<module>profile-manager</module>
<module>bridge-profile-manager</module>
<module>bundle-manager</module>
<module>permission-manager</module>
<module>route-manager</module>
</modules>
</project>

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,123 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.system</groupId>
<artifactId>management</artifactId>
<version>1.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>ru.entaxy.esb.system.management.profile.manager</groupId>
<artifactId>profile-manager</artifactId>
<packaging>bundle</packaging>
<name>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: PROFILE :: MANAGER</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: PROFILE :: MANAGER</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.management.profile.manager.*
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
!com.sun.org.apache.xml.internal.dtm.ref,
!org.mapstruct.*,
org.springframework.beans.factory.annotation,
ru.entaxy.esb.system.management.bundle.jpa,
ru.entaxy.esb.system.management.bundle.jpa.entity,
ru.entaxy.esb.system.management.bundle.jpa.dto,
ru.entaxy.esb.system.jpa,
ru.entaxy.esb.system.profile.commons,
ru.entaxy.esb.system.profile.commons.connectors,
ru.entaxy.esb.system.core.dispatcher,
ru.entaxy.esb.system.management.route.manager.*,
org.apache.commons.logging,
org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.systems</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.profile.commons</groupId>
<artifactId>profile-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.jpa</groupId>
<artifactId>bundle-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.manager</groupId>
<artifactId>bundle-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bridge.profile.manager</groupId>
<artifactId>bridge-profile-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.connector.manager</groupId>
<artifactId>connector-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.permission.manager</groupId>
<artifactId>permission-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.route.manager</groupId>
<artifactId>route-manager</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,46 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.profile.manager;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.profile.manager.dto.ProfileDto;
import java.util.List;
public interface ProfileManager {
BundleDto installProfile(ProfileDto profileDto) throws Exception;
BundleDto startProfile(ProfileDto profileDto) throws Exception;
BundleDto stopProfile(ProfileDto profileDto) throws Exception;
ProfileDto getProfile(ProfileDto profileDto) throws Exception;
List<ProfileDto> getProfiles() throws Exception;
List<ProfileDto> getPermissionsBySubject(String uuid) throws Exception;
List<ProfileDto> getPermissionsByObject(String uuid) throws Exception;
void uninstallProfile(ProfileDto profileDto) throws Exception;
void restore() throws Exception;
}

View File

@ -0,0 +1,214 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.profile.manager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import ru.entaxy.esb.system.connector.entity.Connector;
import ru.entaxy.esb.system.jpa.SystemService;
import ru.entaxy.esb.system.jpa.entity.ExportAllowed;
import ru.entaxy.esb.system.jpa.entity.System;
import ru.entaxy.esb.system.management.bridge.profile.manager.BridgeProfileManager;
import ru.entaxy.esb.system.management.bridge.profile.manager.dto.BridgeProfileDto;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.bundle.manager.BundleManager;
import ru.entaxy.esb.system.management.connector.manager.ConnectorManager;
import ru.entaxy.esb.system.management.permission.manager.PermissionManager;
import ru.entaxy.esb.system.management.profile.manager.dto.ProfileDto;
import ru.entaxy.esb.system.management.profile.manager.mapper.ProfileMapper;
import ru.entaxy.esb.system.management.route.manager.RouteManager;
import java.io.IOException;
import java.util.List;
public class ProfileManagerImpl implements ProfileManager {
private static final Log LOG = LogFactory.getLog(ProfileManagerImpl.class);
private static final String PROFILE = "profile";
private boolean isRestoreFromDB;
private BundleManager bundleManager;
private SystemService systemService;
private ProfileMapper profileMapper;
private BridgeProfileManager bridgeProfileManager;
private ConnectorManager connectorManager;
private PermissionManager permissionManager;
private RouteManager routeManager;
@Override
public BundleDto installProfile(ProfileDto profileDto) throws Exception {
BundleDto bundle;
System system = null;
try {
system = systemService.create(profileMapper.toSystemEntity(profileDto));
bundle = bundleManager.installAndStartBundle(system.getName(), PROFILE,
String.valueOf(system.getVersion()));
systemService.setBundleEntity(system, profileMapper.toBundleEntity(bundle));
routeManager.createDefaultRoute(profileDto.getName());
} catch (Exception ex) {
systemService.remove(system);
throw ex;
}
return bundle;
}
@Override
public BundleDto startProfile(ProfileDto profileDto) throws Exception {
System system = systemService.getByUuid(profileDto.getUuid());
BundleDto bundle = bundleManager.startBundle(profileMapper.toBundleDto(system.getBundleEntity()));
systemService.setBundleEntity(system, profileMapper.toBundleEntity(bundle));
return bundle;
}
@Override
public BundleDto stopProfile(ProfileDto profileDto) throws Exception {
System system = systemService.getByUuid(profileDto.getUuid());
stopProfileDependency(system);
BundleDto bundle = bundleManager.stopBundle(profileMapper.toBundleDto(system.getBundleEntity()));
systemService.setBundleEntity(system, profileMapper.toBundleEntity(bundle));
return bundle;
}
@Override
public void uninstallProfile(ProfileDto profileDto) throws Exception {
System system = systemService.getByUuid(profileDto.getUuid());
uninstallProfileDependency(system);
bundleManager.uninstallBundle(system.getName(), PROFILE, String.valueOf(system.getVersion()));
systemService.remove(system.getId());
}
@Override
public ProfileDto getProfile(ProfileDto profileDto) throws Exception {
return profileMapper.toProfileDto(systemService.getByUuid(profileDto.getUuid()));
}
@Override
public List<ProfileDto> getProfiles() throws Exception {
return profileMapper.toListProfiles(systemService.getFullSystemListByOriginIsEmpty());
}
@Override
public List<ProfileDto> getPermissionsBySubject(String uuid) throws Exception {
return profileMapper.toListProfiles(systemService.getFullSystemListByPermissionBySubject(uuid));
}
@Override
public List<ProfileDto> getPermissionsByObject(String uuid) throws Exception {
return profileMapper.toListProfiles(systemService.getFullSystemListByPermissionByObject(uuid));
}
@Override
public void restore() throws Exception {
if (!isRestoreFromDB)
return;
for (System system : systemService.getSystemList()) {
if (system.getOrigin() == null || system.getOrigin().isEmpty()) {
try {
LOG.info("Restore profile of system " + system.getName());
bundleManager.restore(profileMapper.toBundleDto(system.getBundleEntity()));
} catch (IOException e) {
LOG.warn("Recreate profile of system " + system.getName());
restoreProfile(system);
}
try {
if(system.getDefaultRoute())
routeManager.createDefaultRoute(system.getName());
} catch (Exception e) {
LOG.warn("Error from create default route " + system.getName());
throw e;
}
}
}
}
private void restoreProfile(System system) throws Exception {
BundleDto bundle = bundleManager.installBundle(system.getName(), PROFILE,
String.valueOf(system.getVersion()));
bundle.setStatus(profileMapper.toBundleDto(system.getBundleEntity()).getStatus());
bundleManager.checkCurrentBundleStatus(bundle);
systemService.setBundleEntity(system, profileMapper.toBundleEntity(bundle));
}
private void stopProfileDependency(System system) throws Exception {
if (system.getConnectors() != null) {
for (Connector connector : system.getConnectors()) {
connectorManager.stopConnector(connector);
}
}
BridgeProfileDto bridgeProfileDto = profileMapper.toBridgeProfileDto(system);
for (ExportAllowed exportAllowed : system.getExportAlloweds()) {
bridgeProfileDto.setEsbName(exportAllowed.getName());
bridgeProfileManager.stopBridgeProfile(bridgeProfileDto);
}
}
private void uninstallProfileDependency(System system) throws Exception {
if (system.getConnectors() != null) {
for (Connector connector : system.getConnectors()) {
connectorManager.uninstallConnector(connector);
}
}
BridgeProfileDto bridgeProfileDto = profileMapper.toBridgeProfileDto(system);
for (ExportAllowed exportAllowed : system.getExportAlloweds()) {
bridgeProfileDto.setEsbName(exportAllowed.getName());
bridgeProfileManager.uninstallBridgeProfile(bridgeProfileDto);
}
permissionManager.removeAllPermission(system.getId());
routeManager.uninstallDefaultRoute(system.getName());
}
public void setProfileMapper(ProfileMapper profileMapper) {
this.profileMapper = profileMapper;
}
public void setBundleManager(BundleManager bundleManager) {
this.bundleManager = bundleManager;
}
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
public void setBridgeProfileManager(BridgeProfileManager bridgeProfileManager) {
this.bridgeProfileManager = bridgeProfileManager;
}
public void setRouteManager(RouteManager routeManager) {
this.routeManager = routeManager;
}
public void setConnectorManager(ConnectorManager connectorManager) {
this.connectorManager = connectorManager;
}
public void setPermissionManager(PermissionManager permissionManager) {
this.permissionManager = permissionManager;
}
public void setIsRestoreFromDB(String isRestoreFromDB) {
this.isRestoreFromDB = Boolean.parseBoolean(isRestoreFromDB);
}
}

View File

@ -0,0 +1,137 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.profile.manager.dto;
import ru.entaxy.esb.system.management.connector.manager.dto.ConnectorDto;
import java.util.Date;
import java.util.Set;
public class ProfileDto {
private String uuid;
private String name;
private String description;
private Date editDate;
private String editedBy;
private Date createDate;
private String createdBy;
private String version;
private String type;
private String status;
private Set<ConnectorDto> connectors;
private Set<String> exportAlloweds;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getEditDate() {
return editDate;
}
public void setEditDate(Date editDate) {
this.editDate = editDate;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getEditedBy() {
return editedBy;
}
public void setEditedBy(String editedBy) {
this.editedBy = editedBy;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Set<ConnectorDto> getConnectors() {
return connectors;
}
public void setConnectors(Set<ConnectorDto> connectors) {
this.connectors = connectors;
}
public Set<String> getExportAlloweds() {
return exportAlloweds;
}
public void setExportAlloweds(Set<String> exportAlloweds) {
this.exportAlloweds = exportAlloweds;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
}

View File

@ -0,0 +1,84 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.profile.manager.mapper;
import org.mapstruct.InjectionStrategy;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import ru.entaxy.esb.system.jpa.entity.ExportAllowed;
import ru.entaxy.esb.system.jpa.entity.System;
import ru.entaxy.esb.system.management.bridge.profile.manager.dto.BridgeProfileDto;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleDto;
import ru.entaxy.esb.system.management.bundle.jpa.entity.BundleEntity;
import ru.entaxy.esb.system.management.connector.manager.mapper.ConnectorMapper;
import ru.entaxy.esb.system.management.profile.manager.dto.ProfileDto;
import java.util.List;
import java.util.Set;
@Mapper(componentModel = "spring", uses = {ConnectorMapper.class},
injectionStrategy = InjectionStrategy.CONSTRUCTOR)
public interface ProfileMapper {
@Mappings({
@Mapping(target = "version", source = "version", qualifiedByName = "generateVersion"),
@Mapping(target = "createDate", expression = "java(new java.util.Date())"),
})
System toSystemEntity(ProfileDto profileDto);
@Mappings({
@Mapping(target = "status", source = "bundleEntity.status"),
})
ProfileDto toProfileDto(System system);
@Mappings({
@Mapping(target = "name", source = "bundleName"),
@Mapping(target = "url", source = "bundleUrl"),
})
BundleEntity toBundleEntity(BundleDto bundle);
@Mappings({
@Mapping(target = "bundleName", source = "name"),
@Mapping(target = "bundleUrl", source = "url"),
})
BundleDto toBundleDto(BundleEntity bundle);
Set<ExportAllowed> toExportAllowedEntities(Set<String> exportAlloweds);
Set<String> toExportAlloweds(Set<ExportAllowed> exportAlloweds);
default ExportAllowed map(String exportAllowed) {
ExportAllowed exportAllowedEntity = new ExportAllowed();
exportAllowedEntity.setName(exportAllowed);
return exportAllowedEntity;
}
default String map(ExportAllowed exportAllowed) {
return exportAllowed != null ? exportAllowed.getName() : null;
}
List<ProfileDto> toListProfiles(List<System> systemList);
@Mappings({
@Mapping(target = "profileUuid", source = "uuid")
})
BridgeProfileDto toBridgeProfileDto(System system);
}

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
profile-manager
==========
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~~~~~~
-->
<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">
<cm:property-placeholder persistent-id="ru.entaxy.esb" update-strategy="reload">
<cm:default-properties>
<cm:property name="is.restore.from.db" value="true"/>
</cm:default-properties>
</cm:property-placeholder>
<bean id="profileManager" class="ru.entaxy.esb.system.management.profile.manager.ProfileManagerImpl"
init-method="restore">
<property name="isRestoreFromDB" value="${is.restore.from.db}"/>
<property name="systemService" ref="systemService"/>
<property name="profileMapper" ref="profileMapper"/>
<property name="bundleManager" ref="bundleManager"/>
<property name="connectorManager" ref="connectorManager"/>
<property name="bridgeProfileManager" ref="bridgeProfileManager"/>
<property name="permissionManager" ref="permissionManager"/>
<property name="routeManager" ref="routeManager"/>
</bean>
<service ref="profileManager" interface="ru.entaxy.esb.system.management.profile.manager.ProfileManager"/>
<bean id="profileMapper" class="ru.entaxy.esb.system.management.profile.manager.mapper.ProfileMapperImpl">
<argument ref="connectorMapper"/>
</bean>
<bean id="connectorMapper" class="ru.entaxy.esb.system.management.connector.manager.mapper.ConnectorMapperImpl"/>
<bean id="bridgeProfileMapper"
class="ru.entaxy.esb.system.management.bridge.profile.manager.mapper.BridgeProfileMapperImpl"/>
<reference id="systemService"
interface="ru.entaxy.esb.system.jpa.SystemService"
timeout="30000"
availability="mandatory"/>
<reference id="bundleManager"
interface="ru.entaxy.esb.system.management.bundle.manager.BundleManager"
timeout="30000"
availability="mandatory"/>
<reference id="connectorManager"
interface="ru.entaxy.esb.system.management.connector.manager.ConnectorManager"
timeout="30000"
availability="mandatory"/>
<reference id="bridgeProfileManager"
interface="ru.entaxy.esb.system.management.bridge.profile.manager.BridgeProfileManager"
timeout="30000"
availability="mandatory"/>
<reference id="permissionManager"
interface="ru.entaxy.esb.system.management.permission.manager.PermissionManager"
timeout="30000"
availability="mandatory"/>
<reference id="routeManager"
interface="ru.entaxy.esb.system.management.route.manager.RouteManager"
timeout="30000"
availability="mandatory"/>
</blueprint>

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,55 @@
<?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/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>management</artifactId>
<groupId>ru.entaxy.esb.system</groupId>
<version>1.8.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>ru.entaxy.esb.system.management.route.manager</groupId>
<artifactId>route-manager</artifactId>
<packaging>bundle</packaging>
<name>SYSTEM :: ENTAXY :: ROUTE :: MANAGEMENT</name>
<description>SYSTEM :: ENTAXY :: ROUTE :: MANAGEMENT</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.management.route.manager
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
!com.sun.org.apache.xml.internal.dtm.ref,
!org.mapstruct.*,
javax.jws.*;version="[2.0.0,3.0.0)",
javax.jws.soap.*;version="[2.0.0,3.0.0)",
javax.xml.ws.*;version="[2.2.0,3.0.0)",
org.apache.commons.logging,
org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
javax.xml.bind;version="[2,3)",
javax.xml.bind.annotation;version="[2,3)",
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<groupId>ru.entaxy.esb.system.registry.profile.commons</groupId>
<artifactId>profile-commons</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.jpa</groupId>
<artifactId>bundle-service</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bundle.manager</groupId>
<artifactId>bundle-manager</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,27 @@
/*-
* ~~~~~~licensing~~~~~~
* route-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.route.manager;
public interface RouteManager {
void createDefaultRoute(String systemName) throws Exception;
void uninstallDefaultRoute(String systemName) throws Exception;
}

View File

@ -0,0 +1,42 @@
/*-
* ~~~~~~licensing~~~~~~
* route-manager
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.route.manager;
import ru.entaxy.esb.system.management.bundle.manager.BundleManager;
public class RouteManagerImpl implements RouteManager {
private static final String DEFAULT_ROUTE = "default-route";
private BundleManager bundleManager;
@Override
public void createDefaultRoute(String systemName) throws Exception {
bundleManager.installAndStartBundle(systemName, DEFAULT_ROUTE, String.valueOf(1.0));
}
@Override
public void uninstallDefaultRoute(String systemName) throws Exception {
bundleManager.uninstallBundle(systemName, DEFAULT_ROUTE, String.valueOf(1.0));
}
public void setBundleManager(BundleManager bundleManager) {
this.bundleManager = bundleManager;
}
}

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
route-manager
==========
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~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<reference id="bundleManager"
interface="ru.entaxy.esb.system.management.bundle.manager.BundleManager"
timeout="30000"
availability="mandatory"/>
<bean id="routeManager" class="ru.entaxy.esb.system.management.route.manager.RouteManagerImpl">
<property name="bundleManager" ref="bundleManager"/>
</bean>
<service ref="routeManager" interface="ru.entaxy.esb.system.management.route.manager.RouteManager"/>
</blueprint>

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
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.

View File

@ -0,0 +1,137 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.esb.system</groupId>
<artifactId>management</artifactId>
<version>1.8.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>ru.entaxy.esb.system.management</groupId>
<artifactId>system-management-api</artifactId>
<packaging>bundle</packaging>
<name>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: API</name>
<description>SYSTEM :: ENTAXY :: SYSTEM :: MANAGEMENT :: API</description>
<properties>
<bundle.osgi.import.pkg>
!com.sun.org.apache.xml.internal.dtm.ref,
!org.mapstruct.*,
javax.jws.*;version="[2.0.0,3.0.0)",
javax.jws.soap.*;version="[2.0.0,3.0.0)",
javax.xml.ws.*;version="[2.2.0,3.0.0)",
ru.entaxy.esb.system.management.permission.manager.*,
ru.entaxy.esb.system.management.profile.manager.*,
ru.entaxy.esb.system.management.connector.manager.*,
ru.entaxy.esb.system.management.bridge.profile.manager.*,
ru.entaxy.esb.system.management.bundle.jpa.dto,
org.apache.commons.logging,
org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
javax.xml.bind;version="[2,3)",
javax.xml.bind.annotation;version="[2,3)",
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.profile.manager</groupId>
<artifactId>profile-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.connector.manager</groupId>
<artifactId>connector-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.bridge.profile.manager</groupId>
<artifactId>bridge-profile-manager</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.management.permission.manager</groupId>
<artifactId>permission-manager</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
<annotationProcessorPaths>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/wsdl/system-management-service.wsdl
</wsdl>
<extraargs>
<extraarg>-p</extraarg>
<extraarg>ru.entaxy.esb.system.management.soap</extraarg>
<extraarg>-bareMethods</extraarg>
</extraargs>
<extendedSoapHeaders>true</extendedSoapHeaders>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,319 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management;
import ru.entaxy.esb.system.core.template.Template;
import ru.entaxy.esb.system.management.bridge.profile.manager.BridgeProfileManager;
import ru.entaxy.esb.system.management.bridge.profile.manager.dto.BridgeProfileDto;
import ru.entaxy.esb.system.management.bundle.jpa.dto.BundleStatus;
import ru.entaxy.esb.system.management.connector.manager.ConnectorManager;
import ru.entaxy.esb.system.management.connector.manager.dto.ConnectorDto;
import ru.entaxy.esb.system.management.mapper.Mapper;
import ru.entaxy.esb.system.management.permission.manager.PermissionManager;
import ru.entaxy.esb.system.management.permission.manager.dto.PermissionDto;
import ru.entaxy.esb.system.management.profile.manager.ProfileManager;
import ru.entaxy.esb.system.management.profile.manager.dto.ProfileDto;
import ru.entaxy.esb.system.management.route.manager.RouteManager;
import ru.entaxy.esb.system.management.soap.*;
import javax.jws.WebService;
@WebService(endpointInterface = "ru.entaxy.esb.system.management.soap.SystemManagementService",
targetNamespace = "http://www.entaxy.ru/system-management-service/",
serviceName = "SystemManagementServiceImpl"
)
public class SystemManagementServiceImpl implements SystemManagementService {
private ProfileManager profileManager;
private BridgeProfileManager bridgeProfileManager;
private ConnectorManager connectorManager;
private PermissionManager permissionManager;
private Mapper mapper;
@Override
public boolean createProfile(CreateProfileType createProfileType, String createdBy) {
try {
validateProfileName(createProfileType.getProfileName());
ProfileDto profileDto = mapper.toProfileDto(createProfileType);
profileDto.setCreatedBy(createdBy);
return (BundleStatus.ACTIVE.equals(profileManager.installProfile(profileDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean startProfile(ProfileType profileType, String createdBy) {
try {
ProfileDto profileDto = mapper.toProfileDto(profileType);
profileDto.setCreatedBy(createdBy);
return (BundleStatus.ACTIVE.equals(profileManager.startProfile(profileDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean stopProfile(ProfileType profileType, String createdBy) {
try {
ProfileDto profileDto = mapper.toProfileDto(profileType);
profileDto.setCreatedBy(createdBy);
return (BundleStatus.RESOLVED.equals(profileManager.stopProfile(profileDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean removeProfile(ProfileType profileType, String createdBy) {
try {
profileManager.uninstallProfile(mapper.toProfileDto(profileType));
return true;
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public FullProfileType getProfile(ProfileType profileType, String createdBy) {
try {
return mapper.toFullProfileType(profileManager.getProfile(mapper.toProfileDto(profileType)));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public ListFullProfileType getProfiles(ListProfileRequest request, String createdBy) {
try {
return mapper.toListFullProfileType(profileManager.getProfiles());
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean createConnector(CreateConnectorType connectorGeneratorType, String createdBy) {
try {
ConnectorDto connectorDto = mapper.toConnectorDto(connectorGeneratorType);
connectorDto.setCreatedBy(createdBy);
return (BundleStatus.ACTIVE.equals(connectorManager.installConnector(connectorDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public ListConnectorType getConnectors(ListConnectorRequest request, String createdBy) {
return mapper.toListConnectorType(connectorManager.getListConnector());
}
@Override
public boolean startConnector(GetConnectorType getConnectorType, String createdBy) {
try {
ConnectorDto connectorDto = mapper.toConnectorDto(getConnectorType);
connectorDto.setCreatedBy(createdBy);
return (BundleStatus.ACTIVE.equals(connectorManager.startConnector(connectorDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean stopConnector(GetConnectorType getConnectorType, String createdBy) {
try {
ConnectorDto connectorDto = mapper.toConnectorDto(getConnectorType);
connectorDto.setCreatedBy(createdBy);
return (BundleStatus.RESOLVED.equals(connectorManager.stopConnector(connectorDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean createPermission(PermissionType request, String createdBy) {
permissionManager.createPermission(mapper.toPermissionDto(request));
return true;
}
@Override
public ListProfileType getPermissionsByObject(ProfileType request, String createdBy) {
try {
return mapper.toListProfileType(profileManager.getPermissionsByObject(request.getUuid()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public ListProfileType getPermissionsBySubject(ProfileType request, String createdBy) {
try {
return mapper.toListProfileType(profileManager.getPermissionsBySubject(request.getUuid()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean removePermission(PermissionType request, String createdBy) {
permissionManager.removePermission(mapper.toPermissionDto(request));
return true;
}
@Override
public boolean createPermissionForSubject(PermissionForSubjectType request, String createdBy) {
for (String objectUuid : request.getObjectUuid()) {
permissionManager.createPermission(new PermissionDto(objectUuid, request.getSubjectUuid()));
}
return true;
}
@Override
public boolean createPermissionForObject(PermissionForObjectType request, String createdBy) {
for (String subjectUuid : request.getSubjectUuid()) {
permissionManager.createPermission(new PermissionDto(request.getObjectUuid(), subjectUuid));
}
return true;
}
@Override
public boolean removeConnector(GetConnectorType getConnectorType, String createdBy) {
try {
return (BundleStatus.UNINSTALL.equals(connectorManager.uninstallConnector(
mapper.toConnectorDto(getConnectorType)).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public ListBridgeProfileType getBridgeProfiles(GetBridgeProfilesRequest request, String createdBy) {
try {
return mapper.toListBridgeProfileType(bridgeProfileManager.getBridgeProfiles());
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean createBridgeProfile(BridgeProfileType bridgeProfileType, String createdBy) {
try {
BridgeProfileDto bridgeProfileDto = mapper.toBridgeProfileDto(bridgeProfileType);
bridgeProfileDto.setCreatedBy(createdBy);
return (BundleStatus.ACTIVE.equals(bridgeProfileManager.installBridgeProfile(bridgeProfileDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public FullBridgeProfileType getBridgeProfile(BridgeProfileType request, String createdBy) {
try {
return mapper.toFullBridgeProfileType(bridgeProfileManager.getBridgeProfile(mapper.toBridgeProfileDto(request)));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean startBridgeProfile(BridgeProfileType bridgeProfileType, String createdBy) {
try {
BridgeProfileDto bridgeProfileDto = mapper.toBridgeProfileDto(bridgeProfileType);
bridgeProfileDto.setCreatedBy(createdBy);
return (BundleStatus.ACTIVE.equals(bridgeProfileManager.startBridgeProfile(bridgeProfileDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean stopBridgeProfile(BridgeProfileType bridgeProfileType, String createdBy) {
try {
BridgeProfileDto bridgeProfileDto = mapper.toBridgeProfileDto(bridgeProfileType);
bridgeProfileDto.setCreatedBy(createdBy);
return (BundleStatus.RESOLVED.equals(bridgeProfileManager.stopBridgeProfile(bridgeProfileDto).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public boolean removeBridgeProfile(BridgeProfileType bridgeProfileType, String createdBy) {
try {
return (BundleStatus.UNINSTALL.equals(bridgeProfileManager.uninstallBridgeProfile(
mapper.toBridgeProfileDto(bridgeProfileType)).getStatus()));
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
@Override
public ListTemplateType getTemplates(ListTemplateRequest request, String createdBy) {
ListTemplateType listTemplateType = new ListTemplateType();
for (Template template : connectorManager.getTemplates()) {
listTemplateType.getTemplate().add(mapper.toTemplateType(template));
}
return listTemplateType;
}
@Override
public TemplateType getTemplate(GetTemplate request, String createdBy) {
return mapper.toTemplateType(connectorManager.getTemplate(request.getTemplateName()));
}
@Override
public ListEsbType getListEsb(ListEsbRequest request, String createdBy) {
try {
ListEsbType listEsbType = new ListEsbType();
for (String s : bridgeProfileManager.getListEsb()) {
listEsbType.getEsbName().add(s);
}
return listEsbType;
} catch (Exception e) {
throw new RuntimeException(e.getMessage(), e);
}
}
private void validateProfileName(String data) throws Exception {
if (!data.matches("([A-Za-z][A-Za-z0-9_\\-]*)"))
throw new IllegalArgumentException("Invalid data format in {" + data + "}");
}
public void setConnectorManager(ConnectorManager connectorManager) {
this.connectorManager = connectorManager;
}
public void setProfileManager(ProfileManager profileManager) {
this.profileManager = profileManager;
}
public void setBridgeProfileManager(BridgeProfileManager bridgeProfileManager) {
this.bridgeProfileManager = bridgeProfileManager;
}
public void setPermissionManager(PermissionManager permissionManager) {
this.permissionManager = permissionManager;
}
public void setMapper(Mapper mapper) {
this.mapper = mapper;
}
}

View File

@ -0,0 +1,194 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.Named;
import ru.entaxy.esb.system.core.template.Template;
import ru.entaxy.esb.system.management.bridge.profile.manager.dto.BridgeProfileDto;
import ru.entaxy.esb.system.management.connector.manager.dto.ConnectorDto;
import ru.entaxy.esb.system.management.permission.manager.dto.PermissionDto;
import ru.entaxy.esb.system.management.profile.manager.dto.ProfileDto;
import ru.entaxy.esb.system.management.soap.*;
import javax.xml.bind.JAXBElement;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import java.util.*;
@org.mapstruct.Mapper
public interface Mapper {
@Mappings({
@Mapping(source = "objectUuid", target = "objectId"),
@Mapping(source = "subjectUuid", target = "subjectId"),
})
PermissionDto toPermissionDto(PermissionType permissionType);
@Mappings({
@Mapping(source = "profileName", target = "name"),
@Mapping(source = "description", target = "description", qualifiedByName = "toJAXBElementDescription")
})
ProfileDto toProfileDto(CreateProfileType createProfileType);
@Named("toJAXBElementDescription")
default String toJAXBElementDescription(JAXBElement<String> description) {
return description.getValue();
}
@Mappings({
@Mapping(source = "name", target = "profileName"),
@Mapping(source = "connectors", target = "connectorList.connector"),
@Mapping(source = "exportAlloweds", target = "esbNames.esbName"),
@Mapping(source = "editDate", target = "editDate", qualifiedByName = "toEditDate"),
@Mapping(source = "editedBy", target = "editedBy", qualifiedByName = "toEditedBy"),
@Mapping(source = "description", target = "description", qualifiedByName = "toDescription")
})
FullProfileType toFullProfileType(ProfileDto profileDto);
@Mappings({
@Mapping(source = "uuid", target = "uuid"),
})
ProfileDto toProfileDto(ProfileType profileType);
@Mappings({
@Mapping(source = "uuid", target = "uuid"),
})
ProfileType toProfileType(ProfileDto profileType);
@Mappings({
@Mapping(source = "profileUuid", target = "systemUuid"),
@Mapping(source = "paramList", target = "connectorParams", qualifiedByName = "toMapParam")
})
ConnectorDto toConnectorDto(CreateConnectorType createConnectorType);
@Mappings({
@Mapping(source = "profileUuid", target = "systemUuid"),
})
ConnectorDto toConnectorDto(GetConnectorType getConnectorType);
BridgeProfileDto toBridgeProfileDto(BridgeProfileType bridgeProfileType);
@Mappings({
@Mapping(target = "name", expression = "java(connectorDto.getName())"),
@Mapping(source = "connectorParams", target = "paramList", qualifiedByName = "toParamListType"),
})
ConnectorType toConnectorType(ConnectorDto connectorDto);
@Mapping(source = "params", target = "paramList", qualifiedByName = "toParamListType")
TemplateType toTemplateType(Template template);
@Named("toParamListType")
default ParamListType toParamListType(Map<String, String> params) {
ParamListType paramListType = new ParamListType();
if (params != null) {
for (Map.Entry<String, String> entry : params.entrySet()) {
ParamType paramType = new ParamType();
paramType.setName(entry.getKey());
paramType.setValue(entry.getValue());
paramListType.getParam().add(paramType);
}
}
return paramListType;
}
@Named("toMapParam")
default Map<String, String> toMapParam(ParamListType paramListType) {
Map<String, String> params = new HashMap<>();
if (paramListType != null) {
for (ParamType paramType : paramListType.getParam()) {
params.put(paramType.getName(), paramType.getValue());
}
}
return params;
}
@Named("toListFullProfileType")
default ListFullProfileType toListFullProfileType(List<ProfileDto> profileDtos) {
ListFullProfileType listFullProfileType = new ListFullProfileType();
for (ProfileDto profileDto : profileDtos) {
listFullProfileType.getFullProfileType().add(toFullProfileType(profileDto));
}
return listFullProfileType;
}
@Named("toListProfileType")
default ListProfileType toListProfileType(List<ProfileDto> profileDtos) {
ListProfileType listProfileType = new ListProfileType();
for (ProfileDto profileDto : profileDtos) {
listProfileType.getProfileType().add(toProfileType(profileDto));
}
return listProfileType;
}
default ListConnectorType toListConnectorType(List<ConnectorDto> connectorDtos) {
ListConnectorType listConnectorType = new ListConnectorType();
for (ConnectorDto connectorDto : connectorDtos) {
listConnectorType.getConnector().add(toConnectorType(connectorDto));
}
return listConnectorType;
}
default ListBridgeProfileType toListBridgeProfileType(List<ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileType> bridgeProfileDtos) {
ListBridgeProfileType listBridgeProfileType = new ListBridgeProfileType();
for (ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileType bridgeProfileType : bridgeProfileDtos) {
listBridgeProfileType.getFullBridgeProfileType().add(toFullBridgeProfileType(bridgeProfileType));
}
return listBridgeProfileType;
}
default JAXBElement<XMLGregorianCalendar> toEditDate(Date editDate) throws DatatypeConfigurationException {
if (editDate != null) {
ObjectFactory factory = new ObjectFactory();
GregorianCalendar calendar = new GregorianCalendar();
calendar.setTime(editDate);
return factory.createFullProfileTypeEditDate(DatatypeFactory.newInstance()
.newXMLGregorianCalendar(calendar));
} else
return null;
}
@Named("toEditedBy")
default JAXBElement<String> toEditedBy(String editedBy) {
if (editedBy != null) {
ObjectFactory factory = new ObjectFactory();
return factory.createFullProfileTypeEditedBy(editedBy);
} else
return null;
}
@Named("toDescription")
default JAXBElement<String> toDescription(String description) {
if (description != null) {
ObjectFactory factory = new ObjectFactory();
return factory.createFullProfileTypeDescription(description);
} else
return null;
}
@Mappings({
@Mapping(source = "origin", target = "esbName")
})
FullBridgeProfileType toFullBridgeProfileType(ru.entaxy.esb.system.management.bridge.profile.manager.sender.BridgeProfileType bridgeProfileType);
}

View File

@ -0,0 +1,137 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for bridgeProfileType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="bridgeProfileType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="profileUuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="profileName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="esbName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "bridgeProfileType", propOrder = {
"profileUuid",
"profileName",
"esbName"
})
public class BridgeProfileType {
@XmlElement(required = true)
protected String profileUuid;
@XmlElement(required = true)
protected String profileName;
@XmlElement(required = true)
protected String esbName;
/**
* Gets the value of the profileUuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileUuid() {
return profileUuid;
}
/**
* Sets the value of the profileUuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileUuid(String value) {
this.profileUuid = value;
}
/**
* Gets the value of the profileName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileName() {
return profileName;
}
/**
* Sets the value of the profileName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileName(String value) {
this.profileName = value;
}
/**
* Gets the value of the esbName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEsbName() {
return esbName;
}
/**
* Sets the value of the esbName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEsbName(String value) {
this.esbName = value;
}
}

View File

@ -0,0 +1,137 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for connectorType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="connectorType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="paramList" type="{http://www.entaxy.ru/system-management-service/}paramListType"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "connectorType", propOrder = {
"name",
"status",
"paramList"
})
public class ConnectorType {
@XmlElement(required = true)
protected String name;
@XmlElement(required = true)
protected String status;
@XmlElement(required = true)
protected ParamListType paramList;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStatus(String value) {
this.status = value;
}
/**
* Gets the value of the paramList property.
*
* @return
* possible object is
* {@link ParamListType }
*
*/
public ParamListType getParamList() {
return paramList;
}
/**
* Sets the value of the paramList property.
*
* @param value
* allowed object is
* {@link ParamListType }
*
*/
public void setParamList(ParamListType value) {
this.paramList = value;
}
}

View File

@ -0,0 +1,137 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for createConnectorType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="createConnectorType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="templateName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="profileUuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="paramList" type="{http://www.entaxy.ru/system-management-service/}paramListType"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "createConnectorType", propOrder = {
"templateName",
"profileUuid",
"paramList"
})
public class CreateConnectorType {
@XmlElement(required = true)
protected String templateName;
@XmlElement(required = true)
protected String profileUuid;
@XmlElement(required = true)
protected ParamListType paramList;
/**
* Gets the value of the templateName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTemplateName() {
return templateName;
}
/**
* Sets the value of the templateName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTemplateName(String value) {
this.templateName = value;
}
/**
* Gets the value of the profileUuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileUuid() {
return profileUuid;
}
/**
* Sets the value of the profileUuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileUuid(String value) {
this.profileUuid = value;
}
/**
* Gets the value of the paramList property.
*
* @return
* possible object is
* {@link ParamListType }
*
*/
public ParamListType getParamList() {
return paramList;
}
/**
* Sets the value of the paramList property.
*
* @param value
* allowed object is
* {@link ParamListType }
*
*/
public void setParamList(ParamListType value) {
this.paramList = value;
}
}

View File

@ -0,0 +1,139 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for createProfileType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="createProfileType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="profileName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "createProfileType", propOrder = {
"profileName",
"uuid",
"description"
})
public class CreateProfileType {
@XmlElement(required = true)
protected String profileName;
@XmlElement(required = true)
protected String uuid;
@XmlElementRef(name = "description", namespace = "http://www.entaxy.ru/system-management-service/", type = JAXBElement.class, required = false)
protected JAXBElement<String> description;
/**
* Gets the value of the profileName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileName() {
return profileName;
}
/**
* Sets the value of the profileName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileName(String value) {
this.profileName = value;
}
/**
* Gets the value of the uuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUuid() {
return uuid;
}
/**
* Sets the value of the uuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUuid(String value) {
this.uuid = value;
}
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setDescription(JAXBElement<String> value) {
this.description = value;
}
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for exportAllowedType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="exportAllowedType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="esbName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "exportAllowedType", propOrder = {
"esbName"
})
public class ExportAllowedType {
protected List<String> esbName;
/**
* Gets the value of the esbName property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the esbName property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEsbName().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getEsbName() {
if (esbName == null) {
esbName = new ArrayList<String>();
}
return this.esbName;
}
}

View File

@ -0,0 +1,165 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for fullBridgeProfileType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="fullBridgeProfileType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="profileUuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="profileName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="esbName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "fullBridgeProfileType", propOrder = {
"profileUuid",
"profileName",
"status",
"esbName"
})
public class FullBridgeProfileType {
@XmlElement(required = true)
protected String profileUuid;
@XmlElement(required = true)
protected String profileName;
@XmlElement(required = true)
protected String status;
@XmlElement(required = true)
protected String esbName;
/**
* Gets the value of the profileUuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileUuid() {
return profileUuid;
}
/**
* Sets the value of the profileUuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileUuid(String value) {
this.profileUuid = value;
}
/**
* Gets the value of the profileName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileName() {
return profileName;
}
/**
* Sets the value of the profileName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileName(String value) {
this.profileName = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStatus(String value) {
this.status = value;
}
/**
* Gets the value of the esbName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEsbName() {
return esbName;
}
/**
* Sets the value of the esbName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setEsbName(String value) {
this.esbName = value;
}
}

View File

@ -0,0 +1,357 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
/**
* <p>Java class for fullProfileType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="fullProfileType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="profileName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="createDate" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
* &lt;element name="createdBy" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="editDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/&gt;
* &lt;element name="editedBy" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
* &lt;element name="type" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
* &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="connectorList" type="{http://www.entaxy.ru/system-management-service/}listConnectorType"/&gt;
* &lt;element name="esbNames" type="{http://www.entaxy.ru/system-management-service/}exportAllowedType"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "fullProfileType", propOrder = {
"profileName",
"uuid",
"description",
"createDate",
"createdBy",
"editDate",
"editedBy",
"type",
"status",
"connectorList",
"esbNames"
})
public class FullProfileType {
@XmlElement(required = true)
protected String profileName;
@XmlElement(required = true)
protected String uuid;
@XmlElementRef(name = "description", namespace = "http://www.entaxy.ru/system-management-service/", type = JAXBElement.class, required = false)
protected JAXBElement<String> description;
@XmlElement(required = true)
@XmlSchemaType(name = "date")
protected XMLGregorianCalendar createDate;
@XmlElement(required = true)
protected String createdBy;
@XmlElementRef(name = "editDate", namespace = "http://www.entaxy.ru/system-management-service/", type = JAXBElement.class, required = false)
protected JAXBElement<XMLGregorianCalendar> editDate;
@XmlElementRef(name = "editedBy", namespace = "http://www.entaxy.ru/system-management-service/", type = JAXBElement.class, required = false)
protected JAXBElement<String> editedBy;
protected boolean type;
@XmlElement(required = true)
protected String status;
@XmlElement(required = true)
protected ListConnectorType connectorList;
@XmlElement(required = true)
protected ExportAllowedType esbNames;
/**
* Gets the value of the profileName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileName() {
return profileName;
}
/**
* Sets the value of the profileName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileName(String value) {
this.profileName = value;
}
/**
* Gets the value of the uuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUuid() {
return uuid;
}
/**
* Sets the value of the uuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUuid(String value) {
this.uuid = value;
}
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setDescription(JAXBElement<String> value) {
this.description = value;
}
/**
* Gets the value of the createDate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getCreateDate() {
return createDate;
}
/**
* Sets the value of the createDate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setCreateDate(XMLGregorianCalendar value) {
this.createDate = value;
}
/**
* Gets the value of the createdBy property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCreatedBy() {
return createdBy;
}
/**
* Sets the value of the createdBy property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCreatedBy(String value) {
this.createdBy = value;
}
/**
* Gets the value of the editDate property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link XMLGregorianCalendar }{@code >}
*
*/
public JAXBElement<XMLGregorianCalendar> getEditDate() {
return editDate;
}
/**
* Sets the value of the editDate property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link XMLGregorianCalendar }{@code >}
*
*/
public void setEditDate(JAXBElement<XMLGregorianCalendar> value) {
this.editDate = value;
}
/**
* Gets the value of the editedBy property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getEditedBy() {
return editedBy;
}
/**
* Sets the value of the editedBy property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setEditedBy(JAXBElement<String> value) {
this.editedBy = value;
}
/**
* Gets the value of the type property.
*
*/
public boolean isType() {
return type;
}
/**
* Sets the value of the type property.
*
*/
public void setType(boolean value) {
this.type = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStatus(String value) {
this.status = value;
}
/**
* Gets the value of the connectorList property.
*
* @return
* possible object is
* {@link ListConnectorType }
*
*/
public ListConnectorType getConnectorList() {
return connectorList;
}
/**
* Sets the value of the connectorList property.
*
* @param value
* allowed object is
* {@link ListConnectorType }
*
*/
public void setConnectorList(ListConnectorType value) {
this.connectorList = value;
}
/**
* Gets the value of the esbNames property.
*
* @return
* possible object is
* {@link ExportAllowedType }
*
*/
public ExportAllowedType getEsbNames() {
return esbNames;
}
/**
* Sets the value of the esbNames property.
*
* @param value
* allowed object is
* {@link ExportAllowedType }
*
*/
public void setEsbNames(ExportAllowedType value) {
this.esbNames = value;
}
}

View File

@ -0,0 +1,53 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "getBridgeProfilesRequest")
public class GetBridgeProfilesRequest {
}

View File

@ -0,0 +1,109 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for getConnectorType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="getConnectorType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="templateName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="profileUuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getConnectorType", propOrder = {
"templateName",
"profileUuid"
})
public class GetConnectorType {
@XmlElement(required = true)
protected String templateName;
@XmlElement(required = true)
protected String profileUuid;
/**
* Gets the value of the templateName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTemplateName() {
return templateName;
}
/**
* Sets the value of the templateName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTemplateName(String value) {
this.templateName = value;
}
/**
* Gets the value of the profileUuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getProfileUuid() {
return profileUuid;
}
/**
* Sets the value of the profileUuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setProfileUuid(String value) {
this.profileUuid = value;
}
}

View File

@ -0,0 +1,81 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for getTemplate complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="getTemplate"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="templateName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getTemplate", propOrder = {
"templateName"
})
public class GetTemplate {
@XmlElement(required = true)
protected String templateName;
/**
* Gets the value of the templateName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTemplateName() {
return templateName;
}
/**
* Sets the value of the templateName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTemplateName(String value) {
this.templateName = value;
}
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for listBridgeProfileType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="listBridgeProfileType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="fullBridgeProfileType" type="{http://www.entaxy.ru/system-management-service/}fullBridgeProfileType" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "listBridgeProfileType", propOrder = {
"fullBridgeProfileType"
})
public class ListBridgeProfileType {
protected List<FullBridgeProfileType> fullBridgeProfileType;
/**
* Gets the value of the fullBridgeProfileType property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the fullBridgeProfileType property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getFullBridgeProfileType().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link FullBridgeProfileType }
*
*
*/
public List<FullBridgeProfileType> getFullBridgeProfileType() {
if (fullBridgeProfileType == null) {
fullBridgeProfileType = new ArrayList<FullBridgeProfileType>();
}
return this.fullBridgeProfileType;
}
}

View File

@ -0,0 +1,53 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "listConnectorRequest")
public class ListConnectorRequest {
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for listConnectorType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="listConnectorType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="connector" type="{http://www.entaxy.ru/system-management-service/}connectorType" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "listConnectorType", propOrder = {
"connector"
})
public class ListConnectorType {
protected List<ConnectorType> connector;
/**
* Gets the value of the connector property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the connector property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getConnector().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ConnectorType }
*
*
*/
public List<ConnectorType> getConnector() {
if (connector == null) {
connector = new ArrayList<ConnectorType>();
}
return this.connector;
}
}

View File

@ -0,0 +1,53 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "listEsbRequest")
public class ListEsbRequest {
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for listEsbType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="listEsbType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="esbName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "listEsbType", propOrder = {
"esbName"
})
public class ListEsbType {
protected List<String> esbName;
/**
* Gets the value of the esbName property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the esbName property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEsbName().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getEsbName() {
if (esbName == null) {
esbName = new ArrayList<String>();
}
return this.esbName;
}
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for listFullProfileType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="listFullProfileType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="fullProfileType" type="{http://www.entaxy.ru/system-management-service/}fullProfileType" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "listFullProfileType", propOrder = {
"fullProfileType"
})
public class ListFullProfileType {
protected List<FullProfileType> fullProfileType;
/**
* Gets the value of the fullProfileType property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the fullProfileType property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getFullProfileType().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link FullProfileType }
*
*
*/
public List<FullProfileType> getFullProfileType() {
if (fullProfileType == null) {
fullProfileType = new ArrayList<FullProfileType>();
}
return this.fullProfileType;
}
}

View File

@ -0,0 +1,53 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "listProfileRequest")
public class ListProfileRequest {
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for listProfileType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="listProfileType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="profileType" type="{http://www.entaxy.ru/system-management-service/}profileType" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "listProfileType", propOrder = {
"profileType"
})
public class ListProfileType {
protected List<ProfileType> profileType;
/**
* Gets the value of the profileType property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the profileType property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getProfileType().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ProfileType }
*
*
*/
public List<ProfileType> getProfileType() {
if (profileType == null) {
profileType = new ArrayList<ProfileType>();
}
return this.profileType;
}
}

View File

@ -0,0 +1,53 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "listTemplateRequest")
public class ListTemplateRequest {
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for listTemplateType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="listTemplateType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="template" type="{http://www.entaxy.ru/system-management-service/}templateType" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "listTemplateType", propOrder = {
"template"
})
public class ListTemplateType {
protected List<TemplateType> template;
/**
* Gets the value of the template property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the template property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getTemplate().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TemplateType }
*
*
*/
public List<TemplateType> getTemplate() {
if (template == null) {
template = new ArrayList<TemplateType>();
}
return this.template;
}
}

View File

@ -0,0 +1,816 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the ru.entaxy.esb.system.management.soap package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _GetProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getProfileRequest");
private final static QName _CreateProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "createProfileRequest");
private final static QName _StopProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "stopProfileRequest");
private final static QName _StartProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "startProfileRequest");
private final static QName _RemoveProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "removeProfileRequest");
private final static QName _FullProfileType_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "fullProfileType");
private final static QName _ListProfile_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "listProfile");
private final static QName _ListFullProfile_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "listFullProfile");
private final static QName _ListConnector_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "listConnector");
private final static QName _CreateConnectorRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "createConnectorRequest");
private final static QName _RemoveConnectorRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "removeConnectorRequest");
private final static QName _StopConnectorRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "stopConnectorRequest");
private final static QName _StartConnectorRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "startConnectorRequest");
private final static QName _GetConnector_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getConnector");
private final static QName _ListEsb_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "listEsb");
private final static QName _GetBridgeProfilesResponse_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getBridgeProfilesResponse");
private final static QName _CreateBridgeProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "createBridgeProfileRequest");
private final static QName _StopBridgeProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "stopBridgeProfileRequest");
private final static QName _StartBridgeProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "startBridgeProfileRequest");
private final static QName _RemoveBridgeProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "removeBridgeProfileRequest");
private final static QName _GetBridgeProfileRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getBridgeProfileRequest");
private final static QName _FullBridgeProfileType_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "fullBridgeProfileType");
private final static QName _ListTemplate_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "listTemplate");
private final static QName _Template_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "template");
private final static QName _GetTemplateRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getTemplateRequest");
private final static QName _Response_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "response");
private final static QName _CreatedBy_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "createdBy");
private final static QName _CreatePermissionRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "createPermissionRequest");
private final static QName _RemovePermissionRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "removePermissionRequest");
private final static QName _GetPermissionsByObjectRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getPermissionsByObjectRequest");
private final static QName _GetPermissionsByObjectResponse_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getPermissionsByObjectResponse");
private final static QName _GetPermissionsBySubjectRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getPermissionsBySubjectRequest");
private final static QName _GetPermissionsBySubjectResponse_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "getPermissionsBySubjectResponse");
private final static QName _CreatePermissionForObjectRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "createPermissionForObjectRequest");
private final static QName _CreatePermissionForSubjectRequest_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "createPermissionForSubjectRequest");
private final static QName _FullProfileTypeDescription_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "description");
private final static QName _FullProfileTypeEditDate_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "editDate");
private final static QName _FullProfileTypeEditedBy_QNAME = new QName("http://www.entaxy.ru/system-management-service/", "editedBy");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: ru.entaxy.esb.system.management.soap
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link ProfileType }
*
*/
public ProfileType createProfileType() {
return new ProfileType();
}
/**
* Create an instance of {@link CreateProfileType }
*
*/
public CreateProfileType createCreateProfileType() {
return new CreateProfileType();
}
/**
* Create an instance of {@link FullProfileType }
*
*/
public FullProfileType createFullProfileType() {
return new FullProfileType();
}
/**
* Create an instance of {@link ListProfileRequest }
*
*/
public ListProfileRequest createListProfileRequest() {
return new ListProfileRequest();
}
/**
* Create an instance of {@link ListProfileType }
*
*/
public ListProfileType createListProfileType() {
return new ListProfileType();
}
/**
* Create an instance of {@link ListFullProfileType }
*
*/
public ListFullProfileType createListFullProfileType() {
return new ListFullProfileType();
}
/**
* Create an instance of {@link ListConnectorRequest }
*
*/
public ListConnectorRequest createListConnectorRequest() {
return new ListConnectorRequest();
}
/**
* Create an instance of {@link ListConnectorType }
*
*/
public ListConnectorType createListConnectorType() {
return new ListConnectorType();
}
/**
* Create an instance of {@link CreateConnectorType }
*
*/
public CreateConnectorType createCreateConnectorType() {
return new CreateConnectorType();
}
/**
* Create an instance of {@link GetConnectorType }
*
*/
public GetConnectorType createGetConnectorType() {
return new GetConnectorType();
}
/**
* Create an instance of {@link ListEsbRequest }
*
*/
public ListEsbRequest createListEsbRequest() {
return new ListEsbRequest();
}
/**
* Create an instance of {@link ListEsbType }
*
*/
public ListEsbType createListEsbType() {
return new ListEsbType();
}
/**
* Create an instance of {@link GetBridgeProfilesRequest }
*
*/
public GetBridgeProfilesRequest createGetBridgeProfilesRequest() {
return new GetBridgeProfilesRequest();
}
/**
* Create an instance of {@link ListBridgeProfileType }
*
*/
public ListBridgeProfileType createListBridgeProfileType() {
return new ListBridgeProfileType();
}
/**
* Create an instance of {@link BridgeProfileType }
*
*/
public BridgeProfileType createBridgeProfileType() {
return new BridgeProfileType();
}
/**
* Create an instance of {@link FullBridgeProfileType }
*
*/
public FullBridgeProfileType createFullBridgeProfileType() {
return new FullBridgeProfileType();
}
/**
* Create an instance of {@link ListTemplateRequest }
*
*/
public ListTemplateRequest createListTemplateRequest() {
return new ListTemplateRequest();
}
/**
* Create an instance of {@link ListTemplateType }
*
*/
public ListTemplateType createListTemplateType() {
return new ListTemplateType();
}
/**
* Create an instance of {@link TemplateType }
*
*/
public TemplateType createTemplateType() {
return new TemplateType();
}
/**
* Create an instance of {@link GetTemplate }
*
*/
public GetTemplate createGetTemplate() {
return new GetTemplate();
}
/**
* Create an instance of {@link PermissionType }
*
*/
public PermissionType createPermissionType() {
return new PermissionType();
}
/**
* Create an instance of {@link PermissionForObjectType }
*
*/
public PermissionForObjectType createPermissionForObjectType() {
return new PermissionForObjectType();
}
/**
* Create an instance of {@link PermissionForSubjectType }
*
*/
public PermissionForSubjectType createPermissionForSubjectType() {
return new PermissionForSubjectType();
}
/**
* Create an instance of {@link ExportAllowedType }
*
*/
public ExportAllowedType createExportAllowedType() {
return new ExportAllowedType();
}
/**
* Create an instance of {@link ConnectorType }
*
*/
public ConnectorType createConnectorType() {
return new ConnectorType();
}
/**
* Create an instance of {@link ParamListType }
*
*/
public ParamListType createParamListType() {
return new ParamListType();
}
/**
* Create an instance of {@link ParamType }
*
*/
public ParamType createParamType() {
return new ParamType();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getProfileRequest")
public JAXBElement<ProfileType> createGetProfileRequest(ProfileType value) {
return new JAXBElement<ProfileType>(_GetProfileRequest_QNAME, ProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link CreateProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link CreateProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "createProfileRequest")
public JAXBElement<CreateProfileType> createCreateProfileRequest(CreateProfileType value) {
return new JAXBElement<CreateProfileType>(_CreateProfileRequest_QNAME, CreateProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "stopProfileRequest")
public JAXBElement<ProfileType> createStopProfileRequest(ProfileType value) {
return new JAXBElement<ProfileType>(_StopProfileRequest_QNAME, ProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "startProfileRequest")
public JAXBElement<ProfileType> createStartProfileRequest(ProfileType value) {
return new JAXBElement<ProfileType>(_StartProfileRequest_QNAME, ProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "removeProfileRequest")
public JAXBElement<ProfileType> createRemoveProfileRequest(ProfileType value) {
return new JAXBElement<ProfileType>(_RemoveProfileRequest_QNAME, ProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link FullProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link FullProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "fullProfileType")
public JAXBElement<FullProfileType> createFullProfileType(FullProfileType value) {
return new JAXBElement<FullProfileType>(_FullProfileType_QNAME, FullProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ListProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ListProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "listProfile")
public JAXBElement<ListProfileType> createListProfile(ListProfileType value) {
return new JAXBElement<ListProfileType>(_ListProfile_QNAME, ListProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ListFullProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ListFullProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "listFullProfile")
public JAXBElement<ListFullProfileType> createListFullProfile(ListFullProfileType value) {
return new JAXBElement<ListFullProfileType>(_ListFullProfile_QNAME, ListFullProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ListConnectorType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ListConnectorType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "listConnector")
public JAXBElement<ListConnectorType> createListConnector(ListConnectorType value) {
return new JAXBElement<ListConnectorType>(_ListConnector_QNAME, ListConnectorType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link CreateConnectorType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link CreateConnectorType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "createConnectorRequest")
public JAXBElement<CreateConnectorType> createCreateConnectorRequest(CreateConnectorType value) {
return new JAXBElement<CreateConnectorType>(_CreateConnectorRequest_QNAME, CreateConnectorType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link GetConnectorType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link GetConnectorType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "removeConnectorRequest")
public JAXBElement<GetConnectorType> createRemoveConnectorRequest(GetConnectorType value) {
return new JAXBElement<GetConnectorType>(_RemoveConnectorRequest_QNAME, GetConnectorType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link GetConnectorType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link GetConnectorType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "stopConnectorRequest")
public JAXBElement<GetConnectorType> createStopConnectorRequest(GetConnectorType value) {
return new JAXBElement<GetConnectorType>(_StopConnectorRequest_QNAME, GetConnectorType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link GetConnectorType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link GetConnectorType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "startConnectorRequest")
public JAXBElement<GetConnectorType> createStartConnectorRequest(GetConnectorType value) {
return new JAXBElement<GetConnectorType>(_StartConnectorRequest_QNAME, GetConnectorType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link GetConnectorType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link GetConnectorType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getConnector")
public JAXBElement<GetConnectorType> createGetConnector(GetConnectorType value) {
return new JAXBElement<GetConnectorType>(_GetConnector_QNAME, GetConnectorType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ListEsbType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ListEsbType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "listEsb")
public JAXBElement<ListEsbType> createListEsb(ListEsbType value) {
return new JAXBElement<ListEsbType>(_ListEsb_QNAME, ListEsbType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ListBridgeProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ListBridgeProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getBridgeProfilesResponse")
public JAXBElement<ListBridgeProfileType> createGetBridgeProfilesResponse(ListBridgeProfileType value) {
return new JAXBElement<ListBridgeProfileType>(_GetBridgeProfilesResponse_QNAME, ListBridgeProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "createBridgeProfileRequest")
public JAXBElement<BridgeProfileType> createCreateBridgeProfileRequest(BridgeProfileType value) {
return new JAXBElement<BridgeProfileType>(_CreateBridgeProfileRequest_QNAME, BridgeProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "stopBridgeProfileRequest")
public JAXBElement<BridgeProfileType> createStopBridgeProfileRequest(BridgeProfileType value) {
return new JAXBElement<BridgeProfileType>(_StopBridgeProfileRequest_QNAME, BridgeProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "startBridgeProfileRequest")
public JAXBElement<BridgeProfileType> createStartBridgeProfileRequest(BridgeProfileType value) {
return new JAXBElement<BridgeProfileType>(_StartBridgeProfileRequest_QNAME, BridgeProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "removeBridgeProfileRequest")
public JAXBElement<BridgeProfileType> createRemoveBridgeProfileRequest(BridgeProfileType value) {
return new JAXBElement<BridgeProfileType>(_RemoveBridgeProfileRequest_QNAME, BridgeProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link BridgeProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getBridgeProfileRequest")
public JAXBElement<BridgeProfileType> createGetBridgeProfileRequest(BridgeProfileType value) {
return new JAXBElement<BridgeProfileType>(_GetBridgeProfileRequest_QNAME, BridgeProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link FullBridgeProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link FullBridgeProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "fullBridgeProfileType")
public JAXBElement<FullBridgeProfileType> createFullBridgeProfileType(FullBridgeProfileType value) {
return new JAXBElement<FullBridgeProfileType>(_FullBridgeProfileType_QNAME, FullBridgeProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ListTemplateType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ListTemplateType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "listTemplate")
public JAXBElement<ListTemplateType> createListTemplate(ListTemplateType value) {
return new JAXBElement<ListTemplateType>(_ListTemplate_QNAME, ListTemplateType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link TemplateType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link TemplateType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "template")
public JAXBElement<TemplateType> createTemplate(TemplateType value) {
return new JAXBElement<TemplateType>(_Template_QNAME, TemplateType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link GetTemplate }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link GetTemplate }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getTemplateRequest")
public JAXBElement<GetTemplate> createGetTemplateRequest(GetTemplate value) {
return new JAXBElement<GetTemplate>(_GetTemplateRequest_QNAME, GetTemplate.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link Boolean }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "response")
public JAXBElement<Boolean> createResponse(Boolean value) {
return new JAXBElement<Boolean>(_Response_QNAME, Boolean.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "createdBy")
public JAXBElement<String> createCreatedBy(String value) {
return new JAXBElement<String>(_CreatedBy_QNAME, String.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PermissionType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link PermissionType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "createPermissionRequest")
public JAXBElement<PermissionType> createCreatePermissionRequest(PermissionType value) {
return new JAXBElement<PermissionType>(_CreatePermissionRequest_QNAME, PermissionType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PermissionType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link PermissionType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "removePermissionRequest")
public JAXBElement<PermissionType> createRemovePermissionRequest(PermissionType value) {
return new JAXBElement<PermissionType>(_RemovePermissionRequest_QNAME, PermissionType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getPermissionsByObjectRequest")
public JAXBElement<ProfileType> createGetPermissionsByObjectRequest(ProfileType value) {
return new JAXBElement<ProfileType>(_GetPermissionsByObjectRequest_QNAME, ProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ListProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ListProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getPermissionsByObjectResponse")
public JAXBElement<ListProfileType> createGetPermissionsByObjectResponse(ListProfileType value) {
return new JAXBElement<ListProfileType>(_GetPermissionsByObjectResponse_QNAME, ListProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getPermissionsBySubjectRequest")
public JAXBElement<ProfileType> createGetPermissionsBySubjectRequest(ProfileType value) {
return new JAXBElement<ProfileType>(_GetPermissionsBySubjectRequest_QNAME, ProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ListProfileType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link ListProfileType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "getPermissionsBySubjectResponse")
public JAXBElement<ListProfileType> createGetPermissionsBySubjectResponse(ListProfileType value) {
return new JAXBElement<ListProfileType>(_GetPermissionsBySubjectResponse_QNAME, ListProfileType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PermissionForObjectType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link PermissionForObjectType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "createPermissionForObjectRequest")
public JAXBElement<PermissionForObjectType> createCreatePermissionForObjectRequest(PermissionForObjectType value) {
return new JAXBElement<PermissionForObjectType>(_CreatePermissionForObjectRequest_QNAME, PermissionForObjectType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link PermissionForSubjectType }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link PermissionForSubjectType }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "createPermissionForSubjectRequest")
public JAXBElement<PermissionForSubjectType> createCreatePermissionForSubjectRequest(PermissionForSubjectType value) {
return new JAXBElement<PermissionForSubjectType>(_CreatePermissionForSubjectRequest_QNAME, PermissionForSubjectType.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "description", scope = FullProfileType.class)
public JAXBElement<String> createFullProfileTypeDescription(String value) {
return new JAXBElement<String>(_FullProfileTypeDescription_QNAME, String.class, FullProfileType.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link XMLGregorianCalendar }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link XMLGregorianCalendar }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "editDate", scope = FullProfileType.class)
public JAXBElement<XMLGregorianCalendar> createFullProfileTypeEditDate(XMLGregorianCalendar value) {
return new JAXBElement<XMLGregorianCalendar>(_FullProfileTypeEditDate_QNAME, XMLGregorianCalendar.class, FullProfileType.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "editedBy", scope = FullProfileType.class)
public JAXBElement<String> createFullProfileTypeEditedBy(String value) {
return new JAXBElement<String>(_FullProfileTypeEditedBy_QNAME, String.class, FullProfileType.class, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*
* @param value
* Java instance representing xml element's value.
* @return
* the new instance of {@link JAXBElement }{@code <}{@link String }{@code >}
*/
@XmlElementDecl(namespace = "http://www.entaxy.ru/system-management-service/", name = "description", scope = CreateProfileType.class)
public JAXBElement<String> createCreateProfileTypeDescription(String value) {
return new JAXBElement<String>(_FullProfileTypeDescription_QNAME, String.class, CreateProfileType.class, value);
}
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for paramListType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="paramListType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="param" type="{http://www.entaxy.ru/system-management-service/}paramType" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "paramListType", propOrder = {
"param"
})
public class ParamListType {
protected List<ParamType> param;
/**
* Gets the value of the param property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the param property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getParam().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ParamType }
*
*
*/
public List<ParamType> getParam() {
if (param == null) {
param = new ArrayList<ParamType>();
}
return this.param;
}
}

View File

@ -0,0 +1,109 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for paramType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="paramType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "paramType", propOrder = {
"name",
"value"
})
public class ParamType {
@XmlElement(required = true)
protected String name;
@XmlElement(required = true)
protected String value;
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}

View File

@ -0,0 +1,115 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for permissionForObjectType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="permissionForObjectType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="objectUuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="subjectUuid" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "permissionForObjectType", propOrder = {
"objectUuid",
"subjectUuid"
})
public class PermissionForObjectType {
@XmlElement(required = true)
protected String objectUuid;
protected List<String> subjectUuid;
/**
* Gets the value of the objectUuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getObjectUuid() {
return objectUuid;
}
/**
* Sets the value of the objectUuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setObjectUuid(String value) {
this.objectUuid = value;
}
/**
* Gets the value of the subjectUuid property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the subjectUuid property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSubjectUuid().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getSubjectUuid() {
if (subjectUuid == null) {
subjectUuid = new ArrayList<String>();
}
return this.subjectUuid;
}
}

View File

@ -0,0 +1,115 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for permissionForSubjectType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="permissionForSubjectType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="objectUuid" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
* &lt;element name="subjectUuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "permissionForSubjectType", propOrder = {
"objectUuid",
"subjectUuid"
})
public class PermissionForSubjectType {
protected List<String> objectUuid;
@XmlElement(required = true)
protected String subjectUuid;
/**
* Gets the value of the objectUuid property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the objectUuid property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getObjectUuid().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getObjectUuid() {
if (objectUuid == null) {
objectUuid = new ArrayList<String>();
}
return this.objectUuid;
}
/**
* Gets the value of the subjectUuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSubjectUuid() {
return subjectUuid;
}
/**
* Sets the value of the subjectUuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSubjectUuid(String value) {
this.subjectUuid = value;
}
}

View File

@ -0,0 +1,109 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for permissionType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="permissionType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="objectUuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="subjectUuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "permissionType", propOrder = {
"objectUuid",
"subjectUuid"
})
public class PermissionType {
@XmlElement(required = true)
protected String objectUuid;
@XmlElement(required = true)
protected String subjectUuid;
/**
* Gets the value of the objectUuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getObjectUuid() {
return objectUuid;
}
/**
* Sets the value of the objectUuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setObjectUuid(String value) {
this.objectUuid = value;
}
/**
* Gets the value of the subjectUuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSubjectUuid() {
return subjectUuid;
}
/**
* Sets the value of the subjectUuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSubjectUuid(String value) {
this.subjectUuid = value;
}
}

View File

@ -0,0 +1,81 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for profileType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="profileType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "profileType", propOrder = {
"uuid"
})
public class ProfileType {
@XmlElement(required = true)
protected String uuid;
/**
* Gets the value of the uuid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUuid() {
return uuid;
}
/**
* Sets the value of the uuid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUuid(String value) {
this.uuid = value;
}
}

View File

@ -0,0 +1,299 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.bind.annotation.XmlSeeAlso;
/**
* This class was generated by Apache CXF 3.3.6
* 2021-02-03T15:56:47.930+07:00
* Generated source version: 3.3.6
*
*/
@WebService(targetNamespace = "http://www.entaxy.ru/system-management-service/", name = "system-management-service")
@XmlSeeAlso({ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface SystemManagementService {
@WebMethod(action = "http://www.entaxy.ru/system-management-service/get-bridge-profile")
@WebResult(name = "fullBridgeProfileType", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public FullBridgeProfileType getBridgeProfile(
@WebParam(partName = "request", name = "getBridgeProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
BridgeProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/start-profile")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean startProfile(
@WebParam(partName = "request", name = "startProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/remove-permission")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean removePermission(
@WebParam(partName = "request", name = "removePermissionRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
PermissionType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/get-profile")
@WebResult(name = "fullProfileType", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public FullProfileType getProfile(
@WebParam(partName = "request", name = "getProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/stop-bridge-profile")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean stopBridgeProfile(
@WebParam(partName = "request", name = "stopBridgeProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
BridgeProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/list-esb")
@WebResult(name = "listEsb", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public ListEsbType getListEsb(
@WebParam(partName = "request", name = "listEsbRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ListEsbRequest request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/list-templates")
@WebResult(name = "template", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public TemplateType getTemplate(
@WebParam(partName = "request", name = "getTemplateRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
GetTemplate request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/remove-connector")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean removeConnector(
@WebParam(partName = "request", name = "removeConnectorRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
GetConnectorType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/stop-profile")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean stopProfile(
@WebParam(partName = "request", name = "stopProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/list-profiles")
@WebResult(name = "listFullProfile", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public ListFullProfileType getProfiles(
@WebParam(partName = "request", name = "listProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ListProfileRequest request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/stop-connector")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean stopConnector(
@WebParam(partName = "request", name = "stopConnectorRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
GetConnectorType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/get-bridge-profiles")
@WebResult(name = "getBridgeProfilesResponse", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public ListBridgeProfileType getBridgeProfiles(
@WebParam(partName = "request", name = "getBridgeProfilesRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
GetBridgeProfilesRequest request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/list-connectors")
@WebResult(name = "listConnector", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public ListConnectorType getConnectors(
@WebParam(partName = "request", name = "listConnectorRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ListConnectorRequest request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/get-permissions-by-object")
@WebResult(name = "getPermissionsByObjectResponse", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public ListProfileType getPermissionsByObject(
@WebParam(partName = "request", name = "getPermissionsByObjectRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/create-profile")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean createProfile(
@WebParam(partName = "request", name = "createProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
CreateProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/get-permissions-by-subject")
@WebResult(name = "getPermissionsBySubjectResponse", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public ListProfileType getPermissionsBySubject(
@WebParam(partName = "request", name = "getPermissionsBySubjectRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/list-templates")
@WebResult(name = "listTemplate", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public ListTemplateType getTemplates(
@WebParam(partName = "request", name = "listTemplateRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ListTemplateRequest request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/create-permission")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean createPermission(
@WebParam(partName = "request", name = "createPermissionRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
PermissionType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/create-bridge-profile")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean createBridgeProfile(
@WebParam(partName = "request", name = "createBridgeProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
BridgeProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/start-bridge-profile")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean startBridgeProfile(
@WebParam(partName = "request", name = "startBridgeProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
BridgeProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/create-permission-for-subject")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean createPermissionForSubject(
@WebParam(partName = "request", name = "createPermissionForSubjectRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
PermissionForSubjectType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/remove-bridge-profile")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean removeBridgeProfile(
@WebParam(partName = "request", name = "removeBridgeProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
BridgeProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/remove-profile")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean removeProfile(
@WebParam(partName = "request", name = "removeProfileRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
ProfileType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/create-permission-for-object")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean createPermissionForObject(
@WebParam(partName = "request", name = "createPermissionForObjectRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
PermissionForObjectType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/create-connector")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean createConnector(
@WebParam(partName = "request", name = "createConnectorRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
CreateConnectorType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
@WebMethod(action = "http://www.entaxy.ru/system-management-service/start-connector")
@WebResult(name = "response", targetNamespace = "http://www.entaxy.ru/system-management-service/", partName = "response")
public boolean startConnector(
@WebParam(partName = "request", name = "startConnectorRequest", targetNamespace = "http://www.entaxy.ru/system-management-service/")
GetConnectorType request,
@WebParam(partName = "header", name = "createdBy", targetNamespace = "http://www.entaxy.ru/system-management-service/", header = true)
java.lang.String header
);
}

View File

@ -0,0 +1,106 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service;
/**
* This class was generated by Apache CXF 3.3.6
* 2021-02-03T15:56:47.985+07:00
* Generated source version: 3.3.6
*
*/
@WebServiceClient(name = "system-management-service",
wsdlLocation = "file:/C:/Projects/entaxy-framework/system/system-management/system-management-api/src/main/resources/wsdl/system-management-service.wsdl",
targetNamespace = "http://www.entaxy.ru/system-management-service/")
public class SystemManagementService_Service extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://www.entaxy.ru/system-management-service/", "system-management-service");
public final static QName SystemManagementServiceSOAP = new QName("http://www.entaxy.ru/system-management-service/", "system-management-serviceSOAP");
static {
URL url = null;
try {
url = new URL("file:/C:/Projects/entaxy-framework/system/system-management/system-management-api/src/main/resources/wsdl/system-management-service.wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(SystemManagementService_Service.class.getName())
.log(java.util.logging.Level.INFO,
"Can not initialize the default wsdl from {0}", "file:/C:/Projects/entaxy-framework/system/system-management/system-management-api/src/main/resources/wsdl/system-management-service.wsdl");
}
WSDL_LOCATION = url;
}
public SystemManagementService_Service(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public SystemManagementService_Service(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public SystemManagementService_Service() {
super(WSDL_LOCATION, SERVICE);
}
public SystemManagementService_Service(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public SystemManagementService_Service(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public SystemManagementService_Service(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
/**
*
* @return
* returns SystemManagementService
*/
@WebEndpoint(name = "system-management-serviceSOAP")
public SystemManagementService getSystemManagementServiceSOAP() {
return super.getPort(SystemManagementServiceSOAP, SystemManagementService.class);
}
/**
*
* @param features
* A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values.
* @return
* returns SystemManagementService
*/
@WebEndpoint(name = "system-management-serviceSOAP")
public SystemManagementService getSystemManagementServiceSOAP(WebServiceFeature... features) {
return super.getPort(SystemManagementServiceSOAP, SystemManagementService.class, features);
}
}

View File

@ -0,0 +1,109 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
package ru.entaxy.esb.system.management.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for templateType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="templateType"&gt;
* &lt;complexContent&gt;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
* &lt;sequence&gt;
* &lt;element name="templateName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
* &lt;element name="paramList" type="{http://www.entaxy.ru/system-management-service/}paramListType"/&gt;
* &lt;/sequence&gt;
* &lt;/restriction&gt;
* &lt;/complexContent&gt;
* &lt;/complexType&gt;
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "templateType", propOrder = {
"templateName",
"paramList"
})
public class TemplateType {
@XmlElement(required = true)
protected String templateName;
@XmlElement(required = true)
protected ParamListType paramList;
/**
* Gets the value of the templateName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTemplateName() {
return templateName;
}
/**
* Sets the value of the templateName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTemplateName(String value) {
this.templateName = value;
}
/**
* Gets the value of the paramList property.
*
* @return
* possible object is
* {@link ParamListType }
*
*/
public ParamListType getParamList() {
return paramList;
}
/**
* Sets the value of the paramList property.
*
* @param value
* allowed object is
* {@link ParamListType }
*
*/
public void setParamList(ParamListType value) {
this.paramList = value;
}
}

View File

@ -0,0 +1,21 @@
/*-
* ~~~~~~licensing~~~~~~
* system-management-api
* ==========
* 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~~~~~~
*/
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.entaxy.ru/system-management-service/", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package ru.entaxy.esb.system.management.soap;

Some files were not shown because too many files have changed in this diff Show More