com.webmethods.caf.faces.data.export
Class AtomEntriesExportProvider

java.lang.Object
  extended by com.webmethods.caf.faces.data.object.BoundPropertiesContentProvider
      extended by com.webmethods.caf.faces.data.object.BoundPropertiesTableContentProvider
          extended by com.webmethods.caf.faces.data.export.PageableExportProvider
              extended by com.webmethods.caf.faces.data.export.AtomEntriesExportProvider
All Implemented Interfaces:
IContentProvider, ISortableTableContentProvider, ITableContentProvider, IUpdateableContentProvider

public class AtomEntriesExportProvider
extends PageableExportProvider

Provider, specialized for atom data, which limits a wrapped table content-provider to exposing a specified set of properties; these properties are specified via binding expressions. The specialization includes optionally generating content and links

Consumers should specify at least the following properties:

id
URI which uniquely identifies this entry. Should be an absolute uri (ex: "http://example.org/my-feed/my-entry").
updated
Last updated date of this entry.
title
Entry title (in the current locale).

Consumers may also specify following standard atom properties:

author
Name of entity or list of names of entities who authored this entry.
category
List of keywords (aka tags) which apply to this entry.
content
Textual content of this entry.
contributor
List of the names of additional contributors to this entry.
link
List of links to resources related to this entry.
published
Original publishing date of this entry.
rights
Textual description of the intellectual property rights to the content of this entry (in the current locale).
source
Name of or link to the original source of this entry.
summary
Entry summary (in the current locale).
.


Field Summary
protected  Object[] m_atomPropertyKeys
          Array of aggregate property keys.
protected  String m_content
          Cached current row content.
protected  boolean m_generateContent
          True to autogenerate content.
protected  boolean m_generateLinks
          True to autogenerate links.
protected static Pattern RE_LINKS
           
protected static Pattern RE_SCRIPTS
           
 
Fields inherited from class com.webmethods.caf.faces.data.export.PageableExportProvider
m_first, m_rows, NO_SORT
 
Fields inherited from class com.webmethods.caf.faces.data.object.BoundPropertiesContentProvider
m_keys, m_provider, m_var
 
Constructor Summary
AtomEntriesExportProvider()
          Blank provider.
AtomEntriesExportProvider(ITableContentProvider provider, Map keys, String var)
          Provider limiting specified provider to specified keys.
 
Method Summary
protected  String generateContent()
           
protected  List generateLinks()
           
 Object[] getPropertyKeys()
          Returns list of properties supported by this content provider.
 Class getType(Object propertyKey)
          Returns java type of the given property
 Object getValue(Object propertyKey)
          Returns value of the given property
 boolean hasProperty(Object propertyKey)
          Checks if the given property is supported by this content provider
 void refresh()
           
 void setRowIndex(int index)
          Set the zero-relative index of the currently selected row, or -1 to indicate that we are not positioned on a row.
 
Methods inherited from class com.webmethods.caf.faces.data.export.PageableExportProvider
getFirst, getRowIndex, getRows, getSort, isRowAvailable, setFirst, setRows, setSort
 
Methods inherited from class com.webmethods.caf.faces.data.object.BoundPropertiesTableContentProvider
getCurrentRow, getRowCount, getRowVariable, getTableProvider, setRowVariable
 
Methods inherited from class com.webmethods.caf.faces.data.object.BoundPropertiesContentProvider
createDefaultKeys, getKeys, getProvider, getVar, isReadOnly, setKeys, setProvider, setValue, setVar, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.webmethods.caf.faces.data.ITableContentProvider
getCurrentRow, getRowCount, getRowVariable, setRowVariable
 
Methods inherited from interface com.webmethods.caf.faces.data.IContentProvider
toString
 

Field Detail

RE_SCRIPTS

protected static final Pattern RE_SCRIPTS

RE_LINKS

protected static final Pattern RE_LINKS

m_generateContent

protected boolean m_generateContent
True to autogenerate content.


m_generateLinks

protected boolean m_generateLinks
True to autogenerate links.


m_atomPropertyKeys

protected Object[] m_atomPropertyKeys
Array of aggregate property keys.


m_content

protected String m_content
Cached current row content.

Constructor Detail

AtomEntriesExportProvider

public AtomEntriesExportProvider()
Blank provider. Must be initialized with BoundPropertiesContentProvider.setProvider(com.webmethods.caf.faces.data.IContentProvider), BoundPropertiesContentProvider.setKeys(java.util.Map), and BoundPropertiesContentProvider.setVar(java.lang.String).


AtomEntriesExportProvider

public AtomEntriesExportProvider(ITableContentProvider provider,
                                 Map keys,
                                 String var)
Provider limiting specified provider to specified keys.

Method Detail

getPropertyKeys

public Object[] getPropertyKeys()
Description copied from interface: IContentProvider
Returns list of properties supported by this content provider. Can return Object[0], never null.

Specified by:
getPropertyKeys in interface IContentProvider
Overrides:
getPropertyKeys in class BoundPropertiesContentProvider
Returns:
array of property keys which is typically of type String or Integer

getType

public Class getType(Object propertyKey)
              throws PropertyNotFoundException
Description copied from interface: IContentProvider
Returns java type of the given property

Specified by:
getType in interface IContentProvider
Overrides:
getType in class BoundPropertiesContentProvider
Parameters:
propertyKey - the property key of type String or Integer
Returns:
property java Class
Throws:
PropertyNotFoundException - if property is not supported

getValue

public Object getValue(Object propertyKey)
                throws EvaluationException,
                       PropertyNotFoundException
Description copied from interface: IContentProvider
Returns value of the given property

Specified by:
getValue in interface IContentProvider
Overrides:
getValue in class BoundPropertiesContentProvider
Parameters:
propertyKey - the property key of type String or Integer
Returns:
value of the property, can be null
Throws:
EvaluationException - if error during property evaluation
PropertyNotFoundException - if property is not supported

hasProperty

public boolean hasProperty(Object propertyKey)
Description copied from interface: IContentProvider
Checks if the given property is supported by this content provider

Specified by:
hasProperty in interface IContentProvider
Overrides:
hasProperty in class BoundPropertiesContentProvider
Parameters:
propertyKey - property key of type String or Integer
Returns:
true if property is supported

setRowIndex

public void setRowIndex(int index)
Description copied from interface: ITableContentProvider
Set the zero-relative index of the currently selected row, or -1 to indicate that we are not positioned on a row.

Specified by:
setRowIndex in interface ITableContentProvider
Overrides:
setRowIndex in class PageableExportProvider
See Also:
DataModel

refresh

public void refresh()
             throws ContentProviderException
Throws:
ContentProviderException

generateContent

protected String generateContent()

generateLinks

protected List generateLinks()