org.apache.abdera.protocol.server.adapters.ibatis
Class IBatisCollectionAdapter

java.lang.Object
  extended by org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter
      extended by org.apache.abdera.protocol.server.provider.managed.ManagedCollectionAdapter
          extended by org.apache.abdera.protocol.server.provider.basic.BasicAdapter
              extended by org.apache.abdera.protocol.server.adapters.ibatis.IBatisCollectionAdapter
All Implemented Interfaces:
CollectionAdapter, CollectionInfo, MediaCollectionAdapter, Transactional

public class IBatisCollectionAdapter
extends BasicAdapter

Adapter that uses IBatis and a database to store Atompub collection entries. As an extension to BasicAdapter, the adapter is intended to be used with BasicProvider and is configured using /abdera/adapter/*.properties files.


Field Summary
protected  Map<String,com.ibatis.sqlmap.client.SqlMapClient> sqlMapClients
           
 
Fields inherited from class org.apache.abdera.protocol.server.provider.basic.BasicAdapter
logger
 
Fields inherited from class org.apache.abdera.protocol.server.provider.managed.ManagedCollectionAdapter
abdera, config
 
Constructor Summary
IBatisCollectionAdapter(Abdera abdera, FeedConfiguration config)
           
 
Method Summary
protected  Map<String,Object> collectColumns(Entry entry)
           
 Entry createEntry(Entry entry)
           
protected  Entry createEntryFromRow(Feed feed, Map<String,Object> row)
           
 boolean deleteEntry(Object entryId)
           
static String getDocumentAsXml(Document doc)
           
 Entry getEntry(Object entryId)
           
 Feed getFeed()
           
protected  com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
           
 Entry updateEntry(Object entryId, Entry entry)
           
 
Methods inherited from class org.apache.abdera.protocol.server.provider.basic.BasicAdapter
addEditLinkToEntry, createEntryIdUri, createFeed, deleteEntry, extensionRequest, getCategories, getEntry, getFeed, getProperty, postEntry, putEntry, setEntryIdIfNull
 
Methods inherited from class org.apache.abdera.protocol.server.provider.managed.ManagedCollectionAdapter
getAbdera, getAuthor, getConfiguration, getId, getTitle
 
Methods inherited from class org.apache.abdera.protocol.server.impl.AbstractCollectionAdapter
asCollectionElement, buildCreateEntryResponse, buildGetEntryResponse, buildGetFeedResponse, buildHeadEntryResponse, buildPostMediaEntryResponse, compensate, createErrorResponse, createFeedBase, deleteMedia, end, getAccepts, getCategoriesInfo, getEntryFromRequest, getHref, getHref, getMedia, getResourceName, headEntry, headMedia, optionsEntry, optionsMedia, postMedia, putMedia, setHref, start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.protocol.server.CollectionAdapter
headEntry, optionsEntry
 

Field Detail

sqlMapClients

protected Map<String,com.ibatis.sqlmap.client.SqlMapClient> sqlMapClients
Constructor Detail

IBatisCollectionAdapter

public IBatisCollectionAdapter(Abdera abdera,
                               FeedConfiguration config)
Method Detail

getSqlMapClient

protected com.ibatis.sqlmap.client.SqlMapClient getSqlMapClient()
                                                         throws Exception
Throws:
Exception

getFeed

public Feed getFeed()
             throws Exception
Specified by:
getFeed in class BasicAdapter
Throws:
Exception

getEntry

public Entry getEntry(Object entryId)
               throws Exception
Specified by:
getEntry in class BasicAdapter
Throws:
Exception

createEntry

public Entry createEntry(Entry entry)
                  throws Exception
Specified by:
createEntry in class BasicAdapter
Throws:
Exception

updateEntry

public Entry updateEntry(Object entryId,
                         Entry entry)
                  throws Exception
Specified by:
updateEntry in class BasicAdapter
Throws:
Exception

deleteEntry

public boolean deleteEntry(Object entryId)
                    throws Exception
Specified by:
deleteEntry in class BasicAdapter
Throws:
Exception

createEntryFromRow

protected Entry createEntryFromRow(Feed feed,
                                   Map<String,Object> row)
                            throws Exception
Throws:
Exception

getDocumentAsXml

public static String getDocumentAsXml(Document doc)
                               throws TransformerConfigurationException,
                                      TransformerException
Throws:
TransformerConfigurationException
TransformerException

collectColumns

protected Map<String,Object> collectColumns(Entry entry)
                                     throws Exception
Throws:
Exception


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.