Example usage for com.liferay.portal.kernel.plugin Version includes

List of usage examples for com.liferay.portal.kernel.plugin Version includes

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.plugin Version includes.

Prototype

public boolean includes(Version version) 

Source Link

Usage

From source file:com.liferay.portlet.softwarecatalog.service.impl.SCProductEntryLocalServiceImpl.java

License:Open Source License

protected boolean isVersionSupported(String version, List<SCFrameworkVersion> frameworkVersions) {

    Version currentVersion = Version.getInstance(version);

    for (SCFrameworkVersion frameworkVersion : frameworkVersions) {
        Version supportedVersion = Version.getInstance(frameworkVersion.getName());

        if (supportedVersion.includes(currentVersion)) {
            return true;
        }/*ww  w  .j  ava2s  .  co m*/
    }

    return false;
}