public class EventSinkTemplateDeployerHelper extends Object
| Constructor and Description |
|---|
EventSinkTemplateDeployerHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToArtifactIdToColumnDefMap(org.wso2.carbon.registry.core.Registry registry,
String artifactId,
String incomingColKey) |
static void |
cleanRegistryWithUndeploy(String artifactId,
boolean isUndeploy)
Undeploys the artifact, having the given artifactId.
|
static void |
cleanTableSchemaRegistryRecords(org.wso2.carbon.registry.core.Registry registry,
String artifactId) |
static void |
deleteEventSinkConfigurationFile(int tenantId,
String streamName) |
static org.wso2.carbon.analytics.eventsink.AnalyticsEventStore |
getExistingEventStore(int tenantId,
String streamName) |
static String |
getKeyForColumn(org.wso2.carbon.analytics.eventsink.AnalyticsTableSchema.Column column,
String streamName)
Returns a unique ID for a given Column.
|
static String |
removeArtifactIdFromList(String artifactIdList,
String artifactId)
Util for removing artifactID (along with the separator comma) from artifactIdList
|
static org.wso2.carbon.analytics.eventsink.AnalyticsEventStore |
unmarshallEventSinkConfig(org.wso2.carbon.event.template.manager.core.DeployableTemplate template) |
static void |
updateArtifactAndColDefMappings(org.wso2.carbon.registry.core.Registry registry,
String artifactId,
List<org.wso2.carbon.analytics.eventsink.AnalyticsTableSchema.Column> columns,
String incomingStreamName) |
static void |
updateArtifactAndStreamIdMappings(org.wso2.carbon.registry.core.Registry registry,
String artifactId,
List<String> streamIds) |
public static org.wso2.carbon.analytics.eventsink.AnalyticsEventStore unmarshallEventSinkConfig(org.wso2.carbon.event.template.manager.core.DeployableTemplate template)
throws org.wso2.carbon.event.template.manager.core.TemplateDeploymentException
org.wso2.carbon.event.template.manager.core.TemplateDeploymentExceptionpublic static void deleteEventSinkConfigurationFile(int tenantId,
String streamName)
throws org.wso2.carbon.event.template.manager.core.TemplateDeploymentException
org.wso2.carbon.event.template.manager.core.TemplateDeploymentExceptionpublic static String removeArtifactIdFromList(String artifactIdList, String artifactId)
artifactId - artifact ID, to be removed.artifactIdList - a comma separated list of artifact IDs.public static org.wso2.carbon.analytics.eventsink.AnalyticsEventStore getExistingEventStore(int tenantId,
String streamName)
throws org.wso2.carbon.event.template.manager.core.TemplateDeploymentException
org.wso2.carbon.event.template.manager.core.TemplateDeploymentExceptionpublic static void cleanTableSchemaRegistryRecords(org.wso2.carbon.registry.core.Registry registry,
String artifactId)
throws org.wso2.carbon.event.template.manager.core.TemplateDeploymentException
org.wso2.carbon.event.template.manager.core.TemplateDeploymentExceptionpublic static String getKeyForColumn(org.wso2.carbon.analytics.eventsink.AnalyticsTableSchema.Column column, String streamName)
column - streamName - public static void addToArtifactIdToColumnDefMap(org.wso2.carbon.registry.core.Registry registry,
String artifactId,
String incomingColKey)
throws org.wso2.carbon.event.template.manager.core.TemplateDeploymentException
org.wso2.carbon.event.template.manager.core.TemplateDeploymentExceptionpublic static void updateArtifactAndStreamIdMappings(org.wso2.carbon.registry.core.Registry registry,
String artifactId,
List<String> streamIds)
throws org.wso2.carbon.event.template.manager.core.TemplateDeploymentException
org.wso2.carbon.event.template.manager.core.TemplateDeploymentExceptionpublic static void updateArtifactAndColDefMappings(org.wso2.carbon.registry.core.Registry registry,
String artifactId,
List<org.wso2.carbon.analytics.eventsink.AnalyticsTableSchema.Column> columns,
String incomingStreamName)
throws org.wso2.carbon.registry.core.exceptions.RegistryException,
org.wso2.carbon.event.template.manager.core.TemplateDeploymentException
org.wso2.carbon.registry.core.exceptions.RegistryExceptionorg.wso2.carbon.event.template.manager.core.TemplateDeploymentExceptionpublic static void cleanRegistryWithUndeploy(String artifactId, boolean isUndeploy) throws org.wso2.carbon.event.template.manager.core.TemplateDeploymentException
artifactId - Artifact ID of the artifact.isUndeploy - When this is set to False, this method will only clean the registry records that has being kept for artifactId. It will NOT change any Event Sink deployment that has already being done.
In other words, by setting isUndeploy to False, this method can be called to clean the registry when a deployment operation failed.
When this is set ot True, this will remove any subscriptions created when deploying the artifact (in addition to cleaning the registry).org.wso2.carbon.event.template.manager.core.TemplateDeploymentExceptionCopyright © 2016 WSO2. All rights reserved.