Package net.sf.gluent.javagenerator

Examples of net.sf.gluent.javagenerator.JavaGenerator$Expression


    public static String evaluate(final String expression, final JexlContext jexlContext) {
        String result = StringUtils.EMPTY;

        if (StringUtils.isNotBlank(expression) && jexlContext != null) {
            try {
                Expression jexlExpression = getEngine().createExpression(expression);
                Object evaluated = jexlExpression.evaluate(jexlContext);
                if (evaluated != null) {
                    result = evaluated.toString();
                }
            } catch (JexlException e) {
                LOG.error("Invalid jexl expression: " + expression, e);
View Full Code Here


import java.util.Map;

public class ELUtil {
    public static Object invoke(String expression, Map<String, Object> context) {
        JexlEngine jexl = new JexlEngine();
        Expression el = jexl.createExpression(expression);
        JexlContext elContext = new MapContext();
        for (String property : context.keySet()) {
            elContext.set(property, context.get(property));
        }
        return el.evaluate(elContext);
    }
View Full Code Here

        String result = subst.replace(var);

        try
        {
            Expression exp = engine.createExpression(result);
            result = (String) exp.evaluate(createContext());
        }
        catch (Exception e)
        {
            configuration.getLogger().debug("Error encountered evaluating " + result, e);
        }
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.EXPRESSION: {
            Expression expression = (Expression) theEObject;
            T result = caseExpression(expression);
            if (result == null)
                result = caseBaseElement(expression);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) {
        Expression oldExpression = expression;
        expression = newExpression;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.RESOURCE_PARAMETER_BINDING__EXPRESSION, oldExpression,
                    newExpression);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTimeDate(Expression newTimeDate, NotificationChain msgs) {
        Expression oldTimeDate = timeDate;
        timeDate = newTimeDate;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.TIMER_EVENT_DEFINITION__TIME_DATE, oldTimeDate, newTimeDate);
            if (msgs == null)
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTimeDuration(Expression newTimeDuration, NotificationChain msgs) {
        Expression oldTimeDuration = timeDuration;
        timeDuration = newTimeDuration;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.TIMER_EVENT_DEFINITION__TIME_DURATION, oldTimeDuration,
                    newTimeDuration);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetTimeCycle(Expression newTimeCycle, NotificationChain msgs) {
        Expression oldTimeCycle = timeCycle;
        timeCycle = newTimeCycle;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.TIMER_EVENT_DEFINITION__TIME_CYCLE, oldTimeCycle, newTimeCycle);
            if (msgs == null)
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetExpression(Expression newExpression, NotificationChain msgs) {
        Expression oldExpression = expression;
        expression = newExpression;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
                    Bpmn2Package.RESOURCE_ASSIGNMENT_EXPRESSION__EXPRESSION, oldExpression,
                    newExpression);
View Full Code Here

 
  @SuppressWarnings("unchecked")
  public void execute(ExecutionContext executionContext,Event event) {
   
   
    Expression expression=this.getTimeDate();
    FormalExpression formalExpression=null;
    if(expression!=null){
      formalExpression=(FormalExpression)expression;
    }
    if(formalExpression==null){
View Full Code Here

TOP

Related Classes of net.sf.gluent.javagenerator.JavaGenerator$Expression

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.