|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xindice.client.xmldb.CommonConfigurable org.apache.xindice.client.xmldb.xmlrpc.DatabaseImpl
Implements XML:DB's Database
interface using XML-RPC to communicate
with the Xindice XML-RPC server. Usually, this class is not used
directly, but DatabaseImpl
is used instead.
Note this class is a database driver, and one class of this database
could be used to connect to many different databases, on one or
different Xindice XML-RPC servers.
XML-RPC database driver uses following configuration parameters:
Field Summary | |
static String |
DRIVER_NAME
Prefix used to denote XML:DB URI's that should use this driver |
static String |
PROP_SERVICE_LOCATION
Driver property name for the xml-rpc service location. |
static String |
PROP_XMLRPC_PASSWORD
Driver property name for the basic authentication password. |
static String |
PROP_XMLRPC_USER
Driver property name for the basic authentication user name. |
static String |
SYSPROP_SERVICE_LOCATION
System property name for the service location |
static String |
SYSPROP_XMLRPC_PASSWORD
System property name for the basic authentication password in case there were no configuration property passed |
static String |
SYSPROP_XMLRPC_USER
System property name for the basic authentication user name in case there were no configuration property passed |
Constructor Summary | |
DatabaseImpl()
Create a new DatabaseImpl object. |
|
DatabaseImpl(CommonConfigurable config)
Create a new DatabaseImpl object with a copy of the properties from the DatabaseImpl parameter. |
Method Summary | |
boolean |
acceptsURI(String uri)
Determines whether this Database implementation can handle
the URI. |
org.xmldb.api.base.Collection |
getCollection(String uri,
String userName,
String password)
Retrieves a Collection instance based on the URI provided
in the uri parameter. |
String |
getConformanceLevel()
Returns the XML:DB API Conformance level for the implementation. |
String |
getName()
Returns the prefix used in XML:DB to denote URI's that this driver can handle. |
String[] |
getNames()
Returns an array of names associated with the Database instance. |
Methods inherited from class org.apache.xindice.client.xmldb.CommonConfigurable |
getProperty, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xmldb.api.base.Configurable |
getProperty, setProperty |
Field Detail |
public static final String PROP_SERVICE_LOCATION
public static final String SYSPROP_SERVICE_LOCATION
public static final String PROP_XMLRPC_USER
public static final String SYSPROP_XMLRPC_USER
public static final String PROP_XMLRPC_PASSWORD
public static final String SYSPROP_XMLRPC_PASSWORD
public static final String DRIVER_NAME
Constructor Detail |
public DatabaseImpl()
public DatabaseImpl(CommonConfigurable config)
config
- from which the initial parameters for this
DatabaseImpl object are copied.Method Detail |
public boolean acceptsURI(String uri) throws org.xmldb.api.base.XMLDBException
Database
implementation can handle
the URI. It should return true if the Database instance knows how to
handle the URI and false otherwise.
acceptsURI
in interface org.xmldb.api.base.Database
uri
- the URI to check for.
org.xmldb.api.base.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.ErrroCodes.INVALID_URI
If the URI is not in a valid format. public org.xmldb.api.base.Collection getCollection(String uri, String userName, String password) throws org.xmldb.api.base.XMLDBException
Collection
instance based on the URI provided
in the uri
parameter. The format of the URI is defined in the
documentation for DatabaseManager.getCollection().
Authentication is handled via username and password however it is not
required that the database support authentication. Databases that do not
support authentication MUST ignore the
username
and password
if those provided are not
null.
getCollection
in interface org.xmldb.api.base.Database
uri
- the URI to use to locate the collection.password
- The password to use for authentication to the database or
null if the database does not support authentication.
Collection
instance for the requested collection or
null if the collection could not be found.
org.xmldb.api.base.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.ErrroCodes.INVALID_URI
If the URI is not in a valid format. ErrroCodes.PERMISSION_DENIED
If the username
and password
were not accepted by the database.public String getName() throws org.xmldb.api.base.XMLDBException
getName
in interface org.xmldb.api.base.Database
org.xmldb.api.base.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public String[] getNames() throws org.xmldb.api.base.XMLDBException
getNames
in interface org.xmldb.api.base.Database
org.xmldb.api.base.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.public String getConformanceLevel() throws org.xmldb.api.base.XMLDBException
getConformanceLevel
in interface org.xmldb.api.base.Database
org.xmldb.api.base.XMLDBException
- with expected error codes.ErrorCodes.VENDOR_ERROR
for any vendor
specific errors that occur.
|
Xindice API version 1.2m1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |