Package com.xmultra.processor.db.cms.content

Examples of com.xmultra.processor.db.cms.content.CategoryMapping


      ba.setStatus(1);

      // Get all CategoryMapping nodes from article element.
      NodeList catMapNodes = pkgContentElem.getElementsByTagName("CategoryMapping");
Console.displayDev("XmlContentFactory", "CategoryMapping nodes: " + catMapNodes, true, "scb");
      CategoryMapping currentCatMap = null;
      int numCatMapNodes = catMapNodes.getLength();
      // Add all category mappings to the article object.
      for (int i = 0; i < numCatMapNodes; i++) {
        currentCatMap =
            this.getCatMappingFromCatMapElem((Element)catMapNodes.item(i));
View Full Code Here


    return ba;
  }

  private CategoryMapping getCatMappingFromCatMapElem(Element catMapElem)
      throws ParseException {
    CategoryMapping cm = new CategoryMapping();
    cm.setContentTypeId(BasicArticle.CONTENT_TYPE_ID);
    cm.setRank(this.getRankFromCatMap(catMapElem));
    cm.setUserName(this.getUserNameFromCatMap(catMapElem));
    cm.setStartTime(this.getStartTimeFromCatMap(catMapElem));
    cm.setEndTime(this.getEndTimeFromCatMap(catMapElem));
    cm.setCategoryName(this.getCategoryNameFromCatMap(catMapElem));
    cm.setPubName(this.getPubNameFromCatMap(catMapElem));
    cm.setMapToTaxonomy(this.getMapToTaxonomyFromCatMap(catMapElem));
    return cm;
  }
View Full Code Here

        throw new ContentPersistenceExceptions(exceptionArrayList);
      }
      article.setArticleId(articleId);
      if (article.hasCategoryMappings()) {
        Iterator catMaps = article.getCategoryMappings().iterator();
        CategoryMapping currentCm = null;
        while (catMaps.hasNext()) {
          currentCm = (CategoryMapping) catMaps.next();
          try {
            CatMapCSHelper.storeCatMapping(currentCm, con, article.getArticleId());
          }
          catch (SQLException sql) {
            CategoryMappingPersistenceException cmpe =
                new CategoryMappingPersistenceException(sql.getMessage(),
                "Error attempting to create category mapping with category name " +
                currentCm.getCategoryName() + " and article ID " +
                article.getArticleId());
            exceptionArrayList.add(cmpe);
          }
        }
      }
View Full Code Here

TOP

Related Classes of com.xmultra.processor.db.cms.content.CategoryMapping

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.