Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.CategoryVO


  {
    logger.info("We want to create a list of categories if not existing under the parent category " + parentCategory);
    Iterator categoryIterator = categories.iterator();
    while(categoryIterator.hasNext())
    {
      CategoryVO categoryVO = (CategoryVO)categoryIterator.next();
      CategoryVO newParentCategory = null;
     
      List<CategoryVO> existingCategories = null;
      if(parentCategory != null)
      {
        existingCategories = CategoryController.getController().getActiveCategoryVOListByParent(parentCategory.getCategoryId(), db);//.getActiveByParent(parentCategory.getCategoryId(), db);
        //existingCategories = CategoryController.getController().findByParent(parentCategory.getCategoryId(), db);
        logger.info("existingCategories 1:" + existingCategories);
      }
      else
      {
        existingCategories = CategoryController.getController().findRootCategoryVOList(db);
        logger.info("existingCategories 2:" + existingCategories);
      }
     
      Iterator<CategoryVO> existingCategoriesIterator = existingCategories.iterator();
      while(existingCategoriesIterator.hasNext())
      {
        Object candidate = existingCategoriesIterator.next();
        logger.info("candidate:" + candidate.getClass().getName() + ":" + candidate);
        CategoryVO existingCategory = (CategoryVO)candidate; //existingCategoriesIterator.next();
        logger.info("existingCategory:" + existingCategory.getName());
        if(existingCategory.getName().equals(categoryVO.getName()))
        {
          logger.info("Existed... setting " + existingCategory.getName() + " to new parent category.");
          newParentCategory = existingCategory;
          break;
        }
      }
View Full Code Here


  /**
   * Implemented for BaseController
   */
  public BaseEntityVO getNewVO()
  {
    return new CategoryVO();
  }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.CategoryVO

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.