use of org.wso2.carbon.apimgt.impl.dto.GatewayCleanupSkipList in project carbon-apimgt by wso2.
the class InMemoryAPIDeployer method cleanDeployment.
public void cleanDeployment(String artifactRepositoryPath) {
File artifactRepoPath = Paths.get(artifactRepositoryPath, SynapseConstants.SYNAPSE_CONFIGS, SynapseConstants.DEFAULT_DIR).toFile();
if (artifactRepoPath.exists() && artifactRepoPath.isDirectory()) {
GatewayCleanupSkipList gatewayCleanupSkipList = ServiceReferenceHolder.getInstance().getAPIManagerConfiguration().getGatewayCleanupSkipList();
File apiPath = Paths.get(artifactRepoPath.getAbsolutePath(), "api").toFile();
if (apiPath.exists() && apiPath.isDirectory()) {
clean(apiPath, gatewayCleanupSkipList.getApis());
}
File localEntryPath = Paths.get(artifactRepoPath.getAbsolutePath(), "local-entries").toFile();
if (localEntryPath.exists() && localEntryPath.isDirectory()) {
clean(localEntryPath, gatewayCleanupSkipList.getLocalEntries());
}
File endpointPath = Paths.get(artifactRepoPath.getAbsolutePath(), "endpoints").toFile();
if (endpointPath.exists() && endpointPath.isDirectory()) {
clean(endpointPath, gatewayCleanupSkipList.getEndpoints());
}
File sequencesPath = Paths.get(artifactRepoPath.getAbsolutePath(), "sequences").toFile();
if (sequencesPath.exists() && sequencesPath.isDirectory()) {
clean(sequencesPath, gatewayCleanupSkipList.getSequences());
}
}
}
Aggregations