GithubHelp home page GithubHelp logo

isabella232 / sling-org-apache-sling-feature-r2f Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/sling-org-apache-sling-feature-r2f

0.0 0.0 0.0 20 KB

Apache Sling Feature Model Runtime Creator

Home Page: https://sling.apache.org/

License: Apache License 2.0

Java 100.00%

sling-org-apache-sling-feature-r2f's Introduction

Apache Sling

Build Status Coverage Sonarcloud Status JavaDoc Maven Central feature License

Running Feature

This is a simple OSGi service which is able to convert, given a BundleContext instance, a currently running OSGi container to an Apache Sling Feature Model definition.

APIs are really simple: it is necessary first to obtain the RuntimeEnvironment2FeatureModel instance from the OSGi Service Registry, then

import org.apache.sling.feature.r2f.*;

@Reference
RuntimeEnvironment2FeatureModel generator;

...
Feature runtimeFeature = generator.getRunningFeature();

Please Note

Currently version will include in the generated Feature Model bundles and configurations only, which are the only informations that can be extracted from a BundleContext instance.

Launch Feature

The RuntimeEnvironment2FeatureModel OSGi service is also able to retrieve the (assembled) Feature used to launch the platform:

import org.apache.sling.feature.r2f.*;

@Reference
RuntimeEnvironment2FeatureModel generator;

...
Feature launchFeature = generator.getLaunchFeature();

## Upgrade Feature

The RuntimeEnvironment2FeatureModel OSGi service is also able to compute the upgrade Feature which prototypes from the Feature used to launch the platform and that targets the runtime Feature:

import org.apache.sling.feature.r2f.*;

@Reference
RuntimeEnvironment2FeatureModel generator;

...
Feature launchFeature = generator.getLaunch2RuntimeUpgradingFeature();

The effective Runtime Feature

Finally, the RuntimeEnvironment2FeatureModel OSGi service is also able to compute the real runtime Feature which is assembled from the Feature used to launch the platform and that targets the runtime Feature:

import org.apache.sling.feature.r2f.*;

@Reference
RuntimeEnvironment2FeatureModel generator;

...
Feature launchFeature = generator.getLaunch2RuntimeUpgradingFeature();

sling-org-apache-sling-feature-r2f's People

Contributors

bdelacretaz avatar klcodanr avatar raducotescu avatar simonetripodi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.