Package org.infoglue.cms.entities.structure

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


        beginTransaction(db);

        try
        {
          SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(siteNodeId, db);
           
          siteNodeVersion = new SiteNodeVersionImpl();
          siteNodeVersion.setOwningSiteNode((SiteNodeImpl)siteNode);
          siteNodeVersion.setVersionModifier(infoGluePrincipal.getName());
          siteNodeVersion.setValueObject(siteNodeVersionVO);
View Full Code Here


   * This method creates a new siteNodeVersion for the siteNode sent in.
   */
 
  public static SiteNodeVersion createFull(Integer siteNodeId, InfoGluePrincipal infoGluePrincipal, SiteNodeVersionVO siteNodeVersionVO, Database db) throws SystemException, Bug, Exception
  {
      SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(siteNodeId, db);
       
      SiteNodeVersionImpl siteNodeVersion = new SiteNodeVersionImpl();     
      siteNodeVersion.setOwningSiteNode((SiteNodeImpl)siteNode);
      siteNodeVersion.setVersionModifier(infoGluePrincipal.getName());
      siteNodeVersion.setValueObject(siteNodeVersionVO);
View Full Code Here

      beginTransaction(db);

        try
        {
            SiteNode siteNode = SiteNodeController.getController().getSiteNodeWithId(siteNodeId, db);
            List publishedSiteNodeVersions = new ArrayList();
            getPublishedSiteNodeVersionWithParentRecursive(siteNode, publishedSiteNodeVersions, db);
            publishedSiteNodeVersionVOList = toVOList(publishedSiteNodeVersions);
           
            commitTransaction(db);
View Full Code Here

    // Get the children of this sitenode and do the recursion
    Collection childSiteNodeList = siteNode.getChildSiteNodes();
    Iterator childSiteNodeListIterator = childSiteNodeList.iterator();
    while(childSiteNodeListIterator.hasNext())
    {
      SiteNode childSiteNode = (SiteNode)childSiteNodeListIterator.next();
      getPublishedSiteNodeVersionWithParentRecursive(childSiteNode, resultList, db);
    }
   
    return resultList;
  }
View Full Code Here

                //If its a published version we just deletes the event - we don't want to delete the version.
                EventController.delete(event, db);
              }
              else
              {
                SiteNode siteNode = siteNodeVersion.getOwningSiteNode();
                //event.setEntityId(SiteNodeVersionController.getPreviousSiteNodeVersionVO(siteNode.getId(), siteNodeVersion.getId()).getId());
                event.setEntityId(SiteNodeVersionController.getController().getPreviousActiveSiteNodeVersionVO(siteNode.getId(), siteNodeVersion.getId(), db).getId());
                SiteNodeVersionController.getController().delete(siteNodeVersion, db);
                //db.remove(siteNodeVersion);
              }
            }
          }
View Full Code Here

              //If its a published version we just deletes the event - we don't want to delete the version.
              EventController.delete(event, db);
            }
            else
            {
              SiteNode siteNode = siteNodeVersion.getOwningSiteNode();
              //event.setEntityId(SiteNodeVersionController.getPreviousSiteNodeVersionVO(siteNode.getId(), siteNodeVersion.getId()).getId());
              SiteNodeVersion previousSiteNodeVersion = SiteNodeVersionController.getController().getPreviousActiveSiteNodeVersion(siteNode.getId(), siteNodeVersion.getId(), db);
              if(previousSiteNodeVersion != null && event != null)
                event.setEntityId(previousSiteNodeVersion.getId());
              SiteNodeVersionController.getController().delete(siteNodeVersion, db);
              SiteNodeStateController.getController().changeStateOnMetaInfo(db, siteNode.getValueObject(), previousSiteNodeVersion.getValueObject(), previousSiteNodeVersion.getStateId(), "Denied publication", true, infoGluePrincipal, new ArrayList());
              //db.remove(siteNodeVersion);
            }
          }
        }
        else if(event.getTypeId().intValue() == EventVO.UNPUBLISH_LATEST.intValue())
View Full Code Here

              beginTransaction(db);

              try
              {
                SiteNode newSiteNode = siteNodeControllerProxy.acCreate(this.principal, siteNodeVO.getParentSiteNodeId(), siteNodeVO.getSiteNodeTypeDefinitionId(), siteNodeVO.getRepositoryId(), siteNodeVO, db);
                SiteNodeVO newSiteNodeVO = newSiteNode.getValueObject();
                if(newSiteNode != null)
                  statusBean.getCreatedBeans().add(new CreatedEntityBean(SiteNodeVO.class.getName(), new Long(newSiteNodeVO.getId())));
               
                Content newMetaInfoContent = SiteNodeController.getController().createSiteNodeMetaInfoContent(db, newSiteNodeVO, siteNodeVO.getRepositoryId(), this.principal, pageTemplateContentId, new ArrayList());
                if(newMetaInfoContent != null)
View Full Code Here

    public SiteNodeVO viewSiteNode(Integer siteNodeId) throws ConstraintException, SystemException
    {
        Database db = CastorDatabaseService.getDatabase();
        ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

        SiteNode siteNode = null;

        beginTransaction(db);

        try
        {
            siteNode = SiteNodeController.getController().getSiteNodeWithId(siteNodeId, db);
       
            //If any of the validations or setMethods reported an error, we throw them up now before create.
            ceb.throwIfNotEmpty();
           
            commitTransaction(db);
        }
        catch(ConstraintException ce)
        {
            logger.warn("An error occurred so we should not complete the transaction:" + ce, ce);
            rollbackTransaction(db);
            throw ce;
        }
        catch(Exception e)
        {
            logger.error("An error occurred so we should not complete the transaction:" + e, e);
            rollbackTransaction(db);
            throw new SystemException(e.getMessage());
        }

        return siteNode.getValueObject();
    }       
View Full Code Here

      String[] repositories = getRequest().getParameterValues("repositoryId");
      for(int i=0; i<repositories.length; i++)
      {
        Integer repositoryId = new Integer(repositories[i]);
        Repository repository   = RepositoryController.getController().getRepositoryWithId(repositoryId, db);
        SiteNode siteNode     = SiteNodeController.getController().getRootSiteNode(repositoryId, db);
        Content content     = ContentController.getContentController().getRootContent(repositoryId, db);
       
          InterceptionPointVO interceptionPointVO = InterceptionPointController.getController().getInterceptionPointVOWithName("Repository.Read", db);
          if(interceptionPointVO != null)
            allAccessRights.addAll(AccessRightController.getController().getAccessRightListOnlyReadOnly(interceptionPointVO.getId(), repository.getId().toString(), db));
View Full Code Here

        }
       
        Iterator childSiteNodes = siteNode.getChildSiteNodes().iterator();
        while(childSiteNodes.hasNext())
        {
          SiteNode childSiteNode = (SiteNode)childSiteNodes.next();
          getSiteNodePropertiesAndAccessRights(ps, allSiteNodeProperties, allAccessRights, childSiteNode, db);
        }
  }
View Full Code Here

TOP

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

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.