/* * (non-Javadoc) * @see sif3.infra.rest.env.ClientEnvironmentManager#disconnect() */ public void disconnect() { ProviderEnvironment envInfo = getProviderEnvrionment(); if (!envInfo.getIsConnected()) { logger.debug( "The consumer " + envInfo.getEnvironmentKey().getEnvironmentName() + " is not connected. No action taken."); } envInfo.setConnected(false); setSIF3Session(null); envInfo.clearConnectorBaseURIs(); }
private boolean populateInfrastructureURLs(EnvironmentType environment) { boolean success = true; ProviderEnvironment envInfo = getProviderEnvrionment(); envInfo.clearConnectorBaseURIs(); InfrastructureServicesType infraServices = environment.getInfrastructureServices(); if (infraServices != null) { List<InfrastructureServiceType> services = infraServices.getInfrastructureService(); if (services.size() == 0) // that must be a problem { success = false; } else { for (InfrastructureServiceType service : services) { try { envInfo.addConnectorBaseURI( ConsumerEnvironment.ConnectorName.valueOf(service.getName().value()), new URI(service.getValue())); } catch (Exception ex) { String connectorName = (service.getName() != null) ? service.getName().value() : "Connector Name MISSING"; logger.error( "Could not add URI = " + service.getValue() + " for connector = " + connectorName + " to Consumer Environment " + envInfo.getEnvironmentName()); success = false; } } } } else { logger.error( "Environment data on provider incomplete. Infrastructure Service URIs are missing."); success = false; } return success; }
/* * (non-Javadoc) * @see sif3.infra.rest.env.ClientEnvironmentManager#loadTemplateEnvironmentData() */ public EnvironmentType loadTemplateEnvironmentData() { ProviderEnvironment envInfo = getProviderEnvrionment(); return envOps.loadTemplateEnvironmentData( envInfo.getTemplateXMLFileName(), envInfo.getAdapterType(), envInfo.getEnvironmentType()); }