Created
January 20, 2015 10:32
FactoryConfig Class acts as interface for FactoryConfigConsumerClass
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component(label = "Factory configuration", immediate = true, enabled = true, metatype = true, description = "This is factory configuration which acts as a interface for allowing user to enter property values",policy = ConfigurationPolicy.REQUIRE, configurationFactory = true) | |
@Property(name = "dummy.prop", label = "Dummy property", description = "This is just dummy property", value = "Dummy Value") | |
public class FactoryConfig { | |
private static final Logger LOGGER = LoggerFactory.getLogger(FactoryConfig.class); | |
@Activate | |
public void activate(ComponentContext componentContext) { | |
Dictionary properties = componentContext.getProperties(); | |
String dummyProperty = PropertiesUtil.toString(properties.get("dummy.prop"), ""); | |
LOGGER.info("Read the dummy property value : " + dummyProperty); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment