public String doCancel() throws Exception {
    try {
      CreateSiteNodeWizardInfoBean createSiteNodeWizardInfoBean = getCreateSiteNodeWizardInfoBean();

      String cancelAddress = createSiteNodeWizardInfoBean.getCancelAddress();

      this.invalidateCreateSiteNodeWizardInfoBean();

      this.getResponse().sendRedirect(cancelAddress);
    } catch (Exception e) {
      e.printStackTrace();
    }

    return NONE;
  }
  public String doExecute() throws Exception {
    try {
      CreateSiteNodeWizardInfoBean createSiteNodeWizardInfoBean = getCreateSiteNodeWizardInfoBean();
      if (createSiteNodeWizardInfoBean.getParentSiteNodeId() == null) {
        return "stateLocation";
      }

      createSiteNodeWizardInfoBean
          .getSiteNodeVO()
          .setCreatorName(this.getInfoGluePrincipal().getName());
      this.ceb = createSiteNodeWizardInfoBean.getSiteNodeVO().validate();

      if (!this.ceb.isEmpty()) {
        return "inputSiteNode";
      }

      Integer repositoryId = createSiteNodeWizardInfoBean.getRepositoryId();
      SiteNodeVO newSiteNodeVO = null;

      Database db = CastorDatabaseService.getDatabase();
      ConstraintExceptionBuffer ceb = new ConstraintExceptionBuffer();

      beginTransaction(db);

      try {
        createSiteNodeWizardInfoBean.getSiteNodeVO().setIsBranch(new Boolean(true));
        SiteNode newSiteNode =
            SiteNodeControllerProxy.getSiteNodeControllerProxy()
                .acCreate(
                    this.getInfoGluePrincipal(),
                    createSiteNodeWizardInfoBean.getParentSiteNodeId(),
                    createSiteNodeWizardInfoBean.getSiteNodeTypeDefinitionId(),
                    repositoryId,
                    createSiteNodeWizardInfoBean.getSiteNodeVO(),
                    db);
        newSiteNodeVO = newSiteNode.getValueObject();
        SiteNodeController.getController()
            .createSiteNodeMetaInfoContent(
                db,
                newSiteNodeVO,
                repositoryId,
                this.getInfoGluePrincipal(),
                createSiteNodeWizardInfoBean.getPageTemplateContentId(),
                new ArrayList());

        commitTransaction(db);
      } catch (Exception e) {
        logger.error("An error occurred so we should not completes the transaction:" + e, e);
        rollbackTransaction(db);
        throw new SystemException(e.getMessage());
      }

      String returnAddress = createSiteNodeWizardInfoBean.getReturnAddress();
      returnAddress =
          returnAddress.replaceAll(
              "#entityId", createSiteNodeWizardInfoBean.getSiteNodeVO().getId().toString());
      returnAddress =
          returnAddress.replaceAll("#path", createSiteNodeWizardInfoBean.getSiteNodeVO().getName());

      this.invalidateCreateSiteNodeWizardInfoBean();

      this.getResponse().sendRedirect(returnAddress);
    } catch (Exception e) {
      e.printStackTrace();
    }

    return NONE;
  }