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

com.vaadin.server.osgi.BootstrapContribution 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.osgi;

import java.util.ArrayList;
import java.util.List;

import org.osgi.service.component.annotations.Component;

import com.vaadin.osgi.resources.OsgiVaadinContributor;
import com.vaadin.osgi.resources.OsgiVaadinResource;

/**
 * OSGi service component registering bootstrap JS as published resources in
 * OSGi environments.
 *
 * @author Vaadin Ltd
 * @since 8.1
 */
@Component
public class BootstrapContribution implements OsgiVaadinContributor {
    private static final String[] RESOURCES = { "vaadinBootstrap.js",
            "vaadinBootstrap.js.gz" };

    @Override
    public List getContributions() {
        final List contributions = new ArrayList<>(
                RESOURCES.length);
        for (final String resource : RESOURCES) {
            contributions.add(OsgiVaadinResource.create(resource));
        }
        return contributions;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy