net.sf.cantina.datasource
Class PersistentDocument

java.lang.Object
  extended bynet.sf.cantina.datasource.PersistentDocument
All Implemented Interfaces:
Document

public class PersistentDocument
extends java.lang.Object
implements Document

Author:
Stephane JAIS

Field Summary
static java.lang.String ENCODING
           
 
Constructor Summary
PersistentDocument()
           
 
Method Summary
 java.util.Collection getAvailableLocales()
          Returns the locales available for this document.
 byte[] getContent(java.util.Locale locale)
           
 java.lang.String getContentAsString(java.util.Locale locale)
           
 java.lang.String getContentType()
           
 java.lang.String getDocumentId()
          Gets the primary key.
 Realm getRealm()
          Gets the realm for this document
 Translation getTranslation(java.util.Locale locale)
           
 java.util.Map getTranslations()
           
 void setContent(java.util.Locale locale, byte[] content)
           
 void setContentAsString(java.util.Locale locale, java.lang.String content)
           
 void setContentType(java.lang.String contentType)
           
 void setDocumentId(java.lang.String documentId)
           
 void setRealm(Realm realm)
          sets the realm for this document
 void setTranslations(java.util.Map translations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENCODING

public static final java.lang.String ENCODING
See Also:
Constant Field Values
Constructor Detail

PersistentDocument

public PersistentDocument()
Method Detail

getDocumentId

public java.lang.String getDocumentId()
Gets the primary key.

Specified by:
getDocumentId in interface Document
Returns:
The primary key

setDocumentId

public void setDocumentId(java.lang.String documentId)

getRealm

public Realm getRealm()
Gets the realm for this document

Specified by:
getRealm in interface Document
Returns:
the Realm

setRealm

public void setRealm(Realm realm)
sets the realm for this document

Specified by:
setRealm in interface Document
Parameters:
realm -

getAvailableLocales

public java.util.Collection getAvailableLocales()
Returns the locales available for this document.

Specified by:
getAvailableLocales in interface Document

getTranslations

public java.util.Map getTranslations()

setTranslations

public void setTranslations(java.util.Map translations)

getTranslation

public Translation getTranslation(java.util.Locale locale)

getContent

public byte[] getContent(java.util.Locale locale)
Specified by:
getContent in interface Document

getContentAsString

public java.lang.String getContentAsString(java.util.Locale locale)
                                    throws java.lang.Exception
Specified by:
getContentAsString in interface Document
Throws:
java.lang.Exception

setContent

public void setContent(java.util.Locale locale,
                       byte[] content)
Specified by:
setContent in interface Document

setContentAsString

public void setContentAsString(java.util.Locale locale,
                               java.lang.String content)
                        throws java.lang.Exception
Specified by:
setContentAsString in interface Document
Throws:
java.lang.Exception

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in interface Document

setContentType

public void setContentType(java.lang.String contentType)
Specified by:
setContentType in interface Document


Copyright © 2004 Cantina. All Rights Reserved.