Examples of throwIfNotEmpty()


Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

              else
              {
                ceb.add(new AccessConstraintException("Repository.repositoryId", "1006"));
              }
             
              ceb.throwIfNotEmpty();

                 
                  Database db = CastorDatabaseService.getDatabase();
            beginTransaction(db);
           
View Full Code Here

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

          this.contentVO = ContentControllerProxy.getController().getACContentVOWithId(this.getInfoGluePrincipal(), contentId);
          if(this.contentVO.getRepositoryId() != null && checkPermission && !hasAccessTo("Repository.Read", "" + this.contentVO.getRepositoryId())  && !hasAccessTo("Repository.Write", "" + this.contentVO.getRepositoryId()))
          {
          AccessConstraintExceptionBuffer ceb = new AccessConstraintExceptionBuffer();
          ceb.add(new AccessConstraintException("Content.contentId", "1000"));
          ceb.throwIfNotEmpty();
          }
      }
     
      logger.info("this.contentVO:" + this.contentVO);
      logger.info("this.contentVO.getParentContentId():" + this.contentVO.getParentContentId());
View Full Code Here

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

      ceb.add(new AccessConstraintException("Content.contentId", "1002"));

    //if(ContentControllerProxy.getController().getIsContentProtected(parentContentId) && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.Create", parentContentId.toString()))
    //  ceb.add(new AccessConstraintException("Content.contentId", "1002"));

    ceb.throwIfNotEmpty();

    if(allowedContentTypeDefinitionId == null)
    {
      this.contentTypeDefinitionVOList = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOList();
    }
View Full Code Here

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

        if(protectedSiteNodeVersionId != null && !AccessRightController.getController().getIsPrincipalAuthorized(infoGluePrincipal, "SiteNodeVersion.ChangeAccessRights", protectedSiteNodeVersionId.toString()))
          ceb.add(new AccessConstraintException("SiteNodeVersion.siteNodeId", "1006"));
      }
    }
   
    ceb.throwIfNotEmpty();
  }

 
  /**
   * This method will be called when a interceptionPoint is reached and it handle it within a transaction.
View Full Code Here

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

        if(protectedSiteNodeVersionId != null && !AccessRightController.getController().getIsPrincipalAuthorized(db, infoGluePrincipal, "SiteNodeVersion.Write", protectedSiteNodeVersionId.toString()))
          ceb.add(new AccessConstraintException("SiteNodeVersion.siteNodeVersionId", "1001"));
      }
    }

    ceb.throwIfNotEmpty();
  }
 
  public void setInterceptorVO(InterceptorVO vo)
  {
    //Dont need it for now
View Full Code Here

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

   
      Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(contentId);
      if(protectedContentId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.SubmitToPublish", protectedContentId.toString()))
        ceb.add(new AccessConstraintException("Content.contentId", "1005"));
     
      ceb.throwIfNotEmpty();

      contentVersionVOList = ContentVersionController.getContentVersionController().getContentVersionVOWithParentRecursive(contentId, ContentVersionVO.PUBLISHED_STATE, false);
    }

      return "input";
View Full Code Here

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

     
        Integer protectedContentId = ContentControllerProxy.getController().getProtectedContentId(contentId);
        if(protectedContentId != null && !AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "Content.SubmitToPublish", protectedContentId.toString()))
          ceb.add(new AccessConstraintException("Content.contentId", "1005"));
       
        ceb.throwIfNotEmpty();
 
        processBean.updateProcess("Getting child contents available for unpublish");
       
        contentVOList = ContentController.getContentController().getContentVOWithParentRecursive(contentId, processBean);
      }
View Full Code Here

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

    }
        if ( ps.exists( "content_" + this.parentContentId + "_allowedContentTypeNames" ) )
        {
            this.allowedContentTypeNames = ps.getString("content_" + this.parentContentId + "_allowedContentTypeNames");
        }
    ceb.throwIfNotEmpty();
   
    return "input";
    }

    public String doInputV3() throws Exception
View Full Code Here

Examples of org.infoglue.cms.util.AccessConstraintExceptionBuffer.throwIfNotEmpty()

    String createContentInlineOperationBackToCurrentContentTitleText = getLocalizedString(getLocale(), "tool.contenttool.createContentInlineOperationBackToCurrentContentTitleText");

      setActionMessage(userSessionKey, createContentInlineOperationDoneHeader);
      addActionLink(userSessionKey, new LinkBean("currentContentUrl", createContentInlineOperationBackToCurrentContentLinkText, createContentInlineOperationBackToCurrentContentTitleText, createContentInlineOperationBackToCurrentContentTitleText, this.originalAddress, false, ""));

    ceb.throwIfNotEmpty();
   
    return "inputV3";
    }
   
    public String doExecuteV3() throws Exception
View Full Code Here

Examples of org.infoglue.cms.util.ConstraintExceptionBuffer.throwIfNotEmpty()

            //add validation here if needed
            serviceDefinition = getServiceDefinitionWithId(serviceDefinitionVO.getServiceDefinitionId(), db);
            serviceDefinition.setValueObject(serviceDefinitionVO);

            //If any of the validations or setMethods reported an error, we throw them up now before create.
            ceb.throwIfNotEmpty();
           
            commitTransaction(db);
        }
        catch(ConstraintException ce)
        {
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.