Search in sources :

Example 1 with TAnalyticsServerProfiles

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);
        }
    }
}
Also used : TAnalyticsServerProfiles(org.apache.ode.bpel.dd.TAnalyticsServerProfiles) AnalyticsServerProfile(org.wso2.carbon.bpel.core.ode.integration.config.analytics.AnalyticsServerProfile) AnalyticsServerProfileBuilder(org.wso2.carbon.bpel.core.ode.integration.config.analytics.AnalyticsServerProfileBuilder)

Aggregations

TAnalyticsServerProfiles (org.apache.ode.bpel.dd.TAnalyticsServerProfiles)1 AnalyticsServerProfile (org.wso2.carbon.bpel.core.ode.integration.config.analytics.AnalyticsServerProfile)1 AnalyticsServerProfileBuilder (org.wso2.carbon.bpel.core.ode.integration.config.analytics.AnalyticsServerProfileBuilder)1