org.netbeans.modules.bpel.model.impl.services
Class ExpressionUpdater

java.lang.Object
  extended by org.netbeans.modules.bpel.model.impl.services.ExpressionUpdater

public final class ExpressionUpdater
extends java.lang.Object

Author:
ads, nk160297

Nested Class Summary
static class ExpressionUpdater.ExpressionException
           
static class ExpressionUpdater.InvalidExpressionException
           
 
Method Summary
static ExpressionUpdater getInstance()
           
 java.util.Collection<java.lang.String> getUsedVariables(java.lang.String expression)
           
 boolean isPresent(java.lang.String expression, Named component)
          Method returns true if component is present in expression.
 java.lang.String update(java.lang.String expression, Named component, java.lang.String newName)
          Update entrance of component in expression with new component name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ExpressionUpdater getInstance()

isPresent

public boolean isPresent(java.lang.String expression,
                         Named component)
Method returns true if component is present in expression.

Parameters:
expression - Subject expression.
component - Component that will be trying to find.
Returns:
true if component is found in expression.

update

public java.lang.String update(java.lang.String expression,
                               Named component,
                               java.lang.String newName)
Update entrance of component in expression with new component name.

Parameters:
expression - Subject expression.
component - Component that will be trying to find for update.
newName - New name of component.
Returns:
Updated expression or null if it was not updated.

getUsedVariables

public java.util.Collection<java.lang.String> getUsedVariables(java.lang.String expression)
Parameters:
expression - Subject expression.
Returns:
collection names of found variables.