org.apache.cxf.management.web.logging.atom.converter
Class StandardConverter

java.lang.Object
  extended by org.apache.cxf.management.web.logging.atom.converter.StandardConverter
All Implemented Interfaces:
Converter

public class StandardConverter
extends Object
implements Converter

Converter producing ATOM Feeds on standalone Entries with LogRecords or LogRecordsLists embedded as content or extension. For configuration details see constructor documentation.


Nested Class Summary
static class StandardConverter.Format
          Entity format
static class StandardConverter.Multiplicity
          Quantities of entries in feed or logrecords in entry
static class StandardConverter.Output
          Conversion output
 
Constructor Summary
StandardConverter(StandardConverter.Output output, StandardConverter.Multiplicity multiplicity, StandardConverter.Format format)
          Creates configured converter with default post-processing of feeds/entries mandatory properties.
StandardConverter(StandardConverter.Output output, StandardConverter.Multiplicity multiplicity, StandardConverter.Format format, org.apache.cxf.jaxrs.ext.atom.AbstractFeedBuilder<List<LogRecord>> feedBuilder, org.apache.cxf.jaxrs.ext.atom.AbstractEntryBuilder<List<LogRecord>> entryBuilder)
          Creates configured converter with feeds/entries post-processing based on data provided by feed and entry builders.
 
Method Summary
 List<? extends org.apache.abdera.model.Element> convert(List<LogRecord> records)
          Converts given collection.
protected  void setDefaultEntryProperties(org.apache.abdera.model.Entry entry, List<LogRecord> records, int entryIndex)
           
protected  void setDefaultFeedProperties(org.apache.abdera.model.Feed feed, List<LogRecord> records)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardConverter

public StandardConverter(StandardConverter.Output output,
                         StandardConverter.Multiplicity multiplicity,
                         StandardConverter.Format format)
Creates configured converter with default post-processing of feeds/entries mandatory properties. Regardless of "format", combination of "output" and "multiplicity" flags can be interpreted as follow:

Parameters:
output - whether root elements if Feed or Entry (e.g. for AtomPub).
multiplicity - for output==FEED it is multiplicity of entities in feed for output==ENTITY it is multiplicity of log records in entity.
format - log records embedded as entry content or extension.

StandardConverter

public StandardConverter(StandardConverter.Output output,
                         StandardConverter.Multiplicity multiplicity,
                         StandardConverter.Format format,
                         org.apache.cxf.jaxrs.ext.atom.AbstractFeedBuilder<List<LogRecord>> feedBuilder,
                         org.apache.cxf.jaxrs.ext.atom.AbstractEntryBuilder<List<LogRecord>> entryBuilder)
Creates configured converter with feeds/entries post-processing based on data provided by feed and entry builders.

Method Detail

convert

public List<? extends org.apache.abdera.model.Element> convert(List<LogRecord> records)
Description copied from interface: Converter
Converts given collection.

Specified by:
convert in interface Converter
Parameters:
records - not-null collection of records
Returns:
non-empty collection of ATOM Elements that represent log records

setDefaultFeedProperties

protected void setDefaultFeedProperties(org.apache.abdera.model.Feed feed,
                                        List<LogRecord> records)

setDefaultEntryProperties

protected void setDefaultEntryProperties(org.apache.abdera.model.Entry entry,
                                         List<LogRecord> records,
                                         int entryIndex)


Apache CXF