org.apache.velocity.util
Class StringUtils

java.lang.Object
  extended by org.apache.velocity.util.StringUtils

public class StringUtils
extends java.lang.Object

This class provides some methods for dynamically invoking methods in objects, and some string manipulation methods used by torque. The string methods will soon be moved into the turbine string utilities class.

Version:
$Id: StringUtils.java 685685 2008-08-13 21:43:27Z nbubna $
Author:
Jason van Zyl, Daniel Rall

Constructor Summary
StringUtils()
           
 
Method Summary
 boolean allEmpty(java.util.List list)
          Check to see if all the string objects passed in are empty.
static java.lang.String capitalizeFirstLetter(java.lang.String data)
           Capitalize the first letter but leave the rest as they are.
static java.lang.String chop(java.lang.String s, int i)
          Chop i characters off the end of a string.
static java.lang.String chop(java.lang.String s, int i, java.lang.String eol)
          Chop i characters off the end of a string.
static java.lang.String collapseNewlines(java.lang.String argStr)
          Remove/collapse multiple newline characters.
static java.lang.String collapseSpaces(java.lang.String argStr)
          Remove/collapse multiple spaces.
 java.lang.String concat(java.util.List list)
          Concatenates a list of objects as a String.
static java.lang.String fileContentsToString(java.lang.String file)
          Read the contents of a file and place them in a string object.
static java.lang.String firstLetterCaps(java.lang.String data)
           Makes the first letter caps and the rest p;METHOD

org.apache.velocity.util
Interface ContextAware

All Known Implementing Classes:
IncludeNotFound

public interface ContextAware

Event handlers implementing this interface will automatically have the method setContext called before each event. This allows the event handler to use information in the latest context when responding to the event.

Important Note: Only local event handlers attached to the context (as opposed to global event handlers initialized in the velocity.properties file) should implement ContextAware. Since global event handlers are singletons individual requests will not be able to count on the correct context being loaded before a request.

Since:
1.5
Version:
$Id: ContextAware.java 685685 2008-08-13 21:43:27Z nbubna $
Author:
Will Glass-Husain

Method Summary
 void setContext(Context context)
          Initialize the EventHandler.
 

Method Detail

setContext

void setContext(Context context)
Initialize the EventHandler.

Parameters:
context -


Copyright © 2000-2012. All Rights Reserved. ./usr/share/doc/velocity/api/org/apache/velocity/util/StringUtils.html0000644000000000000000000007572011732670626025025 0ustar rootroot StringUtils (Apache Velocity 1.7 API)

org.apache.velocity.util
Class StringUtils

java.lang.Object
  extended by org.apache.velocity.util.StringUtils

public class StringUtils
extends java.lang.Object

This class provides some methods for dynamically invoking methods in objects, and some string manipulation methods used by torque. The string methods will soon be moved into the turbine string utilities class.

Version:
$Id: StringUtils.java 685685 2008-08-13 21:43:27Z nbubna $
Author:
Jason van Zyl, Daniel Rall

Constructor Summary
StringUtils()
           
 
Method Summary
 boolean allEmpty(java.util.List list)
          Check to see if all the string objects passed in are empty.
static java.lang.String capitalizeFirstLetter(java.lang.String data)
           Capitalize the first letter but leave the rest as they are.
static java.lang.String chop(java.lang.String s, int i)
          Chop i characters off the end of a string.
static java.lang.String chop(java.lang.String s, int i, java.lang.String eol)
          Chop i characters off the end of a string.
static java.lang.String collapseNewlines(java.lang.String argStr)
          Remove/collapse multiple newline characters.
static java.lang.String collapseSpaces(java.lang.String argStr)
          Remove/collapse multiple spaces.
 java.lang.String concat(java.util.List list)
          Concatenates a list of objects as a String.
static java.lang.String fileContentsToString(java.lang.String file)
          Read the contents of a file and place them in a string object.
static java.lang.String firstLetterCaps(java.lang.String data)
           Makes the first letter caps and the rest p;METHOD

org.apache.velocity.util
Interface ContextAware

All Known Implementing Classes:
IncludeNotFound

public interface ContextAware

Event handlers implementing this interface will automatically have the method setContext called before each event. This allows the event handler to use information in the latest context when responding to the event.

Important Note: Only local event handlers attached to the context (as opposed to global event handlers initialized in the velocity.properties file) should implement ContextAware. Since global event handlers are singletons individual requests will not be able to count on the correct context being loaded before a request.

Since:
1.5
Version:
$Id: ContextAware.java 685685 2008-08-13 21:43:27Z nbubna $
Author:
Will Glass-Husain

Method Summary
 void setContext(Context context)
          Initialize the EventHandler.
 

Method Detail

setContext

void setContext(Context context)
Initialize the EventHandler.

Parameters:
context -