Package com.hlcl.rql.as

Examples of com.hlcl.rql.as.Project


//
//      CmsClient client = new CmsClient(logonGuid);
//      Project project = client.getProject(sessionKey, projectGuid);
     
      client = new CmsClient(new PasswordAuthentication("testuser_compass", "testuser368"));
      Project project = client.getProjectByName("hip.hlcl.com");
      System.out.println(client.getConnectedUser().getName());

      // check different pages
      String[] pageIds = {"127290", "624522", "656879", "7375"};
      for (int i = 0; i < pageIds.length; i++) {
        Page startPg = project.getPageById(pageIds[i]);
        System.out.println(startPg.getInfoText());
       
        // build helper class
        PublishPagePolicies policies = new PublishPagePolicies(startPg);
//        System.out.println(policies.getPageProjectVariantNameSuffixes());
View Full Code Here


      String logonGuid="69322821E01E49A9A50CF20E382C6CA2";
      String sessionKey="FB46C0BE11BE48CD8645D17E381851D3";
      String projectGuid="06BE79A1D9F549388F06F6B649E27152";

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

      Page startPg = project.getPageById("27007");

      // prepare action
      Class.forName("org.hsqldb.jdbcDriver");
      Connection connection = DriverManager.getConnection("jdbc:hsqldb:mem:cacpat", "sa", "");
      String[] skipSuffixes = {"_fragment"};
      ContentAreaCollectorPageAction action = new ContentAreaCollectorPageAction(connection, "cacpat", skipSuffixes, "company");

      // 1. add all
      PageArrayList children = startPg.getListChildPages("content_pages_list");
      for (Iterator iterator = children.iterator(); iterator.hasNext();) {
        Page child = (Page) iterator.next();
        action.invoke(child);
      }
     
      // 2. add some with different content area
      action.setContentAreaName("business_administration");
      // already existing pages
      action.invoke(project.getPageById("161"));
      action.invoke(project.getPageById("713"));
      // new page
      action.invoke(project.getPageById("27001"));

      // 3. retrieve save values
      while(action.nextPage()) {
        System.out.printf("%s\t%s\t%s\t%s\n", action.getCurrentPageGuid(), action.getCurrentPageId(), action.getCurrentPageHeadline(), action.getCurrentPageContentAreas());
      }
View Full Code Here

  /**
   * Returns the responsibility departments pages (cached within project).
   */
  public PageArrayList getResponsibleDepartments() throws RQLException {
    Project project = getProject();
    String responsiblityPagesCacheId = getResponsiblityPagesCacheId();
    PageArrayList rowPages = project.getPages(responsiblityPagesCacheId);
    if (rowPages == null) {
      // get row pages
      com.hlcl.rql.as.List departmentsList = getDepartmentsTableList();
      rowPages = departmentsList.getChildPages();
      // cache within project
      project.putPages(responsiblityPagesCacheId, rowPages);
    }
    return rowPages;
  }
View Full Code Here

  private void readTableDataFromCms() throws RQLException {
    CmsClient client = null;
    try {
      // login
      client = new CmsClient(new PasswordAuthentication(getUserName(), getPassword()));
      Project project = client.getProjectByName(getProjectName());

      // prepare parameters
      ScriptParameters parms = project.getParameters(getParmPageId());

      // remember in instance to steer next refresh
      refreshIntervalInMinutes = Integer.parseInt(parms.get("refreshIntervalInMinutes"));

      // get row pages
      Page tablePg = project.getPageById(parms.get("responsibleTablePageId"));
      PageArrayList rowPages = tablePg.getListChildPages(parms.get("departmentsListTmpltElemName"));

      // get all data and save within data holder rows
      responsibleDepartments = new ArrayList<ResponsibleTableRow>(rowPages.size());
      for (Iterator iterator = rowPages.iterator(); iterator.hasNext();) {
View Full Code Here

    String logonGuid = "0B1FBC04A6D94A45A6C5E2AC8915B698";
    String sessionKey = "C26CF959E1434E31B7F9DA89829369B4";
    String projectGuid = "73671509FA5C43ED8FC4171AD0298AD2";

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

    Page currentPg = project.getPageById("34009");

    // check page state
    currentPg.isInStateWaitingToBeTranslated();
    System.out.println(currentPg.getStateInfo());

    // translation editor action: do not translate
    currentPg.doNotTranslateFromMainToCurrent();
   
    // do not translate from main to de
    LanguageVariant targetLanguageVariant = project.getLanguageVariantByRfcLanguageId("de");
    currentPg.doNotTranslateFromMainTo(targetLanguageVariant);
   
    // do not translate, very flexible
    LanguageVariant sourceLanguageVariant = project.getLanguageVariantByRfcLanguageId("en");
    currentPg.doNotTranslate(sourceLanguageVariant, targetLanguageVariant);
  }
View Full Code Here

    String logonGuid = "43321CA565FC4D91ACFD3F3E4AB2D92B";
    String sessionKey = "840BC272ED864906BB44E86F60A1B81B";
    String projectGuid = "73671509FA5C43ED8FC4171AD0298AD2";

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

    // input values
    PublishingTarget[] targets = new PublishingTarget[4];
    targets[0] = project.getPublishingTargetByNameStartsWith("WORK_");
    targets[1] = project.getPublishingTargetByNameStartsWith("DEVE_");
    targets[2] = project.getPublishingTargetByNameStartsWith("TEST_");
    targets[3] = project.getPublishingTargetByNameStartsWith("PROD_");

    PublicationPackage publPackage = project.getPublicationPackageByName("publ_pages_to_about_us");
    for (PublicationSetting combination : publPackage.getPublicationSettings()) {
      String pvStage = combination.getProjectVariantName().substring(0, 4);

      // add all targets until given stage
      for (int i = 0; i < targets.length; i++) {
View Full Code Here

    String logonGuid = "0B1FBC04A6D94A45A6C5E2AC8915B698";
    String sessionKey = "C26CF959E1434E31B7F9DA89829369B4";
    String projectGuid = "73671509FA5C43ED8FC4171AD0298AD2";

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

    Template template = project.getTemplateByName("content_templates", "field_page");

    Page currentPg = project.getPageById("34009");
    Page fieldPg = currentPg.createAndConnectPageAtList("fields_list", template, "new field page", true);
  }
View Full Code Here

      client = new CmsClient(new PasswordAuthentication(user, pw));

      for (int i = 0; i < projectNames.length; i++) {
        String projectName = projectNames[i];
        Project project = client.getProjectByName(projectName);

        // do what you want
      }
    } catch (RQLException ex) {
      String error = "";
View Full Code Here

    String logonGuidOld = "EF103F2989C94BCEBBC189427F9E6729";
    String sessionKeyOld = "6F4929F495D04A779F07587E1B294A6D";
    String projectGuidOld = "5256C671655D4CE696F663C73CE3E526";

    CmsClient clientOld = new CmsClient(logonGuidOld);
    Project projectOld = clientOld.getProject(sessionKeyOld, projectGuidOld);

    String logonGuid = "D714CF042F3749DFA13298E489552468";
    String sessionKey = "C463987D1AAA4F1E9C7B394CD485B7AE";
    String projectGuid = "73671509FA5C43ED8FC4171AD0298AD2";

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

    Page sourcePg = projectOld.getPageById("old page id");
    PageArrayList listChildren = sourcePg.getListChildPages("fields_list");

    Page targetPg = project.getPageById("new page id");

    for (int i = 0; i < listChildren.size(); i++) {
      Page childPage = listChildren.getPage(i);

    }
View Full Code Here

    String logonGuid = "8009AB61D06844F48077A9E4D4880A20";
    String sessionKey = "C63373D9DB394B94BBAD66106540A123";
    String projectGuid = "73671509FA5C43ED8FC4171AD0298AD2";

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

    // input value
    String subFolderName = "about_us";

    PublicationPackage pubPackage = project.getPublicationPackageByName("publ_pages_to_" + subFolderName);
    java.util.List<PublicationSetting> settings = pubPackage.getPublicationSettings();

    for (PublicationSetting setting : settings) {
      System.out.println(setting.getName());
      String settingName = setting.getName();

      // skip display_do_not_use* project variant
      if (settingName.indexOf("do_not_use") > 0) {
        continue;
      }

      // 1. determine root folder by pv
      PublicationFolder targetFolder = null;
      if (settingName.indexOf("pages_html") > 0 || settingName.indexOf("viewlabels") > 0) {
        targetFolder = project.getPublicationRootFolderByName("docRoot");
      }
      if (settingName.indexOf("page_config_xml") > 0) {
        targetFolder = project.getPublicationRootFolderByName("pageConfig");
      }

      // 2. crawl to folder by lv
      System.out.println("  " + setting.getLanguageVariant().getRfcLanguageId());
      targetFolder = targetFolder.getChildByName(setting.getLanguageVariant().getRfcLanguageId());
View Full Code Here

TOP

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

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.