All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.server.AbstractDeploymentConfiguration Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2024 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.server;

/**
 * An abstract base class for DeploymentConfiguration implementations. This
 * class provides default implementation for common config properties.
 *
 * @since 7.4
 *
 * @author Vaadin Ltd
 */
public abstract class AbstractDeploymentConfiguration
        implements DeploymentConfiguration {

    @Override
    public String getUIClassName() {
        return getApplicationOrSystemProperty(VaadinSession.UI_PARAMETER, null);
    }

    @Override
    public String getUIProviderClassName() {
        return getApplicationOrSystemProperty(
                Constants.SERVLET_PARAMETER_UI_PROVIDER, null);
    }

    @Override
    public int getUIProviderPriority() {
        int prio = 0;
        try {
            prio = Integer.parseInt(getApplicationOrSystemProperty(
                    Constants.SERVLET_PARAMETER_UI_PRIORITY, "0"));
        } catch (NumberFormatException ex) {
        }
        return prio;
    }

    @Override
    public String getWidgetset(String defaultValue) {
        return getApplicationOrSystemProperty(Constants.PARAMETER_WIDGETSET,
                defaultValue);
    }

    @Override
    public String getResourcesPath() {
        return getApplicationOrSystemProperty(
                Constants.PARAMETER_VAADIN_RESOURCES, null);
    }

    @Override
    public String getClassLoaderName() {
        return getApplicationOrSystemProperty("ClassLoader", null);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy