Examples of SiteNodeVersion


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

   * This method returns the latest sitenodeVersion there is for the given siteNode.
   */
 
  public SiteNodeVersion getLatestActiveSiteNodeVersionIfInState(SiteNode siteNode, Integer stateId, Database db) throws SystemException, Exception
  {
    SiteNodeVersion siteNodeVersion = null;
   
    Collection siteNodeVersions = siteNode.getSiteNodeVersions();

    SiteNodeVersion latestSiteNodeVersion = null;
   
    Iterator versionIterator = siteNodeVersions.iterator();
    while(versionIterator.hasNext())
    {
        SiteNodeVersion siteNodeVersionCandidate = (SiteNodeVersion)versionIterator.next()
     
      if(latestSiteNodeVersion == null || (latestSiteNodeVersion.getId().intValue() < siteNodeVersionCandidate.getId().intValue() && siteNodeVersionCandidate.getIsActive().booleanValue()))
          latestSiteNodeVersion = siteNodeVersionCandidate;
     
      if(siteNodeVersionCandidate.getIsActive().booleanValue() && siteNodeVersionCandidate.getStateId().intValue() == stateId.intValue())
      {
        if(siteNodeVersionCandidate.getOwningSiteNode().getSiteNodeId().intValue() == siteNode.getId().intValue())
        {
          if(siteNodeVersion == null || siteNodeVersion.getSiteNodeVersionId().intValue() < siteNodeVersionCandidate.getId().intValue())
          {
            siteNodeVersion = siteNodeVersionCandidate;
          }
        }
      }
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.