Package railo.runtime.exp

Examples of railo.runtime.exp.FunctionException


      setDimensions(dim[0],dim[1]);
    }

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Colormap, Turbulence, Stretch, Angle, TurbulenceFactor, Scale, Dimensions]");
    }

    return filter(src, dst);
  }
View Full Code Here


    if((o=parameters.removeEL(KeyImpl.init("CleanImage")))!=null)setCleanImage(ImageFilterUtil.toBufferedImage(o,"CleanImage"));
    if((o=parameters.removeEL(KeyImpl.init("destination")))!=null)setDestination(ImageFilterUtil.toBufferedImage(o,"destination"));

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [HTolerance, STolerance, BTolerance, CleanImage]");
    }

    return filter(src, dst);
  }
View Full Code Here

  public BufferedImage filter(BufferedImage src, Struct parameters) throws PageException {BufferedImage dst=ImageUtil.createBufferedImage(src);
    //Object o;

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported []");
    }

    return filter(src, dst);
  }
View Full Code Here

      setDimensions(dim[0],dim[1]);
    }

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [White, Black, LowerThreshold, UpperThreshold, Dimensions]");
    }

    return filter(src, dst);
  }
View Full Code Here

      setDimensions(dim[0],dim[1]);
    }

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Exposure, Dimensions]");
    }

    return filter(src, dst);
  }
View Full Code Here

    if((o=parameters.removeEL(KeyImpl.init("EdgeAction")))!=null)setEdgeAction(ImageFilterUtil.toString(o,"EdgeAction"));
    if((o=parameters.removeEL(KeyImpl.init("Interpolation")))!=null)setInterpolation(ImageFilterUtil.toString(o,"Interpolation"));

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Scale, EdgeAction, Interpolation]");
    }

    return filter(src, dst);
  }
View Full Code Here

    if((o=parameters.removeEL(KeyImpl.init("EdgeAction")))!=null)setEdgeAction(ImageFilterUtil.toString(o,"EdgeAction"));
    if((o=parameters.removeEL(KeyImpl.init("Interpolation")))!=null)setInterpolation(ImageFilterUtil.toString(o,"Interpolation"));

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Radius, Angle, CentreX, CentreY, Centre, EdgeAction, Interpolation]");
    }

    return filter(src, dst);
  }
View Full Code Here

public class ImageFilterUtil {

  public static float toFloatValue(Object value, String argName) throws FunctionException {
    float res = Caster.toFloatValue(value,Float.NaN);
    if(Float.isNaN(res)) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", msg(value,"float",argName));
    }
    return res;
  }
View Full Code Here

  }

  public static int toIntValue(Object value, String argName) throws FunctionException {
    int res = Caster.toIntValue(value,Integer.MIN_VALUE);
    if(Integer.MIN_VALUE==res) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", msg(value,"int",argName));
    }
    return res;
  }
View Full Code Here

    return res;
  }
  public static boolean toBooleanValue(Object value, String argName) throws FunctionException {
    Boolean res = Caster.toBoolean(value,null);
    if(res==null) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", msg(value,"boolean",argName));
    }
    return res;
  }
View Full Code Here

TOP

Related Classes of railo.runtime.exp.FunctionException

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.