Package org.apache.jackrabbit.core.fs.db
Class MSSqlFileSystem
- java.lang.Object
-
- org.apache.jackrabbit.core.fs.db.DatabaseFileSystem
-
- org.apache.jackrabbit.core.fs.db.DbFileSystem
-
- org.apache.jackrabbit.core.fs.db.MSSqlFileSystem
-
- All Implemented Interfaces:
FileSystem
,DatabaseAware
public class MSSqlFileSystem extends DbFileSystem
MSSqlFileSystem
is a JDBC-basedFileSystem
implementation for Jackrabbit that persists file system entries in an MS SQL database.It is configured through the following properties:
driver
: the FQN name of the JDBC driver class (default:"com.microsoft.sqlserver.jdbc.SQLServerDriver"
)schema
: type of schema to be used (default:"mssql"
)url
: the database url (e.g."jdbc:sqlserver://[host]:[port];<params>"
)user
: the database userpassword
: the user's passwordschemaObjectPrefix
: prefix to be prepended to schema objectstableSpace
: the tablespace to use
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
Fields Modifier and Type Field Description static String
TABLE_SPACE_VARIABLE
the variable for the MS SQL table spaceprotected 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
Constructors Constructor Description MSSqlFileSystem()
Creates a newMSSqlFileSystem
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CheckSchemaOperation
createCheckSchemaOperation()
This method is called fromDatabaseFileSystem.init()
after theDatabaseFileSystem.createConnectionHelper(DataSource)
method, and returns a defaultCheckSchemaOperation
.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
-
-
-
-
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
-
-
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 fromDatabaseFileSystem.init()
after theDatabaseFileSystem.createConnectionHelper(DataSource)
method, and returns a defaultCheckSchemaOperation
. Subclasses can overrride this implementation to get a customized implementation.- Overrides:
createCheckSchemaOperation
in classDatabaseFileSystem
- Returns:
- a new
CheckSchemaOperation
instance
-
-