Examples of CategoryVO


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);
        //existingCategories = CategoryController.getController().findByParent(parentCategory.getCategoryId(), db);
      else
        existingCategories = CategoryController.getController().findRootCategoryVOList(db);
       
      Iterator<CategoryVO> existingCategoriesIterator = existingCategories.iterator();
      while(existingCategoriesIterator.hasNext())
      {
        CategoryVO existingCategory = 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

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

  private List categoryVOListToCategoryList(final List categoryVOList) throws Exception
  {
    final List result = new ArrayList();
    for(Iterator i=categoryVOList.iterator(); i.hasNext(); )
    {
      CategoryVO categoryVO = (CategoryVO) i.next();
      result.add(CategoryController.getController().findById(categoryVO.getCategoryId(), db));
    }
    return result;
  }
View Full Code Here

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

   */
  private CategoryVO findCategory() throws JspException
  {
    try
    {
      final CategoryVO categoryVO = CategoryController.getController().findByPath(name);
      return CategoryController.getController().findWithChildren(categoryVO.getId());
    }
    catch(Exception e)
    {
      e.printStackTrace();
      throw new JspTagException(e.getMessage());
View Full Code Here

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

         else if(subscriptionFilterVO.getFilterType().equals("1"))
         {
           Iterator categoryVOListIterator = categoryVOList.iterator();
           while(categoryVOListIterator.hasNext())
           {
             CategoryVO categoryVO = (CategoryVO)categoryVOListIterator.next();
             sb.append("<option value=\"" + categoryVO.getId() + "\"" + (hasValue(subscriptionFilterVO.getFilterCondition(), categoryVO.getId().toString()) ? "selected='selected'" : "") + ">" + categoryVO.getName() + "</option>");
           }          
         }
        
         sb.append("    </select>");
         
View Full Code Here

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

  private CategoryController controller = CategoryController.getController();
  private ContentCategoryController contentCategoryController = ContentCategoryController.getController();
  private boolean forceDelete = false;
   
  protected Persistent createModel()  { return new CategoryVO(); }
View Full Code Here

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

            CacheController.cacheObject("propertiesCategoryCache", key, categoryVOList);
          }
         
          if(propertiesCategory.getValueObject().getCategoryId() != null)
          {
            CategoryVO categoryVO = categoriesMap.get(propertiesCategory.getValueObject().getCategoryId());
            if(categoryVO != null)
              categoryVOList.add(categoryVO);
            else
              logger.info("An inconsistency found. The propertyCategory " + propertiesCategory.getId() + " pointed to a missing categoryID: " + propertiesCategory.getValueObject().getCategoryId());
            /*
 
View Full Code Here

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

    setCategoryId(id);
  }

  public CategoryImpl(CategoryVO vo)
  {
    valueObject = (vo != null)? vo : new CategoryVO();
  }
View Full Code Here

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

  protected void setUp() throws Exception
  {
    super.setUp();

    testCategory = new CategoryVO();
    testCategory.setName(getName());
    testCategory.setDescription(getName() + " description");
    testCategory = testController.save(testCategory);
  }
View Full Code Here

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

    try
    {
      testAction.setCommand("save");
      assertResult(CategoryAction.MAIN, testAction.execute());
      CategoryVO newCategory = testAction.getCategory();
      assertEquals("Category name is wrong", testCategory.getName(), newCategory.getName());
      assertEquals("Category name is wrong", testCategory.getDescription(), newCategory.getDescription());
    }
    finally
    {
      testController.delete(testAction.getCategoryId());
    }
View Full Code Here

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

    testAction.getCategory().setParentId(new Integer(0));

    try
    {
      assertSuccess(testAction, "save");
      CategoryVO newCategory = testAction.getCategory();
      assertEquals("Category name is wrong", testCategory.getName(), newCategory.getName());
      assertEquals("Category description is wrong", testCategory.getDescription(), newCategory.getDescription());
    }
    finally
    {
      testController.delete(testAction.getCategoryId());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.