Package org.infoglue.cms.entities.publishing

Examples of org.infoglue.cms.entities.publishing.PublicationDetailVO


                    if(idAsString != null && !idAsString.equals(""))
                    {
                      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(idAsString));
                        publicationVO.setRepositoryId(new Integer(contentVO.getRepositoryId()));

                      PublicationDetailVO publicationDetailVO = new PublicationDetailVO();
                      publicationDetailVO.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO.setDescription("Access rights change publication");
                      publicationDetailVO.setEntityClass("org.infoglue.cms.entities.content.Content");
                      publicationDetailVO.setEntityId(contentVO.getId());
                      publicationDetailVO.setName("" + contentVO.getName());
                      publicationDetailVO.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO);
                    }
                  }
                  else if(icpVO.getName().indexOf("ContentVersion.") > -1)
                  {
                    //logger.info("Was a contentversion access... let's clear caches for that content.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                    {
                      ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getContentVersionVOWithId(new Integer(idAsString));
                      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(contentVersionVO.getContentId()));
                        publicationVO.setRepositoryId(new Integer(contentVO.getRepositoryId()));

                      PublicationDetailVO publicationDetailVO = new PublicationDetailVO();
                      publicationDetailVO.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO.setDescription("Access rights change publication");
                      publicationDetailVO.setEntityClass("org.infoglue.cms.entities.content.ContentVersion");
                      publicationDetailVO.setEntityId(contentVersionVO.getId());
                      publicationDetailVO.setName("" + contentVO.getName() + "/" + contentVersionVO.getId());
                      publicationDetailVO.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO);

                      PublicationDetailVO publicationDetailVO2 = new PublicationDetailVO();
                      publicationDetailVO2.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO2.setDescription("Access rights change publication");
                      publicationDetailVO2.setEntityClass("org.infoglue.cms.entities.content.Content");
                      publicationDetailVO2.setEntityId(contentVO.getId());
                      publicationDetailVO2.setName("" + contentVO.getName());
                      publicationDetailVO2.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO2.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO2);
                    }
                  }
                else if(icpVO.getName().indexOf("SiteNodeVersion.") > -1)
                {
                  //logger.info("Was a sitenode version access... let's clear caches for that siteNodeVersion.");
                    String idAsString = acVO.getParameters();
                    if(idAsString != null && !idAsString.equals(""))
                    {
                      SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(new Integer(idAsString));
                      SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(new Integer(siteNodeVersionVO.getSiteNodeId()));
                        publicationVO.setRepositoryId(new Integer(siteNodeVO.getRepositoryId()));

                      PublicationDetailVO publicationDetailVO = new PublicationDetailVO();
                      publicationDetailVO.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO.setDescription("Access rights change publication");
                      publicationDetailVO.setEntityClass("org.infoglue.cms.entities.structure.SiteNode");
                      publicationDetailVO.setEntityId(siteNodeVO.getId());
                      publicationDetailVO.setName("" + siteNodeVO.getName());
                      publicationDetailVO.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO);

                      PublicationDetailVO publicationDetailVO2 = new PublicationDetailVO();
                      publicationDetailVO2.setCreationDateTime(DateHelper.getSecondPreciseDate());
                      publicationDetailVO2.setDescription("Access rights change publication");
                      publicationDetailVO2.setEntityClass("org.infoglue.cms.entities.structure.SiteNodeVersion");
                      publicationDetailVO2.setEntityId(siteNodeVersionVO.getId());
                      publicationDetailVO2.setName("" + siteNodeVO.getName() + "/" + siteNodeVersionVO.getId());
                      publicationDetailVO2.setTypeId(PublicationDetailVO.PUBLISH);
                      publicationDetailVO2.setCreator(this.getInfoGluePrincipal().getName());

                      publicationDetailVOList.add(publicationDetailVO2);}
                }
                else
                {
View Full Code Here


      String objectName = getRequest().getParameter("objectName");
      String objectDescription = getRequest().getParameter("objectDescription");
      if(objectDescription == null || objectDescription.equalsIgnoreCase(""))
        objectDescription = "No description given.";
     
    PublicationDetailVO publicationDetailVO = new PublicationDetailVO();
    publicationDetailVO.setCreationDateTime(DateHelper.getSecondPreciseDate());
    publicationDetailVO.setDescription(objectDescription);
    publicationDetailVO.setEntityClass(className);
    publicationDetailVO.setEntityId(new Integer(objectId));
    publicationDetailVO.setName("" + objectName)
    publicationDetailVO.setTypeId(PublicationDetailVO.PUBLISH);
    publicationDetailVO.setCreator(publisherName);

    List<PublicationDetailVO> publicationDetailVOList = new ArrayList<PublicationDetailVO>();
    publicationDetailVOList.add(publicationDetailVO);
   
      PublicationVO publicationVO = new PublicationVO();
View Full Code Here

    edition.setPublicationDateTime(publicationDate);
    edition.setPublisher(getName());

    for (int i = 0; i < detailCount; i++)
    {
      PublicationDetailVO detail = new PublicationDetailVO();
      detail.setName("TestPublicationDetail");
      detail.setEntityClass("TEST-CLASS");
      detail.setEntityId(new Integer(-99));
      detail.setCreationDateTime(new Date());
      detail.setCreator(getName());
      detail.setTypeId(PublicationDetailVO.PUBLISH);
      edition.getPublicationDetails().add(detail);
    }

    PublicationVO savedEdition = PublicationController.create(edition);
    testEditions.add(savedEdition);
View Full Code Here

                  AssetCleanerThread assetCleaningThread = new AssetCleanerThread();
                  List publicationDetailVOList = PublicationController.getController().getPublicationDetailVOList(new Integer(objectId));
                  Iterator publicationDetailVOListIterator = publicationDetailVOList.iterator();
                  while(publicationDetailVOListIterator.hasNext())
                  {
                    PublicationDetailVO publicationDetailVO = (PublicationDetailVO)publicationDetailVOListIterator.next();
                    logger.info("publicationDetailVO.getEntityClass():" + publicationDetailVO.getEntityClass());
                    logger.info("publicationDetailVO.getEntityId():" + publicationDetailVO.getEntityId());
                 
                    if(publicationDetailVO.getEntityClass().indexOf("pageCache") > -1)
                    {
                      logger.info("publicationDetailVO.getEntityClass():" + publicationDetailVO.getEntityClass());
                     
                      if(publicationDetailVO.getEntityClass().indexOf("pageCache:") == 0)
                      {
                        String groupQualifyer = publicationDetailVO.getEntityClass().substring("pageCache:".length());
                        logger.info("This is a application pageCache-clear request... specific:" + groupQualifyer);
                        CacheController.clearCaches(publicationDetailVO.getEntityClass(), "" + publicationDetailVO.getEntityId(), null);
                      }
                      else
                      {
                        CacheController.clearCaches("pageCache", "selectiveCacheUpdateNonApplicable", null);
                      }
                     
                        //CacheController.clearCacheForGroup("pageCacheExtra", "selectiveCacheUpdateNonApplicable");
                      //CacheController.clearCacheForGroup("pageCache", "selectiveCacheUpdateNonApplicable");                     
                    }
                    else if(Class.forName(publicationDetailVO.getEntityClass()).getName().equals(ContentVersion.class.getName()))
                    {
                      logger.info("We clear all caches having references to contentVersion: " + publicationDetailVO.getEntityId());
                      try
                      {
                        Integer contentId = ContentVersionController.getContentVersionController().getContentIdForContentVersion(publicationDetailVO.getEntityId());
                        
                          ContentVO previousContentVO = ContentController.getContentController().getContentVOWithId(contentId);
                          Integer previousParentContentId = previousContentVO.getParentContentId();
                          logger.info("previousParentContentId:" + previousParentContentId);
 
                          addCacheUpdateDirective(publicationDetailVO.getEntityClass(), publicationDetailVO.getEntityId().toString(), allIGCacheCalls);
                          //CacheController.clearCaches(publicationDetailVO.getEntityClass(), publicationDetailVO.getEntityId().toString(), null);
                         
                        CacheController.clearCache(SmallContentVersionImpl.class, new Integer[]{new Integer(publicationDetailVO.getEntityId())});
                        CacheController.clearCache(SmallestContentVersionImpl.class, new Integer[]{new Integer(publicationDetailVO.getEntityId())});
 
                        logger.info("We clear all small contents as well " + contentId);
                        CacheController.clearCache(ContentImpl.class, new Integer[]{contentId});
                        CacheController.clearCache(SmallContentImpl.class, new Integer[]{contentId});
                        CacheController.clearCache(SmallishContentImpl.class, new Integer[]{contentId});
                        CacheController.clearCache(MediumContentImpl.class, new Integer[]{contentId});
                        CacheController.clearCache(SmallSiteNodeVersionImpl.class, new Integer[]{new Integer(objectId)});   
                       
                        logger.info("Handling parents....");
                       
                        ContentVO contentVOAfter = ContentController.getContentController().getContentVOWithId(contentId);
                          Integer currentParentContentId = contentVOAfter.getParentContentId();
                          logger.info("previousParentContentId:" + previousParentContentId);
                          logger.info("currentParentContentId:" + currentParentContentId);
 
                          logger.info("We should also clear the parents...");
                        if(currentParentContentId != null)
                        {
                          logger.info("contentVOAfter - clear the new:" + contentVOAfter.getName() + " / " + currentParentContentId);
                          //CacheController.clearCaches(Content.class.getName(), currentParentContentId.toString(), null);
                          addCacheUpdateDirective(Content.class.getName(), currentParentContentId.toString(), allIGCacheCalls);
                         
                            logger.info("We clear all small siteNodes as well " + currentParentContentId);
                          CacheController.clearCache(ContentImpl.class, new Integer[]{currentParentContentId});
                          CacheController.clearCache(SmallContentImpl.class, new Integer[]{currentParentContentId});
                          CacheController.clearCache(SmallishContentImpl.class, new Integer[]{currentParentContentId});
                          CacheController.clearCache(MediumContentImpl.class, new Integer[]{currentParentContentId});
                        }
 
                        if(currentParentContentId != null && previousParentContentId != null && !previousParentContentId.equals(previousParentContentId))
                        {
                          logger.info("contentVOAfter - clear the new:" + contentVOAfter.getName() + " / " + currentParentContentId);
                          //CacheController.clearCaches(Content.class.getName(), previousParentContentId.toString(), null);
                          addCacheUpdateDirective(Content.class.getName(), previousParentContentId.toString(), allIGCacheCalls);
                         
                            logger.info("We clear all small siteNodes as well " + previousParentContentId);
                          CacheController.clearCache(ContentImpl.class, new Integer[]{previousParentContentId});
                          CacheController.clearCache(SmallContentImpl.class, new Integer[]{previousParentContentId});
                          CacheController.clearCache(SmallishContentImpl.class, new Integer[]{previousParentContentId});
                          CacheController.clearCache(MediumContentImpl.class, new Integer[]{previousParentContentId});
                        }

                        if (publicationDetailVO.getTypeId().equals(PublicationDetailVO.UNPUBLISH_LATEST))
                        {
                          assetCleaningThread.addContentVersion(publicationDetailVO.getEntityId());
                        }
                      }
                      catch(Exception e)
                      {
                        logger.warn("An error occurred handling content version from publication " + publicationVO.getId() + ":" + e.getMessage());
                      }
                    }
                    else if(Class.forName(publicationDetailVO.getEntityClass()).getName().equals(SiteNodeVersion.class.getName()))
                    {
                      System.out.println("SiteNodeVersion update....:" + publicationDetailVO.getEntityId());
                      try
                      {
                        SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(publicationDetailVO.getEntityId());
                        //logger.info("siteNodeVersionVO:" + siteNodeVersionVO.getId());
                        Integer siteNodeId = siteNodeVersionVO.getSiteNodeId();
                       
                        CacheController.clearCache("pageCacheLatestSiteNodeVersions", "" + siteNodeId);
                        String versionKey = "" + siteNodeId + "_" + CmsPropertyHandler.getOperatingMode() + "_siteNodeVersionVO";   
                          CacheController.clearCache("latestSiteNodeVersionCache", versionKey);
                       
                          logger.info("We also clear the meta info content..");
 
                          SiteNodeVO previousSiteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
                          Integer previousParentSiteNodeId = previousSiteNodeVO.getParentSiteNodeId();
                          //System.out.println("previousParentSiteNodeId:" + previousParentSiteNodeId);
                          Object previousParentSiteNodeIdCandidate = CacheController.getCachedObject("parentSiteNodeCache", "" + siteNodeId);
                          //System.out.println("previousParentSiteNodeIdCandidate:" + previousParentSiteNodeIdCandidate);
                          if(previousParentSiteNodeIdCandidate != null && !(previousParentSiteNodeIdCandidate instanceof NullObject))
                            previousParentSiteNodeId = ((SiteNodeVO)previousParentSiteNodeIdCandidate).getId();
                          //System.out.println("previousParentSiteNodeId:" + previousParentSiteNodeId);
                           
                          //CacheController.clearCaches(publicationDetailVO.getEntityClass(), publicationDetailVO.getEntityId().toString(), null);
                        //if(siteNodeId != null)
                        //  CacheController.clearCaches(SiteNode.class.getName(), siteNodeId.toString(), null);
                         
                          logger.info("We clear all small siteNodes as well " + siteNodeId);
                        CacheController.clearCache(SiteNodeImpl.class, new Integer[]{siteNodeId});
                        CacheController.clearCache(SmallSiteNodeImpl.class, new Integer[]{siteNodeId});
                        CacheController.clearCache(SmallSiteNodeVersionImpl.class, new Integer[]{new Integer(publicationDetailVO.getEntityId())});   
 
                        logger.info("We clear all contents as well " + previousSiteNodeVO.getMetaInfoContentId());
                        Class metaInfoContentExtra = ContentImpl.class;
                        Object[] idsMetaInfoContentExtra = {previousSiteNodeVO.getMetaInfoContentId()};
                        CacheController.clearCache(metaInfoContentExtra, idsMetaInfoContentExtra);
                       
                        logger.info("We clear all small contents as well " + previousSiteNodeVO.getMetaInfoContentId());
                        Class metaInfoContentExtraSmall = SmallContentImpl.class;
                        CacheController.clearCache(metaInfoContentExtraSmall, idsMetaInfoContentExtra);
                       
                        logger.info("We clear all smallish contents as well " + previousSiteNodeVO.getMetaInfoContentId());
                        Class metaInfoContentExtraSmallish = SmallishContentImpl.class;
                        CacheController.clearCache(metaInfoContentExtraSmallish, idsMetaInfoContentExtra);
     
                        logger.info("We clear all medium contents as well " + previousSiteNodeVO.getMetaInfoContentId());
                        Class metaInfoContentExtraMedium = MediumContentImpl.class;
                        CacheController.clearCache(metaInfoContentExtraMedium, idsMetaInfoContentExtra);
                       
                        //CacheController.clearCaches(ContentImpl.class.getName(), previousSiteNodeVO.getMetaInfoContentId().toString(), null);
                        addCacheUpdateDirective(ContentImpl.class.getName(), previousSiteNodeVO.getMetaInfoContentId().toString(), allIGCacheCalls);
     
                        Database db = CastorDatabaseService.getDatabase();
                        db.begin();
                       
                        LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(previousSiteNodeVO.getRepositoryId(), db);
                        ContentVersionVO metaInfoContentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(previousSiteNodeVO.getMetaInfoContentId(), masterLanguageVO.getId(), db);
                        addCacheUpdateDirective(ContentVersionImpl.class.getName(), metaInfoContentVersionVO.getId().toString(), allIGCacheCalls);
                       
                        List contentVersionIds = new ArrayList();
                        if(previousSiteNodeVO.getMetaInfoContentId() != null)
                        {
                          List<SmallestContentVersionVO> contentVersionVOList = ContentVersionController.getContentVersionController().getSmallestContentVersionVOList(previousSiteNodeVO.getMetaInfoContentId(), db);
                          for(SmallestContentVersionVO cvVO : contentVersionVOList)
                          {
                            contentVersionIds.add(cvVO.getId());
                            logger.info("We clear the meta info contentVersion " + cvVO.getId());
                          }
                        }
                        /*
                        Content content = ContentController.getContentController().getReadOnlyContentWithId(previousSiteNodeVO.getMetaInfoContentId(), db);
                        List contentVersionIds = new ArrayList();
                        Iterator contentVersionIterator = content.getContentVersions().iterator();
                        logger.info("Versions:" + content.getContentVersions().size());
                        while(contentVersionIterator.hasNext())
                        {
                          ContentVersion contentVersion = (ContentVersion)contentVersionIterator.next();
                          contentVersionIds.add(contentVersion.getId());
                          logger.info("We clear the meta info contentVersion " + contentVersion.getId());
                        }
                        */
     
                        db.rollback();
     
                        db.close();
                       
                        Iterator contentVersionIdsIterator = contentVersionIds.iterator();
                        logger.info("Versions:" + contentVersionIds.size());
                        while(contentVersionIdsIterator.hasNext())
                        {
                          Integer contentVersionId = (Integer)contentVersionIdsIterator.next();
                          logger.info("We clear the meta info contentVersion " + contentVersionId);
                          Class metaInfoContentVersionExtra = ContentVersionImpl.class;
                          Object[] idsMetaInfoContentVersionExtra = {contentVersionId};
                          CacheController.clearCache(metaInfoContentVersionExtra, idsMetaInfoContentVersionExtra);
                          //CacheController.clearCaches(ContentVersionImpl.class.getName(), contentVersionId.toString(), null);
                          //addCacheUpdateDirective(ContentVersionImpl.class.getName(), contentVersionId.toString(), allIGCacheCalls);
                        }
                       
                        logger.info("After:" + contentVersionIds.size());
     
                        SiteNodeVersionVO previousSiteNodeVersionVO = SiteNodeVersionController.getController().getPreviousActiveSiteNodeVersionVO(siteNodeVersionVO.getSiteNodeId(), siteNodeVersionVO.getId(), new Integer(CmsPropertyHandler.getOperatingMode()));
                        //logger.info("previousSiteNodeVersionVO:" + previousSiteNodeVersionVO.getId());
 
                        addCacheUpdateDirective(publicationDetailVO.getEntityClass(), publicationDetailVO.getEntityId().toString(), allIGCacheCalls);
                        if(siteNodeId != null)
                        {
                          //logger.info("What really happened.... let's find out");
                          boolean anyRealDifferences = isThereAnyRealDifferencesBetweenSiteNodeVersions(siteNodeVersionVO, previousSiteNodeVersionVO);
                          //logger.info("anyRealDifferences:" + anyRealDifferences);
                          if(anyRealDifferences)
                            addCacheUpdateDirective(SiteNode.class.getName(), siteNodeId.toString(), allIGCacheCalls);
                          else
                          {
                            //logger.info("We'll skip it and assume that this was just a meta info update...");
                          }
                        }
 
                        //Handling access rights...
                        if(siteNodeVersionVO.getIsProtected().intValue() != SiteNodeVersionVO.INHERITED || (previousSiteNodeVersionVO != null && previousSiteNodeVersionVO.getIsProtected().intValue() != SiteNodeVersionVO.INHERITED))
                        {
                              CacheController.clearCache(AccessRightImpl.class);
                              CacheController.clearCache(AccessRightRoleImpl.class);
                              CacheController.clearCache(AccessRightGroupImpl.class);
                              CacheController.clearCache(AccessRightUserImpl.class);
 
                            CacheController.clearCache("personalAuthorizationCache");
                        }
                       
                        logger.info("Handling parents....");
                       
                        SiteNodeVO siteNodeVOAfter = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
                          Integer currentParentSiteNodeId = siteNodeVOAfter.getParentSiteNodeId();
                          //System.out.println("previousParentSiteNodeId:" + previousParentSiteNodeId);
                          //System.out.println("currentParentSiteNodeId:" + currentParentSiteNodeId);
 
                          logger.info("We should also clear the parents...");
                        if(currentParentSiteNodeId != null)
                        {
                          if(previousSiteNodeVersionVO == null)
                          {
                            //logger.info("Looks to be first version - let's update parent as well");
                            logger.info("siteNodeVOAfter - clear the new:" + siteNodeVOAfter.getName() + " / " + currentParentSiteNodeId);
                            addCacheUpdateDirective(SiteNode.class.getName(), currentParentSiteNodeId.toString(), allIGCacheCalls);
                          }
                         
                            logger.info("We clear all small siteNodes as well " + currentParentSiteNodeId);
                          CacheController.clearCache(SiteNodeImpl.class, new Integer[]{currentParentSiteNodeId});
                          CacheController.clearCache(SmallSiteNodeImpl.class, new Integer[]{currentParentSiteNodeId});
                        }
 
                        if(currentParentSiteNodeId != null && previousParentSiteNodeId != null && !previousParentSiteNodeId.equals(currentParentSiteNodeId))
                        {
                          System.out.println("siteNodeVOAfter was not the same - lets clear the old:" + siteNodeVOAfter.getName() + " / " + currentParentSiteNodeId);
                          //CacheController.clearCaches(SiteNode.class.getName(), previousParentSiteNodeId.toString(), null);
                          addCacheUpdateDirective(SiteNode.class.getName(), currentParentSiteNodeId.toString(), allIGCacheCalls);
                          addCacheUpdateDirective(SiteNode.class.getName(), previousParentSiteNodeId.toString(), allIGCacheCalls);
                         
                            logger.info("We clear all small siteNodes as well " + previousParentSiteNodeId);
                          CacheController.clearCache(SiteNodeImpl.class, new Integer[]{previousParentSiteNodeId});
                          CacheController.clearCache(SmallSiteNodeImpl.class, new Integer[]{previousParentSiteNodeId});
                        }
                       
                        if(publicationDetailVO.getTypeId().intValue() == PublicationDetailVO.MOVED.intValue())
                            CacheController.clearCache("childSiteNodesCache");

                      }
                      catch (Exception e)
                      {
View Full Code Here

      {
        List publicationDetailVOList = PublicationController.getController().getPublicationDetailVOList(new Integer(objectId));
        Iterator publicationDetailVOListIterator = publicationDetailVOList.iterator();
        while(publicationDetailVOListIterator.hasNext())
        {
          PublicationDetailVO publicationDetailVO = (PublicationDetailVO)publicationDetailVOListIterator.next();
          logger.info("publicationDetailVO.getEntityClass():" + publicationDetailVO.getEntityClass());
          logger.info("publicationDetailVO.getEntityId():" + publicationDetailVO.getEntityId());
          if(Class.forName(publicationDetailVO.getEntityClass()).getName().equals(ContentVersion.class.getName()))
          {
            logger.info("We cache all content having references to contentVersion: " + publicationDetailVO.getEntityId());
            Integer contentId = ContentVersionController.getContentVersionController().getContentIdForContentVersion(publicationDetailVO.getEntityId());
            getObjectWithId(ContentVersionImpl.class, new Integer(publicationDetailVO.getEntityId()), db);
            getObjectWithId(SmallContentVersionImpl.class, new Integer(publicationDetailVO.getEntityId()), db);
            getObjectWithId(SmallestContentVersionImpl.class, new Integer(publicationDetailVO.getEntityId()), db);

            getObjectWithId(ContentImpl.class, new Integer(contentId), db);
            getObjectWithId(SmallContentImpl.class, new Integer(contentId), db);
            getObjectWithId(SmallishContentImpl.class, new Integer(contentId), db);
            getObjectWithId(MediumContentImpl.class, new Integer(contentId), db);
          }
          else if(Class.forName(publicationDetailVO.getEntityClass()).getName().equals(SiteNodeImpl.class.getName()))
          {
            SiteNodeImpl siteNode = (SiteNodeImpl)getObjectWithId(SiteNodeImpl.class, new Integer(objectId), db);
            getObjectWithId(SmallSiteNodeImpl.class, new Integer(objectId), db);
           
            /*
            NodeDeliveryController ndc = NodeDeliveryController.getNodeDeliveryController(new Integer(objectId), new Integer(-1), new Integer(-1));
            Repository repository = siteNode.getRepository();
              if(repository != null)
            {
              Collection languages = repository.getRepositoryLanguages();
              Iterator languageIterator = languages.iterator();
              while(languageIterator.hasNext())
              {
                RepositoryLanguage repositoryLanguage = (RepositoryLanguage)languageIterator.next();
                Language currentLanguage = repositoryLanguage.getLanguage();
                LanguageDeliveryController.getLanguageDeliveryController().getLanguageIfSiteNodeSupportsIt(db, currentLanguage.getId(), siteNode.getId());
              }
            }
            */
          }
          else if(Class.forName(publicationDetailVO.getEntityClass()).getName().equals(SiteNodeVersion.class.getName()))
          {
            Integer siteNodeId = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(publicationDetailVO.getEntityId()).getSiteNodeId();
             
            getObjectWithId(SiteNodeVersionImpl.class, new Integer(publicationDetailVO.getEntityId()), db);
            getObjectWithId(SmallSiteNodeVersionImpl.class, new Integer(publicationDetailVO.getEntityId()), db);

            SiteNodeImpl siteNode = (SiteNodeImpl)getObjectWithId(SiteNodeImpl.class, new Integer(siteNodeId), db);
            getObjectWithId(SmallSiteNodeImpl.class, new Integer(siteNodeId), db);
           
            /*
 
View Full Code Here

      PublicationImpl p = new PublicationImpl();
      p.setValueObject(publication);
      p.setPublicationDetails(new ArrayList());
      for (Iterator iter = publication.getPublicationDetails().iterator(); iter.hasNext();)
      {
        PublicationDetailVO detailVO = (PublicationDetailVO) iter.next();
        PublicationDetail pd = new PublicationDetailImpl();
        pd.setPublication(p);
        pd.setValueObject(detailVO);
        p.getPublicationDetails().add(pd);
      }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.publishing.PublicationDetailVO

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.