Examples of ProcessBean


Examples of org.apache.commons.scaffold.util.ProcessBean

        servlet.log(Log.HELPER_PROCESSING,Log.DEBUG);
        Map properties = null;
        for (int i = 0; i < helpers.length; i++) {

                // Get helper instantiated by ancestor
            ProcessBean dataBean = (ProcessBean) helpers[i];

            properties = null;
            if (null!=form) {
                if (form instanceof BaseForm) {

                    BaseForm formBean = (BaseForm) form;

                        // Merge user profile (if found)
                        // and our form into a single map
                    servlet.log(Log.HELPER_POPULATE,Log.DEBUG);
                    properties = formBean.merge(userBean);

                        // Pass up the Locale, RemoteNode, and RemoteServer (if any)
                    dataBean.setLocale(formBean.getSessionLocale());
                    dataBean.setRemoteNode(getRemoteNode(request));
                    dataBean.setRemoteServer(getRemoteServer());
                }
                else {
                    properties = PropertyUtils.describe(form);
                }
            } // end null form
            else if (null!=userBean) {
                    // if no form, but is profile, still use profile
                properties = PropertyUtils.describe(userBean);
            }

                // Execute business logic, using values from  map
            servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);
            ProcessResult result = (ProcessResult)
                dataBean.execute(properties);

                // Analyze result of business logic
            checkOutcome(mapping,request,response,result);

        } // end for
View Full Code Here

Examples of org.apache.commons.scaffold.util.ProcessBean

        String[] tokens = tokenize(mapping.getParameter());
              
            // Create our ProcessBean helper
        Object helper = createHelperObject(request,tokens[0]);
        servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);
        ProcessBean dataBean = (ProcessBean) helper;
       
            // Pass along the helper's parameter, if any
        if (tokens.length>2) {
            dataBean.setParameter(tokens[2]);
        }

        properties = null;
        if (null!=form) {
            if (form instanceof BaseForm) {

                BaseForm formBean = (BaseForm) form;

                    // Merge user profile (if found)
                    // and our form into a single map
                servlet.log(Log.HELPER_POPULATE,Log.DEBUG);
                properties = formBean.merge(userBean);

                    // Pass up the Locale and RemoteServer (if any)
                dataBean.setLocale(formBean.getSessionLocale());
                dataBean.setRemoteServer(getRemoteServer());
            }
            else {
                properties = PropertyUtils.describe(form);
            }
        } // end null form
        else if (null!=userBean) {
                // if no form, but is profile, still use profile
            properties = PropertyUtils.describe(userBean);
        }

            // Execute business logic, using values from  map
        servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);

        Method method = dataBean.getClass().getMethod(tokens[1],types);
        Object args[] = { properties };

        ProcessResult result = null;

        try {
View Full Code Here

Examples of org.apache.commons.scaffold.util.ProcessBean

        servlet.log(Log.HELPER_PROCESSING,Log.DEBUG);
        Map properties = null;
        for (int i = 0; i < helpers.length; i++) {

                // Get helper instantiated by ancestor
            ProcessBean dataBean = (ProcessBean) helpers[i];

            properties = null;
            if (null!=form) {
                if (form instanceof BaseForm) {

                    BaseForm formBean = (BaseForm) form;

                        // Merge user profile (if found)
                        // and our form into a single map
                    servlet.log(Log.HELPER_POPULATE,Log.DEBUG);
                    properties = formBean.merge(userBean);

                        // Pass up the Locale, RemoteNode, and RemoteServer (if any)
                    dataBean.setLocale(formBean.getSessionLocale());
                    dataBean.setRemoteNode(getRemoteNode(request));
                    dataBean.setRemoteServer(getRemoteServer());
                }
                else {
                    properties = PropertyUtils.describe(form);
                }
            } // end null form
            else if (null!=userBean) {
                    // if no form, but is profile, still use profile
                properties = PropertyUtils.describe(userBean);
            }

                // Execute business logic, using values from  map
            servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);
            ProcessResult result = (ProcessResult)
                dataBean.execute(properties);

                // Analyze result of business logic
            checkOutcome(mapping,request,result);

        } // end for
