Example usage for com.liferay.portal.kernel.util GetterUtil DEFAULT_LONG

List of usage examples for com.liferay.portal.kernel.util GetterUtil DEFAULT_LONG

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util GetterUtil DEFAULT_LONG.

Prototype

long DEFAULT_LONG

To view the source code for com.liferay.portal.kernel.util GetterUtil DEFAULT_LONG.

Click Source Link

Document

The default long value is #DEFAULT_LONG .

Usage

From source file:com.liferay.exportimport.staging.LayoutStagingImpl.java

License:Open Source License

@Override
public boolean prepareLayoutStagingHandler(PortletDataContext portletDataContext, Layout layout) {

    boolean exportLAR = MapUtil.getBoolean(portletDataContext.getParameterMap(), "exportLAR");

    if (exportLAR || !LayoutStagingUtil.isBranchingLayout(layout)) {
        return true;
    }/* w ww  . j a va  2s.c om*/

    long layoutSetBranchId = MapUtil.getLong(portletDataContext.getParameterMap(), "layoutSetBranchId");

    if (layoutSetBranchId <= 0) {
        return false;
    }

    LayoutRevision layoutRevision = null;

    List<LayoutRevision> layoutRevisions = _layoutRevisionLocalService.getLayoutRevisions(layoutSetBranchId,
            layout.getPlid(), true);

    if (!layoutRevisions.isEmpty()) {
        if (layoutRevisions.size() > 1) {
            layoutRevision = getLayoutRevision(layout);

            long layoutBranchId = GetterUtil.DEFAULT_LONG;

            if (layoutRevision != null) {
                layoutBranchId = layoutRevision.getLayoutBranchId();
            }

            layoutRevision = _layoutRevisionLocalService.fetchLayoutRevision(layoutSetBranchId, layoutBranchId,
                    true, layout.getPlid());
        }

        if ((layoutRevision == null) && !layoutRevisions.isEmpty()) {
            layoutRevision = layoutRevisions.get(0);
        }
    }

    if (layoutRevision == null) {
        return false;
    }

    LayoutStagingHandler layoutStagingHandler = LayoutStagingUtil.getLayoutStagingHandler(layout);

    layoutStagingHandler.setLayoutRevision(layoutRevision);

    return true;
}

From source file:com.liferay.lms.service.impl.AuditEntryLocalServiceImpl.java

License:Open Source License

public void addAuditEntry(long companyId, long groupId, String className, long classPK, long userId,
        String action, String extraData) throws SystemException {
    addAuditEntry(companyId, groupId, className, classPK, GetterUtil.DEFAULT_LONG, userId, action, extraData);
}

From source file:com.liferay.lms.service.impl.AuditLoggerLocalServiceImpl.java

License:Open Source License

public void audit(long companyId, long groupId, String className, long classPK, long userId, String action,
        String extraData) throws SystemException {
    audit(companyId, groupId, className, classPK, GetterUtil.DEFAULT_LONG, userId, action, extraData);
}