com.marklogic.shell
Interface Environment

All Known Implementing Classes:
Shell

public interface Environment

The interface that Enviroments must implement in order to support running commands.

Author:
Andrew Bruno

Field Summary
static java.lang.String NEWLINE
          Platform dependent newline char.
 
Method Summary
 void exit()
          Exit the envronment cleanly.
 void exitWithError(java.lang.String message)
          Exit the environment with an error.
 com.marklogic.xqrunner.XQDataSource getDataSource()
          Returns an XQDataSource.
 org.apache.commons.configuration.PropertiesConfiguration getProperties()
          The configuration properties for the environment.
 void print(java.lang.String message)
          Prints a message.
 void printError(java.lang.Exception exception)
          Prints an error that was caused by an exception.
 void printError(java.lang.String message)
          Prints an error message.
 void printHelp()
          Prints the default help message.
 void printHelp(java.lang.String message)
          Prints a message along with the default help message.
 void printLine(java.lang.String message)
          Prints a message with a line break.
 void runXQuery(com.marklogic.xqrunner.XQuery xquery)
          Run an XQuery statement.
 

Field Detail

NEWLINE

public static final java.lang.String NEWLINE
Platform dependent newline char.

Method Detail

printHelp

public void printHelp()
Prints the default help message.


printHelp

public void printHelp(java.lang.String message)
Prints a message along with the default help message.

Parameters:
message -

print

public void print(java.lang.String message)
Prints a message.

Parameters:
message -

printLine

public void printLine(java.lang.String message)
Prints a message with a line break.

Parameters:
message -

printError

public void printError(java.lang.Exception exception)
Prints an error that was caused by an exception.

Parameters:
exception -

printError

public void printError(java.lang.String message)
Prints an error message.

Parameters:
message -

exit

public void exit()
Exit the envronment cleanly.


exitWithError

public void exitWithError(java.lang.String message)
Exit the environment with an error.

Parameters:
message -

runXQuery

public void runXQuery(com.marklogic.xqrunner.XQuery xquery)
Run an XQuery statement.

Parameters:
xquery -

getDataSource

public com.marklogic.xqrunner.XQDataSource getDataSource()
                                                  throws com.marklogic.xqrunner.XQException
Returns an XQDataSource.

Throws:
com.marklogic.xqrunner.XQException

getProperties

public org.apache.commons.configuration.PropertiesConfiguration getProperties()
The configuration properties for the environment.



Copyright © 2005 Andrew Bruno