Reputation: 1188
How can a plugin's code get access to the properties set in its own liferay-plugin-package.properties file?
Upvotes: 2
Views: 857
Reputation: 3465
You can use DeployManagerUtil
First import the following:
import com.liferay.portal.kernel.deploy.DeployManagerUtil;
import com.liferay.portal.kernel.plugin.PluginPackage;
Second use it:
PluginPackage pluginPackage = DeployManagerUtil.getInstalledPluginPackage("context-name");
String version = pluginPackage.getModuleId();
String pageURL = pluginPackage.getPageURL();
Upvotes: 3