Example usage for com.liferay.portal.kernel.util Constants MERGE

List of usage examples for com.liferay.portal.kernel.util Constants MERGE

Introduction

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

Prototype

String MERGE

To view the source code for com.liferay.portal.kernel.util Constants MERGE.

Click Source Link

Usage

From source file:com.liferay.portlet.assettagadmin.action.EditTagAction.java

License:Open Source License

@Override
public void processAction(ActionMapping mapping, ActionForm form, PortletConfig portletConfig,
        ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {

    JSONObject jsonObject = JSONFactoryUtil.createJSONObject();

    String cmd = ParamUtil.getString(actionRequest, Constants.CMD);

    try {//from   w  w  w  .j a  v  a  2  s .c  om
        if (cmd.equals(Constants.ADD) || cmd.equals(Constants.UPDATE)) {
            jsonObject = updateTag(actionRequest);
        } else if (cmd.equals(Constants.MERGE)) {
            jsonObject = mergeTag(actionRequest);
        }
    } catch (Exception e) {
        jsonObject.putException(e);
    }

    writeJSON(actionRequest, actionResponse, jsonObject);
}