use of org.apache.ode.bpel.dd.TAnalyticsServerProfiles in project carbon-business-process by wso2.
the class TenantProcessStoreImpl method readAnalyticsServerProfiles.
private void readAnalyticsServerProfiles(TDeployment.Process processDD, DeploymentUnitDir du) {
TAnalyticsServerProfiles analyticsServerProfiles = processDD.getAnalyticsServerProfiles();
if (analyticsServerProfiles != null) {
for (TAnalyticsServerProfiles.Profile analyticsServerProfile : analyticsServerProfiles.getProfileList()) {
String location = analyticsServerProfile.getLocation();
if (location.startsWith(UnifiedEndpointConstants.VIRTUAL_FILE)) {
if (!EndpointConfiguration.isAbsolutePath(location.substring(UnifiedEndpointConstants.VIRTUAL_FILE.length()))) {
location = EndpointConfiguration.getAbsolutePath(du.getDeployDir().getAbsolutePath(), location.substring(UnifiedEndpointConstants.VIRTUAL_FILE.length()));
}
} else if ((!location.startsWith(UnifiedEndpointConstants.VIRTUAL_CONF_REG) && !location.startsWith(UnifiedEndpointConstants.VIRTUAL_GOV_REG) && !location.startsWith(UnifiedEndpointConstants.VIRTUAL_REG))) {
if (EndpointConfiguration.isAbsolutePath(location)) {
location = UnifiedEndpointConstants.VIRTUAL_FILE + location;
} else {
location = EndpointConfiguration.getAbsolutePath(du.getDeployDir().getAbsolutePath(), location);
location = UnifiedEndpointConstants.VIRTUAL_FILE + location;
}
}
AnalyticsServerProfileBuilder builder = new AnalyticsServerProfileBuilder(location, tenantId);
AnalyticsServerProfile profile = builder.build();
addAnalyticsServerProfile(profile.getName(), profile);
}
}
}
Aggregations