Examples of SmallestContentVersionVO


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

  public String getArchiveBaseUrl(Database db, Integer contentId, Integer languageId, String assetKey, Integer siteNodeId, boolean useLanguageFallback, DeliveryContext deliveryContext, InfoGluePrincipal infoGluePrincipal) throws SystemException, Exception
  {
    String archiveBaseUrl = null;
   
    SmallestContentVersionVO contentVersion = getSmallestContentVersionVO(siteNodeId, contentId, languageId, db, useLanguageFallback, deliveryContext, infoGluePrincipal);
    if (contentVersion != null)
        {
      DigitalAssetVO digitalAsset = DigitalAssetController.getLatestDigitalAssetVO(contentVersion.getContentVersionId(), assetKey, db);
      //DigitalAsset digitalAsset = getDigitalAssetWithKey(contentVersion, assetKey);
     
      if(digitalAsset != null)
      {
        String fileName = digitalAsset.getAssetFileName();
View Full Code Here

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

  public Vector getArchiveEntries(Database db, Integer contentId, Integer languageId, String assetKey, Integer siteNodeId, boolean useLanguageFallback, DeliveryContext deliveryContext, InfoGluePrincipal infoGluePrincipal) throws SystemException, Exception
  {
    Vector entries = null;
   
    SmallestContentVersionVO contentVersion = getSmallestContentVersionVO(siteNodeId, contentId, languageId, db, useLanguageFallback, deliveryContext, infoGluePrincipal);
    if (contentVersion != null)
    {
      DigitalAssetVO digitalAsset = DigitalAssetController.getLatestDigitalAssetVO(contentVersion.getContentVersionId(), assetKey, db);
      //DigitalAsset digitalAsset = getDigitalAssetWithKey(contentVersion, assetKey);
     
      if(digitalAsset != null)
      {
        String fileName = digitalAsset.getAssetFileName();
View Full Code Here

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

   * also has the correct state for this delivery-instance.
   */
 
  public SmallestContentVersionVO getSmallestContentVersionVO(Database db, Integer siteNodeId, Integer contentId, Integer languageId, boolean useLanguageFallback, DeliveryContext deliveryContext, InfoGluePrincipal infoGluePrincipal) throws SystemException, Exception
  {
    SmallestContentVersionVO contentVersionVO = null;
   
    SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId, db);
    String contentVersionKey = "smallestContentVersionVO_" + siteNodeVO.getRepositoryId() + "_" + contentId + "_" + languageId + "_" + useLanguageFallback;
    if(logger.isInfoEnabled())
      logger.info("contentVersionKey:" + contentVersionKey);
   
    contentVersionVO = (SmallestContentVersionVO)CacheController.getCachedObjectFromAdvancedCache("contentVersionCache", contentVersionKey);
   
    if(contentVersionVO != null)
    {
      //logger.info("There was an cached contentVersionVO:" + contentVersionVO.getContentVersionId());
    }
    else
    {
      contentVersionVO = this.getSmallestContentVersionVO(siteNodeId, contentId, languageId, db, useLanguageFallback, deliveryContext, infoGluePrincipal);
          if(contentVersionVO != null)
      {
        //contentVersionVO = contentVersion.getValueObject();
       
        CacheController.cacheObjectInAdvancedCache("contentVersionCache", contentVersionKey, contentVersionVO, new String[]{CacheController.getPooledString(2, contentVersionVO.getId()), CacheController.getPooledString(1, contentVersionVO.getContentId())}, true);
      }
        }
   
    if(contentVersionVO != null && deliveryContext != null)
        deliveryContext.addUsedContentVersion(CacheController.getPooledString(2, contentVersionVO.getId()));
   
    return contentVersionVO;
  }
View Full Code Here

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

  private SmallestContentVersionVO getSmallestContentVersionVO(Integer siteNodeId, Integer contentId, Integer languageId, Database db, boolean useLanguageFallback, DeliveryContext deliveryContext, InfoGluePrincipal infoGluePrincipal) throws SystemException, Exception
  {
    if(contentId == null || contentId.intValue() < 1)
      return null;
   
    SmallestContentVersionVO contentVersion = null;
   
    //MediumContentImpl content = (MediumContentImpl)getObjectWithId(MediumContentImpl.class, contentId, db);
    ContentVO content = getContentVO(db, contentId, deliveryContext); //ContentController.getContentController().getSmallContentVOWithId(contentId, db);
     
    boolean isValidContent = isValidContent(infoGluePrincipal, content, languageId, useLanguageFallback, false, db, deliveryContext);
View Full Code Here

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

  private SmallestContentVersionVO getSmallestContentVersionVO(Integer contentId, Integer languageId, Integer operatingMode, DeliveryContext deliveryContext, Database db) throws Exception
    {
    //Timer t = new Timer();

    SmallestContentVersionVO contentVersionVO = null;
   
      String versionKey = "" + contentId + "_" + languageId + "_" + operatingMode + "_smallestContentVersionVO";
      //String versionVOKey = "" + contentId + "_" + languageId + "_" + operatingMode + "_contentVersionVO";
     
    Object object = CacheController.getCachedObjectFromAdvancedCache("contentVersionCache", versionKey);
    if(object instanceof NullObject)
    {
      logger.info("There was an cached SmallestContentVersionVO but it was null:" + object);
    }
    else if(object != null)
    {
      contentVersionVO = (SmallestContentVersionVO)object;
    }
    else
    {
      //logger.info("Querying for verson: " + versionKey);
        OQLQuery oql = db.getOQLQuery( "SELECT cv FROM org.infoglue.cms.entities.content.impl.simple.SmallestContentVersionImpl cv WHERE cv.contentId = $1 AND cv.languageId = $2 AND cv.stateId >= $3 AND cv.isActive = $4 ORDER BY cv.contentVersionId desc");
        oql.bind(contentId);
        oql.bind(languageId);
        oql.bind(operatingMode);
        oql.bind(true);
       
        QueryResults results = oql.execute(Database.READONLY);

      if (results.hasMore())
          {
        SmallestContentVersion contentVersion = (SmallestContentVersion)results.next();
            contentVersionVO = contentVersion.getValueObject();

            CacheController.cacheObjectInAdvancedCache("contentVersionCache", versionKey, contentVersionVO, new String[]{CacheController.getPooledString(2, contentVersionVO.getId()), CacheController.getPooledString(1, contentVersionVO.getContentId())}, true);
          }
      else
      {
        CacheController.cacheObjectInAdvancedCache("contentVersionCache", versionKey, new NullObject(), new String[]{CacheController.getPooledString(1, contentId)}, true);
      }

      results.close();
      oql.close();
    }

    if(contentVersionVO != null)
        deliveryContext.addUsedContentVersion(CacheController.getPooledString(2, contentVersionVO.getId()));

    return contentVersionVO;
    }
View Full Code Here

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

     
      //Content content = (MediumContentImpl)getObjectWithId(MediumContentImpl.class, contentId, db);
      //Content content = ContentController.getContentController().getContentWithId(contentId, db);
      ContentVO content = ContentController.getContentController().getSmallContentVOWithId(contentId, db, deliveryContext);
     
      SmallestContentVersionVO mostRecentVersion = getSmallestContentVersionVO(db, siteNodeId, content.getContentId(), languageId, useLanguageFallback, deliveryContext, infoGluePrincipal);
    boolean isProperVersion = (mostRecentVersion != null) && (mostRecentVersion.getId().equals(version.getId()));

    boolean isValidContent = isValidContent(infoGluePrincipal, content, languageId, useLanguageFallback, false, db, deliveryContext);

    return isProperVersion && isValidContent;
  }
View Full Code Here

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

  public Collection getAssetKeys(Database db, Integer contentId, Integer languageId, Integer siteNodeId, boolean useLanguageFallback, DeliveryContext deliveryContext, InfoGluePrincipal infoGluePrincipal) throws SystemException, Exception
  {
    Collection assetKeys = new ArrayList();
   
    SmallestContentVersionVO contentVersion = getSmallestContentVersionVO(siteNodeId, contentId, languageId, db, useLanguageFallback, deliveryContext, infoGluePrincipal);
    if (contentVersion != null)
        {
      Collection assets = getDigitalAssetVOList(contentVersion.getId(), db);
          Iterator keysIterator = assets.iterator();
          while(keysIterator.hasNext())
          {
            DigitalAssetVO asset = (DigitalAssetVO)keysIterator.next();
            String assetKey = asset.getAssetKey();
View Full Code Here

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

  public Collection getAssetIds(Database db, Integer contentId, Integer languageId, Integer siteNodeId, boolean useLanguageFallback, DeliveryContext deliveryContext, InfoGluePrincipal infoGluePrincipal) throws SystemException, Exception
  {
    Collection assetIds = new ArrayList();
   
    SmallestContentVersionVO contentVersion = getSmallestContentVersionVO(siteNodeId, contentId, languageId, db, useLanguageFallback, deliveryContext, infoGluePrincipal);
    if (contentVersion != null)
        {
      Collection assets = getDigitalAssetVOList(contentVersion.getId(), db);
          Iterator keysIterator = assets.iterator();
          while(keysIterator.hasNext())
          {
            DigitalAssetVO asset = (DigitalAssetVO)keysIterator.next();
            assetIds.add(asset.getId());    
View Full Code Here

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

  public List getAssets(Database db, Integer contentId, Integer languageId, Integer siteNodeId, boolean useLanguageFallback, DeliveryContext deliveryContext, InfoGluePrincipal infoGluePrincipal) throws SystemException, Exception
  {
    List digitalAssetVOList = new ArrayList();
   
    SmallestContentVersionVO contentVersion = getSmallestContentVersionVO(siteNodeId, contentId, languageId, db, useLanguageFallback, deliveryContext, infoGluePrincipal);
    if (contentVersion != null)
        {
      digitalAssetVOList = getDigitalAssetVOList(contentVersion.getId(), db);
        }
   
    return digitalAssetVOList;
  }
View Full Code Here

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

  public DigitalAssetVO getAsset(Database db, Integer contentId, Integer languageId, String assetKey, Integer siteNodeId, boolean useLanguageFallback, DeliveryContext deliveryContext, InfoGluePrincipal infoGluePrincipal) throws SystemException, Exception
  {
    DigitalAssetVO digitalAssetVO = null;
   
    SmallestContentVersionVO contentVersion = getSmallestContentVersionVO(siteNodeId, contentId, languageId, db, useLanguageFallback, deliveryContext, infoGluePrincipal);
    if (contentVersion != null)
        {
      Collection assets = getDigitalAssetVOList(contentVersion.getId(), db);
          Iterator keysIterator = assets.iterator();
          while(keysIterator.hasNext())
          {
            DigitalAssetVO asset = (DigitalAssetVO)keysIterator.next();
            if(asset.getAssetKey().equalsIgnoreCase(assetKey))
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.