Animation a = AnimationUtils.loadAnimation(getContext(), R.anim.progress_anim); a.setDuration(duration); a.setInterpolator(new Interpolator() {
public String getParentConversationViewId() { ConversationEntry conversationEntry = ConversationEntries.instance().getConversationEntry(getParentConversationId()); return conversationEntry==null ? null : conversationEntry.getViewId(); }
private void removeCurrentConversationAndDestroyNestedContexts(Map<String, Object> session) { ConversationEntries conversationEntries = ConversationEntries.getInstance(); if (conversationEntries!=null) { conversationEntries.removeConversationEntry( getCurrentConversationId() ); destroyNestedConversationContexts( session, getCurrentConversationId() ); } }
private void restoreSyntheticConversationId(Map parameters) { //Next, try to get the conversation id from the globally defined request parameters Manager manager = Manager.instance(); //TODO: move the conversationIdParameter to this class! if ( isMissing(conversationId) ) { conversationId = getRequestParameterValue( parameters, manager.getConversationIdParameter() ); } if ( isMissing(parentConversationId) ) { parentConversationId = getRequestParameterValue( parameters, manager.getParentConversationIdParameter() ); } }
private ConversationEntry createConversationEntry() { ConversationEntry entry = ConversationEntries.instance() .createConversationEntry( getCurrentConversationId(), getCurrentConversationIdStack() ); if ( !entry.isNested() ) { //if it is a newly created nested //conversation, we already own the //lock entry.lock(); } return entry; }
/** * "Pop" the conversation stack, switching to the parent conversation */ public void pop() { String parentId = getParentId(); if (parentId!=null) { Manager.instance().switchConversation(parentId); } }
public void destroy() { boolean success = Manager.instance().switchConversation( getId() ); if (success) Manager.instance().endConversation(false); }
/** * Switch to the root conversation */ public void root() { String rootId = getRootId(); if (rootId!=null) { Manager.instance().switchConversation(rootId); } }
/** * Switch back to the last defined view-id for the * current conversation. * * @return true if a redirect occurred */ public boolean redirect() { Manager manager = Manager.instance(); return redirect( manager, manager.getCurrentConversationViewId() ); }
/** * Evaluate (get) a value binding */ protected Object getValue(String valueExpression) { return Expressions.instance().createValueExpression(valueExpression).getValue(); }
/** * Add a new listener for a given event type * * @param type the event type * @param methodBindingExpression a method binding, expressed in EL * @param argTypes the argument types of the method binding */ public void addListener(String type, String methodBindingExpression, Class... argTypes) { MethodExpression methodBinding = Expressions.instance().createMethodExpression(methodBindingExpression, Object.class, argTypes); Init.instance().addObserverMethodExpression(type, methodBinding); }
public ConversationEntry getCurrentConversationEntry() { if (currentConversationEntry==null) { currentConversationEntry = ConversationEntries.instance().getConversationEntry( getCurrentConversationId() ); } return currentConversationEntry; }
/** * Call a method binding */ protected Object invokeMethod(String methodExpression) { return Expressions.instance().createMethodExpression(methodExpression).invoke(); }
protected void flushConversationMetadata() { if ( isLongRunningConversation() ) { //important: only do this stuff when a long-running // conversation exists, otherwise we would // force creation of a conversation entry Conversation.instance().flush(); } }
/** * Set a value binding */ protected void setValue(String valueExpression, Object value) { Expressions.instance().createValueExpression(valueExpression).setValue(value); }
public String getCurrentConversationViewId() { ConversationEntry ce = getCurrentConversationEntry(); if ( ce==null ) return null; return ce.getViewId(); }
public Integer getCurrentConversationConcurrentRequestTimeout() { ConversationEntry ce = getCurrentConversationEntry(); if (ce == null) return null; return ce.getConcurrentRequestTimeout(); }
public Integer getCurrentConversationTimeout() { ConversationEntry ce = getCurrentConversationEntry(); if ( ce==null ) return null; return ce.getTimeout(); }
public String getCurrentConversationDescription() { ConversationEntry ce = getCurrentConversationEntry(); if ( ce==null ) return null; return ce.getDescription(); }
/** * 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(); }