Example usage for org.springframework.beans BeansException BeansException

List of usage examples for org.springframework.beans BeansException BeansException

Introduction

In this page you can find the example usage for org.springframework.beans BeansException BeansException.

Prototype

public BeansException(String msg) 

Source Link

Document

Create a new BeansException with the specified message.

Usage

From source file:net.easysmarthouse.service.el.DeviceExpressionResolver.java

@Override
public Object evaluate(String value, BeanExpressionContext expressionContext) throws BeansException {
    if (value.startsWith(evaluationTemplate.getEvaluationStart())
            && value.endsWith(evaluationTemplate.getEvaluationEnd())) {
        try {//  ww w  .j a  v a  2 s.  c  om
            return parser.parse(value);
        } catch (Exception ex) {
            throw new BeansException(ex.getMessage()) {
            };
        }
    } else {
        return delegated.evaluate(value, expressionContext);
    }
}

From source file:com.reactivetechnologies.analytics.mapper.DataMappers.java

@Override
public Dataset mapStringToModel(JsonRequest request) throws ParseException {
    Assert.notNull(request);/*  w  ww.ja  v a2  s  .c  o m*/
    if (!cache.containsKey(request.getType()))
        throw new BeansException("No data mapper found for type- " + request.getType()) {

            /**
             * 
             */
            private static final long serialVersionUID = 1L;
        };
    return cache.get(request.getType()).mapStringToModel(request);
}

From source file:com.reactivetechnologies.platform.analytics.mapper.DataMappers.java

@Override
public TrainModel mapStringToModel(ArffJsonRequest request) throws ParseException {
    Assert.notNull(request);/*from ww w . j  a v a 2  s  . c  o  m*/
    if (!cache.containsKey(request.getType()))
        throw new BeansException("No data mapper found for type- " + request.getType()) {

            /**
             * 
             */
            private static final long serialVersionUID = 1L;
        };
    return cache.get(request.getType()).mapStringToModel(request);
}