com.infodesire.infobit.external.impl
Class ExportRenderHelper

java.lang.Object
  |
  +--com.infodesire.infobit.external.impl.ExportRenderHelper

public class ExportRenderHelper
extends java.lang.Object

Factorizes computations required in export templates.

Version:
$Revision: 1.2 $
Author:
peter2

Constructor Summary
ExportRenderHelper()
           
 
Method Summary
 java.lang.String encodeBase64(java.io.InputStream content)
          Encodes binary data to base64.
 java.lang.String formatDay(java.util.Date date)
          Gets the day-of-month of the specified date.
 java.lang.String formatMonth(java.util.Date date)
          Gets the the month of the specified date.
 java.lang.String formatYear(java.util.Date date)
          Gets the year of the specified date.
 java.lang.String getTemplate(Version version)
          Dispatches the dynamic content class of the specified version to the appropriate template to externalize the content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExportRenderHelper

public ExportRenderHelper()
Method Detail

getTemplate

public java.lang.String getTemplate(Version version)
Dispatches the dynamic content class of the specified version to the appropriate template to externalize the content.

Parameters:
version - The version to externalize
Returns:
The path of a template to render the content of version , with respect to the classpath

encodeBase64

public java.lang.String encodeBase64(java.io.InputStream content)
                              throws InfobitException
Encodes binary data to base64.

Parameters:
content - The content to render
Returns:
Description of the Returned Value
Throws:
InfobitException - Description of Exception

formatYear

public java.lang.String formatYear(java.util.Date date)
Gets the year of the specified date.

Parameters:
date - The date for which to get the field
Returns:
The year of date according to the Gregorian calendar

formatMonth

public java.lang.String formatMonth(java.util.Date date)
Gets the the month of the specified date.

Parameters:
date - The date for which to get the field
Returns:
The number the month of date according to the Gregorian calendar, ranging from 1 to 12

formatDay

public java.lang.String formatDay(java.util.Date date)
Gets the day-of-month of the specified date.

Parameters:
date - The date for which to get the field
Returns:
The day of month of date according to the Gregorian calendar, ranging from 1 to (atmost) 31


Copyright © 2003 Information Desire GmbH. All Rights Reserved.