Package org.infoglue.cms.entities.management

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


   
      QueryResults results = oql.execute(Database.READONLY);
   
    if (results.hasMore())
        {
          Repository repository = (Repository)results.next();
          repositoryVO = repository.getValueObject();
        }

    results.close();
    oql.close();
View Full Code Here


          OQLQuery oql = db.getOQLQuery( "SELECT r FROM org.infoglue.cms.entities.management.impl.simple.RepositoryImpl r WHERE is_defined(r.dnsName) ORDER BY r.repositoryId");
          QueryResults results = oql.execute(Database.READONLY);
   
          while (results.hasMore())
          {
              Repository repository = (Repository) results.next();
              cachedRepositories.add(repository.getValueObject());
          }
         
          results.close();
      oql.close();
View Full Code Here

   
    QueryResults results = oql.execute(Database.READONLY);
   
    if (results.hasMore())
    {
      Repository repository = (Repository)results.next();
      RepositoryVO repositoryVO = repository.getValueObject();
      repositoryVOList.add(repositoryVO);
    }

    results.close();
    oql.close();
View Full Code Here

    logger.info("Coming in with languageCodes:" + languageCodes);
   
        Language language = null;

      SiteNode siteNode = (SiteNode)getObjectWithId(SiteNodeImpl.class, siteNodeId, db);
    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();
View Full Code Here

        List<Repository> repositoryList = new ArrayList<Repository>();

      for(int i=0; i<repositories.length; i++)
      {
        Integer repositoryId = new Integer(repositories[i]);
        Repository repository   = RepositoryController.getController().getRepositoryWithId(repositoryId, db);
        logger.info("Read repo");
       
        /*
        SiteNode siteNode     = SiteNodeController.getController().getRootSiteNode(repositoryId, db);
        logger.info("Read siteNode");
        Content content     = ContentController.getContentController().getRootContent(repositoryId, db);
        logger.info("Read content");
        */

        InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.Read", db);
          if(interceptionPointVO != null)
            allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));
          logger.info("Read allAccessRights 1");

          interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.Write", db);
          if(interceptionPointVO != null)
            allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));
          logger.info("Read allAccessRights 2");

          interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.ReadForBinding", db);
          if(interceptionPointVO != null)
            allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));
          logger.info("Read allAccessRights 3:" + allAccessRights.size());

          allAccessRights.addAll(AccessRightController.getController().getContentAccessRightListOnlyReadOnly(repository.getId(), db));
          logger.info("Read allAccessRights 4:" + allAccessRights.size());

          allAccessRights.addAll(AccessRightController.getController().getSiteNodeAccessRightListOnlyReadOnly(repository.getId(), db));
          logger.info("Read allAccessRights 5:" + allAccessRights.size());
       
        getContentProperties(ps, allContentProperties, allExportedContents, db);
        logger.info("getContentPropertiesAndAccessRights");
       
        getSiteNodeProperties(ps, allSiteNodeProperties, allExportedSiteNodes, db);
        logger.info("getSiteNodePropertiesAndAccessRights");
       
        //siteNodes.add(siteNode);
        //contents.add(content);
        names = names + "_" + repository.getName();
        allRepositoryProperties.putAll(getRepositoryProperties(ps, repositoryId));
       
        repositoryList.add(repository);
      }
      processBean.updateProcess("Access rights: " + allAccessRights.size() + " exported in " + (t.getElapsedTime() / 1000) + " seconds");
