private static List<Object> getParameterValues(List<ValueExpression> valueBindings) { List<Object> values = new ArrayList<Object>( valueBindings.size() ); for (int i=0; i<valueBindings.size(); i++) { values.add( valueBindings.get(i).getValue() ); } return values; }
public boolean matches(String actualValue) { return ( actualValue!=null || condition!=null ) && ( outcomeValue==null || outcomeValue.equals(actualValue) ) && ( condition==null || Boolean.TRUE.equals( condition.getValue() ) ); }
private boolean endConversation() { return isEndConversation && (endConversationCondition==null || Boolean.TRUE.equals( endConversationCondition.getValue() ) ); } public FlushModeType getFlushMode()
private EntityManager lookupEntityManager() { return entityManager.getValue(); }
@Override public boolean navigate(FacesContext context) { addFacesMessage(message, severity, control); render(viewId == null ? null : viewId.getValue()); return true; } }
/** * Evaluates the specified security expression, which must return a boolean * value. * * @param expr String The expression to evaluate * @return boolean The result of the expression evaluation */ protected boolean evaluateExpression(String expr) { return Expressions.instance().createValueExpression(expr, Boolean.class).getValue(); }
private EntityManager lookupEntityManager() { if(entityManager == null) init(); return entityManager.getValue(); } }
public boolean isExecutable(boolean postback) { return (!postback || (postback && onPostback)) && (valueExpression == null || Boolean.TRUE.equals( valueExpression.getValue())); }
private String evaluateValue() { String result = ""; if (expression != null) { Object value = expression.getValue(); if (value != null) { result = value.toString(); } } return result; }
/** * Evaluate (get) a value binding */ protected Object getValue(String valueExpression) { return Expressions.instance().createValueExpression(valueExpression).getValue(); }
protected <T> T evaluateValueExpression(String expression, Class<T> type) { return createValueExpression(expression, type).getValue(); }
private void initSession() { currentSession = session.getValue(); if (currentSession==null) { throw new IllegalStateException("session was null: " + session.getExpressionString()); } }
private void initEntityManager() { currentEntityManager = entityManager.getValue(); if (currentEntityManager==null) { throw new IllegalStateException("entity manager was null: " + entityManager.getExpressionString()); } }
public T scheduleAsynchronousEvent(String type, Object... parameters) { taskExecutor.getValue().execute( new RunnableAsynchronous(new AsynchronousEvent(type, parameters))); return null; }
@Override protected String getViewId(Exception e) { if (id != null) { return id.getValue(); } else { return null; } }
private String getProcessKey(String el) { Object key = Expressions.instance().createValueExpression(el).getValue(); if (key==null) { throw new IllegalStateException("process business key may not be null"); } return key.toString(); }
@Override protected String getViewId(Exception e) { return Expressions.instance().createValueExpression(e.getClass().getAnnotation(Redirect.class).viewId(), String.class).getValue(); }
private boolean beginConversation() { return isBeginConversation && (beginConversationCondition==null || Boolean.TRUE.equals( beginConversationCondition.getValue() ) ); } private boolean endConversation()
public void createOrResumeProcess() { if ( createProcess() ) { BusinessProcess.instance().createProcess(definition); } if ( resumeProcess() ) { BusinessProcess.instance().resumeProcess( processId.getValue() ); } }