Examples of SiteNodeVersionVO


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

        boolean isAuthorized = true;
        if(protectedSiteNodeVersionId != null)
        {
          isAuthorized = false;
          SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(protectedSiteNodeVersionId, db);
          if(siteNodeVersionVO.getIsProtected().intValue() == SiteNodeVersionVO.YES_WITH_INHERIT_FALLBACK.intValue())
            isAuthorized = AccessRightController.getController().getIsPrincipalAuthorized(db, (InfoGluePrincipal)anonymousPrincipal, "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString(), false);
          else
            isAuthorized = AccessRightController.getController().getIsPrincipalAuthorized(db, (InfoGluePrincipal)anonymousPrincipal, "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString());
        }       
       
        logger.info("isAuthorized:" + isAuthorized);
       
        if(isAuthorized)
        { 
          principal = anonymousPrincipal;
          if(principal != null)
          {
              this.getHttpSession().setAttribute("infogluePrincipal", principal);
              this.getHttpSession().setAttribute("infoglueRemoteUser", principal.getName());
              this.getHttpSession().setAttribute("cmsUserName", principal.getName());
          }
        }
      }
     
      if(principal == null)
      {       
        Map status = new HashMap();
        status.put("redirected", new Boolean(false));
        principal = AuthenticationModule.getAuthenticationModule(db, this.getOriginalFullURL(), getRequest(), false).loginUser(getRequest(), getResponse(), status);
        Boolean redirected = (Boolean)status.get("redirected");
        if(redirected != null && redirected.booleanValue())
        {
            this.getHttpSession().removeAttribute("infogluePrincipal");
            this.principal = null;
            return true;
        }
        else if(principal != null)
        {
            this.getHttpSession().setAttribute("infogluePrincipal", principal);
          this.getHttpSession().setAttribute("infoglueRemoteUser", principal.getName());
          this.getHttpSession().setAttribute("cmsUserName", principal.getName());
         
            this.principal = principal;
        }
       
        if(principal == null)
          principal = loginWithCookies();
       
          if(principal == null)
              principal = loginWithRequestArguments();
         
          if(principal == null)
          { 
            try
          {
              if(!forceCmsUser)
              {
              principal = getAnonymousPrincipal();
             
              if(principal != null)
              {
                this.getHttpSession().setAttribute("infogluePrincipal", principal);
                this.getHttpSession().setAttribute("infoglueRemoteUser", principal.getName());
                this.getHttpSession().setAttribute("cmsUserName", principal.getName());
               
                boolean isAuthorized = false;
                if(!protectDeliver)
                  isAuthorized = AccessRightController.getController().getIsPrincipalAuthorized(db, (InfoGluePrincipal)principal, "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString());
               
                if(!isAuthorized)
                { 
                  this.getHttpSession().removeAttribute("infogluePrincipal");
                  logger.info("SiteNode is protected and anonymous user was not allowed - sending him to login page.");
                  String redirectUrl = getRedirectUrl(getRequest(), getResponse());               
                  //System.out.println("redirectUrl:" + redirectUrl);
                  getResponse().sendRedirect(redirectUrl);
                  isRedirected = true;
                }
              }
              }
              else
              {
              this.getHttpSession().removeAttribute("infogluePrincipal");
              this.getHttpSession().removeAttribute("infoglueRemoteUser");
              this.getHttpSession().removeAttribute("cmsUserName");
              logger.info("SiteNode is protected and anonymous user was not allowed - sending him to login page.");
              String redirectUrl = getRedirectUrl(getRequest(), getResponse());               
              getResponse().sendRedirect(redirectUrl);
              isRedirected = true;
              }
          }
          catch(Exception e)
          {
              throw new SystemException("There was no anonymous user found in the system. There must be - add the user anonymous/anonymous and try again.", e);
          }
          }
        else
        {
          boolean isAuthorized = false;
          if(protectDeliver && protectedSiteNodeVersionId == null && !principal.getName().equals(CmsPropertyHandler.getAnonymousUser()))
          {
            isAuthorized = true;
          }
          else if(protectedSiteNodeVersionId != null)
          {
            if(logger.isInfoEnabled())
              logger.info("protectedSiteNodeVersionId:" + protectedSiteNodeVersionId);
           
            isAuthorized = AccessRightController.getController().getIsPrincipalAuthorized((InfoGluePrincipal)this.getAnonymousPrincipal(), "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString());
           
            if(logger.isInfoEnabled())
              logger.info("Anonymous auth:" + isAuthorized);
           
            if(!isAuthorized)
            {
              isAuthorized = AccessRightController.getController().getIsPrincipalAuthorized(db, (InfoGluePrincipal)principal, "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString());
           
              if(logger.isInfoEnabled())
                logger.info("" + principal + " auth:" + isAuthorized);
            }
           
            if(logger.isInfoEnabled())
              logger.info("protectedSiteNodeVersionId:" + protectedSiteNodeVersionId);
           
          }
          else if(!protectDeliver)
          {
            isAuthorized = AccessRightController.getController().getIsPrincipalAuthorized(db, (InfoGluePrincipal)principal, "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString());
          }
         
          if(logger.isInfoEnabled())
          {
            logger.info("protectDeliver:" + protectDeliver);
            logger.info("protectedSiteNodeVersionId:" + protectedSiteNodeVersionId);
            logger.info("isAuthorized:" + isAuthorized);
            logger.info("principal:" + principal);
          }
         
          if(!isAuthorized)
          { 
            if(this.referer == null)
              this.referer = this.getRequest().getHeader("Referer");
           
            if(this.referer == null || referer.indexOf("ViewStructureToolToolBar.action") != -1)
              this.referer = "/";

            if(principal.getName().equals(CmsPropertyHandler.getAnonymousUser()))
            {
              logger.info("SiteNode is protected and user was anonymous - sending him to login page.");
              //String url = "ExtranetLogin!loginForm.action?returnAddress=" + URLEncoder.encode(this.getRequest().getRequestURL().toString() + "?" + this.getRequest().getQueryString() + "&referer=" + URLEncoder.encode(referer, "UTF-8") + "&date=" + System.currentTimeMillis(), "UTF-8");
              String url = getRedirectUrl(getRequest(), getResponse());
              getResponse().sendRedirect(url);
              isRedirected = true;
            }
            else
            {
              logger.info("SiteNode is protected and user has no access - sending him to no access page.");
                String noAccessURL = getNoAccessURL();
              getResponse().sendRedirect(noAccessURL);
              isRedirected = true;
            }
          }
          else
          {
            this.getHttpSession().setAttribute("infogluePrincipal", principal);
            this.getHttpSession().setAttribute("infoglueRemoteUser", principal.getName());
            this.getHttpSession().setAttribute("cmsUserName", principal.getName());
           
            this.principal = principal;
          }
        }

      }
      else
      {
        logger.info("principal:" + principal);
        logger.info("protectedSiteNodeVersionId:" + protectedSiteNodeVersionId);

        Principal alternativePrincipal = loginWithCookies();
          if(alternativePrincipal == null)
              alternativePrincipal = loginWithRequestArguments();

          SiteNodeVersionVO siteNodeVersionVO = null;
          boolean isAlternativePrincipalAuthorized = (alternativePrincipal == null);
        boolean isPrincipalAuthorized = true;
        boolean isAnonymousPrincipalAuthorized = true;
       
          if(protectedSiteNodeVersionId != null)
          {
            siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(protectedSiteNodeVersionId, db);
       
            isAlternativePrincipalAuthorized = false;
            isPrincipalAuthorized = false;
            isAnonymousPrincipalAuthorized = false;
          }
         
          if(siteNodeVersionVO != null && siteNodeVersionVO.getIsProtected().intValue() == SiteNodeVersionVO.YES_WITH_INHERIT_FALLBACK.intValue())
        {
          if(alternativePrincipal != null)
            isAlternativePrincipalAuthorized = AccessRightController.getController().getIsPrincipalAuthorized(db, (InfoGluePrincipal)alternativePrincipal, "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString(), true);
          if(!isAlternativePrincipalAuthorized && !((InfoGluePrincipal)principal).getName().equals(((InfoGluePrincipal)this.getAnonymousPrincipal()).getName()))
            isPrincipalAuthorized = AccessRightController.getController().getIsPrincipalAuthorized(db, (InfoGluePrincipal)principal, "SiteNodeVersion.Read", protectedSiteNodeVersionId.toString(), true);
View Full Code Here

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

      Integer disabledLanguagesSiteNodeVersionId = ndc.getDisabledLanguagesSiteNodeVersionId(db, siteNodeId);
      logger.info("disabledLanguagesSiteNodeVersionId:" + disabledLanguagesSiteNodeVersionId);

      if(disabledLanguagesSiteNodeVersionId != null)
      {
          SiteNodeVersionVO disabledLanguagesSiteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(disabledLanguagesSiteNodeVersionId, db);
         
          String disabledLanguagesString = CmsPropertyHandler.getPropertySetValue("siteNode_" + disabledLanguagesSiteNodeVersionVO.getSiteNodeId() + "_disabledLanguages");
        logger.info("disabledLanguagesString:" + disabledLanguagesString);
       
        if(disabledLanguagesString != null && !disabledLanguagesString.equalsIgnoreCase(""))
        {
            String[] disabledLanguagesStringArray = disabledLanguagesString.split(",");
            for(int i=0; i<disabledLanguagesStringArray.length; i++)
            {
                logger.info("languageId.intValue():" + languageId.intValue());
                logger.info("disabledLanguagesStringArray:" + disabledLanguagesStringArray);
            if(languageId.intValue() == new Integer(disabledLanguagesStringArray[i]).intValue())
                {
                    isValidLanguage = false;
                  logger.info("isValidLanguage:" + isValidLanguage);
                    break;
                }
            }
        }

          String enabledLanguagesString = CmsPropertyHandler.getPropertySetValue("siteNode_" + disabledLanguagesSiteNodeVersionVO.getSiteNodeId() + "_enabledLanguages");
       
        if(enabledLanguagesString != null && !enabledLanguagesString.equalsIgnoreCase(""))
        {
          isValidLanguage = false;
         
View Full Code Here

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

      Integer disabledLanguagesSiteNodeVersionId = ndc.getDisabledLanguagesSiteNodeVersionId(db, siteNodeId);
      logger.info("disabledLanguagesSiteNodeVersionId:" + disabledLanguagesSiteNodeVersionId);

      if(disabledLanguagesSiteNodeVersionId != null)
      {
          SiteNodeVersionVO disabledLanguagesSiteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(disabledLanguagesSiteNodeVersionId, db);
         
          String disabledLanguagesString = CmsPropertyHandler.getPropertySetValue("siteNode_" + disabledLanguagesSiteNodeVersionVO.getSiteNodeId() + "_disabledLanguages");
        logger.info("disabledLanguagesString:" + disabledLanguagesString);
       
        if(disabledLanguagesString != null && !disabledLanguagesString.equalsIgnoreCase(""))
        {
            String[] disabledLanguagesStringArray = disabledLanguagesString.split(",");
            for(int i=0; i<disabledLanguagesStringArray.length; i++)
            {
                logger.info("languageId.intValue():" + languageId.intValue());
                logger.info("disabledLanguagesStringArray:" + disabledLanguagesStringArray);
            if(languageId.intValue() == new Integer(disabledLanguagesStringArray[i]).intValue())
                {
                    isValidLanguage = false;
                  logger.info("isValidLanguage:" + isValidLanguage);
                    break;
                }
            }
        }

          String enabledLanguagesString = CmsPropertyHandler.getPropertySetValue("siteNode_" + disabledLanguagesSiteNodeVersionVO.getSiteNodeId() + "_enabledLanguages");
       
        if(enabledLanguagesString != null && !enabledLanguagesString.equalsIgnoreCase(""))
        {
          isValidLanguage = false;
         
View Full Code Here

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

  public int doEndTag() throws JspException
    {
    boolean isHidden = false;
    try
    {
      SiteNodeVersionVO svvo   = NodeDeliveryController.getNodeDeliveryController(this.getController().getSiteNodeId(), this.getController().getLanguageId(), this.getController().getContentId()).getLatestActiveSiteNodeVersionVO(this.getController().getDatabase(), siteNodeId);
      isHidden     = svvo.getIsHidden();
    }
    catch (Exception e)
    {
      logger.warn("Exception in IsHiddenTag:" + e.getMessage());
    }
View Full Code Here

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

  private void testSiteNode(InfoGluePrincipal principal, Integer siteNodeId, Database db) throws ConstraintException, SystemException, Exception
  {
        SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(siteNodeId, db);
        siteNode.getValueObject().setName(siteNode.getValueObject().getName().substring(0,10) + System.currentTimeMillis());

    SiteNodeVersionVO latestSiteNodeVersionVO = SiteNodeVersionController.getController().getLatestSiteNodeVersion(db, siteNode.getSiteNodeId(), false).getValueObject();
    latestSiteNodeVersionVO.setContentType("text/html");
    logger.info("PageKey:" + latestSiteNodeVersionVO.getPageCacheKey());
    latestSiteNodeVersionVO.setPageCacheKey("");
    latestSiteNodeVersionVO.setPageCacheTimeout(null);
    latestSiteNodeVersionVO.setDisableEditOnSight(new Integer(2));
    latestSiteNodeVersionVO.setDisablePageCache(new Integer(2));
    latestSiteNodeVersionVO.setDisableLanguages(new Integer(2));
    latestSiteNodeVersionVO.setIsProtected(new Integer(2));
    latestSiteNodeVersionVO.setVersionModifier(principal.getName());
    latestSiteNodeVersionVO.setModifiedDateTime(DateHelper.getSecondPreciseDate());
   
    SiteNodeVersionControllerProxy.getSiteNodeVersionControllerProxy().acUpdate(principal, latestSiteNodeVersionVO, db);

  }
View Full Code Here

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

                    else if(Class.forName(publicationDetailVO.getEntityClass()).getName().equals(SiteNodeVersion.class.getName()))
                    {
                      System.out.println("SiteNodeVersion update....:" + publicationDetailVO.getEntityId());
                      try
                      {
                        SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(publicationDetailVO.getEntityId());
                        //logger.info("siteNodeVersionVO:" + siteNodeVersionVO.getId());
                        Integer siteNodeId = siteNodeVersionVO.getSiteNodeId();
                       
                        CacheController.clearCache("pageCacheLatestSiteNodeVersions", "" + siteNodeId);
                        String versionKey = "" + siteNodeId + "_" + CmsPropertyHandler.getOperatingMode() + "_siteNodeVersionVO";   
                          CacheController.clearCache("latestSiteNodeVersionCache", versionKey);
                       
                          logger.info("We also clear the meta info content..");
 
                          SiteNodeVO previousSiteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeId);
                          Integer previousParentSiteNodeId = previousSiteNodeVO.getParentSiteNodeId();
                          //System.out.println("previousParentSiteNodeId:" + previousParentSiteNodeId);
                          Object previousParentSiteNodeIdCandidate = CacheController.getCachedObject("parentSiteNodeCache", "" + siteNodeId);
                          //System.out.println("previousParentSiteNodeIdCandidate:" + previousParentSiteNodeIdCandidate);
                          if(previousParentSiteNodeIdCandidate != null && !(previousParentSiteNodeIdCandidate instanceof NullObject))
                            previousParentSiteNodeId = ((SiteNodeVO)previousParentSiteNodeIdCandidate).getId();
                          //System.out.println("previousParentSiteNodeId:" + previousParentSiteNodeId);
                           
                          //CacheController.clearCaches(publicationDetailVO.getEntityClass(), publicationDetailVO.getEntityId().toString(), null);
                        //if(siteNodeId != null)
                        //  CacheController.clearCaches(SiteNode.class.getName(), siteNodeId.toString(), null);
                         
                          logger.info("We clear all small siteNodes as well " + siteNodeId);
                        CacheController.clearCache(SiteNodeImpl.class, new Integer[]{siteNodeId});
                        CacheController.clearCache(SmallSiteNodeImpl.class, new Integer[]{siteNodeId});
                        CacheController.clearCache(SmallSiteNodeVersionImpl.class, new Integer[]{new Integer(publicationDetailVO.getEntityId())});   
 
                        logger.info("We clear all contents as well " + previousSiteNodeVO.getMetaInfoContentId());
                        Class metaInfoContentExtra = ContentImpl.class;
                        Object[] idsMetaInfoContentExtra = {previousSiteNodeVO.getMetaInfoContentId()};
                        CacheController.clearCache(metaInfoContentExtra, idsMetaInfoContentExtra);
                       
                        logger.info("We clear all small contents as well " + previousSiteNodeVO.getMetaInfoContentId());
                        Class metaInfoContentExtraSmall = SmallContentImpl.class;
                        CacheController.clearCache(metaInfoContentExtraSmall, idsMetaInfoContentExtra);
                       
                        logger.info("We clear all smallish contents as well " + previousSiteNodeVO.getMetaInfoContentId());
                        Class metaInfoContentExtraSmallish = SmallishContentImpl.class;
                        CacheController.clearCache(metaInfoContentExtraSmallish, idsMetaInfoContentExtra);
     
                        logger.info("We clear all medium contents as well " + previousSiteNodeVO.getMetaInfoContentId());
                        Class metaInfoContentExtraMedium = MediumContentImpl.class;
                        CacheController.clearCache(metaInfoContentExtraMedium, idsMetaInfoContentExtra);
                       
                        //CacheController.clearCaches(ContentImpl.class.getName(), previousSiteNodeVO.getMetaInfoContentId().toString(), null);
                        addCacheUpdateDirective(ContentImpl.class.getName(), previousSiteNodeVO.getMetaInfoContentId().toString(), allIGCacheCalls);
     
                        Database db = CastorDatabaseService.getDatabase();
                        db.begin();
                       
                        LanguageVO masterLanguageVO = LanguageController.getController().getMasterLanguage(previousSiteNodeVO.getRepositoryId(), db);
                        ContentVersionVO metaInfoContentVersionVO = ContentVersionController.getContentVersionController().getLatestActiveContentVersionVO(previousSiteNodeVO.getMetaInfoContentId(), masterLanguageVO.getId(), db);
                        addCacheUpdateDirective(ContentVersionImpl.class.getName(), metaInfoContentVersionVO.getId().toString(), allIGCacheCalls);
                       
                        List contentVersionIds = new ArrayList();
                        if(previousSiteNodeVO.getMetaInfoContentId() != null)
                        {
                          List<SmallestContentVersionVO> contentVersionVOList = ContentVersionController.getContentVersionController().getSmallestContentVersionVOList(previousSiteNodeVO.getMetaInfoContentId(), db);
                          for(SmallestContentVersionVO cvVO : contentVersionVOList)
                          {
                            contentVersionIds.add(cvVO.getId());
                            logger.info("We clear the meta info contentVersion " + cvVO.getId());
                          }
                        }
                        /*
                        Content content = ContentController.getContentController().getReadOnlyContentWithId(previousSiteNodeVO.getMetaInfoContentId(), db);
                        List contentVersionIds = new ArrayList();
                        Iterator contentVersionIterator = content.getContentVersions().iterator();
                        logger.info("Versions:" + content.getContentVersions().size());
                        while(contentVersionIterator.hasNext())
                        {
                          ContentVersion contentVersion = (ContentVersion)contentVersionIterator.next();
                          contentVersionIds.add(contentVersion.getId());
                          logger.info("We clear the meta info contentVersion " + contentVersion.getId());
                        }
                        */
     
                        db.rollback();
     
                        db.close();
                       
                        Iterator contentVersionIdsIterator = contentVersionIds.iterator();
                        logger.info("Versions:" + contentVersionIds.size());
                        while(contentVersionIdsIterator.hasNext())
                        {
                          Integer contentVersionId = (Integer)contentVersionIdsIterator.next();
                          logger.info("We clear the meta info contentVersion " + contentVersionId);
                          Class metaInfoContentVersionExtra = ContentVersionImpl.class;
                          Object[] idsMetaInfoContentVersionExtra = {contentVersionId};
                          CacheController.clearCache(metaInfoContentVersionExtra, idsMetaInfoContentVersionExtra);
                          //CacheController.clearCaches(ContentVersionImpl.class.getName(), contentVersionId.toString(), null);
                          //addCacheUpdateDirective(ContentVersionImpl.class.getName(), contentVersionId.toString(), allIGCacheCalls);
                        }
                       
                        logger.info("After:" + contentVersionIds.size());
     
                        SiteNodeVersionVO previousSiteNodeVersionVO = SiteNodeVersionController.getController().getPreviousActiveSiteNodeVersionVO(siteNodeVersionVO.getSiteNodeId(), siteNodeVersionVO.getId(), new Integer(CmsPropertyHandler.getOperatingMode()));
                        //logger.info("previousSiteNodeVersionVO:" + previousSiteNodeVersionVO.getId());
 
                        addCacheUpdateDirective(publicationDetailVO.getEntityClass(), publicationDetailVO.getEntityId().toString(), allIGCacheCalls);
                        if(siteNodeId != null)
                        {
                          //logger.info("What really happened.... let's find out");
                          boolean anyRealDifferences = isThereAnyRealDifferencesBetweenSiteNodeVersions(siteNodeVersionVO, previousSiteNodeVersionVO);
                          //logger.info("anyRealDifferences:" + anyRealDifferences);
                          if(anyRealDifferences)
                            addCacheUpdateDirective(SiteNode.class.getName(), siteNodeId.toString(), allIGCacheCalls);
                          else
                          {
                            //logger.info("We'll skip it and assume that this was just a meta info update...");
                          }
                        }
 
                        //Handling access rights...
                        if(siteNodeVersionVO.getIsProtected().intValue() != SiteNodeVersionVO.INHERITED || (previousSiteNodeVersionVO != null && previousSiteNodeVersionVO.getIsProtected().intValue() != SiteNodeVersionVO.INHERITED))
                        {
                              CacheController.clearCache(AccessRightImpl.class);
                              CacheController.clearCache(AccessRightRoleImpl.class);
                              CacheController.clearCache(AccessRightGroupImpl.class);
                              CacheController.clearCache(AccessRightUserImpl.class);
View Full Code Here

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

      logger.info("bindingTypeId:" + serviceBindingVO.getBindingTypeId());
      logger.info("availableServiceBindingId:" + availableServiceBindingId);
      logger.info("siteNodeVersionId:" + siteNodeVersionId);
      logger.info("serviceDefinitionId:" + serviceDefinitionId);

      SiteNodeVersionVO siteNodeVersionVO = SiteNodeVersionController.getController().getSiteNodeVersionVOWithId(siteNodeVersionId, db);
     
      SmallServiceBindingImpl serviceBinding = new SmallServiceBindingImpl();
        serviceBinding.setValueObject(serviceBindingVO);
        serviceBinding.setAvailableServiceBinding((AvailableServiceBindingImpl)AvailableServiceBindingController.getController().getAvailableServiceBindingWithId(availableServiceBindingId, db));
        serviceBinding.setServiceDefinition((ServiceDefinitionImpl)ServiceDefinitionController.getController().getServiceDefinitionWithId(serviceDefinitionId, db));
View Full Code Here

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

  private ConstraintExceptionBuffer ceb;
 
  public UpdateSiteNodeVersionAction()
  {
    this(new SiteNodeVersionVO());
  }
View Full Code Here

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

          ceb = this.siteNodeVO.validate();
       
       
        ceb.throwIfNotEmpty();
 
        SiteNodeVersionVO siteNodeVersionVO = null;
        if(this.advanced != null && this.advanced.equals("true"))
        {
          siteNodeVersionVO = new SiteNodeVersionVO();
          siteNodeVersionVO.setContentType(this.getContentType());
          siteNodeVersionVO.setPageCacheKey(this.getPageCacheKey());
          siteNodeVersionVO.setPageCacheTimeout(this.getPageCacheTimeout());
          siteNodeVersionVO.setDisableEditOnSight(this.getDisableEditOnSight());
          //siteNodeVersionVO.setDisableLanguages(this.disableLanguages);
          siteNodeVersionVO.setDisablePageCache(this.getDisablePageCache());
          siteNodeVersionVO.setDisableForceIdentityCheck(this.disableForceIdentityCheck);
          siteNodeVersionVO.setForceProtocolChange(this.forceProtocolChange);
          siteNodeVersionVO.setIsProtected(this.getIsProtected());
          siteNodeVersionVO.setIsHidden(this.getIsHidden());
          siteNodeVersionVO.setVersionModifier(this.getInfoGluePrincipal().getName());
        }
        else if(this.showPageLanguages != null && this.showPageLanguages.equals("true"))
        {
          SiteNodeVersionVO currentSiteNodeVersionVO = SiteNodeVersionController.getController().getLatestActiveSiteNodeVersionVO(getSiteNodeId());
         
          siteNodeVersionVO = new SiteNodeVersionVO();
          siteNodeVersionVO.setContentType(currentSiteNodeVersionVO.getContentType());
          siteNodeVersionVO.setPageCacheKey(currentSiteNodeVersionVO.getPageCacheKey());
          siteNodeVersionVO.setPageCacheTimeout(currentSiteNodeVersionVO.getPageCacheTimeout());
          siteNodeVersionVO.setDisableEditOnSight(currentSiteNodeVersionVO.getDisableEditOnSight());
          siteNodeVersionVO.setDisableLanguages(this.disableLanguages);
          siteNodeVersionVO.setDisablePageCache(currentSiteNodeVersionVO.getDisablePageCache());
          siteNodeVersionVO.setDisableForceIdentityCheck(currentSiteNodeVersionVO.getDisableForceIdentityCheck());
          siteNodeVersionVO.setForceProtocolChange(currentSiteNodeVersionVO.getForceProtocolChange());
          siteNodeVersionVO.setIsProtected(currentSiteNodeVersionVO.getIsProtected());
          siteNodeVersionVO.setIsHidden(currentSiteNodeVersionVO.getIsHidden());
          siteNodeVersionVO.setVersionModifier(this.getInfoGluePrincipal().getName());
        }
       
        UpdateSiteNodeUCC updateSiteNodeUCC = UpdateSiteNodeUCCFactory.newUpdateSiteNodeUCC();
        updateSiteNodeUCC.updateSiteNode(this.getInfoGluePrincipal(), this.siteNodeVO, this.siteNodeTypeDefinitionId, siteNodeVersionVO);   
View Full Code Here

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

  {
    boolean hasPublishedVersion = false;
   
    try
    {
      SiteNodeVersionVO siteNodeVersion = SiteNodeVersionController.getLatestPublishedSiteNodeVersionVO(this.siteNodeId);
      if(siteNodeVersion != null)
      {
        SiteNodeVO siteNodeVO = SiteNodeController.getController().getSiteNodeVOWithId(siteNodeVersion.getSiteNodeId());
        hasPublishedVersion = true;
        lastPublishedSiteNodeVersionId = siteNodeVersion.getId();
        this.repositoryId = siteNodeVO.getRepositoryId();
        this.name = siteNodeVO.getName();
        this.siteNodeId = siteNodeVO.getId();
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.