|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISVNOptions
The ISVNOptions interface should be implemented to manage global run-time configuration options.
Like the Subversion client library SVNKit uses configuration options during runtime. ISVNOptions is intended for managing those options which are similar to ones you can meet in the config file located in the default Subversion configuration area - on Windows platforms it's usually located in the 'Documents and Settings\UserName\Subversion' (or simply '%APPDATA%\Subversion') directory, on Unix-like platforms - in '~/.subversion'. ISVNOptions is not intended for managing those options that can be met in the servers file (located in the same directory as config) - options for network layers are managed by interfaces and classes of the org.tmatesoft.svn.core.auth package.
Every SVN*Client's public constructor receives an ISVNOptions as a driver of the run-time configuration options. SVNClientManager also has got several newInstance() methods that receive an options driver. Thus it's simpe to implement a specific options driver to ISVNOptions and use it instead of a default one. However if you are not interested in customizing the run-time configuration area you can use a default driver which uses config info from the default SVN configuration area (see above).
Use SVNWCUtil
to get a default options driver, like this:
import org.tmatesoft.svn.core.wc.ISVNOptions; import org.tmatesoft.svn.core.wc.SVNClientManager; ... //here the only one boolean parameter - readonly - enables //or disables writing to the config file: if true (like in this snippet) - //SVNKit can only read options from the config file but not write ISVNOptions options = SVNWCUtil.createDefaultOptions(true); SVNClientManager clientManager = SVNClientManager.newInstance(options, "name", "password"); ...
If you would like to have the default configuration area in a place different from the SVN default one, you should provide a preferred path to the config directory like this:
import org.tmatesoft.svn.core.wc.ISVNOptions; import org.tmatesoft.svn.core.wc.SVNClientManager; ... File defaultConfigDir = new File("way/to/your/config/dir"); ISVNOptions options = SVNWCUtil.createDefaultOptions(defaultConfigDir, true); SVNClientManager clientManager = SVNClientManager.newInstance(options, "name", "password"); ...
Read also this Subversion book chapter on runtime configuration area.
SVNWCUtil
,
ExamplesMethod Summary | |
---|---|
java.util.Map |
applyAutoProperties(java.io.File file,
java.util.Map target)
Collects and puts into a Map all
autoproperties specified for the file name pattern matched by the
target file name. |
ISVNConflictHandler |
getConflictResolver()
|
java.util.Map |
getFileExtensionsToMimeTypes()
Returns a hash holding file extensions to MIME types mappings. |
java.lang.String[] |
getIgnorePatterns()
Returns all the global ignore patterns. |
java.text.DateFormat |
getKeywordDateFormat()
Returns the date format used to format datestamps. |
ISVNMergerFactory |
getMergerFactory()
Returns a factory object which is responsible for creating merger drivers. |
java.lang.String |
getNativeCharset()
Returns the native charset name. |
byte[] |
getNativeEOL()
Returns the native EOL marker bytes. |
java.lang.String[] |
getPreservedConflictFileExtensions()
Returns an array of path extensions which the user wants to preserve when conflict files are made. |
boolean |
isAllowAllForwardMergesFromSelf()
Says to a merge driver whether to allow all forward merges or not. |
boolean |
isUseCommitTimes()
Determines if the commit-times option is enabled. |
Methods inherited from interface org.tmatesoft.svn.core.io.ISVNTunnelProvider |
---|
createTunnelConnector |
Method Detail |
---|
boolean isUseCommitTimes()
The commit-times option makes checkout/update/switch/revert operations put last-committed timestamps on every file they touch.
This option corresponds to the 'use-commit-times' option that can be found in the SVN's config file under the [miscellany] section.
java.lang.String[] getIgnorePatterns()
The global ignore patterns describe the names of files and directories that SVNKit should ignore during status, add and import operations. Similar to the 'global-ignores' option that can be found in the SVN's config file under the [miscellany] section.
java.util.Map applyAutoProperties(java.io.File file, java.util.Map target)
Map
all
autoproperties specified for the file name pattern matched by the
target file name.
If fileName
matches any known file name pattern then
all properties set for that pattern will be collected and
placed into target
.
For one file name pattern there can be several autoproperties set, delimited by ";".
file
- a target filetarget
- a Map
that will receive
autoproperties
target
itselfISVNMergerFactory getMergerFactory()
java.text.DateFormat getKeywordDateFormat()
java.lang.String[] getPreservedConflictFileExtensions()
boolean isAllowAllForwardMergesFromSelf()
byte[] getNativeEOL()
java.lang.String getNativeCharset()
SVNProperty.NATIVE
.
java.util.Map getFileExtensionsToMimeTypes()
String
file extensions, and values are String
MIME typesISVNConflictHandler getConflictResolver()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |