Package org.infoglue.cms.entities.structure

Examples of org.infoglue.cms.entities.structure.SiteNodeVO


    }
     
      if(this.repositoryId == null && this.contentId != null)
      {
      this.repositoryId = ContentController.getContentController().getContentVOWithId(this.contentId).getRepositoryId();
        SiteNodeVO rootSiteNodeVO = SiteNodeController.getController().getRootSiteNodeVO(this.repositoryId);
      if(rootSiteNodeVO != null)
        this.siteNodeId = rootSiteNodeVO.getId();
      }
     
        return "success";
    }
View Full Code Here


    this.siteNodesMarkedForDeletion = SiteNodeController.getController().getSiteNodeVOListMarkedForDeletion(this.repositoryFilter, getInfoGluePrincipal());

    Iterator<SiteNodeVO> siteNodesMarkedForDeletionIterator = siteNodesMarkedForDeletion.iterator();
    while(siteNodesMarkedForDeletionIterator.hasNext())
    {
      SiteNodeVO siteNodeVO = siteNodesMarkedForDeletionIterator.next();
      try
      {
        SiteNodeControllerProxy.getSiteNodeControllerProxy().acDelete(getInfoGluePrincipal(), siteNodeVO, true);
      }
      catch (Exception e)
      {
        logger.error("Could not delete page[" + siteNodeVO.getName() + "]:" + e.getMessage());
        logger.warn("Could not delete page[" + siteNodeVO.getName() + "]:" + e.getMessage(), e);
      }
    }

    Iterator<ContentVO> contentsMarkedForDeletionIterator = contentsMarkedForDeletion.iterator();
    while(contentsMarkedForDeletionIterator.hasNext())
View Full Code Here

          continue;
         
        if(path.indexOf("/") == 0)
          path = path.substring(1);
       
        SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId, db);
        ContentVO parentContentVO = ContentController.getContentController().getRootContent(db, siteNodeVO.getRepositoryId(), principal.getName(), true).getValueObject();
        if(method.equals("siteStructure"))
        {
          String siteNodePath = SiteNodeController.getController().getSiteNodePath(siteNodeVO.getId(), db);
          logger.info("siteNodePath:" + siteNodePath);
          parentContentVO = ContentController.getContentController().getContentVOWithPath(siteNodeVO.getRepositoryId(), path + siteNodePath, true, principal, db);
        }
        else if(method.equals("fixedPath"))
        {
          parentContentVO = ContentController.getContentController().getContentVOWithPath(siteNodeVO.getRepositoryId(), path, true, principal, db);
        }
       
        ContentVO autoContentVO = new ContentVO();
        autoContentVO.setName(siteNodeVO.getName() + " - " + componentPropertyDefinition.getName());
        autoContentVO.setCreatorName(principal.getName());
        autoContentVO.setIsBranch(false);

        StringBuffer sb = new StringBuffer();
        sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?><article xmlns=\"x-schema:ArticleSchema.xml\"><attributes>");
        List contentTypeAttributes = ContentTypeDefinitionController.getController().getContentTypeAttributes(createContentTypeDefinitionVO, true);
        Iterator contentTypeAttributesIterator = contentTypeAttributes.iterator();
        while(contentTypeAttributesIterator.hasNext())
        {
          ContentTypeAttribute contentTypeAttribute = (ContentTypeAttribute)contentTypeAttributesIterator.next();
          String initialValue = null;
          if(contentTypeAttribute.getContentTypeAttribute("initialData") != null && contentTypeAttribute.getContentTypeAttribute("initialData").getContentTypeAttributeParameterValue() != null)
          {
            initialValue = contentTypeAttribute.getContentTypeAttribute("initialData").getContentTypeAttributeParameterValue().getValue("label");
          }
         
          boolean skip = false;
          if(contentTypeAttribute.getContentTypeAttribute("enableRelationEditor") != null && contentTypeAttribute.getContentTypeAttribute("enableRelationEditor").getContentTypeAttributeParameterValue() != null && contentTypeAttribute.getContentTypeAttribute("enableRelationEditor").getContentTypeAttributeParameterValue().getValue("label").equals("true"))
          {
            skip = true;
          }
          if(contentTypeAttribute.getContentTypeAttribute("enableContentRelationEditor") != null && contentTypeAttribute.getContentTypeAttribute("enableContentRelationEditor").getContentTypeAttributeParameterValue() != null && contentTypeAttribute.getContentTypeAttribute("enableContentRelationEditor").getContentTypeAttributeParameterValue().getValue("label").equals("true"))
          {
            skip = true;
          }
          if(contentTypeAttribute.getContentTypeAttribute("enableStructureRelationEditor") != null && contentTypeAttribute.getContentTypeAttribute("enableStructureRelationEditor").getContentTypeAttributeParameterValue() != null && contentTypeAttribute.getContentTypeAttribute("enableStructureRelationEditor").getContentTypeAttributeParameterValue().getValue("label").equals("true"))
          {
            skip = true;
          }
          if(!skip)
          {
            if(initialValue == null || initialValue.trim().equals(""))
              initialValue = "State " + contentTypeAttribute.getName();
            sb.append("<" + contentTypeAttribute.getName() + "><![CDATA[" + initialValue + "]]></" + contentTypeAttribute.getName() + ">");
          }
          else
            logger.info("Skipping:" + contentTypeAttribute.getName());
        }
        sb.append("</attributes></article>");
       
        String defaultValue = sb.toString();

        ContentVersionVO autoContentVersionVO = new ContentVersionVO();
        autoContentVersionVO.setVersionComment("Automatically created");
        autoContentVersionVO.setVersionModifier(principal.getName());
        autoContentVersionVO.setVersionValue(defaultValue);
       
        autoContentVO = ContentController.getContentController().create(db, parentContentVO.getId(), createContentTypeDefinitionVO.getId(), siteNodeVO.getRepositoryId(), autoContentVO).getValueObject();
        ContentVersionController.getContentVersionController().create(autoContentVO.getId(), languageId, autoContentVersionVO, null, db);
       
        Locale locale = LanguageController.getController().getLocaleWithId(languageId, db);
        LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(siteNodeVO.getRepositoryId(), db);   

        String entity = "Content";
        Integer entityId  = new Integer(autoContentVO.getId());
        String propertyName = "" + componentPropertyDefinition.getName();
       
