Package com.hlcl.rql.as

Examples of com.hlcl.rql.as.PublishingJob


        java.util.List<String> stages = policies.getPagePossibleStagesForUserAndPage();
        System.out.println("  " + stages);

        // check job creation
        PublishingJob job = policies.createPagePublishingJob(stages.get(0), false, false);
        System.out.println("  # mails = " + job.getNumberOfPublishingMails());

        // list project variants
        Set<ProjectVariant> pvs = job.getProjectVariants();
        for (Iterator iterator = pvs.iterator(); iterator.hasNext();) {
          ProjectVariant projectVariant = (ProjectVariant) iterator.next();
          System.out.println("  " + projectVariant.getName());
        }
      }
View Full Code Here


   * Returns the publishing job for page and page config; configured with project- and language variants.
   */
  public PublishingJob createPagePublishingJob(String targetStage, boolean withFollowingPages, boolean withRelatedPages) throws RQLException {

    // prepare job configuration
    PublishingJob result = new PublishingJob(startPage, withFollowingPages, withRelatedPages, jobPackageCheck());
    String[] lvGuids = getJobLanguageVariantGuids();
   
    for (ProjectVariant projectVariant : getJobProjectVariants(targetStage)) {
      for (int i = 0; i < lvGuids.length; i++) {
        String lvGuid = lvGuids[i];
        // never check that user has access to language variant
        result.addToPublish(projectVariant.getProjectVariantGuid(), lvGuid, false);
      }
    }
    return result;
  }
View Full Code Here

    Project project = client.getProject(sessionKey, projectGuid);

    Page currentPg = project.getPageById("34009");
    boolean withFollowingPages = false;
    boolean withRelated = true;
    PublishingJob job = new PublishingJob(currentPg, withFollowingPages, withRelated);

    job.addToPublish("projectVariantGuid1,projectVariantGuid2,projectVariantGuid3", ",", "languageVariantGuid");

//    currentPg.publishAllCombinations(withFollowingPages, "projectVariantGuids", "separator", "languageVariantGuids");
    job.setMailReceiver(client.getConnectedUser());

    job.start();
    job.getNumberOfPublishingMails();
  }
View Full Code Here

TOP

Related Classes of com.hlcl.rql.as.PublishingJob

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.