org.ektorp.support
Class StdDesignDocumentFactory

java.lang.Object
  extended by org.ektorp.support.StdDesignDocumentFactory
All Implemented Interfaces:
DesignDocumentFactory

public class StdDesignDocumentFactory
extends Object
implements DesignDocumentFactory

Author:
henrik lundgren

Field Summary
 SimpleViewGenerator viewGenerator
           
 
Constructor Summary
StdDesignDocumentFactory()
           
StdDesignDocumentFactory(SimpleViewGenerator viewGenerator)
           
 
Method Summary
 DesignDocument generateFrom(Object metaDataSource)
          Generates a design document with views, lists, shows and filters generated and loaded according to the annotations found in the metaDataSource object.
 DesignDocument getFromDatabase(CouchDbConnector db, String designDocumentId)
          Retrieves the DesignDocument instance from the database
 DesignDocument newDesignDocumentInstance()
          Create a new empty instance of a DesignDocument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewGenerator

public SimpleViewGenerator viewGenerator
Constructor Detail

StdDesignDocumentFactory

public StdDesignDocumentFactory()

StdDesignDocumentFactory

public StdDesignDocumentFactory(SimpleViewGenerator viewGenerator)
Method Detail

generateFrom

public DesignDocument generateFrom(Object metaDataSource)
Description copied from interface: DesignDocumentFactory
Generates a design document with views, lists, shows and filters generated and loaded according to the annotations found in the metaDataSource object.

Specified by:
generateFrom in interface DesignDocumentFactory
Returns:

getFromDatabase

public DesignDocument getFromDatabase(CouchDbConnector db,
                                      String designDocumentId)
Description copied from interface: DesignDocumentFactory
Retrieves the DesignDocument instance from the database

Specified by:
getFromDatabase in interface DesignDocumentFactory
Parameters:
db - The couch database connector
designDocumentId - The id of the document
Returns:

newDesignDocumentInstance

public DesignDocument newDesignDocumentInstance()
Description copied from interface: DesignDocumentFactory
Create a new empty instance of a DesignDocument

Specified by:
newDesignDocumentInstance in interface DesignDocumentFactory
Returns:


Copyright © 2017. All rights reserved.