com.xpn.xwiki.util
Class Util

java.lang.Object
  extended by com.xpn.xwiki.util.Util

public class Util
extends java.lang.Object


Field Summary
private  org.apache.oro.text.regex.Perl5Matcher matcher
           
private  org.apache.oro.text.perl.Perl5Util p5util
           
private static org.apache.oro.text.PatternCache patterns
           
 
Constructor Summary
Util()
           
 
Method Summary
static java.lang.String cleanValue(java.lang.String value)
           
static boolean contains(java.lang.String name, java.lang.String list, java.lang.String sep)
           
static javax.servlet.http.Cookie getCookie(java.lang.String cookieName, XWikiContext context)
           
static java.lang.String getFileContent(java.io.File file)
           
static java.lang.String getFileContent(java.io.Reader reader)
           
static byte[] getFileContentAsBytes(java.io.File file)
           
static byte[] getFileContentAsBytes(java.io.InputStream is)
           
static java.lang.String getHTMLExceptionMessage(XWikiException xe, XWikiContext context)
           
 org.apache.oro.text.regex.Perl5Matcher getMatcher()
           
 java.util.List getMatches(java.lang.String content, java.lang.String spattern, int group)
           
static MonitorPlugin getMonitorPlugin(XWikiContext context)
           
static java.lang.String getName(java.lang.String name)
           
static java.lang.String getName(java.lang.String name, XWikiContext context)
           
static java.util.Map getObject(XWikiRequest request, java.lang.String prefix)
           
 org.apache.oro.text.perl.Perl5Util getP5util()
           
static org.apache.oro.text.PatternCache getPatterns()
           
static java.lang.String getWeb(java.lang.String fullname)
           
static boolean isAlphaNumeric(java.lang.String text)
           
static java.util.Hashtable keyValueToHashtable(java.lang.String keyvalue)
           
 boolean match(java.lang.String pattern, java.lang.String text)
           
 boolean matched()
           
static java.lang.String noaccents(java.lang.String text)
           
static java.lang.String restoreValue(java.lang.String value)
           
static java.lang.String secureLaszloCode(java.lang.String laszlocode)
           
 java.util.Vector split(java.lang.String pattern, java.lang.String text)
           
 java.lang.String substitute(java.lang.String pattern, java.lang.String text)
           
 java.lang.String substitute(java.lang.String pattern, java.lang.String substitution, java.lang.String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

patterns

private static org.apache.oro.text.PatternCache patterns

matcher

private org.apache.oro.text.regex.Perl5Matcher matcher

p5util

private org.apache.oro.text.perl.Perl5Util p5util
Constructor Detail

Util

public Util()
Method Detail

substitute

public java.lang.String substitute(java.lang.String pattern,
                                   java.lang.String text)

match

public boolean match(java.lang.String pattern,
                     java.lang.String text)

matched

public boolean matched()

substitute

public java.lang.String substitute(java.lang.String pattern,
                                   java.lang.String substitution,
                                   java.lang.String text)

getMatcher

public org.apache.oro.text.regex.Perl5Matcher getMatcher()

getP5util

public org.apache.oro.text.perl.Perl5Util getP5util()

getMatches

public java.util.List getMatches(java.lang.String content,
                                 java.lang.String spattern,
                                 int group)
                          throws org.apache.oro.text.regex.MalformedPatternException
Throws:
org.apache.oro.text.regex.MalformedPatternException

cleanValue

public static java.lang.String cleanValue(java.lang.String value)

restoreValue

public static java.lang.String restoreValue(java.lang.String value)

keyValueToHashtable

public static java.util.Hashtable keyValueToHashtable(java.lang.String keyvalue)
                                               throws java.io.IOException
Throws:
java.io.IOException

getPatterns

public static org.apache.oro.text.PatternCache getPatterns()

getObject

public static java.util.Map getObject(XWikiRequest request,
                                      java.lang.String prefix)

getWeb

public static java.lang.String getWeb(java.lang.String fullname)

split

public java.util.Vector split(java.lang.String pattern,
                              java.lang.String text)

getFileContent

public static java.lang.String getFileContent(java.io.File file)
                                       throws java.io.IOException
Throws:
java.io.IOException

getFileContent

public static java.lang.String getFileContent(java.io.Reader reader)
                                       throws java.io.IOException
Throws:
java.io.IOException

getFileContentAsBytes

public static byte[] getFileContentAsBytes(java.io.File file)
                                    throws java.io.IOException
Throws:
java.io.IOException

getFileContentAsBytes

public static byte[] getFileContentAsBytes(java.io.InputStream is)
                                    throws java.io.IOException
Throws:
java.io.IOException

contains

public static boolean contains(java.lang.String name,
                               java.lang.String list,
                               java.lang.String sep)

noaccents

public static java.lang.String noaccents(java.lang.String text)

isAlphaNumeric

public static boolean isAlphaNumeric(java.lang.String text)

getName

public static java.lang.String getName(java.lang.String name)

getName

public static java.lang.String getName(java.lang.String name,
                                       XWikiContext context)

getCookie

public static javax.servlet.http.Cookie getCookie(java.lang.String cookieName,
                                                  XWikiContext context)

getHTMLExceptionMessage

public static java.lang.String getHTMLExceptionMessage(XWikiException xe,
                                                       XWikiContext context)

secureLaszloCode

public static java.lang.String secureLaszloCode(java.lang.String laszlocode)
                                         throws XWikiException
Throws:
XWikiException

getMonitorPlugin

public static MonitorPlugin getMonitorPlugin(XWikiContext context)


Copyright 2003 Ludovic Dubost