I have a configuration interface defined with annotation
@ExtendedObjectClassDefinition(
category = "logging",
scope = ExtendedObjectClassDefinition.Scope.COMPANY
)
so that I can configure liferay instances separately. How can I retreive the configuration in my code?
I tried using
ConfigurableUtil.createConfigurable(MyConfig.class, properties)
in my activate method, however it only receives the system wide configuration values.
To figure this out, I always grep Liferay's source, in this case for
ExtendedObjectClassDefinition.Scope.COMPANY, and see how it is used.One sample (second order, the configuration in question is AWSTranslatorConfiguration) from AWSTranslator - see the isEnabled method:
Key is: In order to get the scoped value, you'll definitely need to provide the scope - in this case the
companyId.