ModeShape Distribution 3.0.0.Beta4

org.modeshape.jdbc.delegate
Class HttpRepositoryDelegate

java.lang.Object
  extended by org.modeshape.jdbc.delegate.AbstractRepositoryDelegate
      extended by org.modeshape.jdbc.delegate.HttpRepositoryDelegate
All Implemented Interfaces:
RepositoryDelegate

public class HttpRepositoryDelegate
extends AbstractRepositoryDelegate

The HTTPRepositoryDelegate provides remote Repository implementation to access the Jcr layer via HTTP lookup.


Field Summary
static RepositoryDelegateFactory FACTORY
           
protected static int PROTOCOL_HTTP
           
 
Fields inherited from class org.modeshape.jdbc.delegate.AbstractRepositoryDelegate
logger
 
Constructor Summary
HttpRepositoryDelegate(String url, Properties info)
           
 
Method Summary
 void close()
          Call to close the delegate connection and any outstanding transactions will be closed.
protected  ConnectionInfo createConnectionInfo(String url, Properties info)
          Returns a ConnectionInfo object which represents the information of a specific connection, from a given url format and some Properties
 QueryResult execute(String query, String language)
          Call to execute the sql query based on the specified Jcr language.
 String getDescriptor(String descriptorKey)
          Returns the value for the requested descriptorKey
 boolean isValid(int timeout)
           
 NodeType nodeType(String name)
          Call to get NodeType based on specified name
 List<NodeType> nodeTypes()
          Call to get all the NodeTypes defined.
protected  void retrieveRepository()
          Implementor is responsible for creating the repository.
 
Methods inherited from class org.modeshape.jdbc.delegate.AbstractRepositoryDelegate
closeStatement, commit, createConnection, getConnectionInfo, getRepository, getRepositoryName, getRepositoryNames, isWrapperFor, rollback, setRepository, setRepositoryName, setRepositoryNames, unwrap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL_HTTP

protected static final int PROTOCOL_HTTP
See Also:
Constant Field Values

FACTORY

public static final RepositoryDelegateFactory FACTORY
Constructor Detail

HttpRepositoryDelegate

public HttpRepositoryDelegate(String url,
                              Properties info)
Method Detail

createConnectionInfo

protected ConnectionInfo createConnectionInfo(String url,
                                              Properties info)
Description copied from class: AbstractRepositoryDelegate
Returns a ConnectionInfo object which represents the information of a specific connection, from a given url format and some Properties

Parameters:
url - a non-null string which represents a jdbc url
info - a non-null Properties instance which may contain extra information needed by the connection
Returns:
ConnectionInfo instance, never null

execute

public QueryResult execute(String query,
                           String language)
                    throws RepositoryException
Description copied from interface: RepositoryDelegate
Call to execute the sql query based on the specified Jcr language.

Parameters:
query - is the sql query to execute
language - is the JCR language the query should be executed based on.
Returns:
QueryResult is the JCR query result
Throws:
RepositoryException

getDescriptor

public String getDescriptor(String descriptorKey)
Returns the value for the requested descriptorKey

Returns:
String descriptor value
See Also:
RepositoryDelegate.getDescriptor(java.lang.String)

nodeType

public NodeType nodeType(String name)
                  throws RepositoryException
Description copied from interface: RepositoryDelegate
Call to get NodeType based on specified name

Returns:
NodeType
Throws:
RepositoryException

nodeTypes

public List<NodeType> nodeTypes()
                         throws RepositoryException
Description copied from interface: RepositoryDelegate
Call to get all the NodeTypes defined.

Returns:
List of all the node types.
Throws:
RepositoryException

retrieveRepository

protected void retrieveRepository()
                           throws SQLException
Description copied from class: AbstractRepositoryDelegate
Implementor is responsible for creating the repository.

Throws:
SQLException

isValid

public boolean isValid(int timeout)
Returns:
boolean indicating if timeout is valid
See Also:
Connection.isValid(int)

close

public void close()
Call to close the delegate connection and any outstanding transactions will be closed.

Specified by:
close in interface RepositoryDelegate
Overrides:
close in class AbstractRepositoryDelegate
See Also:
Connection.close()

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.