Plumtree UI Infrastructure API  
 

GeneralHelpers Members

GeneralHelpers overview

Public Static Methods

BreakDownLongWordsInString Adds spaces into long strings so that it can be displayed with wrapping in HTML without having to truncate.
ContainsUnsafeCharacters Helper method that checks whether or not a string contains unsafe characters, such as angle braces for HTML or curly braces for javascript. This is useful for determining if someone is trying to do a javascript hack.
ConvertToInts This method takes a String with numbers separated by ','s and splits it into an int array. If there is an error, the rest of the array is filled with 0s.
ConvertToString This method converts the expanded object types int[] into a comma separated String
EscapeJavascript This method escapes a String for use in Javascript. This code was adapted from Studio's code (Patrick Corcoran)
FormatPath 
Replace replace substrings within string.
SetUIError This helper function sets a UI Error with the messages specified, and optionally throws an exception. The UI Error will contain the strings specified only, but the Debug log entry will also contain the text of the exception (e.getMessage())
TruncateLongString 

Public Instance Constructors

GeneralHelpers Constructor Initializes a new instance of the GeneralHelpers class.

Public Instance Methods

Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
ToString (inherited from Object)Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.

See Also

GeneralHelpers Class | com.plumtree.uiinfrastructure.statichelpers Namespace