org.rhq.enterprise.server.plugins.alertOperations
Class AlertTokenReplacer

java.lang.Object
  extended by org.rhq.enterprise.server.plugins.alertOperations.AlertTokenReplacer

public class AlertTokenReplacer
extends Object

Helper to replace tokens by their values

Author:
Heiko W. Rupp

Field Summary
static String NOT_YET_IMPLEMENTED
           
protected static String THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
           
 
Constructor Summary
AlertTokenReplacer(Alert alert, OperationDefinition operationDefinition, Resource targetResource)
           
 
Method Summary
 String replaceToken(String tokenString)
          Replace the token string passed (without the token delimiters ) with the actual value
 String replaceTokens(String input)
          Replace all tokens on the input line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOT_YET_IMPLEMENTED

public static final String NOT_YET_IMPLEMENTED
See Also:
Constant Field Values

THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG

protected static final String THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
See Also:
Constant Field Values
Constructor Detail

AlertTokenReplacer

public AlertTokenReplacer(Alert alert,
                          OperationDefinition operationDefinition,
                          Resource targetResource)
Method Detail

replaceTokens

public String replaceTokens(String input)
Replace all tokens on the input line. If no tokens are found the input is returned. Tokens have the form '<% class.sub %>'

Parameters:
input - a line of text
Returns:
input with tokens replaced.
See Also:
Token, TokenClass

replaceToken

public String replaceToken(String tokenString)
Replace the token string passed (without the token delimiters ) with the actual value

Parameters:
tokenString - Input like alert.id
Returns:
replacement string or the input if the token was not valid.


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.