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

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

public class XSPUtil
extends Object

The XSP Utility object helper

Version:
CVS $Id: XSPUtil.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Ricardo Rocha, Berin Loritsch

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, ComponentManager manager, ContentHandler contentHandler, Map objectModel)
           
static void includeInputSource(InputSource source, ComponentManager manager, ContentHandler contentHandler)
           
static void includeSource(String uri, String base, SourceResolver resolver, ContentHandler contentHandler)
           
static void includeString(String string, ComponentManager 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
 

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,
                                 ComponentManager manager,
                                 ContentHandler contentHandler)
                          throws RuntimeException
Throws:
RuntimeException

includeFile

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

includeInputSource

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


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.