Package com.liferay.portlet

Examples of com.liferay.portlet.ActionRequestImpl


    String[] publishInode = req.getParameterValues("publishInode");

    if (publishInode == null)
      return;

    ActionRequestImpl reqImpl = (ActionRequestImpl) req;

    for (int i = 0; i < publishInode.length; i++) {
      HTMLPage htmlpage = (HTMLPage) InodeFactory.getInode(publishInode[i], HTMLPage.class);

      if (InodeUtils.isSet(htmlpage.getInode())) {
        // calls the asset factory edit
        try {
          PublishFactory.publishAsset(htmlpage, reqImpl.getHttpServletRequest());
          ActivityLogger.logInfo(PublishFactory.class, "Publishing HTMLpage action", "User " + user + " publishing page " + htmlpage.getTitle(), HostUtil.hostNameUtil(req, _getUser(req)));
          SessionMessages.add(reqImpl.getHttpServletRequest(), "message", "message.htmlpage_list.published");
        } catch (WebAssetException wax) {
          Logger.error(this, wax.getMessage(), wax);
          SessionMessages.add(reqImpl.getHttpServletRequest(), "error", "message.webasset.published.failed");
        }
      }
    }

  }
View Full Code Here


        List<UserProxy> userProxies = null;
        if (!UserManagerListBuilderFactory.isFullCommand(req)) {
            String userIds = req.getParameter("users");
            userProxies = UserManagerListBuilderFactory.getUserProxiesFromList(userIds);
        } else {
            ActionRequestImpl reqImpl = (ActionRequestImpl) req;
            HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
            UserManagerListSearchForm userManagerListSearchForm = (UserManagerListSearchForm) httpReq.getSession().getAttribute(
                    WebKeys.USERMANAGERLISTFORM);
            if (userManagerListSearchForm == null)
                userProxies = new ArrayList<UserProxy>();
            else
View Full Code Here

    String cmd = req.getParameter(Constants.CMD);
    String referer = req.getParameter("referer");

    // wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

    if ((referer != null) && (referer.length() != 0)) {
      referer = URLDecoder.decode(referer, "UTF-8");
    }
View Full Code Here

  // this method is implemented again here because it has some differences
  // with cache updates!!!!
  public void _moveWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user) throws Exception {

    // wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

    Logger.debug(this, "I'm moving the web page");

    // gets the current container being edited from the request object
    HTMLPage webAsset = (HTMLPage) req.getAttribute(WebKeys.HTMLPAGE_EDIT);
View Full Code Here

  }

  public void _saveWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user) throws Exception {

    // wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

    // Retreiving the current HTMLPage
    HTMLPage existingHTMLPage = (HTMLPage) req.getAttribute(WebKeys.HTMLPAGE_EDIT);

    boolean previousShowMenu = existingHTMLPage.isShowOnMenu();
View Full Code Here

  }

  public void _copyWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user) throws Exception {

    // wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

    // gets the current template being edited from the request object
    HTMLPage currentHTMLPage = (HTMLPage) req.getAttribute(WebKeys.HTMLPAGE_EDIT);

    // gets folder parent
View Full Code Here

    String cmd = req.getParameter(Constants.CMD);
    String referer = req.getParameter("referer");
   
    //wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

    if ((referer != null) && (referer.length() != 0)) {
      referer = URLDecoder.decode(referer, "UTF-8");
    }
View Full Code Here

    HostAPI hostAPI = APILocator.getHostAPI();
    IdentifierAPI identifierAPI = APILocator.getIdentifierAPI();
   
    //wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

    LinkForm linkForm = (LinkForm) form;
   
    //gets the new information for the link from the request object
    Link link = new Link();
View Full Code Here

  public void _copyWebAsset(ActionRequest req, ActionResponse res,
      PortletConfig config, ActionForm form, User user) throws Exception {

    //wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

    //gets the current template being edited from the request object
    Link currentLink = (Link) req.getAttribute(WebKeys.LINK_EDIT);

    //gets folder parent
View Full Code Here

  }

  private void _publishLinks(ActionRequest req, User user) throws Exception {
   
    String[] publishInode = req.getParameterValues("publishInode");
    ActionRequestImpl reqImpl = (ActionRequestImpl)req;
   
    if (publishInode!=null) {
      for (int i=0;i<publishInode.length;i++) {
        Link link = (Link) InodeFactory.getInode(publishInode[i],Link.class);
   
        if (InodeUtils.isSet(link.getInode())) {
          //calls the asset factory edit
         
          try{
            PublishFactory.publishAsset(link,reqImpl.getHttpServletRequest());
            SessionMessages.add(req, "message", "message.link_list.published");
          }catch(WebAssetException wax){
            Logger.error(this, wax.getMessage(),wax);
            SessionMessages.add(req, "error", "message.webasset.published.failed");
          }
View Full Code Here

TOP

Related Classes of com.liferay.portlet.ActionRequestImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.