Package org.infoglue.cms.entities.management

Examples of org.infoglue.cms.entities.management.Repository


      Collection repositoryLanguages = language.getRepositoryLanguages();
      Iterator iterator = repositoryLanguages.iterator();
      while(iterator.hasNext())
      {
        RepositoryLanguage repositoryLanguage = (RepositoryLanguage)iterator.next();
        Repository repository = repositoryLanguage.getRepository();
        repository.getRepositoryLanguages().remove(repositoryLanguage);
        db.remove(repositoryLanguage);
      }
    }
    catch(Exception e)
    {
View Full Code Here


        beginTransaction(db);

        try
        {     
        Repository repository = RepositoryController.getController().getRepositoryWithId(repositoryId, db);
        deleteRepositoryLanguages(repository, db);

          //add validation here if needed        
            List repositoryLanguageList = new ArrayList();
            if(languageValues != null)
      {
        for (int i=0; i < languageValues.length; i++)
              {
                Language language = LanguageController.getController().getLanguageWithId(new Integer(languageValues[i]), db);
                RepositoryLanguage repositoryLanguage = create(repository.getId(), new Integer(languageValues[i]), new Integer(i), db);
                repositoryLanguageList.add(repositoryLanguage);
              }
      }
     
      //repository = RepositoryController.getController().getRepositoryWithId(repositoryVO.getRepositoryId(), db);
            //repository.setValueObject(repositoryVO);
            repository.setRepositoryLanguages(repositoryLanguageList);
     
            //If any of the validations or setMethods reported an error, we throw them up now before create.
            ceb.throwIfNotEmpty();
           
            commitTransaction(db);
View Full Code Here

    beginTransaction(db);

    try
    {
      Repository repository = RepositoryController.getController().getRepositoryWithId(repositoryId, db);
      Collection repositoryLanguageList = repository.getRepositoryLanguages();
      List languageList = LanguageController.getController().getLanguageVOList();
      remainingLanguages.addAll(languageList);
         
      Iterator languageIterator = languageList.iterator();
      while(languageIterator.hasNext())
View Full Code Here

        try
        {
          Content content = getContentWithId(contentId, db);
        if(content != null)
        {
          Repository repository = content.getRepository();
          if(repository != null)
          {
             languages = LanguageController.getController().getLanguageVOList(repository.getId(), db);
           
             //If any of the validations or setMethods reported an error, we throw them up now before create.
             ceb.throwIfNotEmpty();
           
             commitTransaction(db);
View Full Code Here

        }   
               
        if(siteNodeTypeDefinitionId != null)
          siteNodeTypeDefinition = SiteNodeTypeDefinitionController.getController().getSiteNodeTypeDefinitionWithId(siteNodeTypeDefinitionId, db);

        Repository repository = RepositoryController.getController().getRepositoryWithId(repositoryId, db);

       
        siteNode = new SiteNodeImpl();
        siteNode.setValueObject(siteNodeVO);
        siteNode.setParentSiteNode((SiteNodeImpl)parentSiteNode);
View Full Code Here

      }   
     
      if(siteNodeTypeDefinitionId != null)
        siteNodeTypeDefinition = SiteNodeTypeDefinitionController.getController().getSiteNodeTypeDefinitionWithId(siteNodeTypeDefinitionId, db);
     
      Repository repository = RepositoryController.getController().getRepositoryWithId(repositoryId, db);

      siteNode = new SiteNodeImpl();
      siteNode.setValueObject(siteNodeVO);
      siteNode.setParentSiteNode((SiteNodeImpl)parentSiteNode);
      siteNode.setRepository((RepositoryImpl)repository);
View Full Code Here

            siteNode.setParentSiteNode((SiteNodeImpl)parentSiteNode);
          }
        }
       
        logger.info("Looking for repo:" + siteNode.getValueObject().getRepositoryId());
        Repository newRepository = (Repository)repositoryIdMap.get("" + siteNode.getValueObject().getRepositoryId() + "_repository");
        logger.info("newRepository:" + newRepository);
        siteNode.setRepository((RepositoryImpl)newRepository);
        siteNode.getValueObject().setRepositoryId(newRepository.getId());
        //logger.info("readContentCandidate debug...:" + readContentCandidate.getName() + ":" + readContentCandidate.getId() + ":" + readContentCandidate.getRepositoryId());
      }
 
      InfoGlueExportImpl siteNodeVersions = getInfoGlueExportImpl(siteNodeVersionsFile, encoding);
      logger.info("siteNodeVersions:" + siteNodeVersions);
View Full Code Here

          }
        }
       
        logger.info("repositoryIdMap:" + repositoryIdMap);
        //logger.info("Looking for repo:" + content.getRepositoryId());
        Repository newRepository = (Repository)repositoryIdMap.get("" + content.getRepositoryId() + "_repository");
        //logger.info("newRepository:" + newRepository);
        content.setRepository((RepositoryImpl)newRepository);
        //logger.info("readContentCandidate debug...:" + readContentCandidate.getName() + ":" + readContentCandidate.getId() + ":" + readContentCandidate.getRepositoryId());
      }
     
View Full Code Here

            else
            {
        //None found - we create it and give it the name of the repository.
        logger.info("Found no rootSiteNode so we create a new....");
        SiteNodeVO rootSiteNodeVO = new SiteNodeVO();
        Repository repository = RepositoryController.getController().getRepositoryWithId(repositoryId, db);
        rootSiteNodeVO.setName(repository.getName());
        rootSiteNodeVO.setIsBranch(new Boolean(true));
        rootSiteNodeVO.setMetaInfoContentId(new Integer(-1));
        List siteNodeTypeDefintionList = SiteNodeTypeDefinitionController.getController().getSiteNodeTypeDefinitionList(db);
        Integer siteNodeTypeDefintionId = null;
        if(siteNodeTypeDefintionList != null && siteNodeTypeDefintionList.size() == 1)
View Full Code Here

          if(maxLevel > currentLevel)
            recurseSiteNodeTree(childSiteNode.getId(), languageId, templateController, principal, maxLevel, currentLevel + 1);
        }

  
    Repository repository = RepositoryController.getController().getRepositoryWithId(siteNodeVO.getRepositoryId(), templateController.getDatabase());
    Collection languages = repository.getRepositoryLanguages();
    Iterator languagesIterator = languages.iterator();
    while(languagesIterator.hasNext())
    {
        RepositoryLanguage repositoryLanguage = (RepositoryLanguage)languagesIterator.next();
        LanguageDeliveryController.getLanguageDeliveryController().getLanguageIfSiteNodeSupportsIt(templateController.getDatabase(), repositoryLanguage.getLanguage().getId(), siteNodeId);
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.management.Repository

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.