Example usage for com.liferay.portal.kernel.service ResourceActionLocalServiceUtil fetchResourceAction

List of usage examples for com.liferay.portal.kernel.service ResourceActionLocalServiceUtil fetchResourceAction

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service ResourceActionLocalServiceUtil fetchResourceAction.

Prototype

public static com.liferay.portal.kernel.model.ResourceAction fetchResourceAction(String name, String actionId) 

Source Link

Usage

From source file:jorgediazest.indexchecker.model.IndexCheckerModelQuery.java

License:Open Source License

protected long getActionIdBitwiseValue(String name, String actionId) throws PortalException {

    String key = name + "_" + actionId;

    Long bitwiseValue = cacheActionIdBitwiseValue.get(key);

    if (bitwiseValue == null) {
        ResourceAction resourceAction = ResourceActionLocalServiceUtil.fetchResourceAction(name, actionId);

        if (resourceAction == null) {
            bitwiseValue = 0L;//from  ww  w  . j a  va 2  s.  c o  m
        } else {
            bitwiseValue = resourceAction.getBitwiseValue();
        }

        cacheActionIdBitwiseValue.put(key, bitwiseValue);
    }

    return bitwiseValue;
}