Package org.infoglue.cms.entities.structure

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


        throw new SystemException("There was no template bound to this page which makes it impossible to render.")
     
      ContentVersionVO contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), languageId);
      if(contentVersionVO == null)
      {
        SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
        LanguageVO masterLanguage = LanguageController.getController().getMasterLanguage(siteNodeVO.getRepositoryId());
        contentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(contentVO.getId(), masterLanguage.getLanguageId());
      }
     
      template = ContentVersionController.getContentVersionController().getAttributeValue(contentVersionVO.getId(), "ComponentStructure", false);
     
View Full Code Here


    {
    List<Integer> uniqueList = new ArrayList<Integer>();
    List<ReferenceBean> refList = RegistryController.getController().getReferencingObjectsForContent(new Integer(getRequest().getParameter("contentId")), 100, true, true);
    if(getRequest().getParameter("isMetaInfoContent") != null && getRequest().getParameter("isMetaInfoContent").equals("true"))
    {
      SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithMetaInfoContentId(new Integer(getRequest().getParameter("contentId")));
      if(siteNodeVO != null)
      {
        refList = RegistryController.getController().getReferencingObjectsForSiteNode(siteNodeVO.getId(), 100, true, true);
      }
    }
    for(ReferenceBean bean : refList)
    {
      if(bean.getReferencingCompletingObject() instanceof ContentVO)
View Full Code Here

    Integer siteNodeId = null;
    if(getRequest().getParameter("siteNodeId") != null && !getRequest().getParameter("siteNodeId").equals("") && !getRequest().getParameter("siteNodeId").equals("null"))
      siteNodeId = new Integer(getRequest().getParameter("siteNodeId"));
 
    SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
    SiteNodeVersionVO latestVersion = SiteNodeVersionController.getController().getLatestActiveSiteNodeVersionVO(siteNodeId);

    String autoShowApprovalButtons = CmsPropertyHandler.getAutoShowApprovalButtons();
    String useApprovalFlow = CmsPropertyHandler.getUseApprovalFlow();
    boolean showEvent = false;
   
    if(autoShowApprovalButtons.equals("true"))
    {
      boolean isApprover = false;
      boolean hasAccessToPublishingTool = hasAccessTo("Common.ApproveDenyPublications", false);
      if(!hasAccessToPublishingTool)
        hasAccessToPublishingTool = hasAccessTo("PublishingTool.Read", false);
      if(hasAccessToPublishingTool)
      {
        boolean hasAccessToRepository = hasAccessTo("Repository.Read", "" + siteNodeVO.getRepositoryId());
        if(!hasAccessToRepository)
          hasAccessToRepository = hasAccessTo("Repository.Write", "" + siteNodeVO.getRepositoryId());
       
        if(hasAccessToRepository)
          isApprover = true;
      }
     
View Full Code Here

  public SiteNodeNodeSupplier(Integer repositoryId, InfoGluePrincipal infoGluePrincipal, Integer sortLanguageId) throws SystemException
  {
      this.infogluePrincipal = infoGluePrincipal;
      this.sortLanguageId = sortLanguageId;
     
    SiteNodeVO vo =null;
    ucc = ViewSiteNodeTreeUCCFactory.newViewSiteNodeTreeUCC()
    try
    {
      if(repositoryId != null && repositoryId.intValue() > 0)
      {
        vo = ucc.getRootSiteNode(repositoryId, infoGluePrincipal);
        BaseNode rootNode =  new SiteNodeNodeImpl();
        rootNode.setChildren(true);
        rootNode.setId(vo.getId());
        rootNode.setTitle(vo.getName());
        rootNode.setContainer(vo.getIsBranch().booleanValue())
       
        setRootNode(rootNode);
      }
    }
    catch (ConstraintException e)
View Full Code Here

          Integer expectedSortOrder = 0;
         
      Iterator<SiteNodeVO> i = childrenVOList.iterator();
      while(i.hasNext())
      {
        SiteNodeVO vo = i.next();

        LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(vo.getRepositoryId(), db);

        boolean hasUserPageAccess = true;
        String useAccessRightsOnStructureTreeString = CmsPropertyHandler.getUseAccessRightsOnStructureTree();
        if(useAccessRightsOnStructureTreeString != null && useAccessRightsOnStructureTreeString.equalsIgnoreCase("true"))
          hasUserPageAccess = getHasUserPageAccess(this.infogluePrincipal, vo.getId());
       
        if(hasUserPageAccess)
        {
          BaseNode node =  new SiteNodeNodeImpl();
          node.setId(vo.getId());
          node.setTitle(vo.getName());
         
          Boolean isLanguageAvailable = SiteNodeController.getController().getIsLanguageAvailable(vo.getId(), this.sortLanguageId, db, this.infogluePrincipal);
          node.getParameters().put("isLanguageAvailable", "" + isLanguageAvailable);
         
          ContentVersionVO cvVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(vo.getMetaInfoContentId(), this.sortLanguageId, db);
          if(cvVO != null)
          {
            node.getParameters().put("isLocalized", "true");
            String navigationTitle = ContentVersionController.getContentVersionController().getAttributeValue(cvVO, "NavigationTitle", true);
            node.setLocalizedTitle(navigationTitle);
          }
          else
          {
            node.getParameters().put("isLocalized", "false");
            if(this.sortLanguageId != null && masterLanguageVO.getId().intValue() != this.sortLanguageId.intValue())
            {
              ContentVersionVO masterCVVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(vo.getMetaInfoContentId(), masterLanguageVO.getId(), db);
              if(masterCVVO != null)
              {
                String navigationTitle = ContentVersionController.getContentVersionController().getAttributeValue(masterCVVO, "NavigationTitle", true);
                node.setLocalizedTitle(navigationTitle);
              }
            }
          }
         
          if(vo.getIsHidden() != null)
            node.getParameters().put("isHidden", "" + vo.getIsHidden());

          if(vo.getStateId() != null)
          {
            if(vo.getStateId() != SiteNodeVersionVO.PUBLISHED_STATE)
            {
              Timer t = new Timer();
              Set<SiteNodeVersionVO> siteNodeVersionVOList = new HashSet<SiteNodeVersionVO>();
              Set<ContentVersionVO> contentVersionVOList = new HashSet<ContentVersionVO>();
             
              ProcessBean processBean = ProcessBean.createProcessBean(ViewListSiteNodeVersionAction.class.getName(), "" + infogluePrincipal.getName());
              SiteNodeVersionController.getController().getSiteNodeAndAffectedItemsRecursive(vo.getId(), SiteNodeVersionVO.WORKING_STATE, siteNodeVersionVOList, contentVersionVOList, false, false, infogluePrincipal, processBean, masterLanguageVO.getLocale(), -1);
              if(siteNodeVersionVOList.size() > 0 || contentVersionVOList.size() > 0)
                node.getParameters().put("stateId", "0");
              else
                node.getParameters().put("stateId", "" + vo.getStateId());
             
              RequestAnalyser.getRequestAnalyser().registerComponentStatistics("getSiteNodeAndAffectedItemsRecursive", t.getElapsedTime());
            }
            else
            {
              node.getParameters().put("stateId", "" + vo.getStateId());
            }
          }
         
          if(vo.getIsProtected() != null && vo.getIsProtected().intValue() == SiteNodeVersionVO.YES.intValue())
            node.getParameters().put("isProtected", "true");

          if (vo.getIsBranch().booleanValue())
          {
            node.setContainer(true);
            node.setChildren((vo.getChildCount().intValue() > 0)); //
            ret.add(node);
          }
          else
          {
            node.setContainer(false);
View Full Code Here

    return contentVO;
  }

  public SiteNodeVO getSiteNodeVO(Integer siteNodeId) throws Exception
  {
    SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);

    return siteNodeVO;
  }
View Full Code Here

    String fileName = formEntryAsset.getId() + "_" + formEntryAsset.getFileName();
    String filePath = CmsPropertyHandler.getDigitalAssetPath();
   
    dumpDigitalAsset(formEntryAsset, fileName, filePath);
   
    SiteNodeVO siteNodeVO = NodeDeliveryController.getNodeDeliveryController(deliveryContext.getSiteNodeId(), deliveryContext.getLanguageId(), deliveryContext.getContentId()).getSiteNodeVO(db, deliveryContext.getSiteNodeId());
    String dnsName = CmsPropertyHandler.getWebServerAddress();
    if(siteNodeVO != null)
    {
      RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(siteNodeVO.getRepositoryId(), db);
      if(repositoryVO.getDnsName() != null && !repositoryVO.getDnsName().equals(""))
        dnsName = repositoryVO.getDnsName();
    }

    assetUrl = URLComposer.getURLComposer().composeDigitalAssetUrl(dnsName, null, fileName, deliveryContext);
View Full Code Here

      String fileName = formEntryAsset.getId() + "_" + formEntryAsset.getFileName();
      String filePath = CmsPropertyHandler.getDigitalAssetPath();
     
      dumpDigitalAsset(formEntryAsset, fileName, filePath);
     
      SiteNodeVO siteNodeVO = NodeDeliveryController.getNodeDeliveryController(deliveryContext.getSiteNodeId(), deliveryContext.getLanguageId(), deliveryContext.getContentId()).getSiteNodeVO(db, deliveryContext.getSiteNodeId());
      String dnsName = CmsPropertyHandler.getWebServerAddress();
      if(siteNodeVO != null)
      {
        RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(siteNodeVO.getRepositoryId(), db);
        if(repositoryVO.getDnsName() != null && !repositoryVO.getDnsName().equals(""))
          dnsName = repositoryVO.getDnsName();
      }
      assetUrl = URLComposer.getURLComposer().composeDigitalAssetUrl(dnsName, null, fileName, deliveryContext);
View Full Code Here

   * This method handles versioning and state-control of siteNodes.
   * Se inline documentation for further explainations.
   */
    public SiteNodeVersionVO changeState(Integer oldSiteNodeVersionId, Integer stateId, String versionComment, boolean overrideVersionModifyer, String recipientFilter, InfoGluePrincipal infoGluePrincipal, Integer siteNodeId, List<EventVO> resultingEvents) throws ConstraintException, SystemException
    {
      SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
      return changeState(oldSiteNodeVersionId, siteNodeVO, stateId, versionComment, overrideVersionModifyer, recipientFilter, infoGluePrincipal, resultingEvents);
    }
View Full Code Here

   * Se inline documentation for further explainations.
   */
 
    public SiteNodeVersionVO changeState(Integer oldSiteNodeVersionId, Integer stateId, String versionComment, boolean overrideVersionModifyer, String recipientFilter, InfoGluePrincipal infoGluePrincipal, Database db, Integer siteNodeId, List<EventVO> resultingEvents) throws ConstraintException, SystemException
    {
      SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
      return changeState(oldSiteNodeVersionId, siteNodeVO, stateId, versionComment, overrideVersionModifyer, recipientFilter, infoGluePrincipal, db, resultingEvents);
    }
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.