Package org.apache.lenya.cms.task

Examples of org.apache.lenya.cms.task.ExecutionException


            }

        } catch (ExecutionException e) {
            throw e;
        } catch (Exception e) {
            throw new ExecutionException(e);
        }

    }
View Full Code Here


        SiteTree tree = getPublication().getTree(liveDocument.getArea());
        SiteTreeNode node = tree.getNode(liveDocument.getId());

        if (node == null) {
            throw new ExecutionException(
                "Sitetree node for document [" + liveDocument + "] does not exist!");
        }

        Label label = node.getLabel(liveDocument.getLanguage());

        if (label == null) {
            throw new ExecutionException(
                "Sitetree label for document [" + liveDocument + "] does not exist!");
        }

        if (node.getLabels().length == 1 && node.getChildren().length > 0) {
            if (log.isDebugEnabled()) {
View Full Code Here

    Publication publication;
    try {
      publication = PublicationFactory.getPublication(objectModel);
    } catch (PublicationException e) {
      throw new ExecutionException(e);
    }
    Request request = ObjectModelHelper.getRequest(objectModel);

    setNotifying(request);

    Parameters taskParameters = extractTaskParameters(parameters, publication, request);
    getTaskParameters().parameterize(taskParameters);

    String taskId = request.getParameter(TaskWrapperParameters.TASK_ID);
    taskId = parameters.getParameter(TaskWrapperParameters.TASK_ID, taskId);

    String webappUrl = ServletHelper.getWebappURI(request);
    initialize(taskId, publication, webappUrl, taskParameters);

    String eventName = request.getParameter(WorkflowInvoker.EVENT_REQUEST_PARAMETER);
    if (eventName == null) {
      eventName = request.getParameter(WorkflowInvoker.LENYA_EVENT_REQUEST_PARAMETER);
    }
    if (eventName != null) {
      Session session = request.getSession(false);
      if (session == null) {
        log.debug("No session found - not enabling workflow handling.");
      } else {
        Identity identity = Identity.getIdentity(session);
        if (identity == null) {
          log.debug("No identity found - not enabling workflow handling.");
        } else {
          log.debug("Identity found - enabling workflow handling.");
          Role[] roles;
          try {
            roles = PolicyAuthorizer.getRoles(request);
          } catch (AccessControlException e) {
            throw new ExecutionException(e);
          }
          setWorkflowAware(eventName, identity, roles);
        }
      }
    }
View Full Code Here

            project.executeTarget(target);
           
        }
        catch (BuildException e) {
            error = e;
            throw new ExecutionException(e);
        }
        finally {
            project.fireBuildFinished(error);
        }
    }
View Full Code Here

                PARAMETER_LOGFILE, getDefaultLogFile(publicationDirectory).getAbsolutePath());
            logFile = new File(logFilename);
           
        }
        catch (ParameterException e) {
            throw new ExecutionException(e);
        }
       
        executeAntTarget(servletContextPath, publicationId, publicationDirectory, buildFile, target, arguments, properties, logFile);
       
    }
View Full Code Here

            export(new URL(serverURI), serverPort, publicationPath,
                getParameters().getParameter(PublishingEnvironment.PARAMETER_EXPORT_PATH), uris,
                getParameters().getParameter(PublishingEnvironment.PARAMETER_SUBSTITUTE_REGEXP),
                getParameters().getParameter(PublishingEnvironment.PARAMETER_SUBSTITUTE_REPLACEMENT));
        } catch (Exception e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

                getParameters().getParameter(PublishingEnvironment.PARAMETER_TREE_LIVE_PATH),
                getParameters().getParameter(ResourcePublishingEnvironment.PARAMETER_RESOURCE_LIVE_PATH),
                getParameters().getParameter(PublishingEnvironment.PARAMETER_REPLICATION_PATH),
                sources);
        } catch (Exception e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

                getParameters().getParameter(PublishingEnvironment.PARAMETER_TREE_LIVE_PATH),
                null,
                getParameters().getParameter(PublishingEnvironment.PARAMETER_REPLICATION_PATH),
                sources);
        } catch (Exception e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

            export(new URL(serverURI), serverPort, publicationPath,
                getParameters().getParameter(PublishingEnvironment.PARAMETER_EXPORT_PATH), uris,
                getParameters().getParameter(PublishingEnvironment.PARAMETER_SUBSTITUTE_REGEXP),
                getParameters().getParameter(PublishingEnvironment.PARAMETER_SUBSTITUTE_REPLACEMENT));
        } catch (Exception e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

                getParameters().getParameter(PublishingEnvironment.PARAMETER_TREE_LIVE_PATH),
                getParameters().getParameter(ResourcePublishingEnvironment.PARAMETER_RESOURCE_LIVE_PATH),
                getParameters().getParameter(PublishingEnvironment.PARAMETER_REPLICATION_PATH),
                sources);
        } catch (Exception e) {
            throw new ExecutionException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.task.ExecutionException

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.