Ejemplo n.º 1
0
  @Override
  public void processAction(ActionRequest req, ActionResponse res)
      throws IOException, PortletException {
    // TODO Auto-generated method stub
    String cmd = ParamUtil.getString(req, Constants.CMD);
    String id = ParamUtil.getString(req, "clipId");
    try {
      if (cmd.equals(ConstantsExt.HITCOUNT)) {
        ClipServiceUtil.increaseHitCount(id);
      }
      if (cmd.equals(ConstantsExt.HITCOUNTVIEW)) {
        ClipServiceUtil.increaseHitCountView(id);
      }
    } catch (Exception ex) {

    }
    super.processAction(req, res);
  }
  @Override
  public void processAction(ActionRequest actionRequest, ActionResponse actionResponse)
      throws PortletException {

    try {
      String actionName = ParamUtil.getString(actionRequest, ActionRequest.ACTION_NAME);

      if (actionName.equals("deleteEntry")) {
        deleteEntry(actionRequest, actionResponse);
      } else if (actionName.equals("saveEntry")) {
        saveEntry(actionRequest, actionResponse);
      } else {
        super.processAction(actionRequest, actionResponse);
      }
    } catch (Exception e) {
      throw new PortletException(e);
    }
  }