public class ExternalSearchGenerator extends ServiceableGenerator
| Modifier and Type | Field and Description |
|---|---|
private static String |
__SEARCH_CRITERIA_PREFIX |
protected DataSourceFactoryExtensionPoint |
_dataSourceFactoryEP
Datasource factory handler
|
protected QueryDao |
_queryDao
The Query DAO.
|
managerobjectModel, parameters, resolver, sourcecontentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer| Constructor and Description |
|---|
ExternalSearchGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
executeQuery(Query query,
Map<String,String> parameterValues,
int nbResultsPerPage,
int page)
Execute ldap query
|
void |
generate() |
protected int |
getPageIndex(Request request)
Get the page index
|
protected Map<String,String> |
getParameterValues(Request request,
Query query)
Get the search criteria values from request
|
protected void |
saxFormFields(Query query)
SAX the form search criteria
|
protected void |
saxFormParameters(Request request,
Query query,
Map<String,String> values)
SAX the search parameters from the request parameters and query
|
protected void |
saxFormValues(Request request,
Map<String,String> values)
SAX the form search criteria values
|
protected void |
saxPagination(int page,
int offset,
int limit,
int nbResult,
boolean hasMoreResult)
SAX the pagination
|
protected void |
saxResult(Query query,
QueryResult result)
Sax a query result.
|
void |
service(ServiceManager smanager) |
disposerecycle, setupsetConsumer, setContentHandler, setLexicalHandlerenableLogging, getLogger, setupLogger, setupLogger, setupLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetConsumerprivate static final String __SEARCH_CRITERIA_PREFIX
protected DataSourceFactoryExtensionPoint _dataSourceFactoryEP
public ExternalSearchGenerator()
public void service(ServiceManager smanager) throws ServiceException
service in interface Serviceableservice in class ServiceableGeneratorServiceExceptionpublic void generate() throws IOException, SAXException, ProcessingException
protected Map<String,String> getParameterValues(Request request, Query query)
request - The requestquery - The LDAP queryprotected void saxFormParameters(Request request, Query query, Map<String,String> values) throws SAXException
request - The requestquery - The LDAP queryvalues - The extracted form valuesSAXException - If an error occurs while SAXingprotected void saxFormFields(Query query) throws SAXException
query - The LDAP querySAXException - if an error occurs while SAXingprotected void saxFormValues(Request request, Map<String,String> values) throws SAXException
request - The requestvalues - The extracted form valuesSAXException - if an error occurs while SAXingprotected void executeQuery(Query query, Map<String,String> parameterValues, int nbResultsPerPage, int page) throws DataInclusionException, SAXException
query - the ldap queryparameterValues - the search criterianbResultsPerPage - the number of result per pagepage - the page numberDataInclusionException - if an error occurredSAXException - If an error occurredprotected void saxPagination(int page, int offset, int limit, int nbResult, boolean hasMoreResult) throws SAXException
page - the current pageoffset - the offsetlimit - the number of results per pagenbResult - the number result of the pagehasMoreResult - true if there are less one page moreSAXException - if an error occurredprotected void saxResult(Query query, QueryResult result) throws SAXException
query - the query.result - the result to generate.SAXException - if an error occurs while saxingprotected int getPageIndex(Request request)
request - The request