Package org.infoglue.cms.entities.management

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


    Map<String, ReferenceBean> entries = new HashMap<String, ReferenceBean>();
    List<ReferenceBean> references = new ArrayList<ReferenceBean>();
    for (String registryIdString : registryIds)
      {
      RegistryVO registryVO = getRegistryVOWithId(new Integer(registryIdString), db);
      if (logger.isInfoEnabled())
      {
        logger.info("About to remove registry bean. Referencing-type: " + registryVO.getReferencingEntityName() + ", referencing-id: " + registryVO.getReferencingEntityId());
      }
      ReferenceBean referenceBean = getReferenceBeanFromRegistryVO(registryVO, entries, checkedLanguageVersions, onlyLatest, true, db);
      if (referenceBean != null)
      {
        references.add(referenceBean);
      }
        delete(registryVO.getRegistryId(), db);
      }
    return references;
    }
View Full Code Here


  private Map<ContentVersionVO, RegistryVO> extractContentVersionsFromRegistryList(String[] registryIds, boolean onlyLatest, Database db) throws Throwable
  {
    Map<ContentVersionVO, RegistryVO> versionRegistryPair = new HashMap<ContentVersionVO, RegistryVO>();

    Integer registryId;
    RegistryVO registryVO;
    for (String registryIdString : registryIds)
    {
      registryId = new Integer(registryIdString);
      registryVO = RegistryController.getController().getRegistryVOWithId(registryId, db);
      extractContentVersionFromRegistry(versionRegistryPair, registryVO, onlyLatest, db);
View Full Code Here

  private Map<SiteNodeVO, RegistryVO> extractSiteNodesFromRegistryList(String[] registryIds, Database db) throws Exception
  {
    Map<SiteNodeVO, RegistryVO> siteNodeRegistryPair = new HashMap<SiteNodeVO, RegistryVO>();

    Integer registryId;
    RegistryVO registryVO;
    for (String registryIdString : registryIds)
    {
      registryId = new Integer(registryIdString);
      registryVO = RegistryController.getController().getRegistryVOWithId(registryId, db);
      extractSiteNodeFromRegistry(siteNodeRegistryPair, registryVO, db);
View Full Code Here

              String name = qualifyer.getName();
              String value = qualifyer.getValue();
 
                  try
                  {
                RegistryVO registryVO = new RegistryVO();
                registryVO.setReferenceType(RegistryVO.PAGE_BINDING);
                  if(name.equalsIgnoreCase("contentId"))
                {
                    // TODO REMOVE OPTMIZ!
//                      Content content = ContentController.getContentController().getContentWithId(new Integer(value), db);
                      ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(value), db);
                 
                      registryVO.setEntityId(value);
                    registryVO.setEntityName(Content.class.getName());
                   
                    registryVO.setReferencingEntityId(siteNodeVersionVO.getId().toString());
                    registryVO.setReferencingEntityName(SiteNodeVersion.class.getName());
                    registryVO.setReferencingEntityCompletingId("" + siteNodeId);
                    registryVO.setReferencingEntityCompletingName(SiteNode.class.getName());
               
                    SiteNodeVO snVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
                    LanguageVO masterLanguage = LanguageController.getController().getMasterLanguage(snVO.getRepositoryId(), db);
                    ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getContentId(), masterLanguage.getId(), db);
                    getComponents(siteNodeVersionVO, contentVersionVO.getVersionValue(), db);
                      getComponentBindings(siteNodeVersionVO, contentVersionVO.getVersionValue(), db);
                 
                    /*
                    Collection contentVersions = content.getContentVersions();
                    Iterator contentVersionIterator = contentVersions.iterator();
                    while(contentVersionIterator.hasNext())
                  {
                        ContentVersion contentVersion = (ContentVersion)contentVersionIterator.next();
                        getComponents(siteNodeVersion, contentVersion.getVersionValue(), db);
                        getComponentBindings(siteNodeVersion, contentVersion.getVersionValue(), db);
                    }
                    */
                }
                  else if(name.equalsIgnoreCase("siteNodeId"))
                {
                      registryVO.setEntityId(value);
                    registryVO.setEntityName(SiteNode.class.getName());
                   
                    registryVO.setReferencingEntityId(siteNodeVersionVO.getId().toString());
                    registryVO.setReferencingEntityName(SiteNodeVersion.class.getName());
                    registryVO.setReferencingEntityCompletingId("" + siteNodeId);
                registryVO.setReferencingEntityCompletingName(SiteNode.class.getName());
                }
                 
                logger.info("Before creating registry entry...");
               
                  this.create(registryVO, db);
View Full Code Here

           
            if(name != null && value != null)
            {
                    try
                    {
                  RegistryVO registryVO = new RegistryVO();
                  registryVO.setReferenceType(RegistryVO.PAGE_BINDING);
                    if(name.equalsIgnoreCase("contentId"))
                  {
  //                      Content content = ContentController.getContentController().getContentWithId(new Integer(value), db);
                   
                        registryVO.setEntityId(value);
                      registryVO.setEntityName(Content.class.getName());
                     
                      registryVO.setReferencingEntityId(siteNodeVersion.getId().toString());
                      registryVO.setReferencingEntityName(SiteNodeVersion.class.getName());
  //                    registryVO.setReferencingEntityCompletingId(oldSiteNode.getId().toString());
                      registryVO.setReferencingEntityCompletingId(siteNodeVersion.getSiteNodeId().toString());
                      registryVO.setReferencingEntityCompletingName(SiteNode.class.getName());
                 
                      /*
                      Collection contentVersions = content.getContentVersions();
                      Iterator contentVersionIterator = contentVersions.iterator();
                      while(contentVersionIterator.hasNext())
                      {
                          ContentVersion contentVersion = (ContentVersion)contentVersionIterator.next();
                          getComponents(siteNodeVersion, contentVersion.getVersionValue(), db);
                          getComponentBindings(siteNodeVersion, contentVersion.getVersionValue(), db);
                      }
                      */
                  }
                    else if(name.equalsIgnoreCase("siteNodeId"))
                  {
  //                      SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(new Integer(value), db);
                       
                        registryVO.setEntityId(value);
                      registryVO.setEntityName(SiteNode.class.getName());
                     
                      registryVO.setReferencingEntityId(siteNodeVersion.getId().toString());
                      registryVO.setReferencingEntityName(SiteNodeVersion.class.getName());
                      registryVO.setReferencingEntityCompletingId(siteNodeVersion.getSiteNodeId().toString());
                      registryVO.setReferencingEntityCompletingName(SiteNode.class.getName());
                  }
                   
                  logger.info("Before creating registry entry...");
 
                    this.create(registryVO, db);
View Full Code Here

              {
                if(siteNodeIdString.indexOf("templateLogic.siteNodeId") == -1)
                {
                  siteNodeId = new Integer(siteNodeIdString);
                  logger.info("siteNodeId:" + siteNodeId);
                  RegistryVO registryVO = new RegistryVO();
                  registryVO.setEntityId(siteNodeId.toString());
                  registryVO.setEntityName(SiteNode.class.getName());
                  registryVO.setReferenceType(RegistryVO.INLINE_LINK);
                  registryVO.setReferencingEntityId(contentVersion.getContentVersionId().toString());
                  registryVO.setReferencingEntityName(ContentVersion.class.getName());
                  registryVO.setReferencingEntityCompletingId(contentVersion.getContentId().toString());
                  registryVO.setReferencingEntityCompletingName(Content.class.getName());
                 
                  this.create(registryVO, db);
                }
              }
              catch(Exception e)
View Full Code Here

              if(contentIdString != null && !contentIdString.equals(""))
              {
              contentId = new Integer(contentIdString);
                logger.info("contentId:" + contentId);
               
                RegistryVO registryVO = new RegistryVO();
                registryVO.setEntityId(contentId.toString());
                registryVO.setEntityName(Content.class.getName());
                registryVO.setReferenceType(RegistryVO.INLINE_ASSET);
                registryVO.setReferencingEntityId(contentVersion.getContentVersionId().toString());
                registryVO.setReferencingEntityName(ContentVersion.class.getName());
                registryVO.setReferencingEntityCompletingId(contentVersion.getContentId().toString());
                registryVO.setReferencingEntityCompletingName(Content.class.getName());
               
                this.create(registryVO, db);
              }
          }
      }
View Full Code Here

          int siteNodeEndIndex = match.indexOf("</id>");
          while(siteNodeStartIndex > 0 && siteNodeEndIndex > 0 && siteNodeEndIndex > siteNodeStartIndex)
          {
              siteNodeId = new Integer(match.substring(siteNodeStartIndex + 4, siteNodeEndIndex));
              logger.info("siteNodeId:" + siteNodeId);
              RegistryVO registryVO = new RegistryVO();
              registryVO.setEntityId(siteNodeId.toString());
              registryVO.setEntityName(SiteNode.class.getName());
              registryVO.setReferenceType(RegistryVO.INLINE_SITE_NODE_RELATION);
              registryVO.setReferencingEntityId(contentVersion.getContentVersionId().toString());
              registryVO.setReferencingEntityName(ContentVersion.class.getName());
              registryVO.setReferencingEntityCompletingId(contentVersion.getContentId().toString());
              registryVO.setReferencingEntityCompletingName(Content.class.getName());
             
              this.create(registryVO, db);
             
              siteNodeStartIndex = match.indexOf("<id>", siteNodeEndIndex);
            siteNodeEndIndex = match.indexOf("</id>", siteNodeStartIndex);
View Full Code Here

          while(contentStartIndex > 0 && contentEndIndex > 0 && contentEndIndex > contentStartIndex)
          {
              contentId = new Integer(match.substring(contentStartIndex + 4, contentEndIndex));
              logger.info("contentId:" + contentId);
             
              RegistryVO registryVO = new RegistryVO();
              registryVO.setEntityId(contentId.toString());
              registryVO.setEntityName(Content.class.getName());
              registryVO.setReferenceType(RegistryVO.INLINE_CONTENT_RELATION);
              registryVO.setReferencingEntityId(contentVersion.getContentVersionId().toString());
              registryVO.setReferencingEntityName(ContentVersion.class.getName());
              registryVO.setReferencingEntityCompletingId(contentVersion.getContentId().toString());
              registryVO.setReferencingEntityCompletingName(Content.class.getName());
             
              this.create(registryVO, db);
             
              contentStartIndex = match.indexOf("<id>", contentEndIndex);
              contentEndIndex = match.indexOf("</id>", contentStartIndex);
View Full Code Here

              contentId = new Integer(match.substring(contentStartIndex + 1, contentEndIndex));
              logger.info("contentId:" + contentId);
             
              if(!foundComponents.contains(contentId))
              {
                RegistryVO registryVO = new RegistryVO();
                registryVO.setEntityId(contentId.toString());
                registryVO.setEntityName(Content.class.getName());
                registryVO.setReferenceType(RegistryVO.PAGE_COMPONENT);
                registryVO.setReferencingEntityId(siteNodeVersion.getSiteNodeVersionId().toString());
                registryVO.setReferencingEntityName(SiteNodeVersion.class.getName());
                registryVO.setReferencingEntityCompletingId("" + siteNodeVersion.getSiteNodeId());
                registryVO.setReferencingEntityCompletingName(SiteNode.class.getName());
               
                this.create(registryVO, db);
               
                foundComponents.add(contentId);
              }
View Full Code Here

TOP

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

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.