Package org.infoglue.cms.entities.content

Examples of org.infoglue.cms.entities.content.ContentCategoryVO


  private ContentCategoryController controller = ContentCategoryController.getController();
  private Integer contentId;
  private Integer languageId;

  protected Persistent createModel()        { return new ContentCategoryVO(); }
View Full Code Here


       
        if(!exists)
        {
          logger.info("Creating the category " + category.getName() + " as it was not set on this version");

            ContentCategoryVO contentCategoryVO = new ContentCategoryVO();
            contentCategoryVO.setAttributeName(attributeName);
            contentCategoryVO.setContentVersionId(contentVersionVO.getId());
            ContentCategory contentCategory = createWithDatabase(contentCategoryVO, category, contentVersion, db);
               
            contentCategoryVOList.add(contentCategory.getValueObject());
        }
        else
View Full Code Here

     
      if(!exists)
      {
        logger.info("Creating the category " + category.getName() + " as it was not set on this version");

        ContentCategoryVO contentCategoryVO = new ContentCategoryVO();
          contentCategoryVO.setAttributeName(attributeName);
          contentCategoryVO.setContentVersionId(contentVersion.getId());
          ContentCategory contentCategory = createWithDatabase(contentCategoryVO, category, contentVersion, db);
        contentVersion.getContentCategories().add(contentCategory);
           
        contentCategoryList.add(contentCategory);
      }
View Full Code Here

     
      if(!exists)
      {
        logger.info("Creating the category " + category.getName() + " as it was not set on this version");

        ContentCategoryVO contentCategoryVO = new ContentCategoryVO();
          contentCategoryVO.setAttributeName(attributeName);
          contentCategoryVO.setContentVersionId(contentVersion.getId());
          ContentCategory contentCategory = createMediumWithDatabase(contentCategoryVO, category, contentVersion, db);
        contentVersion.getContentCategories().add(contentCategory);
           
        contentCategoryList.add(contentCategory);
      }
View Full Code Here

        //ContentVersion contentVersion = (ContentVersion)getObjectWithId(ContentVersionImpl.class, contentCategory.getContentVersionId(), db);
        Iterator contentCategoriesIterator = contentVersion.getContentCategories().iterator();
        while(contentCategoriesIterator.hasNext())
        {
          MediumContentCategoryImpl currentContentCategory = (MediumContentCategoryImpl)contentCategoriesIterator.next();
          ContentCategoryVO currentContentCategoryVO = currentContentCategory.getValueObject();
          if(currentContentCategoryVO.getAttributeName().equals(contentCategory.getAttributeName()) && currentContentCategory.getCategory().getId().equals(contentCategory.getCategory().getId()))
          {
            contentCategoriesIterator.remove();
            db.remove(currentContentCategory);
            break;
          }
View Full Code Here

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

                    versions.add(contentVersion);
             
              DigitalAssetController.getController().createByCopy(oldContentVersionId, (MediumContentVersionImpl)contentVersion, assetIdMap, db);
              for(ContentCategory cc : contentCategories)
              {
                ContentCategoryVO contentCategoryVO = new ContentCategoryVO();
                contentCategoryVO.setAttributeName(cc.getAttributeName());
                ContentCategoryController.getController().createWithDatabase(contentCategoryVO, cc.getCategory(), contentVersion, db);
              }
             
              logger.info("Created contentVersion:" + contentVersion);
            }
View Full Code Here

                    try
                    {
                      String contentId = sentContentId;
                      //if(contentId == null || contentId.equals(""))
                       
                      ContentCategoryVO contentCategoryVO = ContentCategoryController.getController().findById(new Integer(entityId));
                      ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getContentVersionVOWithId(contentCategoryVO.getContentVersionId());
                      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(contentVersionVO.getContentId());
                      String contentTypeDefinitionId = "" + contentVO.getContentTypeDefinitionId();
                      cacheInstance.flushGroup("selectiveCacheUpdateNonApplicable_contentTypeDefinitionId_" + contentTypeDefinitionId);
                      cacheInstance.putInCache("recacheMark_" + contentTypeDefinitionId, "" + System.currentTimeMillis());
                      cacheInstance.putInCache("recacheMark", "" + System.currentTimeMillis());
View Full Code Here

    assertTrue("Extra Category Two was not a child", found.getChildren().contains(two));
  }

  public void testDeleteContentCategories() throws Exception
  {
    ContentCategoryVO cc = new ContentCategoryVO();
    cc.setContentVersionId(new Integer(-999));
    cc.setAttributeName(getName());
    cc.setCategory(testCategory);
    cc = contentCategoryStore.save(cc, InfoGluePrincipalControllerProxy.getController().getTestPrincipal());

    List found = contentCategoryStore.findByCategory(testCategory.getId());
    assertEquals("Wrong number of ContentCategories found", 1, found.size());
    assertTrue("ContentCategory not found by Category", found.contains(cc));
View Full Code Here

    testCategory = new CategoryVO();
    testCategory.setName(getName());
    testCategory.setDescription(getName() + " description");
    testCategory = testCategoryController.save(testCategory);

    testContentCategory = new ContentCategoryVO();
    testContentCategory.setAttributeName(getName());
    testContentCategory.setContentVersionId(VERSION_ID);
    testContentCategory.setCategory(testCategory);
    testContentCategory = testController.save(testContentCategory, InfoGluePrincipalControllerProxy.getController().getTestPrincipal());
  }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.content.ContentCategoryVO

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.