Package org.infoglue.cms.exception

Examples of org.infoglue.cms.exception.ConstraintException


  /**
   *
   */
  private void validateField(boolean isIllegalValue, String fieldName, ConstraintExceptionBuffer ceb) {
    if(isIllegalValue) {
      ceb.add(new ConstraintException(fieldName, ERROR_CODE));
    }
  }
View Full Code Here


               errorMessage = message.substring(4, message.length() - 1);
               break;
            }
          }
         
        ceb.add(new ConstraintException(name, errorMessage));
        //ceb.add(new ConstraintException(name, m.getKey()));
      }
    }
    return ceb;
  }
View Full Code Here

  /**
   *
   */
  private final ConstraintException createConstraintException(String errorCode)
  {
    return new ConstraintException(this.fieldName, errorCode);
  }
View Full Code Here

 
   public void delete(ContentVersion contentVersion, Database db, boolean forceDelete) throws ConstraintException, SystemException, Exception
  {
    if (!forceDelete && contentVersion.getStateId().intValue() == ContentVersionVO.PUBLISHED_STATE.intValue() && contentVersion.getIsActive().booleanValue() == true)
    {
      throw new ConstraintException("ContentVersion.stateId", "3300", contentVersion.getOwningContent().getName());
    }
   
    contentCategoryController.deleteByContentVersion(contentVersion, db);
    DigitalAssetController.getController().deleteByContentVersion(contentVersion, db);
   
View Full Code Here

 
   public void delete(MediumContentVersionImpl contentVersion, Database db, boolean forceDelete) throws ConstraintException, SystemException, Exception
  {
    if (!forceDelete && contentVersion.getStateId().intValue() == ContentVersionVO.PUBLISHED_STATE.intValue() && contentVersion.getIsActive().booleanValue() == true)
    {
      throw new ConstraintException("ContentVersion.stateId", "3300", contentVersion.getOwningContent().getName());
    }
   
    contentCategoryController.deleteByContentVersion(contentVersion, db);
    DigitalAssetController.getController().deleteByContentVersion(contentVersion, db);
    //System.out.println("Removing:" + contentVersion.getId());
View Full Code Here

            DigitalAssetVO digitalAssetVO = digitalAsset.getValueObject();
           
            InputStream is = DigitalAssetController.getController().getAssetInputStream(digitalAsset, true);
     
            if(is == null && !allowBrokenAssets)
              throw new ConstraintException("DigitalAsset.assetBlob", "3308", "Broken asset found on content '" + originalContentVersion.getValueObject().getContentName() + "' with id " + originalContentVersion.getValueObject().getContentId());
           
              try
            {
                synchronized (is)
              {
View Full Code Here

      DigitalAssetVO digitalAssetVO = digitalAsset.getValueObject();
     
      InputStream is = DigitalAssetController.getController().getAssetInputStream(digitalAsset, true);

      if(is == null && !allowBrokenAssets)
        throw new ConstraintException("DigitalAsset.assetBlob", "3308", "Broken asset found on content '" + contentVersion.getValueObject().getContentName() + "' with id " + contentVersion.getValueObject().getContentId());
     
        try
      {
          synchronized (is)
        {
View Full Code Here

TOP

Related Classes of org.infoglue.cms.exception.ConstraintException

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.