View Full Code Here

      try
      {
        db.begin();
       
        Integer repositoryId = new Integer(repositories[i]);
        Repository repository = RepositoryController.getController().getRepositoryWithId(repositoryId, db);
        logger.info("Read repo");

        List<SiteNode> allSiteNodes = new ArrayList<SiteNode>();
        List<SiteNodeVersion> allSiteNodeVersions = new ArrayList<SiteNodeVersion>();
        List<Content> allContents = new ArrayList<Content>();
        List<ExportContentVersionImpl> allContentVersions = new ArrayList<ExportContentVersionImpl>();
        List<DigitalAsset> allDigitalAssets = new ArrayList<DigitalAsset>();

        if(type.equals("Contents"))
        {
          List<Content> contents = ContentController.getContentController().getContentList(repositoryId, 0, 5000, db);
          while(contents.size() > 0)
          {
            allContents.addAll(contents);
            contents = ContentController.getContentController().getContentList(repositoryId, contents.get(contents.size()-1).getContentId(), 5000, db);
            logger.info(".");
          }
          exportedEntities = allContents.size();
          logger.info("Read all contents");
        }
        if(type.equals("ContentVersions"))
        {
          List<ExportContentVersionImpl> contentVersions = ContentVersionController.getContentVersionController().getContentVersionList(repositoryId, 0, 5000, onlyPublishedVersions, db);
          while(contentVersions.size() > 0)
          {
            allContentVersions.addAll(contentVersions);
            contentVersions = ContentVersionController.getContentVersionController().getContentVersionList(repositoryId, contentVersions.get(contentVersions.size()-1).getContentVersionId(), 5000, onlyPublishedVersions, db);
            logger.info(".");
          }
          exportedEntities = allContentVersions.size();
          logger.info("Read all content versions");
        }

        if(type.equals("SiteNodes"))
        {
          List<SiteNode> siteNodes = SiteNodeController.getController().getSiteNodeList(repositoryId, 0, 5000, db);
          while(siteNodes.size() > 0)
          {
            allSiteNodes.addAll(siteNodes);
            siteNodes = SiteNodeController.getController().getSiteNodeList(repositoryId, siteNodes.get(siteNodes.size()-1).getSiteNodeId(), 5000, db);
            logger.info(".");
          }
          exportedEntities = allSiteNodes.size();
          logger.info("Read all siteNodes");
        }
       
        if(type.equals("SiteNodeVersions"))
        {
          List<SiteNodeVersion> siteNodeVersions = SiteNodeVersionController.getController().getSiteNodeVersionList(repositoryId, 0, 5000, onlyPublishedVersions, db);
          while(siteNodeVersions.size() > 0)
          {
            allSiteNodeVersions.addAll(siteNodeVersions);
            siteNodeVersions = SiteNodeVersionController.getController().getSiteNodeVersionList(repositoryId, siteNodeVersions.get(siteNodeVersions.size()-1).getSiteNodeVersionId(), 5000, onlyPublishedVersions, db);
            logger.info(".");
          }
          exportedEntities = allSiteNodeVersions.size();
        }
        if(type.equals("DigitalAssets"))
        {
          int assetCount = 0;
          List<DigitalAssetVO> assets = DigitalAssetController.getController().dumpDigitalAssetList(repositoryId, 0, 50, assetMaxSize, onlyPublishedVersions, folderName);
          while(assets.size() > 0)
          {
            assetCount += assets.size();
            //allDigitalAssets.addAll(assets);
            assets = DigitalAssetController.getController().dumpDigitalAssetList(repositoryId, assets.get(assets.size()-1).getDigitalAssetId(), 50, assetMaxSize, onlyPublishedVersions, folderName);
            logger.info(".");
          }
          exportedEntities = assetCount;
        }
       
        if(!type.equals("DigitalAssets"))
        {
          InfoGlueExportImpl infoGlueExportImpl = new InfoGlueExportImpl();
         
          String name = new VisualFormatter().replaceNonAscii(repository.getName(), '_');
         
          String fileName = type + "_" + repository.getId() + ".xml";
         
          /*
          if(exportFileName != null && !exportFileName.equals(""))
            fileName = exportFileName;
          */
 
View Full Code Here

    return new RepositoryController();
  }
 
    public RepositoryVO create(RepositoryVO vo) throws ConstraintException, SystemException
    {
        Repository ent = new RepositoryImpl();
        ent.setValueObject(vo);
        ent = (Repository) createEntity(ent);
        return ent.getValueObject();
    }    
View Full Code Here

        return ent.getValueObject();
    }    

    public Repository create(RepositoryVO vo, Database db) throws ConstraintException, SystemException, Exception
    {
        Repository ent = new RepositoryImpl();
        ent.setValueObject(vo);
        ent = (Repository) createEntity(ent, db);
        return ent;
    }    
View Full Code Here

    public void markForDelete(RepositoryVO repositoryVO, String userName, boolean forceDelete, InfoGluePrincipal infoGluePrincipal) throws ConstraintException, SystemException
    {
    Database db = CastorDatabaseService.getDatabase();
    ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

    Repository repository = null;
 
    beginTransaction(db);

    try
    {
      repository = getRepositoryWithId(repositoryVO.getRepositoryId(), db);
      repository.setIsDeleted(true);
     
      /*
      List<Content> contentList = ContentControllerProxy.getContentController().getRepositoryContents(repositoryId, db);
      Iterator<Content> contentListIterator = contentList.iterator();
      while(contentListIterator.hasNext())
View Full Code Here

    public void restoreRepository(Integer repositoryId, InfoGluePrincipal infoGluePrincipal) throws ConstraintException, SystemException
    {
    Database db = CastorDatabaseService.getDatabase();
    ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

    Repository repository = null;
 
    beginTransaction(db);

    try
    {
      repository = getRepositoryWithId(repositoryId, db);
      repository.setIsDeleted(false);
     
      List<Content> contentList = ContentControllerProxy.getContentController().getRepositoryContents(repositoryId, db);
      Iterator<Content> contentListIterator = contentList.iterator();
      while(contentListIterator.hasNext())
      {
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.