Package com.liferay.portlet

Examples of com.liferay.portlet.ActionRequestImpl


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

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

    //WebAsset webAsset = (WebAsset) req.getAttribute(webKeyEdit);
    com.dotmarketing.portlets.contentlet.model.Contentlet webAsset = (com.dotmarketing.portlets.contentlet.model.Contentlet)req.getAttribute(webKeyEdit);

    ContentletAPI conAPI;
View Full Code Here


public class HostUtil {
 
  public static String hostNameUtil(ActionRequest req, User user) throws DotDataException, DotSecurityException {

    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
    HttpSession session = httpReq.getSession();

    String hostId = (String) session.getAttribute(com.dotmarketing.util.WebKeys.CMS_SELECTED_HOST_ID);

    Host h = null;
View Full Code Here

    
     */
   
    //If it is a new virtual link then we default to selected host
    if (!UtilMethods.isSet(((VirtualLinkForm) form).getInode()) && !UtilMethods.isSet(((VirtualLinkForm) form).getHostId())) {
      ActionRequestImpl reqImpl = (ActionRequestImpl) req;
      HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
      HttpSession session = httpReq.getSession();
          String hostId= (String)session.getAttribute(com.dotmarketing.util.WebKeys.CMS_SELECTED_HOST_ID);
          if(!UtilMethods.isSet(hostId) || hostId.equals("allHosts"))
            ((VirtualLinkForm)form).setHostId("0");
          if((UtilMethods.isSet(hostId) && !hostId.equals("allHosts")) && ((VirtualLinkForm)form).getHostId()==null)
View Full Code Here

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

  }

  public String hostNameUtil(ActionRequest req) {

    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
    HttpSession session = httpReq.getSession();

    String hostId = (String) session.getAttribute(com.dotmarketing.util.WebKeys.CMS_SELECTED_HOST_ID);

    Host h = null;
View Full Code Here

       if(subcmd != null && subcmd.equals("importContentletsResults")){
        HashMap<String, List<String>>results=ImportAuditUtil.loadImportResults(importIdComplete);
        req.setAttribute("importResults", results);
        setForward(req, "portlet.ext.contentlet.import_contentlets_results");
      } else {
        final ActionRequestImpl reqImpl = (ActionRequestImpl) req;
        final HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
        final long importId = ImportAuditUtil.createAuditRecord(user.getUserId(), (String)httpReq.getSession().getAttribute("fileName"));
        Thread t=new Thread() {
          public void run() {
            try {
              Logger.debug(this, "Calling Process File Method");
View Full Code Here

  }

  private void _generatePreview(long importId, ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, byte[] bytes, String[] csvHeaders, CsvReader csvreader, int languageCodeHeaderColumn, int countryCodeHeaderColumn, Reader reader) throws Exception {

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

    httpReq.getSession().setAttribute("file_to_import", bytes);
    httpReq.getSession().setAttribute("form_to_import", form);
View Full Code Here

  private HashMap<String, List<String>> _processFile(long importId,ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, String[] csvHeaders, CsvReader csvreader, int languageCodeHeaderColumn, int countryCodeHeaderColumn, Reader reader)
  throws Exception {

    // wraps request to get session object
    ActionRequestImpl reqImpl = (ActionRequestImpl) req;
    HttpServletRequest httpReq = reqImpl.getHttpServletRequest();
    HttpSession session = httpReq.getSession();
    ImportContentletsForm importForm = (ImportContentletsForm) httpReq.getSession().getAttribute("form_to_import");
    String currentHostId = (String)session.getAttribute(com.dotmarketing.util.WebKeys.CMS_SELECTED_HOST_ID);
     HashMap<String, List<String>> results = ImportUtil.importFile(importId, currentHostId, importForm.getStructure(), importForm.getFields(), false, (importForm.getLanguage() == -1), user, importForm.getLanguage(), csvHeaders, csvreader, languageCodeHeaderColumn, countryCodeHeaderColumn, reader);
     //req.setAttribute("importResults", results);
View Full Code Here

    String cmd = (req.getParameter(Constants.CMD)!=null)? req.getParameter(Constants.CMD) : Constants.EDIT;
    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

    throws Exception {

    try {

            // Getting the http request
            ActionRequestImpl reqImpl = (ActionRequestImpl) req;
            HttpServletRequest httpReq = reqImpl.getHttpServletRequest();

      PortletSession ses = req.getPortletSession();

      String companyId = PortalUtil.getCompanyId(req);
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.