release version 1.11.0

This commit is contained in:
2025-07-10 23:47:05 +03:00
parent 5cb6857fa1
commit 8dd9cf9cf2
3082 changed files with 278464 additions and 1833 deletions

View File

@ -5,7 +5,7 @@
<parent>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>management</artifactId>
<version>1.10.0</version>
<version>1.11.0</version>
</parent>
<groupId>ru.entaxy.esb.platform.runtime.core.management</groupId>

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import ru.entaxy.platform.core.management.profile.support.legacy.AccountManager;
public interface AccountHelper extends AccountManager {
}

View File

@ -0,0 +1,95 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.CollectionType;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.core.management.profile.NotBackwardCompatibleException;
import ru.entaxy.platform.core.management.profile.support.legacy.AccountManager;
@Component(service = AccountHelper.class, immediate = true)
public class AccountHelperImpl implements AccountHelper {
private static final Logger LOG = LoggerFactory.getLogger(AccountHelperImpl.class);
protected AccountManager accountManager = null;
protected AccountManager nullAccountManager = null;
@Activate
public void activate() {
this.nullAccountManager = new AccountManager() {
@Override
public String getAccountForSystem(String systemUuid) throws Exception {
throw new NotBackwardCompatibleException(Helpers.BACKWARD_COMPATIBILITY_DISABLED);
}
@Override
public void createAccountForSystem(String login, String password, String systemUUID, String createdBy,
String editedBy) throws Exception {
throw new NotBackwardCompatibleException(Helpers.BACKWARD_COMPATIBILITY_DISABLED);
}
};
}
@Reference(collectionType = CollectionType.SERVICE, cardinality = ReferenceCardinality.OPTIONAL,
policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY,
service = AccountManager.class, unbind = "unsetAccountManager")
public void setAccountManager(AccountManager accountManager) {
this.accountManager = accountManager;
}
public void unsetAccountManager(AccountManager accountManager) {
this.accountManager = null;
}
protected AccountManager getEffectiveAccountManager() {
return accountManager != null ? accountManager : nullAccountManager;
}
@Override
public String getAccountForSystem(String systemUuid) throws Exception {
return getEffectiveAccountManager().getAccountForSystem(systemUuid);
}
@Override
public void createAccountForSystem(String login, String password, String systemUUID, String createdBy,
String editedBy) throws Exception {
getEffectiveAccountManager().createAccountForSystem(login, password, systemUUID, createdBy, editedBy);
}
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import ru.entaxy.platform.core.management.profile.support.legacy.ConnectorManager;
public interface ConnectorHelper extends ConnectorManager {
}

View File

@ -0,0 +1,122 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import java.util.Map;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.CollectionType;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.core.management.profile.NotBackwardCompatibleException;
import ru.entaxy.platform.core.management.profile.support.legacy.ConnectorManager;
@Component(service = ConnectorHelper.class, immediate = true)
public class ConnectorHelperImpl implements ConnectorHelper {
private static final Logger log = LoggerFactory.getLogger(ProfileHelperImpl.class);
protected static final String EXPLANATION = Helpers.BACKWARD_COMPATIBILITY_DISABLED;
protected ConnectorManager connectorManager = null;
protected ConnectorManager nullConnectorManager = null;
@Activate
public void activate(ComponentContext componentContext) {
this.nullConnectorManager = new ConnectorManager() {
@Override
public void stopConnector(String idOrName, String connectorName) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public void startConnector(String idOrName, String connectorName) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public void removeConnector(String idOrName, String connectorName) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public void addConnector(String idOrName, String connectorFactoryId, Map<String, String> parameters)
throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
};
}
public ConnectorManager getEffectiveConnectorManager() {
return connectorManager != null ? connectorManager : nullConnectorManager;
}
@Reference(collectionType = CollectionType.SERVICE, cardinality = ReferenceCardinality.OPTIONAL,
policyOption = ReferencePolicyOption.GREEDY, policy = ReferencePolicy.DYNAMIC,
service = ConnectorManager.class,
unbind = "unsetConnectorManager")
public void setConnectorManager(ConnectorManager connectorManager) {
this.connectorManager = connectorManager;
log.debug(">> ConnectorManager is bound");
}
public void unsetConnectorManager(ConnectorManager connectorManager) {
this.connectorManager = null;
log.debug(">> ConnectorManager is unbound");
}
@Override
public void addConnector(String idOrName, String connectorFactoryId, Map<String, String> parameters)
throws Exception {
getEffectiveConnectorManager().addConnector(idOrName, connectorFactoryId, parameters);
}
@Override
public void removeConnector(String idOrName, String connectorName) throws Exception {
getEffectiveConnectorManager().removeConnector(idOrName, connectorName);
}
@Override
public void startConnector(String idOrName, String connectorName) throws Exception {
getEffectiveConnectorManager().startConnector(idOrName, connectorName);
}
@Override
public void stopConnector(String idOrName, String connectorName) throws Exception {
getEffectiveConnectorManager().stopConnector(idOrName, connectorName);
}
}

View File

@ -0,0 +1,68 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import ru.entaxy.platform.base.objects.EntaxyObjectService;
@Component(service = Helpers.class, immediate = true)
public class Helpers {
public static final String BACKWARD_COMPATIBILITY_DISABLED =
"You're calling deprecated API, to use it backward compatibility modules must be installed";
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile public ProfileHelper profileHelper;
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile public ConnectorHelper connectorHelper;
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile public PermissionHelper permissionHelper;
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile public EntaxyObjectService entaxyObjectService;
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile public SystemHelper systemHelper;
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile public AccountHelper accountHelper;
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import ru.entaxy.platform.core.management.profile.support.legacy.PermissionManager;
public interface PermissionHelper extends PermissionManager {
}

View File

@ -0,0 +1,108 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import java.util.List;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.CollectionType;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.core.management.profile.NotBackwardCompatibleException;
import ru.entaxy.platform.core.management.profile.support.legacy.PermissionManager;
@Component(service = PermissionHelper.class, immediate = true)
public class PermissionHelperImpl implements PermissionHelper {
private static final Logger log = LoggerFactory.getLogger(PermissionHelperImpl.class);
protected static final String EXPLANATION = Helpers.BACKWARD_COMPATIBILITY_DISABLED;
protected PermissionManager permissionManager = null;
protected PermissionManager nullPermissionManager = null;
@Activate
public void activate(ComponentContext componentContext) {
this.nullPermissionManager = new PermissionManager() {
@Override
public List<String> getSubjectPermissions(String subjectId) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public List<String> getObjectPermissions(String objectId) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public void createPermission(String objectId, String subjectId) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
};
}
public PermissionManager getEffectivePermissionManager() {
return this.permissionManager != null ? this.permissionManager : this.nullPermissionManager;
}
@Reference(collectionType = CollectionType.SERVICE, cardinality = ReferenceCardinality.OPTIONAL,
policyOption = ReferencePolicyOption.GREEDY, service = PermissionManager.class,
unbind = "unsetPermissionManager")
public void setPermissionManager(PermissionManager permissionManager) {
this.permissionManager = permissionManager;
log.debug(">> PermissionManager is bound");
}
public void unsetPermissionManager(PermissionManager permissionManager) {
this.permissionManager = null;
log.debug(">> PermissionManager is unbound");
}
@Override
public List<String> getObjectPermissions(String objectId) throws Exception {
return getEffectivePermissionManager().getObjectPermissions(objectId);
}
@Override
public List<String> getSubjectPermissions(String subjectId) throws Exception {
return getEffectivePermissionManager().getSubjectPermissions(subjectId);
}
@Override
public void createPermission(String objectId, String subjectId) throws Exception {
getEffectivePermissionManager().createPermission(objectId, subjectId);
}
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import ru.entaxy.platform.core.management.profile.support.legacy.ProfileManager;
public interface ProfileHelper extends ProfileManager {
}

View File

@ -0,0 +1,133 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.CollectionType;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.core.management.profile.NotBackwardCompatibleException;
import ru.entaxy.platform.core.management.profile.support.legacy.ProfileManager;
@Component(service = {ProfileHelper.class},
immediate = true)
public class ProfileHelperImpl implements ProfileHelper {
private static final Logger log = LoggerFactory.getLogger(ProfileHelperImpl.class);
protected static final String EXPLANATION = Helpers.BACKWARD_COMPATIBILITY_DISABLED;
protected ProfileManager profileManager = null;
protected ProfileManager nullProfileManager = null;
@Activate
public void activate(ComponentContext componentContext) {
this.nullProfileManager = new ProfileManager() {
@Override
public void uninstallProfile(String idOrName) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public void stopProfile(String idOrName) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public void startProfile(String idOrName) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public void createProfile(String id, String name, String description) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
@Override
public String getProfileConfig(String idOrName) throws Exception {
throw new NotBackwardCompatibleException(EXPLANATION);
}
};
}
public ProfileManager getEffectiveProfileManager() {
return profileManager != null ? profileManager : nullProfileManager;
}
@Reference(collectionType = CollectionType.SERVICE, cardinality = ReferenceCardinality.OPTIONAL,
policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY,
service = ProfileManager.class, unbind = "unsetProfileManager")
public void setProfileManager(ProfileManager profileManager) {
this.profileManager = profileManager;
log.debug(">> ProfileManager is bound");
}
public void unsetProfileManager(ProfileManager profileManager) {
this.profileManager = null;
log.debug(">> ProfileManager is unbound");
}
@Override
public void createProfile(String id, String name, String description) throws Exception {
getEffectiveProfileManager().createProfile(id, name, description);
}
@Override
public String getProfileConfig(String idOrName) throws Exception {
return getEffectiveProfileManager().getProfileConfig(idOrName);
}
@Override
public void startProfile(String idOrName) throws Exception {
getEffectiveProfileManager().startProfile(idOrName);
}
@Override
public void stopProfile(String idOrName) throws Exception {
getEffectiveProfileManager().stopProfile(idOrName);
}
@Override
public void uninstallProfile(String idOrName) throws Exception {
getEffectiveProfileManager().uninstallProfile(idOrName);
}
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import ru.entaxy.platform.core.management.profile.support.legacy.SystemManager;
public interface SystemHelper extends SystemManager {
}

View File

@ -0,0 +1,81 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.platform.core.management.profile.helper;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.CollectionType;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.core.management.profile.NotBackwardCompatibleException;
import ru.entaxy.platform.core.management.profile.support.legacy.SystemManager;
@Component(service = SystemHelper.class, immediate = true)
public class SystemHelperImpl implements SystemHelper {
private static final Logger LOG = LoggerFactory.getLogger(SystemHelperImpl.class);
protected SystemManager systemManager = null;
protected SystemManager nullSystemManager = null;
@Activate
public void activate() {
this.nullSystemManager = new SystemManager() {
@Override
public String getUUIDbyName(String name) throws Exception {
throw new NotBackwardCompatibleException(Helpers.BACKWARD_COMPATIBILITY_DISABLED);
}
};
}
@Reference(collectionType = CollectionType.SERVICE, cardinality = ReferenceCardinality.OPTIONAL,
policy = ReferencePolicy.DYNAMIC, policyOption = ReferencePolicyOption.GREEDY,
service = SystemManager.class, unbind = "unsetSystemManager")
public void setSystemManager(SystemManager systemManager) {
this.systemManager = systemManager;
}
public void unsetSystemManager(SystemManager systemManager) {
this.systemManager = null;
}
protected SystemManager getEffectiveSystemManager() {
return systemManager != null ? systemManager : nullSystemManager;
}
@Override
public String getUUIDbyName(String name) throws Exception {
return getEffectiveSystemManager().getUUIDbyName(name);
}
}

View File

@ -0,0 +1,75 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile;
import ru.entaxy.esb.platform.base.management.core.api.Attribute;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.esb.platform.base.management.core.api.Operation;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
public interface ConnectorMBean extends EntaxyRuntimeObjectMBean {
public static final String CAPABILITY_NAMESPACE = "entaxy.runtime.connector";
public static final String CONNECTOR_KEY = "connector";
public static final String CONNECTOR_KEY_VALUE_DEFAULT = "default";
// TODO implement if needed
// public boolean isDefault();
@Attribute(desc = "Connector name")
default String getName() {
return getObjectId();
};
@Attribute(desc = "Connector registered name used in registry")
public String getRegisteredName();
@Attribute(desc = "Connector system")
public String getSystem();
@Attribute(desc = "Connector classifier")
public String getClassifier();
@Attribute(desc = "Connector display name")
public String getDisplayName();
@Attribute(desc = "Connector direction")
public String getDirection();
@Attribute(desc = "Connector protocol")
public String getProtocol();
@Operation(desc = "Starts the connector")
public void start() throws Exception;
@Operation(desc = "Stops the connector")
public void stop() throws Exception;
}

View File

@ -0,0 +1,62 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.esb.platform.base.management.core.api.Operation;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
public interface DefaultRouteMBean extends EntaxyRuntimeObjectMBean {
public static interface Helper {
public static Qualifier getQualifier(String profileName) {
return RoutesMBean.Helper.getQualifier(profileName).qualifier(ROUTE_KEY, ROUTE_KEY_VALUE_DEFAULT);
}
}
public static final String CAPABILITY_NAMESPACE = "entaxy.runtime.default-route";
public static final String ROUTE_KEY = "route";
public static final String ROUTE_KEY_VALUE_DEFAULT = "default";
default boolean isDefault() {
return true;
};
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Gets route's configuration")
default public String doGetRouteConfig() throws Exception {
return readConfiguration();
};
}

View File

@ -0,0 +1,41 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile;
import javax.naming.OperationNotSupportedException;
public class NotBackwardCompatibleException extends OperationNotSupportedException {
private static final long serialVersionUID = 1L;
public NotBackwardCompatibleException() {
super();
}
public NotBackwardCompatibleException(String message) {
super(message);
}
}

View File

@ -0,0 +1,135 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.management.MBeanOperationInfo;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.esb.platform.base.management.core.api.Attribute;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.esb.platform.base.management.core.api.Operation;
import ru.entaxy.esb.platform.base.management.core.api.Parameter;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
public interface ProfileMBean extends EntaxyRuntimeObjectMBean {
public static interface Helper {
public static Qualifier getQualifier(String name) {
return ProfilesMBean.Q_PROFILES.qualifier(PROFILE_KEY, name);
}
}
public static final String CAPABILITY_NAMESPACE = "entaxy.runtime.profile";
public static final String PROFILE_KEY = "profile";
@Attribute
default public String getName() {
return getObjectId();
};
@Attribute
public String getDescription();
@Deprecated(since = "1.10", forRemoval = true)
@Attribute
default public String getBasicAuthAccount() {
return "";
};
@Deprecated(since = "1.10", forRemoval = true)
@Attribute
default public String getUuid() {
return getObjectId();
};
@Deprecated(since = "1.10", forRemoval = true)
@Attribute(desc = "Systems the current can send messages to")
default public List<String> getAllowedTargets() {
return Collections.emptyList();
};
@Deprecated(since = "1.10", forRemoval = true)
@Attribute(desc = "Systems the current can receive messages from")
default public List<String> getAllowedSources() {
return Collections.emptyList();
};
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Adds connector to profile")
public void addConnector(
@Parameter(name = "factoryId", desc = "Connector factory ID") String connectorFactoryId,
@Parameter(name = "parameters", desc = "Connector parameters") Map<String, String> parameters)
throws Exception;
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Removes connector from profile")
public void removeConnector(
@Parameter(name = "connectorName", desc = "Connector name") String connectorName) throws Exception;
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Starts connector in profile")
public void startConnector(
@Parameter(name = "connectorName", desc = "Connector name") String connectorName) throws Exception;
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Stops connector in profile")
public void stopConnector(
@Parameter(name = "connectorName", desc = "Connector name") String connectorName) throws Exception;
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Gets connector's configuration")
public String getConnectorConfig(
@Parameter(name = "connectorName", desc = "Connector name") String connectorName) throws Exception;
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Creates account for this system", impact = MBeanOperationInfo.ACTION)
default public void createAccount(
@Parameter(name = "login", desc = "Login") String login,
@Parameter(name = "password", desc = "Password") String password) throws Exception {};
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Allow this system to send messages to other system")
default public void allowTarget(
@Parameter(name = "targetIdOrName", desc = "Target system Id or Name") String idOrName) throws Exception {
};
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Allow this system to receive messages from other system")
default public void allowSource(
@Parameter(name = "sourceIdOrName", desc = "Source system Id or Name") String idOrName) throws Exception {
};
}

View File

@ -0,0 +1,48 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile;
import ru.entaxy.esb.platform.base.management.core.ManagementCore;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectContainerMBean;
import ru.entaxy.platform.core.management.profile.support.legacy.ProfileManager;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
public interface ProfilesMBean extends EntaxyRuntimeObjectContainerMBean, ProfileManager {
public static final String CAPABILITY_NAMESPACE_DEFAULT_ROUTE = "entaxy.runtime.default-route";
public static final String PROFILES_KEY = "category";
public static final String PROFILES_KEY_VALUE = "profiles";
public static final Qualifier Q_PROFILES = ManagementCore.Q_RUNTIME
.qualifier(ProfilesMBean.PROFILES_KEY, ProfilesMBean.PROFILES_KEY_VALUE);
}

View File

@ -0,0 +1,44 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
public interface RoutesMBean {
public static interface Helper {
public static Qualifier getQualifier(String profileName) {
return ProfileMBean.Helper
.getQualifier(profileName)
.qualifier(ROUTES_KEY, ROUTES_KEY_VALUE);
}
}
public static final String ROUTES_KEY = "section";
public static final String ROUTES_KEY_VALUE = "routes";
}

View File

@ -0,0 +1,79 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.impl;
import java.util.Collections;
import java.util.List;
import javax.management.NotCompliantMBeanException;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeItemMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBeanFactory;
import ru.entaxy.platform.core.management.object.MBeanFactory;
import ru.entaxy.platform.core.management.object.factory.AbstractMBeanFactory;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
@MBeanFactory(id = "connector-factory", supportedTypes = {"entaxy.runtime.connector"})
@Component(service = EntaxyRuntimeObjectMBeanFactory.class, immediate = true)
public class ConnectorMBeanFactory extends AbstractMBeanFactory {
private static final Logger log = LoggerFactory.getLogger(ConnectorMBeanFactory.class);
// @Reference(cardinality = ReferenceCardinality.MANDATORY, policyOption = ReferencePolicyOption.GREEDY)
// ProfilesMBean profilesMBean;
@Reference(cardinality = ReferenceCardinality.MANDATORY, policyOption = ReferencePolicyOption.GREEDY)
Helpers helpers;
@Override
public <T extends EntaxyRuntimeObjectMBean> T createMBean(EntaxyRuntimeObject entaxyRuntimeObject) {
ConnectorMBeanImpl beanImpl;
try {
beanImpl = new ConnectorMBeanImpl(entaxyRuntimeObject, helpers);
// beanImpl.setParentMBean(profilesMBean);
} catch (NotCompliantMBeanException e) {
log.error("Error creating ProfileMBeanImpl for [" + entaxyRuntimeObject.getObjectFullId() + "]", e);
return null;
}
return (T) beanImpl;
}
@Override
public List<? extends EntaxyRuntimeItemMBean> createMBeans() {
return Collections.emptyList();
}
}

View File

@ -0,0 +1,99 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.impl;
import javax.management.NotCompliantMBeanException;
import ru.entaxy.esb.platform.base.management.core.api.EntaxyRuntimeTyped;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
import ru.entaxy.platform.core.management.object.ObjectMBean;
import ru.entaxy.platform.core.management.object.factory.AbstractObjectMBean;
import ru.entaxy.platform.core.management.profile.ConnectorMBean;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
// @TODO move string to constant
@EntaxyRuntimeTyped(name = "entaxy.runtime.connector")
@ObjectMBean(subQualifierName = "connector")
public class ConnectorMBeanImpl extends AbstractObjectMBean<ConnectorMBean> implements ConnectorMBean {
protected Helpers helpers;
public ConnectorMBeanImpl(EntaxyRuntimeObject entaxyRuntimeObject, Helpers helpers)
throws NotCompliantMBeanException {
super(ConnectorMBean.class, entaxyRuntimeObject);
this.helpers = helpers;
}
@Override
public String getJMXSubQualifierValue() {
return getObjectId();
}
@Override
public String getFactoryId() {
return this.entaxyRuntimeObject.getAttributeOrDefault("templateId", super.getFactoryId()).toString();
}
@Override
public String getRegisteredName() {
return this.entaxyRuntimeObject.getAttributeOrDefault("bundleName", "").toString();
}
@Override
public String getSystem() {
return this.entaxyRuntimeObject.getAttributeOrDefault("system", "").toString();
}
@Override
public String getClassifier() {
return this.entaxyRuntimeObject.getAttributeOrDefault("classifier", "").toString();
}
@Override
public String getDisplayName() {
return this.entaxyRuntimeObject.getAttributeOrDefault("displayName", getObjectId()).toString();
}
@Override
public String getDirection() {
return this.entaxyRuntimeObject.getAttributeOrDefault("direction", getObjectId()).toString();
}
@Override
public String getProtocol() {
return this.entaxyRuntimeObject.getAttributeOrDefault("protocol", getObjectId()).toString();
}
@Override
public void start() throws Exception {
this.helpers.connectorHelper.startConnector(getSystem(), this.getRegisteredName());
}
@Override
public void stop() throws Exception {
this.helpers.connectorHelper.stopConnector(getSystem(), this.getRegisteredName());
}
}

View File

@ -0,0 +1,76 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.impl;
import java.util.Collections;
import java.util.List;
import javax.management.NotCompliantMBeanException;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeItemMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBeanFactory;
import ru.entaxy.platform.core.management.object.MBeanFactory;
import ru.entaxy.platform.core.management.object.factory.AbstractMBeanFactory;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
@MBeanFactory(id = "default-route-factory", supportedTypes = {"entaxy.runtime.default-route"})
@Component(service = EntaxyRuntimeObjectMBeanFactory.class, immediate = true)
public class DefaultRouteMBeanFactory extends AbstractMBeanFactory {
private static final Logger log = LoggerFactory.getLogger(DefaultRouteMBeanFactory.class);
@Reference(cardinality = ReferenceCardinality.MANDATORY, policyOption = ReferencePolicyOption.GREEDY)
Helpers helpers;
@Override
public <T extends EntaxyRuntimeObjectMBean> T createMBean(EntaxyRuntimeObject entaxyRuntimeObject) {
DefaultRouteMBeanImpl beanImpl;
try {
beanImpl = new DefaultRouteMBeanImpl(entaxyRuntimeObject, helpers);
// beanImpl.setParentMBean(profilesMBean);
} catch (NotCompliantMBeanException e) {
log.error("Error creating ProfileMBeanImpl for [" + entaxyRuntimeObject.getObjectFullId() + "]", e);
return null;
}
return (T) beanImpl;
}
@Override
public List<? extends EntaxyRuntimeItemMBean> createMBeans() {
return Collections.emptyList();
}
}

View File

@ -0,0 +1,95 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.impl;
import javax.management.NotCompliantMBeanException;
import ru.entaxy.esb.platform.base.management.core.api.EntaxyRuntimeTyped;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
import ru.entaxy.platform.core.management.object.ObjectMBean;
import ru.entaxy.platform.core.management.object.factory.AbstractObjectMBean;
import ru.entaxy.platform.core.management.profile.DefaultRouteMBean;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
// @TODO move string to constant
@EntaxyRuntimeTyped(name = "entaxy.runtime.default-route")
@ObjectMBean(subQualifierName = "route")
public class DefaultRouteMBeanImpl extends AbstractObjectMBean<DefaultRouteMBean> implements DefaultRouteMBean {
Helpers helpers;
public DefaultRouteMBeanImpl(EntaxyRuntimeObject entaxyRuntimeObject, Helpers helpers)
throws NotCompliantMBeanException {
super(DefaultRouteMBean.class, entaxyRuntimeObject);
this.helpers = helpers;
}
/**
* methood is overridden for compatibility with current UI
*
* TODO: remove after the above is not actual
*/
@Override
public String getJMXSubQualifierName() {
return "route";
}
/**
* methood is overridden for compatibility with current UI
*
* TODO: remove after the above is not actual
*/
@Override
public String getJMXSubQualifierValue() {
return "default";
}
/**
* methood is overridden for compatibility with current UI
*
* TODO: remove after the above is not actual
*/
/*
@Override
public String getParentSubPath() {
// TODO remove after the above is not actual
return "";
}
*/
/**
* methood is overridden for compatibility with current UI
*
* TODO: remove after the above is not actual
*/
/*
@Override
public String getJMXSubQualifier() {
return "section=routes," + super.getJMXSubQualifier();
}
*/
}

View File

@ -0,0 +1,81 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.impl;
import java.util.Collections;
import java.util.List;
import javax.management.NotCompliantMBeanException;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeItemMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBeanFactory;
import ru.entaxy.platform.core.management.object.MBeanFactory;
import ru.entaxy.platform.core.management.object.factory.AbstractMBeanFactory;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
@MBeanFactory(id = "profile-factory", supportedTypes = {"entaxy.runtime.profile"})
@Component(service = EntaxyRuntimeObjectMBeanFactory.class, immediate = true)
public class ProfileMBeanFactory extends AbstractMBeanFactory {
private static final Logger log = LoggerFactory.getLogger(ProfileMBeanFactory.class);
@Reference(cardinality = ReferenceCardinality.MANDATORY)
ProfilesMBeanImpl profilesMBean;
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile Helpers helpers;
@Override
public <T extends EntaxyRuntimeObjectMBean> T createMBean(EntaxyRuntimeObject entaxyRuntimeObject) {
ProfileMBeanImpl beanImpl;
try {
beanImpl = new ProfileMBeanImpl(entaxyRuntimeObject, helpers);
beanImpl.setParentMBean(profilesMBean);
} catch (NotCompliantMBeanException e) {
log.error("Error creating ProfileMBeanImpl for [" + entaxyRuntimeObject.getObjectFullId() + "]", e);
return null;
}
return (T) beanImpl;
}
@Override
public List<? extends EntaxyRuntimeItemMBean> createMBeans() {
return Collections.singletonList(profilesMBean);
}
}

View File

@ -0,0 +1,188 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.management.NotCompliantMBeanException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.base.management.core.api.EntaxyRuntimeTyped;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.core.management.object.ObjectMBean;
import ru.entaxy.platform.core.management.object.factory.AbstractObjectMBean;
import ru.entaxy.platform.core.management.profile.NotBackwardCompatibleException;
import ru.entaxy.platform.core.management.profile.ProfileMBean;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
// @TODO move string to constant
@EntaxyRuntimeTyped(name = "entaxy.runtime.profile")
@ObjectMBean(subQualifierName = "profile")
public class ProfileMBeanImpl extends AbstractObjectMBean<ProfileMBean> implements ProfileMBean {
private static final Logger log = LoggerFactory.getLogger(ProfileMBeanImpl.class);
Helpers helpers;
// BundleContext bundleContext;
public ProfileMBeanImpl(EntaxyRuntimeObject entaxyRuntimeObject, /*
* BundleContext bundleContext,
*/
Helpers helpers)
throws NotCompliantMBeanException {
super(ProfileMBean.class, entaxyRuntimeObject);
// this.bundleContext = bundleContext;
this.helpers = helpers;
setJMXSubQualifierValue(entaxyRuntimeObject.getId());
}
@Override
public String getJMXSubQualifierName() {
// TODO Auto-generated method stub
return super.getJMXSubQualifierName();
}
@Override
public String getJMXSubQualifierValue() {
return getObjectId();
}
@Override
public String getName() {
return entaxyRuntimeObject.getAttributeOrDefault("name", "").toString();
}
@Override
public String getDescription() {
return entaxyRuntimeObject.getAttributeOrDefault("name", "").toString();
}
@Override
@Deprecated
public String getUuid() {
try {
return internalGetUuid();
} catch (Exception ignore) {
} ;
return getObjectId();
}
@Deprecated
protected String internalGetUuid() throws Exception {
return helpers.systemHelper.getUUIDbyName(getName());
}
@Override
public String getBasicAuthAccount() {
try {
return internalGetBasicAuthAccount();
} catch (Exception ignore) {
}
return "";
}
protected String internalGetBasicAuthAccount() throws Exception {
return helpers.accountHelper.getAccountForSystem(internalGetUuid());
}
@Override
public void createAccount(String login, String password) throws Exception {
if (CommonUtils.isValid(getBasicAuthAccount()))
throw new IllegalArgumentException("Account already exists");
// FIXME remove hardcoded
this.helpers.accountHelper.createAccountForSystem(login, password, getUuid(), "admin", "admin");
}
@Override
public void addConnector(String connectorFactoryId, Map<String, String> parameters) throws Exception {
this.helpers.connectorHelper.addConnector(getName(), connectorFactoryId, parameters);
}
@Override
public void removeConnector(String connectorName) throws Exception {
this.helpers.connectorHelper.removeConnector(getName(), connectorName);
}
@Override
public void startConnector(String connectorName) throws Exception {
this.helpers.connectorHelper.startConnector(getName(), connectorName);
}
@Override
public void stopConnector(String connectorName) throws Exception {
this.helpers.connectorHelper.stopConnector(getName(), connectorName);
}
@Override
public String getConnectorConfig(String connectorName) throws Exception {
return helpers.entaxyObjectService.findObject(connectorName, "entaxy.runtime.connector").getConfiguration();
}
@Override
public List<String> getAllowedTargets() {
try {
return helpers.permissionHelper.getObjectPermissions(internalGetUuid());
} catch (NotBackwardCompatibleException ignore) {
//
} catch (Exception e) {
log.warn("getAllowedTargets not succeded", e);
}
return new ArrayList<>();
}
@Override
public List<String> getAllowedSources() {
try {
return helpers.permissionHelper.getSubjectPermissions(internalGetUuid());
} catch (NotBackwardCompatibleException ignore) {
//
} catch (Exception e) {
log.warn("getAllowedSources not succeded", e);
}
return new ArrayList<>();
}
@Override
public void allowSource(String idOrName) throws Exception {
helpers.permissionHelper.createPermission(idOrName, internalGetUuid());
}
@Override
public void allowTarget(String idOrName) throws Exception {
helpers.permissionHelper.createPermission(internalGetUuid(), idOrName);
}
}

View File

@ -0,0 +1,106 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.impl;
import javax.management.NotCompliantMBeanException;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.CollectionType;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Deactivate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.osgi.service.component.annotations.ServiceScope;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
import ru.entaxy.platform.core.management.object.ContainerMBean;
import ru.entaxy.platform.core.management.object.factory.AbstractObjectContainerMBean;
import ru.entaxy.platform.core.management.profile.ProfilesMBean;
@Component(service = {ProfilesMBeanImpl.class}, scope = ServiceScope.SINGLETON,
immediate = true)
@ContainerMBean(id = "profiles", subQualifierValue = "profiles")
public class ProfilesMBeanImpl extends AbstractObjectContainerMBean<ProfilesMBean>
implements ProfilesMBean {
private static final Logger log = LoggerFactory.getLogger(ProfilesMBeanImpl.class);
protected BundleContext bundleContext;
@Reference(cardinality = ReferenceCardinality.MANDATORY, service = Helpers.class,
collectionType = CollectionType.SERVICE, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile Helpers helpers;
public ProfilesMBeanImpl() throws NotCompliantMBeanException {
super(ProfilesMBean.class);
}
@Activate
public void activate(ComponentContext componentContext) {
this.bundleContext = componentContext.getBundleContext();
}
@Deactivate
public void deactivate() {}
/*
* ProfileManager implementation
*/
@Override
public void createProfile(String id, String name, String description) throws Exception {
this.helpers.profileHelper.createProfile(id, name, description);
}
@Override
public String getProfileConfig(String idOrName) throws Exception {
return this.helpers.entaxyObjectService.findObject(idOrName, "entaxy.runtime.profile").getConfiguration();
}
@Override
public void startProfile(String idOrName) throws Exception {
this.helpers.profileHelper.startProfile(idOrName);
}
@Override
public void stopProfile(String idOrName) throws Exception {
this.helpers.profileHelper.stopProfile(idOrName);
}
@Override
public void uninstallProfile(String idOrName) throws Exception {
this.helpers.profileHelper.uninstallProfile(idOrName);
}
}

View File

@ -0,0 +1,35 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
public interface AccountManager {
public String getAccountForSystem(String systemUuid) throws Exception;
public void createAccountForSystem(String login, String password, String systemUUID, String createdBy,
String editedBy) throws Exception;
}

View File

@ -0,0 +1,83 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.esb.platform.base.management.core.api.Attribute;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.esb.platform.base.management.core.api.Operation;
import ru.entaxy.esb.platform.base.management.core.api.RuntimeTypedMBean;
import ru.entaxy.esb.platform.base.management.core.utils.BundleAwareMBean;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATION_ENRICH)
public interface ConnectorMBean extends BundleAwareMBean, RuntimeTypedMBean {
public static interface Helper {
public static Qualifier getQualifier(String profileName, String connectorName) {
return ConnectorsMBean.Helper.getQualifier(profileName).qualifier(CONNECTOR_KEY, connectorName);
}
}
public static final String CAPABILITY_NAMESPACE = "entaxy.runtime.connector";
public static final String CONNECTOR_KEY = "connector";
public static final String CONNECTOR_KEY_VALUE_DEFAULT = "default";
// TODO implement if needed
// public boolean isDefault();
@Attribute(desc = "Factory ID used to create the connector")
public String getFactoryId();
@Attribute(desc = "Connector name")
public String getName();
@Attribute(desc = "Connector registered name used in registry")
public String getRegisteredName();
@Attribute(desc = "Connector system")
public String getSystem();
@Attribute(desc = "Connector classifier")
public String getClassifier();
@Attribute(desc = "Connector display name")
public String getDisplayName();
@Attribute(desc = "Connector direction")
public String getDirection();
@Operation(desc = "Starts the connector")
public void start() throws Exception;
@Operation(desc = "Stops the connector")
public void stop() throws Exception;
}

View File

@ -0,0 +1,40 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import java.util.Map;
public interface ConnectorManager {
public void addConnector(String idOrName, String connectorFactoryId, Map<String, String> parameters) throws Exception;
public void removeConnector(String idOrName, String connectorName) throws Exception;
public void startConnector(String idOrName, String connectorName) throws Exception;
public void stopConnector(String idOrName, String connectorName) throws Exception;
}

View File

@ -0,0 +1,44 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.platform.core.management.profile.ProfileMBean;
public interface ConnectorsMBean {
public static interface Helper {
public static Qualifier getQualifier(String profileName) {
return ProfileMBean.Helper
.getQualifier(profileName)
.qualifier(CONNECTORS_KEY, CONNECTORS_KEY_VALUE);
}
}
public static final String CONNECTORS_KEY = "section";
public static final String CONNECTORS_KEY_VALUE = "connectors";
}

View File

@ -0,0 +1,113 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleEvent;
import org.osgi.framework.wiring.BundleCapability;
import ru.entaxy.esb.platform.base.management.core.utils.ExtendedBundleTrackerCustomizer;
import ru.entaxy.platform.base.support.CommonUtils;
import ru.entaxy.platform.base.support.osgi.tracker.filter.BundleCapabilityFilter;
public class DeployedLegacyConnectorCustomizer extends ExtendedBundleTrackerCustomizer<List<ManagedLegacyConnector>> {
@Override
protected List<ManagedLegacyConnector> createManagedObject(Bundle bundle, BundleEvent event,
Map<String, List<?>> filterResults) {
@SuppressWarnings("unchecked")
List<BundleCapability> capabilities =
(List<BundleCapability>) filterResults.get(BundleCapabilityFilter.DEFAULT_FILTER_ID);
if (capabilities == null)
capabilities = new ArrayList<>();
List<ManagedLegacyConnector> result = new ArrayList<>();
for (BundleCapability capability : capabilities) {
// process only legacy connectors
if (capability.getAttributes().containsKey("objectId")
&& capability.getAttributes().containsKey("factory")) {
// it's factory-based connector
continue;
}
Object val = capability.getAttributes().get("name");
String name = val == null ? "" : val.toString();
if (!CommonUtils.isValid(name))
continue;
val = capability.getAttributes().get("system");
String system = val == null ? "" : val.toString();
if (!CommonUtils.isValid(system))
continue;
val = capability.getAttributes().get("templateId");
String factoryId = val == null ? "" : val.toString();
val = capability.getAttributes().get("factory");
factoryId = val == null ? factoryId : val.toString();
val = capability.getAttributes().get("bundleName");
String registeredName = val == null ? "" : val.toString();
val = capability.getAttributes().get("classifier");
String classifier = val == null ? "" : val.toString();
val = capability.getAttributes().get("displayName");
String displayName;
try {
displayName =
val == null ? "" : new String(val.toString().getBytes(StandardCharsets.ISO_8859_1), "UTF-8");
} catch (UnsupportedEncodingException e) {
displayName = val == null ? "" : val.toString();
}
val = capability.getAttributes().get("direction");
String direction = val == null ? "" : val.toString();
ManagedLegacyConnector mc = (new ManagedLegacyConnector())
.name(name)
.system(system)
.factoryId(factoryId)
.registeredName(registeredName)
.classifier(classifier)
.displayName(displayName)
.direction(direction);
enrich(bundle, event, filterResults, mc);
result.add(mc);
}
return result;
}
}

View File

@ -0,0 +1,94 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import javax.management.NotCompliantMBeanException;
import org.osgi.framework.BundleContext;
import ru.entaxy.esb.platform.base.management.core.api.EntaxyRuntimeTyped;
import ru.entaxy.esb.platform.base.management.core.utils.BundleAwareMBeanImpl;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
// @TODO move string to constant
@EntaxyRuntimeTyped(name = "entaxy.runtime.connector")
public class LegacyConnectorMBeanImpl extends BundleAwareMBeanImpl<ManagedLegacyConnector, ConnectorMBean>
implements ConnectorMBean {
protected Helpers helpers;
public LegacyConnectorMBeanImpl(BundleContext bundleContext, ManagedLegacyConnector managedObject, Helpers helpers)
throws NotCompliantMBeanException {
super(ConnectorMBean.class, managedObject);
this.bundleContext = bundleContext;
this.helpers = helpers;
}
@Override
public String getFactoryId() {
return this.managedObject.getFactoryId();
}
@Override
public String getName() {
return this.managedObject.getName();
}
@Override
public String getRegisteredName() {
return this.managedObject.getRegisteredName();
}
@Override
public String getSystem() {
return this.managedObject.getSystem();
}
@Override
public String getClassifier() {
return this.managedObject.getClassifier();
}
@Override
public String getDisplayName() {
return this.managedObject.getDisplayName();
}
@Override
public String getDirection() {
return this.managedObject.getDirection();
}
@Override
public void start() throws Exception {
this.helpers.connectorHelper.startConnector(this.managedObject.getSystem(), this.getRegisteredName());
}
@Override
public void stop() throws Exception {
this.helpers.connectorHelper.stopConnector(this.managedObject.getSystem(), this.getRegisteredName());
}
}

View File

@ -0,0 +1,72 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import java.util.List;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.CollectionType;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.util.tracker.BundleTracker;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
import ru.entaxy.platform.base.support.osgi.tracker.BundleTrackerUtils;
import ru.entaxy.platform.base.support.osgi.tracker.filter.BundleCapabilityFilter;
@Component(service = LegacyConnectorManager.class, immediate = true)
public class LegacyConnectorManager {
public static final String CAPABILITY_NAMESPACE = "entaxy.runtime.connector";
protected BundleTracker<List<ManagedLegacyConnector>> connectorTracker;
protected BundleContext bundleContext;
@Reference(cardinality = ReferenceCardinality.MANDATORY, service = Helpers.class,
collectionType = CollectionType.SERVICE)
Helpers helpers;
@Activate
public void activate(ComponentContext componentContext) {
this.bundleContext = componentContext.getBundleContext();
connectorTracker = BundleTrackerUtils.<List<ManagedLegacyConnector>>createBuilder()
.customizer(
(new DeployedLegacyConnectorCustomizer())
.listener(new ManagedLegacyConnectorsListener(bundleContext, this.helpers)))
.addFilter(
(new BundleCapabilityFilter()).namespace(CAPABILITY_NAMESPACE))
.bundleContext(bundleContext)
.bundleState(Bundle.ACTIVE | Bundle.INSTALLED | Bundle.RESOLVED | Bundle.STARTING | Bundle.STOPPING)
.get();
connectorTracker.open();
}
}

View File

@ -0,0 +1,136 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import ru.entaxy.esb.platform.base.management.core.utils.BundleAwareManagedObjectImpl;
public class ManagedLegacyConnector extends BundleAwareManagedObjectImpl {
protected String system;
protected String name;
protected String registeredName;
protected String factoryId;
protected String classifier;
protected String displayName;
protected String direction;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public ManagedLegacyConnector name(String name) {
setName(name);
return this;
}
public String getSystem() {
return system;
}
public void setSystem(String system) {
this.system = system;
}
public ManagedLegacyConnector system(String system) {
setSystem(system);
return this;
}
public String getFactoryId() {
return factoryId;
}
public void setFactoryId(String factoryId) {
this.factoryId = factoryId;
}
public ManagedLegacyConnector factoryId(String factoryIdValue) {
this.setFactoryId(factoryIdValue);
return this;
}
public String getRegisteredName() {
return registeredName;
}
public void setRegisteredName(String registeredName) {
this.registeredName = registeredName;
};
public ManagedLegacyConnector registeredName(String registeredNameValue) {
this.setRegisteredName(registeredNameValue);
return this;
};
public String getClassifier() {
return classifier;
}
public void setClassifier(String classifier) {
this.classifier = classifier;
}
public ManagedLegacyConnector classifier(String classifierValue) {
this.setClassifier(classifierValue);
return this;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public ManagedLegacyConnector displayName(String displayNameValue) {
this.setDisplayName(displayNameValue);
return this;
}
public String getDirection() {
return direction;
}
public void setDirection(String direction) {
this.direction = direction;
}
public ManagedLegacyConnector direction(String directionValue) {
this.setDirection(directionValue);
return this;
}
}

View File

@ -0,0 +1,77 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import java.util.Iterator;
import java.util.List;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.base.management.core.utils.ManagedObjectsListener;
import ru.entaxy.esb.platform.core.management.profile.helper.Helpers;
public class ManagedLegacyConnectorsListener extends
ManagedObjectsListener<List<ManagedLegacyConnector>, ManagedLegacyConnector, ConnectorMBean, LegacyConnectorMBeanImpl> {
private static final Logger log = LoggerFactory.getLogger(ManagedLegacyConnectorsListener.class);
protected Helpers helpers;
public ManagedLegacyConnectorsListener(BundleContext bundleContext, Helpers helpers) {
super(bundleContext, ConnectorMBean.class);
this.helpers = helpers;
}
@Override
protected Iterator<ManagedLegacyConnector> getIterator(List<ManagedLegacyConnector> managedObject) {
return managedObject.iterator();
}
@Override
protected String getKeyValue(ManagedLegacyConnector object) {
return object.getName();
}
@Override
protected LegacyConnectorMBeanImpl createService(ManagedLegacyConnector managedObject) {
try {
return new LegacyConnectorMBeanImpl(bundleContext, managedObject, helpers);
} catch (Exception e) {
log.error("Error creating service", e);
return null;
}
}
@Override
protected String getJmxObjectName(ManagedLegacyConnector managedObject) {
return ConnectorMBean.Helper.getQualifier(
managedObject.getSystem(),
managedObject.getName()).getValue();
}
}

View File

@ -0,0 +1,38 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import java.util.List;
public interface PermissionManager {
public List<String> getObjectPermissions(String objectId) throws Exception;
public List<String> getSubjectPermissions(String subjectId) throws Exception;
public void createPermission(String objectId, String subjectId) throws Exception;
}

View File

@ -0,0 +1,57 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
import ru.entaxy.esb.platform.base.management.core.api.Operation;
import ru.entaxy.esb.platform.base.management.core.api.Parameter;
@Deprecated(since = "1.10", forRemoval = true)
public interface ProfileManager {
@Operation(desc = "Create and deploy new profile")
public void createProfile(
@Parameter(desc = "Profile ID", name = "id") String id,
@Parameter(desc = "System name", name = "name") String name,
@Parameter(desc = "Description", name = "description") String description) throws Exception;
@Deprecated(since = "1.10", forRemoval = true)
@Operation(desc = "Get profile configuration")
public String getProfileConfig(@Parameter(desc = "Profile ID or system name", name = "idOrName") String idOrName)
throws Exception;
@Operation(desc = "Start profile")
public void startProfile(@Parameter(desc = "Profile ID or system name", name = "idOrName") String idOrName)
throws Exception;
@Operation(desc = "Stop profile")
public void stopProfile(@Parameter(desc = "Profile ID or system name", name = "idOrName") String idOrName)
throws Exception;
@Operation(desc = "Uninstall profile")
public void uninstallProfile(@Parameter(desc = "Profile ID or system name", name = "idOrName") String idOrName)
throws Exception;
}

View File

@ -0,0 +1,32 @@
/*-
* ~~~~~~licensing~~~~~~
* profile-management
* ==========
* Copyright (C) 2020 - 2025 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.profile.support.legacy;
public interface SystemManager {
String getUUIDbyName(String name) throws Exception;
}