org.modeshape.jdbc.delegate
Class HttpRepositoryDelegate

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

public class HttpRepositoryDelegate
extends Object
implements RepositoryDelegate

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


Nested Class Summary
 class HttpRepositoryDelegate.HttpConnectionInfo
           
 
Constructor Summary
HttpRepositoryDelegate(String url, Properties info, JcrDriver.JcrContextFactory contextFactory)
           
 
Method Summary
 void close()
          Call to close the delegate connection.
 void commit()
          
 Connection createConnection()
          Call to create the connection based on the implementation of this interface.
 DatabaseMetaData createMetaData(JcrConnection connection)
          Call to create the DatabaseMetaData
 QueryResult execute(String query, String language)
          Call to execute the sql query based on the specified Jcr language.
 ConnectionInfo getConnectionInfo()
          Call to get the connection information.
 Set<String> getRepositoryNames()
          Called to get all the repository names currently available in the JcrEngine.
 boolean isValid(int timeout)
           
 boolean isWrapperFor(Class<?> iface)
           
 NodeType nodeType(String name)
          Call to get NodeType based on specified name
 List<NodeType> nodeTypes()
          Call to get all the NodeTypes defined.
 void rollback()
          
<T> T
unwrap(Class<T> iface)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpRepositoryDelegate

public HttpRepositoryDelegate(String url,
                              Properties info,
                              JcrDriver.JcrContextFactory contextFactory)
Method Detail

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.

Specified by:
execute in interface RepositoryDelegate
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

getConnectionInfo

public ConnectionInfo getConnectionInfo()
Description copied from interface: RepositoryDelegate
Call to get the connection information.

Specified by:
getConnectionInfo in interface RepositoryDelegate
Returns:
ConnectionInfo

nodeType

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

Specified by:
nodeType in interface RepositoryDelegate
Returns:
NodeType
Throws:
RepositoryException

nodeTypes

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

Specified by:
nodeTypes in interface RepositoryDelegate
Returns:
List of all the node types.
Throws:
RepositoryException

createConnection

public Connection createConnection()
                            throws SQLException
Description copied from interface: RepositoryDelegate
Call to create the connection based on the implementation of this interface.

Specified by:
createConnection in interface RepositoryDelegate
Returns:
Connection
Throws:
SQLException

commit

public void commit()
            throws RepositoryException

Specified by:
commit in interface RepositoryDelegate
Throws:
RepositoryException
See Also:
Connection.commit()

rollback

public void rollback()
              throws RepositoryException

Specified by:
rollback in interface RepositoryDelegate
Throws:
RepositoryException
See Also:
Connection.rollback()

close

public void close()
Description copied from interface: RepositoryDelegate
Call to close the delegate connection.

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

createMetaData

public DatabaseMetaData createMetaData(JcrConnection connection)
Description copied from interface: RepositoryDelegate
Call to create the DatabaseMetaData

Specified by:
createMetaData in interface RepositoryDelegate
Returns:
JcrMetaData

isValid

public boolean isValid(int timeout)
Specified by:
isValid in interface RepositoryDelegate
Returns:
boolean indicating if timeout is valid
See Also:
Connection.isValid(int)

getRepositoryNames

public Set<String> getRepositoryNames()
Description copied from interface: RepositoryDelegate
Called to get all the repository names currently available in the JcrEngine.

Specified by:
getRepositoryNames in interface RepositoryDelegate
Returns:
Set of repository names

isWrapperFor

public boolean isWrapperFor(Class<?> iface)
Specified by:
isWrapperFor in interface RepositoryDelegate
Parameters:
iface -
Returns:
boolean
See Also:
Wrapper.isWrapperFor(java.lang.Class)

unwrap

public <T> T unwrap(Class<T> iface)
         throws SQLException
Specified by:
unwrap in interface RepositoryDelegate
Type Parameters:
T -
Parameters:
iface -
Returns:
T
Throws:
SQLException
See Also:
Wrapper.unwrap(java.lang.Class)


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