Foren
How to detect Liferay Portal version
Felix Ashirov, geändert vor 13 Jahren.
How to detect Liferay Portal version
Regular Member Beiträge: 128 Beitrittsdatum: 26.02.10 Neueste Beiträge
Is there any way I can determine which Liferay Portal's version is running.
The goal is to maintain compability of my portlet-plugin with version 5.2.3 and new version 6.0.
The issue arosed because of changed API.
For example, ExpandoTableLocalServiceUtil.getDefaultTable method in version 6.0 requires a companyId that differs from the version 5.2.3
The goal is to maintain compability of my portlet-plugin with version 5.2.3 and new version 6.0.
The issue arosed because of changed API.
For example, ExpandoTableLocalServiceUtil.getDefaultTable method in version 6.0 requires a companyId that differs from the version 5.2.3
Nicolas Muller, geändert vor 13 Jahren.
RE: How to detect Liferay Portal version
Junior Member Beiträge: 57 Beitrittsdatum: 22.02.07 Neueste Beiträge
The table Release_ has the information.
ReleaseLocalServiceUtil.getRelease()
Best regards,
ReleaseLocalServiceUtil.getRelease()
Best regards,
Felix Ashirov, geändert vor 13 Jahren.
RE: How to detect Liferay Portal version
Regular Member Beiträge: 128 Beitrittsdatum: 26.02.10 Neueste Beiträge
Thanks.
ReleaseLocalServiceUtil.getRelease().getBuildNumber()
Felix Ashirov, geändert vor 13 Jahren.
RE: How to detect Liferay Portal version
Regular Member Beiträge: 128 Beitrittsdatum: 26.02.10 Neueste Beiträge
Also can be used ReleaseInfo which has static method getBuildNumber(). This method does not throw any exception instead of ReleaseLocalServiceUtil.getRelease() that is more comfortable