Package org.infoglue.cms.entities.management

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


            }
          }

          if(this.siteNodeId != null)
          {
            RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(this.repositoryId);
 
            String dnsName = repositoryVO.getDnsName();
 
              String workingUrl = null;
             
              String keyword = "working=";
              int startIndex = (dnsName == null) ? -1 : dnsName.indexOf(keyword);
View Full Code Here


               
                logger.info("repositoryString:" + repositoryString);
                logger.info("restString:" + restString);
                try
                {
                  RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithName(repositoryString);
                  logger.info("repositoryVO:" + repositoryVO);
                  if(repositoryVO == null)
                  {
                    logger.warn("No repository found by name " + repositoryString + ". Looking for a default repository where other templates are located.");
                    List templates = ContentController.getContentController().getContentVOWithContentTypeDefinition("HTMLTemplate");
                    if(templates != null && templates.size() > 0)
                    {
                      ContentVO contentVO = (ContentVO)templates.get(0);
                      repositoryVO = RepositoryController.getController().getRepositoryVOWithId(contentVO.getRepositoryId());
                      logger.info("repositoryVO:" + repositoryVO);
                    }
                  }
                 
                  if(repositoryVO != null)
                  {
                    LanguageVO languageVO = LanguageController.getController().getMasterLanguage(repositoryVO.getRepositoryId());
 
                    ContentVO parentContent = ContentController.getContentController().getContentVOWithPath(repositoryVO.getId(), restString, true, this.getInfoGluePrincipal());
                    logger.info("parentContent:" + parentContent);
                    ContentVO newContentVO = ContentController.getContentController().create(parentContent.getId(), contentTypeDefinitionVO.getContentTypeDefinitionId(), parentContent.getRepositoryId(), remoteContentVO);
                    logger.info("Now we want to create the version also on:" + newContentVO.getName());
                    ContentVersionVO contentVersionVO = new ContentVersionVO();
                    contentVersionVO.setVersionComment("deployment");
View Full Code Here

    List repositoryVOList = RepositoryController.getController().getAuthorizedRepositoryVOList(infogluePrincipal, false);
    Iterator repositoryVOListIterator = repositoryVOList.iterator();
    while(repositoryVOListIterator.hasNext())
    {
      RepositoryVO repositoryVO = (RepositoryVO)repositoryVOListIterator.next();
     
      Timer t = new Timer();
      List events = PublicationController.getPublicationEvents(repositoryVO.getId(), infogluePrincipal, "all", false);
      List groupEvents = PublicationController.getPublicationEvents(repositoryVO.getId(), infogluePrincipal, "groupBased", false);
      //t.printElapsedTime("Events took...");
     
      r.add(new PublishingNodeImpl(repositoryVO.getId(), "" + repositoryVO.getName() + " (" + (events.size() > 0 ? "<strong>" : "") + events.size() + (events.size() > 0 ? "</strong>" : "") + "/" + (groupEvents.size() > 0 ? "<strong>" : "") + groupEvents.size() + (groupEvents.size() > 0 ? "</strong>" : "") + ")", "ViewPublications!V3.action?repositoryId=" + repositoryVO.getId(), parameters));
    }

    Map parameterMap = new HashMap();
    parameterMap.put("extraMarkup", "System wide");
   
View Full Code Here

    }

    Iterator<RepositoryVO> repositoriesMarkedForDeletionIterator = repositoriesMarkedForDeletion.iterator();
    while(repositoriesMarkedForDeletionIterator.hasNext())
    {
      RepositoryVO repositoryVO = repositoriesMarkedForDeletionIterator.next();
      try
      {
        RepositoryController.getController().delete(repositoryVO, true, getInfoGluePrincipal());
      }
      catch (Exception e)
      {
        logger.error("Could not delete repository[" + repositoryVO.getName() + "]:" + e.getMessage());
        logger.warn("Could not delete repository[" + repositoryVO.getName() + "]:" + e.getMessage(), e);
      }
    }
   
    return doExecute();
    }
View Full Code Here

     private static VisualFormatter formatter = new VisualFormatter();

  public static ToolbarButton getPreviewButtons(Integer repositoryId, Integer siteNodeId, String siteNodeVersionId, Locale locale) throws Exception
  {
    RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(repositoryId);
   
    String dnsName = repositoryVO.getDnsName();

      String workingUrl = null;
     
      String keyword = "working=";
      int startIndex = (dnsName == null) ? -1 : dnsName.indexOf(keyword);
View Full Code Here

  }
 
 
  public static ToolbarButton getPreviewButton(Integer repositoryId, Integer siteNodeId, Locale locale) throws Exception
  {
    RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(repositoryId);
   
    String dnsName = repositoryVO.getDnsName();

      String workingUrl = null;
     
      String keyword = "working=";
      int startIndex = (dnsName == null) ? -1 : dnsName.indexOf(keyword);
View Full Code Here

          }

          String repositoryName = getRepositoryNameFromCheckoutFile(missingRemoteContentFile);
          logger.info("repositoryName:" + repositoryName);
          logger.info("templateLanguageCode:" + templateLanguageCode);
        RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithName(repositoryName);
        LanguageVO masterLanguageVO = LanguageController.getController().getLanguageVOWithCode(templateLanguageCode);
       
       
        ContentVO localParentContentVO = null;
        if(repositoryVO == null)
        {
          RepositoryVO newRepositoryVO = new RepositoryVO();
          newRepositoryVO.setName(repositoryName);
          newRepositoryVO.setDnsName("undefined");
          newRepositoryVO.setDescription("Autogenerated during cvs sync");

          repositoryVO = RepositoryController.getController().create(newRepositoryVO);
          if(masterLanguageVO == null)
            masterLanguageVO = (LanguageVO)LanguageController.getController().getLanguageVOList().get(0);
         
View Full Code Here

    Integer repositoryId = (Integer)getHttpSession().getAttribute("structureRepositoryId");
    try
    {
      if (repositoryId != null)
      {
        RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(repositoryId);
        repositoryId = repositoryVO.getId();
      }
    }
    catch (Exception e)
    {
      logger.warn("Not a valid repository. repositoryId: " + repositoryId);
View Full Code Here

      Integer repositoryId = (Integer)getHttpSession().getAttribute("contentRepositoryId");
      try
    {
      if (repositoryId != null)
      {
        RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(repositoryId);
        repositoryId = repositoryVO.getId();
      }
    }
    catch (Exception e)
    {
      logger.warn("Not a valid repository. repositoryId: " + repositoryId);
View Full Code Here

    Integer repositoryId = (Integer)this.getHttpSession().getAttribute("repositoryId");
    try
    {
      if (repositoryId != null)
      {
        RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(repositoryId);
        repositoryId = repositoryVO.getId();
      }
    }
    catch (Exception e)
    {
      logger.warn("Not a valid repository. repositoryId: " + repositoryId);
      repositoryId = null;
    }
   
    logger.info("repositoryId:" + repositoryId);
    if(repositoryId == null)
    {
        String prefferedRepositoryId = CmsPropertyHandler.getPreferredRepositoryId(this.getInfoGluePrincipal().getName());
        logger.info("prefferedRepositoryId:" + prefferedRepositoryId);
        if(prefferedRepositoryId != null && prefferedRepositoryId.length() > 0)
        {
          repositoryId = new Integer(prefferedRepositoryId);
          logger.info("Setting session repositoryId:" + repositoryId);
          getHttpSession().setAttribute("repositoryId", repositoryId);   
        }
        else
        {
          try
        {
          List authorizedRepositoryVOList = getAuthorizedRepositoryVOList();
          if(authorizedRepositoryVOList != null && authorizedRepositoryVOList.size() > 0)
          {
            RepositoryVO repositoryVO = (RepositoryVO)authorizedRepositoryVOList.get(0);
            repositoryId = repositoryVO.getId();
            if(logger.isDebugEnabled())
              logger.debug("Setting session repositoryId:" + repositoryId);
              getHttpSession().setAttribute("repositoryId", repositoryId)
          }
        }
View Full Code Here

TOP

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

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.