Package org.wso2.carbon.base

Examples of org.wso2.carbon.base.ServerConfiguration


   
    private static void createDataPublisher(){
        //creating the agent
        AgentConfiguration agentConfiguration = new AgentConfiguration();

        ServerConfiguration serverConfig =  CarbonUtils.getServerConfiguration();
        String trustStorePath = serverConfig.getFirstProperty("Security.TrustStore.Location");
        String trustStorePassword = serverConfig.getFirstProperty("Security.TrustStore.Password");
        String bamServerUrl = serverConfig.getFirstProperty("BamServerURL");
        String adminUsername = FasterLookUpDataHolder.getInstance().getBamUsername();
        String adminPassword = FasterLookUpDataHolder.getInstance().getBamPassword();

        System.setProperty("javax.net.ssl.trustStore", trustStorePath);
        System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);
View Full Code Here


    private ServiceRegistration observerRegistration;

    protected void activate(ComponentContext context) {
        // Initialize the repository manager so that it can be later used to
        // start a synchronizer (eg: via the UI)
        ServerConfiguration serverConfig = ServerConfiguration.getInstance();
        DeploymentSynchronizationManager.getInstance().init(serverConfig);

        try {
            initDeploymentSynchronizerForSuperTenant();
        } catch (RegistryException e) {
View Full Code Here

     *
     * @return a DeploymentSynchronizerConfiguration instance
     */
    public static DeploymentSynchronizerConfiguration getDeploymentSyncConfiguration() {
        DeploymentSynchronizerConfiguration config = new DeploymentSynchronizerConfiguration();
        ServerConfiguration serverConfig = ServerConfiguration.getInstance();
        String value = serverConfig.getFirstProperty(DeploymentSynchronizerConstants.ENABLED);
        config.setEnabled(value != null && JavaUtils.isTrueExplicitly(value));

        value = serverConfig.getFirstProperty(DeploymentSynchronizerConstants.AUTO_CHECKOUT_MODE);
        config.setAutoCheckout(value != null && JavaUtils.isTrueExplicitly(value));

        value = serverConfig.getFirstProperty(DeploymentSynchronizerConstants.AUTO_COMMIT_MODE);
        config.setAutoCommit(value != null && JavaUtils.isTrueExplicitly(value));

        value = serverConfig.getFirstProperty(DeploymentSynchronizerConstants.USE_EVENTING);
        config.setUseEventing(value != null && JavaUtils.isTrueExplicitly(value));

        value = serverConfig.getFirstProperty(DeploymentSynchronizerConstants.AUTO_SYNC_PERIOD);
        if (value != null) {
            config.setPeriod(Long.parseLong(value));
        } else {
            config.setPeriod(DeploymentSynchronizerConstants.DEFAULT_AUTO_SYNC_PERIOD);
        }
View Full Code Here

        }
    }

    private static String getRegistryType() {
        String registryType = DeploymentSynchronizerConstants.DEFAULT_REGISTRY_TYPE;
        ServerConfiguration serverConfig = ServerConfiguration.getInstance();
        String value = serverConfig.getFirstProperty(DeploymentSynchronizerConstants.REGISTRY_TYPE);
        if (value != null) {
            registryType = value;
        }
        return registryType;
    }
View Full Code Here

        }
        return false;
    }

    public int getPriority() {
        ServerConfiguration serverConfig = ServerConfiguration.getInstance();
        String priority = serverConfig.getFirstProperty(AUTHENTICATOR_PRIOROTY);
        if (priority != null && priority.length() > 0) {
            return Integer.parseInt(priority);
        }
        return DEFAULT_PRIORITY_LEVEL;
    }
View Full Code Here

    public String getAuthenticatorName() {
        return AUTHENTICATOR_NAME;
    }
   
    public boolean isDisabled() {
        ServerConfiguration serverConfig = ServerConfiguration.getInstance();
        String isDisabled = serverConfig.getFirstProperty(AUTHENTICATOR_DISABLED);
        if (isDisabled != null && isDisabled.length() > 0) {
            return Boolean.getBoolean(isDisabled);
        }
        return false;
    }
View Full Code Here


    private static void createDataPublisher(){
        //creating the agent

        ServerConfiguration serverConfig =  CarbonUtils.getServerConfiguration();
        String trustStorePath = serverConfig.getFirstProperty("Security.TrustStore.Location");
        String trustStorePassword = serverConfig.getFirstProperty("Security.TrustStore.Password");
        String bamServerUrl = serverConfig.getFirstProperty("BamServerURL");
        String adminUsername = FasterLookUpDataHolder.getInstance().getDataPubConfig().getBamUsername();
        String adminPassword = FasterLookUpDataHolder.getInstance().getDataPubConfig().getBamPassword();

        System.setProperty("javax.net.ssl.trustStore", trustStorePath);
        System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);
View Full Code Here

    private String hiveTable = "cloudController";
    private FasterLookUpDataHolder dataHolder = FasterLookUpDataHolder.getInstance();
   
    public HiveQueryExecutor() {

        ServerConfiguration serverConfig =  CarbonUtils.getServerConfiguration();
        String bamServerUrl = serverConfig.getFirstProperty("BamServerURL");
        String serviceName = "HiveExecutionService";
        HttpTransportProperties.Authenticator authenticator;
       
        try {
            hiveService = new HiveExecutionServiceStub(bamServerUrl+"/services/"+serviceName);
View Full Code Here

        execHandlerManager.startExec();
        return true;
    }

    private void loadExecutorMap() throws CarbonException {
        ServerConfiguration serverConfiguration = ServerConfiguration.getInstance();
        OMElement documentElement;
        try {
            documentElement = XMLUtils.toOM(serverConfiguration.getDocumentElement());
        } catch (Exception e) {
            String msg = "Unable to read Server Configuration.";
            log.error(msg);
            throw new CarbonException(msg, e);
        }
View Full Code Here

     *
     * @return webcontext name
     */
    public static String getWebContextName() {
        String webContext = "carbon";
        ServerConfiguration sc = ServerConfiguration.getInstance();
        if (sc != null) {
            String value = sc.getFirstProperty("WebContext");
            if (value != null) {
                webContext = value;
            }
        }
        return webContext;
View Full Code Here

TOP

Related Classes of org.wso2.carbon.base.ServerConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.