Package org.infoglue.cms.controllers.kernel.impl.simple

Examples of org.infoglue.cms.controllers.kernel.impl.simple.RegistryController


   * This handles the actual exporting.
   */
 
  protected String doExecute() throws Exception
  {
      RegistryController registryController = RegistryController.getController();
   
    Database db = CastorDatabaseService.getDatabase();
   
    try
    {
      db.begin();

     
      //Checks the relations from sitenodes
      List siteNodes = SiteNodeController.getController().getRepositorySiteNodes(this.repositoryId, db);
     
      Iterator siteNodesIterator = siteNodes.iterator();
      while(siteNodesIterator.hasNext())
      {
          SiteNode siteNode = (SiteNode)siteNodesIterator.next();
          logger.info("Going to index all versions of " + siteNode.getName());
         
          Iterator siteNodeVersionsIterator = siteNode.getSiteNodeVersions().iterator();
        while(siteNodeVersionsIterator.hasNext())
        {
            SiteNodeVersion siteNodeVersion = (SiteNodeVersion)siteNodeVersionsIterator.next();
            registryController.updateSiteNodeVersion(siteNodeVersion.getValueObject(), db);
        }
      }

      //Checks the relations from contents
      List contents = ContentController.getContentController().getRepositoryContents(this.repositoryId, db);
     
      Iterator iterator = contents.iterator();
      while(iterator.hasNext())
      {
          Content content = (Content)iterator.next();
          logger.info("Going to index all version of " + content.getName());
         
          Iterator versionsIterator = content.getContentVersions().iterator();
        while(versionsIterator.hasNext())
        {
            ContentVersion contentVersion = (ContentVersion)versionsIterator.next();
            registryController.updateContentVersion(contentVersion.getValueObject(), db);
        }
      }
           
      db.commit();
    }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.controllers.kernel.impl.simple.RegistryController

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.