org.apache.cocoon.components.language.markup.xsp
Class XSPUtil

java.lang.Object
  extended byorg.apache.cocoon.components.language.markup.xsp.XSPUtil

public class XSPUtil
extends Object

The XSP Utility object helper

Version:
CVS $Id: XSPUtil.java 125963 2005-01-21 21:19:51Z cziegeler $
Author:
Ricardo Rocha, Berin Loritsch

Field Summary
static String XSP_COOKIE_PREFIX
          The namespace prefix for the cookie logicsheet.
static String XSP_COOKIE_URI
          The namespace for the cookie logicsheet.
static String XSP_REQUEST_PREFIX
          The namespace prefix for the request logicsheet.
static String XSP_REQUEST_URI
          The namespace for the request logicsheet.
static String XSP_RESPONSE_PREFIX
          The namespace prefix for the response logicsheet.
static String XSP_RESPONSE_URI
          The namespace for the response logicsheet.
static String XSP_URI
          The namespace for the XSP core logicsheet.
 
Constructor Summary
XSPUtil()
           
 
Method Summary
static String baseName(String filename)
           
static String baseName(String filename, String suffix)
           
static String encodeMarkup(String string)
           
static String fileComponent(String filename)
           
static String formatDate(Date date, String pattern)
           
static String formDecode(String s)
           
static String formEncode(String text)
           
static String getContents(InputStream in)
           
static String getContents(InputStream in, String encoding)
           
static String getContents(Reader reader)
           
static Object getContextAttribute(Map objectModel, String name)
           
static int getCount()
           
static String getFileContents(String filename)
           
static String getFileContents(String filename, String encoding)
           
static int getSessionCount(Session session)
           
static String getSourceContents(String url, SourceResolver resolver)
           
static String getSourceContents(String uri, String base, SourceResolver resolver)
           
static void includeFile(String name, ServiceManager manager, ContentHandler contentHandler, Map objectModel)
           
static void includeInputSource(InputSource source, ServiceManager manager, ContentHandler contentHandler)
           
static void includeSource(String uri, String base, SourceResolver resolver, ContentHandler contentHandler)
           
static void includeString(String string, ServiceManager manager, ContentHandler contentHandler)
           
static boolean isAlphaNumeric(char c)
           
static String normalizedBaseName(String filename)
           
static String normalizedName(String filename)
           
static String pathComponent(String filename)
           
static String relativeFilename(String filename, Map objectModel)
           
static String[] split(String line)
           
static String[] split(String line, String delimiter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSP_URI

public static final String XSP_URI
The namespace for the XSP core logicsheet.

See Also:
Constant Field Values

XSP_REQUEST_PREFIX

public static final String XSP_REQUEST_PREFIX
The namespace prefix for the request logicsheet.

See Also:
Constant Field Values

XSP_REQUEST_URI

public static final String XSP_REQUEST_URI
The namespace for the request logicsheet.

See Also:
Constant Field Values

XSP_RESPONSE_PREFIX

public static final String XSP_RESPONSE_PREFIX
The namespace prefix for the response logicsheet.

See Also:
Constant Field Values

XSP_RESPONSE_URI

public static final String XSP_RESPONSE_URI
The namespace for the response logicsheet.

See Also:
Constant Field Values

XSP_COOKIE_PREFIX

public static final String XSP_COOKIE_PREFIX
The namespace prefix for the cookie logicsheet.

See Also:
Constant Field Values

XSP_COOKIE_URI

public static final String XSP_COOKIE_URI
The namespace for the cookie logicsheet.

See Also:
Constant Field Values
Constructor Detail

XSPUtil

public XSPUtil()
Method Detail

pathComponent

public static String pathComponent(String filename)

fileComponent

public static String fileComponent(String filename)

baseName

public static String baseName(String filename)

baseName

public static String baseName(String filename,
                              String suffix)

normalizedBaseName

public static String normalizedBaseName(String filename)

normalizedName

public static String normalizedName(String filename)

relativeFilename

public static String relativeFilename(String filename,
                                      Map objectModel)
                               throws IOException
Throws:
IOException

isAlphaNumeric

public static boolean isAlphaNumeric(char c)

split

public static String[] split(String line)

split

public static String[] split(String line,
                             String delimiter)

encodeMarkup

public static String encodeMarkup(String string)

formEncode

public static String formEncode(String text)
                         throws Exception
Throws:
Exception

formDecode

public static String formDecode(String s)
                         throws Exception
Throws:
Exception

formatDate

public static String formatDate(Date date,
                                String pattern)

getCount

public static int getCount()

getSessionCount

public static int getSessionCount(Session session)

getContextAttribute

public static Object getContextAttribute(Map objectModel,
                                         String name)

getSourceContents

public static String getSourceContents(String url,
                                       SourceResolver resolver)
                                throws IOException
Throws:
IOException

getSourceContents

public static String getSourceContents(String uri,
                                       String base,
                                       SourceResolver resolver)
                                throws IOException
Throws:
IOException

getFileContents

public static String getFileContents(String filename)
                              throws IOException
Throws:
IOException

getFileContents

public static String getFileContents(String filename,
                                     String encoding)
                              throws IOException
Throws:
IOException

getContents

public static String getContents(InputStream in,
                                 String encoding)
                          throws IOException
Throws:
IOException

getContents

public static String getContents(InputStream in)
                          throws IOException
Throws:
IOException

getContents

public static String getContents(Reader reader)
                          throws IOException
Throws:
IOException

includeSource

public static void includeSource(String uri,
                                 String base,
                                 SourceResolver resolver,
                                 ContentHandler contentHandler)
                          throws RuntimeException
Throws:
RuntimeException

includeString

public static void includeString(String string,
                                 ServiceManager manager,
                                 ContentHandler contentHandler)
                          throws RuntimeException
Throws:
RuntimeException

includeFile

public static void includeFile(String name,
                               ServiceManager manager,
                               ContentHandler contentHandler,
                               Map objectModel)
                        throws RuntimeException
Throws:
RuntimeException

includeInputSource

public static void includeInputSource(InputSource source,
                                      ServiceManager manager,
                                      ContentHandler contentHandler)
                               throws RuntimeException
Throws:
RuntimeException


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.