View Full Code Here

Examples of org.apache.commons.scaffold.util.ProcessBean

        String[] tokens = tokenize(mapping.getParameter());
              
            // Create our ProcessBean helper
        Object helper = createHelperObject(request,tokens[0]);
        servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);
        ProcessBean dataBean = (ProcessBean) helper;
       
            // Pass along the helper's parameter, if any
        if (tokens.length>2) {
            dataBean.setParameter(tokens[2]);
        }

        properties = null;
        if (null!=form) {
            if (form instanceof BaseForm) {

                BaseForm formBean = (BaseForm) form;

                    // Merge user profile (if found)
                    // and our form into a single map
                servlet.log(Log.HELPER_POPULATE,Log.DEBUG);
                properties = formBean.merge(userBean);

                    // Pass up the Locale and RemoteServer (if any)
                dataBean.setLocale(formBean.getSessionLocale());
                dataBean.setRemoteServer(getRemoteServer());
            }
            else {
                properties = PropertyUtils.describe(form);
            }
        } // end null form
        else if (null!=userBean) {
                // if no form, but is profile, still use profile
            properties = PropertyUtils.describe(userBean);
        }

            // Execute business logic, using values from  map
        servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);

        Method method = dataBean.getClass().getMethod(tokens[1],types);
        Object args[] = { properties };

        ProcessResult result = null;

        try {
View Full Code Here

Examples of org.apache.commons.scaffold.util.ProcessBean

        servlet.log(Log.HELPER_PROCESSING,Log.DEBUG);
        Map properties = null;
        for (int i = 0; i < helpers.length; i++) {

                // Get helper instantiated by ancestor
            ProcessBean dataBean = (ProcessBean) helpers[i];

            properties = null;
            if (null!=form) {
                if (form instanceof BaseForm) {

                    BaseForm formBean = (BaseForm) form;

                        // Merge user profile (if found)
                        // and our form into a single map
                    servlet.log(Log.HELPER_POPULATE,Log.DEBUG);
                    properties = formBean.merge(userBean);

                        // Pass up the Locale, RemoteNode, and RemoteServer (if any)
                    dataBean.setLocale(formBean.getSessionLocale());
                    dataBean.setRemoteNode(getRemoteNode(request));
                    dataBean.setRemoteServer(getRemoteServer());
                }
                else {
                    properties = PropertyUtils.describe(form);
                }
            } // end null form
            else if (null!=userBean) {
                    // if no form, but is profile, still use profile
                properties = PropertyUtils.describe(userBean);
            }

                // Execute business logic, using values from  map
            servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);
            ProcessResult result = (ProcessResult)
                dataBean.execute(properties);

                // Analyze result of business logic
            checkOutcome(mapping,request,response,result);

        } // end for
View Full Code Here

