com.xpn.xwiki.plugin.query
Class QueryPluginApi

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.plugin.query.QueryPluginApi
All Implemented Interfaces:
IQueryFactory

public class QueryPluginApi
extends Api
implements IQueryFactory

Api for QueryPlugin


Field Summary
private static org.apache.commons.logging.Log log
           
(package private)  QueryPlugin qp
           
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
QueryPluginApi(QueryPlugin qp)
           
 
Method Summary
 IQuery getAttachment(java.lang.String docname, java.lang.String attachname, java.lang.String order)
          create query for attachments
 XWikiCache getCache()
           
 IQuery getChildDocs(java.lang.String docname, java.lang.String prop, java.lang.String order)
          create query for child documents
 XWikiContext getContext()
           
 IQuery getDocs(java.lang.String docname, java.lang.String prop, java.lang.String order)
          create query for docs
 IQuery getObjects(java.lang.String docname, java.lang.String oclass, java.lang.String prop, java.lang.String order)
          create query for objects
 XWikiStoreInterface getStore()
           
 IQuery ql(java.lang.String q)
          create JCRSQL query unsupported for now
 IQuery xpath(java.lang.String q)
          create xpath query
 
Methods inherited from class com.xpn.xwiki.api.Api
checkProgrammingRights, hasAccessLevel, hasAdminRights, hasProgrammingRights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.commons.logging.Log log

qp

QueryPlugin qp
Constructor Detail

QueryPluginApi

public QueryPluginApi(QueryPlugin qp)
Method Detail

getDocs

public IQuery getDocs(java.lang.String docname,
                      java.lang.String prop,
                      java.lang.String order)
               throws javax.jcr.query.InvalidQueryException
Description copied from interface: IQueryFactory
create query for docs

Specified by:
getDocs in interface IQueryFactory
Parameters:
docname - - full document name (web/name | web.name). name may consist xpath []-selection. if any (name|web) - *
prop - - return properties, separated by comma, property start with @, if null - return document
order - - properties for sort, separated by ','; order: ascending/descending after prop. name, or +/- before. if null - not sort
Throws:
javax.jcr.query.InvalidQueryException

getChildDocs

public IQuery getChildDocs(java.lang.String docname,
                           java.lang.String prop,
                           java.lang.String order)
                    throws javax.jcr.query.InvalidQueryException
Description copied from interface: IQueryFactory
create query for child documents

Specified by:
getChildDocs in interface IQueryFactory
Throws:
javax.jcr.query.InvalidQueryException
See Also:
getDocs

getAttachment

public IQuery getAttachment(java.lang.String docname,
                            java.lang.String attachname,
                            java.lang.String order)
                     throws javax.jcr.query.InvalidQueryException
Description copied from interface: IQueryFactory
create query for attachments

Specified by:
getAttachment in interface IQueryFactory
attachname - - name of attachment, may be *, *[]
Throws:
javax.jcr.query.InvalidQueryException
See Also:
getDocs

getObjects

public IQuery getObjects(java.lang.String docname,
                         java.lang.String oclass,
                         java.lang.String prop,
                         java.lang.String order)
                  throws javax.jcr.query.InvalidQueryException
Description copied from interface: IQueryFactory
create query for objects

Specified by:
getObjects in interface IQueryFactory
oclass - - full name of object class (web/name | web.name). if any(name|web) - *
Throws:
javax.jcr.query.InvalidQueryException
See Also:
getDocs

getCache

public XWikiCache getCache()
Specified by:
getCache in interface IQueryFactory

getContext

public XWikiContext getContext()
Specified by:
getContext in interface IQueryFactory

getStore

public XWikiStoreInterface getStore()
Specified by:
getStore in interface IQueryFactory

xpath

public IQuery xpath(java.lang.String q)
             throws javax.jcr.query.InvalidQueryException
Description copied from interface: IQueryFactory
create xpath query

Specified by:
xpath in interface IQueryFactory
Throws:
javax.jcr.query.InvalidQueryException

ql

public IQuery ql(java.lang.String q)
          throws javax.jcr.query.InvalidQueryException
Description copied from interface: IQueryFactory
create JCRSQL query unsupported for now

Specified by:
ql in interface IQueryFactory
Throws:
javax.jcr.query.InvalidQueryException


Copyright 2003 Ludovic Dubost