public class CarbonRepositoryUtils extends Object
| Constructor and Description |
|---|
CarbonRepositoryUtils() |
| Modifier and Type | Method and Description |
|---|---|
static DeploymentSynchronizerConfiguration |
getActiveSynchronizerConfiguration(int tenantId)
Loads the deployment synchronizer configuration.
|
static String |
getCarbonRepositoryFilePath(org.apache.axis2.context.ConfigurationContext cfgCtx)
Returns the Carbon/Axis2 repository path for the given ConfigurationContext
|
static DeploymentSynchronizerConfiguration |
getDefaultDeploymentSyncConfiguration() |
static DeploymentSynchronizerConfiguration |
getDeploymentSyncConfigurationFromConf()
Load the deployment synchronizer configuration from the global ServerConfiguration
of Carbon.
|
static DeploymentSynchronizerConfiguration |
getDeploymentSyncConfigurationFromRegistry(int tenantId)
Loads the deployment synchronizer configuration from the configuration registry of the
specified tenant.
|
static boolean |
isSynchronizerEnabled(int tenantId)
Checks whether deployment synchronizer is enabled for the Carbon repository of the
specified tenant.
|
static DeploymentSynchronizer |
newCarbonRepositorySynchronizer(int tenantId)
Create and initialize a new DeploymentSynchronizer for the Carbon repository of the
specified tenant.
|
static void |
persistConfiguration(DeploymentSynchronizerConfiguration config,
int tenantId)
Save the given DeploymentSynchronizerConfiguration to the registry.
|
public static DeploymentSynchronizer newCarbonRepositorySynchronizer(int tenantId) throws DeploymentSynchronizerException
tenantId - ID of the tenantDeploymentSynchronizerException - If an error occurs while initializing the synchronizerpublic static DeploymentSynchronizerConfiguration getActiveSynchronizerConfiguration(int tenantId) throws DeploymentSynchronizerException
tenantId - Tenant IDDeploymentSynchronizerException - if an error occurs while accessing the registrypublic static DeploymentSynchronizerConfiguration getDeploymentSyncConfigurationFromConf() throws DeploymentSynchronizerException
DeploymentSynchronizerException - on errorpublic static DeploymentSynchronizerConfiguration getDefaultDeploymentSyncConfiguration() throws DeploymentSynchronizerException
DeploymentSynchronizerExceptionpublic static String getCarbonRepositoryFilePath(org.apache.axis2.context.ConfigurationContext cfgCtx)
cfgCtx - A ConfigurationContext instance owned by super tenant or some other tenantpublic static boolean isSynchronizerEnabled(int tenantId)
throws DeploymentSynchronizerException
tenantId - Tenant IDDeploymentSynchronizerException - if an error occurs while loading configuration from the registrypublic static DeploymentSynchronizerConfiguration getDeploymentSyncConfigurationFromRegistry(int tenantId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
tenantId - Tenant IDorg.wso2.carbon.registry.core.exceptions.RegistryException - if the registry cannot be accessedpublic static void persistConfiguration(DeploymentSynchronizerConfiguration config, int tenantId) throws org.wso2.carbon.registry.core.exceptions.RegistryException
config - The configuration to be savedtenantId - Tenant ID to select the configuration registryorg.wso2.carbon.registry.core.exceptions.RegistryException - if an error occurs while accessing the registryCopyright © 2019 WSO2. All rights reserved.