Examples of org.apache.commons.scaffold.util.ProcessBean

        String[] tokens = tokenize(mapping.getParameter());
              
            // Create our ProcessBean helper
        Object helper = createHelperObject(request,tokens[0]);
        servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);
        ProcessBean dataBean = (ProcessBean) helper;
       
            // Pass along the helper's parameter, if any
        if (tokens.length>2) {
            dataBean.setParameter(tokens[2]);
        }

        properties = null;
        if (null!=form) {
            if (form instanceof BaseForm) {

                BaseForm formBean = (BaseForm) form;

                    // Merge user profile (if found)
                    // and our form into a single map
                servlet.log(Log.HELPER_POPULATE,Log.DEBUG);
                properties = formBean.merge(userBean);

                    // Pass up the Locale and RemoteServer (if any)
                dataBean.setLocale(formBean.getSessionLocale());
                dataBean.setRemoteServer(getRemoteServer());
            }
            else {
                properties = PropertyUtils.describe(form);
            }
        } // end null form
        else if (null!=userBean) {
                // if no form, but is profile, still use profile
            properties = PropertyUtils.describe(userBean);
        }

            // Execute business logic, using values from  map
        servlet.log(Log.HELPER_EXECUTING,Log.DEBUG);

        Method method = dataBean.getClass().getMethod(tokens[1],types);
        Object args[] = { properties };

        ProcessResult result = null;

        try {
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.ProcessBean

          contentVersionVOListForApproval.add(contentVersionVO);
        }
      }
    }

    ProcessBean processBean = ProcessBean.createProcessBean(ViewListSiteNodeVersionAction.class.getName(), "" + getInfoGluePrincipal().getName());
    SiteNodeVersionController.getController().getSiteNodeAndAffectedItemsRecursive(siteNodeId, SiteNodeVersionVO.WORKING_STATE, siteNodeVersionVOList, contentVersionVOList, false, false, this.getInfoGluePrincipal(), processBean, getLocale(), -1);
   
    this.getResponse().setContentType("text/plain");
    this.getResponse().setCharacterEncoding("UTF-8");
    if(latestVersion.getStateId().intValue() == SiteNodeVersionVO.PUBLISH_STATE)
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.ProcessBean

            {
              Timer t = new Timer();
              Set<SiteNodeVersionVO> siteNodeVersionVOList = new HashSet<SiteNodeVersionVO>();
              Set<ContentVersionVO> contentVersionVOList = new HashSet<ContentVersionVO>();
             
              ProcessBean processBean = ProcessBean.createProcessBean(ViewListSiteNodeVersionAction.class.getName(), "" + infogluePrincipal.getName());
              SiteNodeVersionController.getController().getSiteNodeAndAffectedItemsRecursive(vo.getId(), SiteNodeVersionVO.WORKING_STATE, siteNodeVersionVOList, contentVersionVOList, false, false, infogluePrincipal, processBean, masterLanguageVO.getLocale(), -1);
              if(siteNodeVersionVOList.size() > 0 || contentVersionVOList.size() > 0)
                node.getParameters().put("stateId", "0");
              else
                node.getParameters().put("stateId", "" + vo.getStateId());
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.ProcessBean

    StringBuffer sb = new StringBuffer();
    sb.append("<html><head><style>body {font-family: arial; font-size: 11px;}</style></head><body>");
   
    try
    {
      ProcessBean processBean = getProcessBean();
      if(processBean != null && processBean.getStatus() != ProcessBean.FINISHED)
      {
        sb.append("<h2>" + getLocalizedString(getLocale(), "tool.structuretool.publicationProcess.publicationProcessInfo") + "</h2>");

        sb.append("<ol>");
        for(String event : processBean.getProcessEvents())
          sb.append("<li>" + event + "</li>");
        sb.append("</ol>");
        sb.append("<div style='position: absolute; top:10px; right: 10px;'><img src='images/v3/loadingAnimation.gif' /></div>");
      }
      else
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.ProcessBean

      return "inputV3";
  }

  public String doInputChooseContents() throws Exception
  {
    ProcessBean processBean = ProcessBean.createProcessBean(UnpublishContentVersionAction.class.getName(), "" + getInfoGluePrincipal().getName());
    processBean.setStatus(ProcessBean.RUNNING);

    try
    {
      if(this.contentId != null)
      {
          ContentVO contentVO = ContentController.getContentController().getContentVOWithId(this.contentId);
          this.repositoryId = contentVO.getRepositoryId();
         
        AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
     
        Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(contentId);
        if(protectedContentId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.SubmitToPublish", protectedContentId.toString()))
          ceb.add(new AccessConstraintException("Content.contentId", "1005"));
       
        ceb.throwIfNotEmpty();
 
        processBean.updateProcess("Getting child contents available for unpublish");
       
        contentVOList = ContentController.getContentController().getContentVOWithParentRecursive(contentId, processBean);
      }
    }
    finally
    {
      processBean.setStatus(ProcessBean.FINISHED);
      processBean.removeProcess();
    }

      return "inputChooseContents";
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.