Package org.infoglue.cms.entities.content

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


   */
  private ContentVO getChildVOWithName(Integer parentContentId, String name, Database db) throws Exception
  {
       String key = "" + parentContentId + name;

    ContentVO cachedChildContentVO = (ContentVO)CacheController.getCachedObjectFromAdvancedCache("childContentCache", key);
    if(cachedChildContentVO != null)
    {
      if(logger.isInfoEnabled())
        logger.info("There was an cached cachedChildContentVO:" + cachedChildContentVO);
      return cachedChildContentVO;
    }

    ContentVO contentVO = null;
   
    OQLQuery oql = db.getOQLQuery("SELECT c FROM org.infoglue.cms.entities.content.impl.simple.SmallContentImpl c WHERE c.parentContentId = $1 AND c.name = $2");
      oql.bind(parentContentId);
      oql.bind(name);
     
View Full Code Here


    // Get the children of this content and do the recursion
    List childContentList = ContentController.getContentController().getContentChildrenVOList(contentId, null, db);
    Iterator cit = childContentList.iterator();
    while (cit.hasNext())
    {
      ContentVO contentVO = (ContentVO) cit.next();
      getContentVOWithParentRecursive(contentVO.getId(), processBean, resultList, db);
    }

    return resultList;
  }
View Full Code Here

  public String getContentAttribute(Integer contentId, Integer languageId, String attributeName) throws Exception
  {
      String attribute = "Undefined";
     
      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(contentId);
   
    ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageId);
    if(contentVersionVO != null)
      attribute = ContentVersionController.getContentVersionController().getAttributeValue(contentVersionVO, attributeName, false);
   
    return attribute;
 
View Full Code Here

  public String getContentAttribute(Database db, Integer contentId, Integer languageId, String attributeName) throws Exception
  {
      String attribute = "Undefined";
     
      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(contentId, db);
   
    ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageId, db);
    if(contentVersionVO != null)
      attribute = ContentVersionController.getContentVersionController().getAttributeValue(contentVersionVO, attributeName, false);
   
    return attribute;
 
View Full Code Here

  public String getContentAttribute(Database db, Integer contentId, Integer languageId, String attributeName, boolean useLanguageFallBack) throws Exception
  {
      String attribute = "Undefined";
     
      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(contentId, db);
   
    ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageId, db);
    if(contentVersionVO == null && useLanguageFallBack)
    {
      LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(contentVO.getRepositoryId(), db);
      contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), masterLanguageVO.getId(), db);
    }
   
    if(contentVersionVO != null)
      attribute = ContentVersionController.getContentVersionController().getAttributeValue(contentVersionVO, attributeName, false);
   
View Full Code Here

  public String getContentAttribute(Database db, Integer contentId, Integer languageId, Integer stateId, String attributeName, boolean useLanguageFallBack) throws Exception
  {
      String attribute = "Undefined";
     
      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(contentId, db);
   
    ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageId, stateId, db);
    if(contentVersionVO == null && useLanguageFallBack)
    {
      LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(contentVO.getRepositoryId(), db);
      contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), masterLanguageVO.getId(), stateId, db);
    }
   
    if(contentVersionVO != null)
      attribute = ContentVersionController.getContentVersionController().getAttributeValue(contentVersionVO, attributeName, false);
   
View Full Code Here

   * is handling.
   */

  public BaseEntityVO getNewVO()
  {
    return new ContentVO();
  }
View Full Code Here

 
  public String getContentIdPath(Integer contentId) throws Exception
  {
    StringBuffer sb = new StringBuffer();
   
    ContentVO contentVO = getContentVOWithId(contentId);
    sb.insert(0, contentVO.getId());
    while(contentVO != null && contentVO.getParentContentId() != null)
    {
      sb.insert(0, contentVO.getParentContentId() + ",");
      if(contentVO.getParentContentId() != null)
        contentVO = getContentVOWithId(contentVO.getParentContentId());
      else
        contentVO = null;
    }
     
    return sb.toString();
View Full Code Here

   */
  public String getContentPath(Integer contentId, boolean includeRootContent, boolean includeRepositoryName, Database db) throws ConstraintException, SystemException, Bug, Exception
  {
    StringBuffer sb = new StringBuffer();

    ContentVO contentVO = ContentController.getContentController().getContentVOWithId(contentId, db);

    sb.insert(0, contentVO.getName());

    while (contentVO.getParentContentId() != null)
    {
      contentVO = ContentController.getContentController().getContentVOWithId(contentVO.getParentContentId(), db);

      if (includeRootContent || contentVO.getParentContentId() != null)
      {
        sb.insert(0, contentVO.getName() + "/");
      }
    }

    if (includeRepositoryName)
    {
      RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(contentVO.getRepositoryId(), db);
      if(repositoryVO != null)
        sb.insert(0, repositoryVO.getName() + "/");
    }
   
    return sb.toString();
View Full Code Here

      QueryResults results = oql.execute(Database.READONLY);
      while(results.hasMore())
            {
        SmallestContentVersionImpl contentVersion = (SmallestContentVersionImpl)results.next();
        ContentVO contentVO = getContentVOWithId(contentVersion.getValueObject().getContentId(), db);
        boolean isValid = true;
        for(int i=0; i<excludedContentTypes.length; i++)
        {
          String contentTypeDefinitionNameToExclude = excludedContentTypes[i];
          ContentTypeDefinitionVO ctdVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithName(contentTypeDefinitionNameToExclude, db);
          if(contentVO.getContentTypeDefinitionId().equals(ctdVO.getId()))
          {
            isValid = false;
            break;
          }
        }
View Full Code Here

TOP

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

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.