org.apache.jackrabbit.core.fs.db
Class MSSqlFileSystem

java.lang.Object
  extended by org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
      extended by org.apache.jackrabbit.core.fs.db.DbFileSystem
          extended by org.apache.jackrabbit.core.fs.db.MSSqlFileSystem
All Implemented Interfaces:
FileSystem, DatabaseAware

public class MSSqlFileSystem
extends DbFileSystem

MSSqlFileSystem is a JDBC-based FileSystem implementation for Jackrabbit that persists file system entries in an MS SQL database.

It is configured through the following properties:

See also DbFileSystem.

The following is a fragment from a sample configuration:

   <FileSystem class="org.apache.jackrabbit.core.fs.db.MSSqlFileSystem">
       <param name="url" value="jdbc:sqlserver://localhost:1433"/>
       <param name="user" value="padv25"/>
       <param name="password" value="padv25"/>
       <param name="schemaObjectPrefix" value="rep_"/>
       <param name="tableSpace" value="default"/>
  </FileSystem>
 


Field Summary
static String TABLE_SPACE_VARIABLE
          the variable for the MS SQL table space
protected  String tableSpace
          the MS SQL table space to use
 
Fields inherited from class org.apache.jackrabbit.core.fs.db.DbFileSystem
dataSourceName, driver, password, url, user
 
Fields inherited from class org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
conHelper, copyFileSQL, copyFilesSQL, deleteFileSQL, deleteFolderSQL, INITIAL_BUFFER_SIZE, initialized, insertFileSQL, insertFolderSQL, schema, schemaObjectPrefix, selectChildCountSQL, selectDataSQL, selectExistSQL, selectFileAndFolderNamesSQL, selectFileExistSQL, selectFileNamesSQL, selectFolderExistSQL, selectFolderNamesSQL, selectLastModifiedSQL, selectLengthSQL, updateDataSQL, updateLastModifiedSQL
 
Fields inherited from interface org.apache.jackrabbit.core.fs.FileSystem
SEPARATOR, SEPARATOR_CHAR
 
Constructor Summary
MSSqlFileSystem()
          Creates a new MSSqlFileSystem instance.
 
Method Summary
protected  CheckSchemaOperation createCheckSchemaOperation()
          This method is called from #init(PMContext) after the DatabaseFileSystem.createConnectionHelper(DataSource) method, and returns a default CheckSchemaOperation.
 String getTableSpace()
          Returns the configured MS SQL table space.
 void setTableSpace(String tableSpace)
          Sets the MS SQL table space.
 
Methods inherited from class org.apache.jackrabbit.core.fs.db.DbFileSystem
equals, getDataSource, getDataSourceName, getDriver, getPassword, getUrl, getUser, hashCode, setConnectionFactory, setDataSourceName, setDriver, setPassword, setUrl, setUser
 
Methods inherited from class org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
buildSQLStatements, close, createConnectionHelper, createDeepFolder, createFolder, deleteFile, deleteFolder, exists, getInputStream, getOutputStream, getSchema, getSchemaObjectPrefix, hasChildren, init, isFile, isFolder, isSchemaCheckEnabled, lastModified, length, list, listFiles, listFolders, setSchema, setSchemaCheckEnabled, setSchemaObjectPrefix, verifyRootExists
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLE_SPACE_VARIABLE

public static final String TABLE_SPACE_VARIABLE
the variable for the MS SQL table space

See Also:
Constant Field Values

tableSpace

protected String tableSpace
the MS SQL table space to use

Constructor Detail

MSSqlFileSystem

public MSSqlFileSystem()
Creates a new MSSqlFileSystem instance.

Method Detail

getTableSpace

public String getTableSpace()
Returns the configured MS SQL table space.

Returns:
the configured MS SQL table space.

setTableSpace

public void setTableSpace(String tableSpace)
Sets the MS SQL table space.

Parameters:
tableSpace - the MS SQL table space.

createCheckSchemaOperation

protected CheckSchemaOperation createCheckSchemaOperation()
This method is called from #init(PMContext) after the DatabaseFileSystem.createConnectionHelper(DataSource) method, and returns a default CheckSchemaOperation. Subclasses can overrride this implementation to get a customized implementation.

Overrides:
createCheckSchemaOperation in class DatabaseFileSystem
Returns:
a new CheckSchemaOperation instance


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.