View Full Code Here

       
           List arguments = (List)envelope.getNodes();
          Integer repositoryId = ((Node)arguments.get(0)).getId();
      logger.info("repositoryId:" + repositoryId);
            ViewSiteNodeTreeUCC viewSiteNodeTreeUCC = ViewSiteNodeTreeUCCFactory.newViewSiteNodeTreeUCC();
            SiteNodeVO siteNodeVO = viewSiteNodeTreeUCC.getRootSiteNode(repositoryId, getInfoGluePrincipal());
            logger.info("siteNodeVO:" + siteNodeVO.getSiteNodeId() + " " + siteNodeVO.getName());
            Node node = new Node();
            node.setId(siteNodeVO.getSiteNodeId());
            node.setName(siteNodeVO.getName());
            node.setIsBranch(siteNodeVO.getIsBranch());
           
            List nodes = new ArrayList();
            nodes.add(node);
            responseEnvelope.setNodes(nodes);
        }
View Full Code Here

       
          List arguments = (List)envelope.getNodes();
          Integer siteNodeId = ((Node)arguments.get(0)).getId();
      logger.info("siteNodeId:" + siteNodeId);
            ViewSiteNodeTreeUCC viewSiteNodeTreeUCC = ViewSiteNodeTreeUCCFactory.newViewSiteNodeTreeUCC();
            SiteNodeVO siteNodeVO = viewSiteNodeTreeUCC.getSiteNode(siteNodeId);
            logger.info("siteNodeVO:" + siteNodeVO.getSiteNodeId() + " " + siteNodeVO.getName());
            Node node = new Node();
            node.setId(siteNodeVO.getSiteNodeId());
            node.setName(siteNodeVO.getName());
            node.setIsBranch(siteNodeVO.getIsBranch());
           
            List nodes = new ArrayList();
            nodes.add(node);
            responseEnvelope.setNodes(nodes);
        }
View Full Code Here

      List nodes = new ArrayList();
      Iterator childIterator = childSiteNodes.iterator();
     
      while(childIterator.hasNext())
      {
        SiteNodeVO siteNodeVO = (SiteNodeVO)childIterator.next();
        Node node = new Node();
              node.setId(siteNodeVO.getSiteNodeId());
              node.setName(siteNodeVO.getName());
              node.setIsBranch(siteNodeVO.getIsBranch());
              nodes.add(node);
      }       
      
            responseEnvelope.setNodes(nodes);
        }
View Full Code Here

    {
        boolean isMetaInfoInWorkingState = false;
      LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(repositoryId);
      Integer languageId = masterLanguageVO.getLanguageId();

      SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
      if(siteNodeVO.getMetaInfoContentId() != null && siteNodeVO.getMetaInfoContentId().intValue() != -1)
      {
        ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(siteNodeVO.getMetaInfoContentId(), languageId);
        if(contentVersionVO.getStateId().equals(ContentVersionVO.WORKING_STATE))
          isMetaInfoInWorkingState = true;
      }

      logger.info("isMetaInfoInWorkingState:" + isMetaInfoInWorkingState);
View Full Code Here

        else
          logger.warn("A content has a content relation to a removed content. entityId: " + entityId);
      }
      else if(entity.equalsIgnoreCase("SiteNode"))
      {
        SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(new Integer(entityId));
        if(siteNodeVO != null)
        {
          sb.insert(0, siteNodeVO.getName() + "/");
          while(siteNodeVO.getParentSiteNodeId() != null)
          {
            siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVO.getParentSiteNodeId());
            sb.insert(0, siteNodeVO.getName() + "/");
          }
        }
        else
          logger.warn("A content has a structure relation to a removed page. entityId: " + entityId);
      }
View Full Code Here

        }
        this.isMetainfoContent = true;
       
        try
        {
          SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithMetaInfoContentId(this.getContentId());
          this.siteNodeName = siteNodeVO.getName();
          this.siteNodeId = siteNodeVO.getId();
        }
        catch (Exception e)
        {
          logger.error("Error getting site node for meta-info: " + e.getMessage());
        }
View Full Code Here

        try
        {
          String path = "Undefined";
          if(entityName.equalsIgnoreCase("SiteNode"))
          {
            SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(new Integer(entityId));
            path = siteNodeVO.getName();
          }
          else if(entityName.equalsIgnoreCase("Content"))
          {
            ContentVO contentVO = ContentController.getContentController().getContentVOWithId(new Integer(entityId));
            path = contentVO.getName();
View Full Code Here

TOP

Related Classes of org.infoglue.cms.entities.structure.SiteNodeVO

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.