public class DefaultSVNOptions extends java.lang.Object implements ISVNOptions, ISVNMergerFactory
Constructor and Description |
---|
DefaultSVNOptions() |
DefaultSVNOptions(java.io.File directory,
boolean readOnly) |
Modifier and Type | Method and Description |
---|---|
void |
addIgnorePattern(java.lang.String pattern)
Adds a new particular ignore pattern to global
ignore patterns.
|
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. |
ISVNMerger |
createMerger(byte[] conflictStart,
byte[] conflictSeparator,
byte[] conflictEnd)
Creates a new merger driver.
|
ISVNConnector |
createTunnelConnector(SVNURL url)
Returns a tunnel comand line matching the given subprotocol
name.
|
void |
deleteAutoProperty(java.lang.String pattern)
Removes a particular autoproperty by specifying a file name
pattern.
|
void |
deleteIgnorePattern(java.lang.String pattern)
Removes a particular global ignore pattern.
|
java.util.Map |
getAutoProperties()
Returns autoproperties as a
Map
where each key is a file name pattern and the corresponding
value is a string in the form of "propName=propValue" . |
static boolean |
getBooleanValue(java.lang.String value,
boolean defaultValue) |
ISVNConflictHandler |
getConflictResolver() |
java.lang.String |
getDefaultSSHKeyFile() |
java.lang.String |
getDefaultSSHPassphrase() |
java.lang.String |
getDefaultSSHPassword() |
int |
getDefaultSSHPortNumber() |
java.lang.String |
getDefaultSSHUserName() |
java.lang.String |
getDiffCommand() |
java.lang.String |
getEditor() |
java.util.Map |
getFileExtensionsToMimeTypes()
Returns a hash holding file extensions to MIME types mappings.
|
java.lang.String |
getGlobalCharset() |
java.lang.String[] |
getIgnorePatterns()
Returns all the global ignore patterns.
|
java.text.DateFormat |
getKeywordDateFormat()
Returns the date format used to format datestamps.
|
java.lang.String |
getLogEncoding() |
ISVNMergerFactory |
getMergerFactory()
Returns a factory object which is responsible for creating
merger drivers.
|
java.lang.String |
getMergeTool() |
java.lang.String |
getNativeCharset()
Returns the native charset name.
|
byte[] |
getNativeEOL()
Returns the native EOL marker bytes.
|
java.lang.String[] |
getPasswordStorageTypes() |
java.lang.String[] |
getPreservedConflictFileExtensions()
Returns an array of path extensions which the user wants to preserve when conflict files are made.
|
java.lang.String |
getPropertyValue(java.lang.String propertyName)
Returns the value of a property from the [svnkit] section
of the config file.
|
boolean |
isAllowAllForwardMergesFromSelf()
Says to a merge driver whether to allow all forward merges or not.
|
boolean |
isAuthStorageEnabled()
Determines if the authentication storage is enabled.
|
static boolean |
isIgnored(ISVNOptions options,
java.lang.String name) |
boolean |
isInteractiveConflictResolution() |
boolean |
isKeepLocks() |
boolean |
isUseAutoProperties()
Determines if the autoproperties option is enabled.
|
boolean |
isUseCommitTimes()
Determines if the commit-times option is enabled.
|
static boolean |
matches(java.lang.String pattern,
java.lang.String fileName) |
void |
setAuthStorageEnabled(boolean storeAuth)
Enables or disables the authentication storage.
|
void |
setAutoProperties(java.util.Map autoProperties)
Sets autoproperties that will be automatically put on all files
that will be added or imported.
|
void |
setAutoProperty(java.lang.String pattern,
java.lang.String properties)
Sets an autoproperty - binds a file name pattern with a
string in the form of
"propName=propValue" . |
void |
setConflictHandler(ISVNConflictHandler resolver) |
void |
setDiffCommand(java.lang.String diffCmd) |
void |
setGlobalCharset(java.lang.String charset) |
void |
setIgnorePatterns(java.lang.String[] patterns)
Sets global ignore patterns.
|
void |
setInMemoryConfigOptions(java.util.Map configOptions) |
void |
setInteractiveConflictResolution(boolean interactive) |
void |
setKeepLocks(boolean keep) |
void |
setMergerFactory(ISVNMergerFactory mergerFactory)
Sets a factory object which is responsible for creating
merger drivers.
|
void |
setPropertyValue(java.lang.String propertyName,
java.lang.String propertyValue)
Sets the value of a property from the [svnkit] section
of the config file.
|
void |
setUseAutoProperties(boolean useAutoProperties)
Enables or disables the autoproperties option.
|
void |
setUseCommitTimes(boolean useCommitTimes)
Enables or disables the commit-times option.
|
public DefaultSVNOptions()
public DefaultSVNOptions(java.io.File directory, boolean readOnly)
public boolean isUseCommitTimes()
ISVNOptions
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.
isUseCommitTimes
in interface ISVNOptions
public void setInMemoryConfigOptions(java.util.Map configOptions)
public void setUseCommitTimes(boolean useCommitTimes)
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.
useCommitTimes
- true to
enable commit-times, false
to disableisUseCommitTimes()
public boolean isUseAutoProperties()
Autoproperties are the properties that are automatically set on files when they are added or imported.
This option corresponds to the 'enable-auto-props' option that can be found in the SVN's config file under the [miscellany] section.
public void setUseAutoProperties(boolean useAutoProperties)
Autoproperties are the properties that are automatically set on files when they are added or imported.
This option corresponds to the 'enable-auto-props' option that can be found in the SVN's config file under the [miscellany] section.
useAutoProperties
- true to
enable autoproperties, false
to disableisUseAutoProperties()
public boolean isAuthStorageEnabled()
The auth storage is used for disk-caching of all authentication information: usernames, passwords, server certificates, and any other types of cacheable credentials.
This option corresponds to the 'store-auth-creds' option that can be found in the SVN's config file under the [auth] section.
public boolean isKeepLocks()
public void setAuthStorageEnabled(boolean storeAuth)
The auth storage is used for disk-caching of all authentication information: usernames, passwords, server certificates, and any other types of cacheable credentials.
This option corresponds to the 'store-auth-creds' option that can be found in the SVN's config file under the [auth] section.
storeAuth
- true to
enable the auth storage, false
to disableisAuthStorageEnabled()
public void setKeepLocks(boolean keep)
public static boolean isIgnored(ISVNOptions options, java.lang.String name)
public java.lang.String[] getIgnorePatterns()
ISVNOptions
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.
getIgnorePatterns
in interface ISVNOptions
public void setIgnorePatterns(java.lang.String[] patterns)
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.
For example, to set all .exe
files to be ignored include
"*.exe"
pattern into patterns
.
If patterns
is null or
empty then all the patterns will be removed.
patterns
- an array of patterns (that usually contain wildcards)
that specify file and directory names to be ignored until
they are versionedgetIgnorePatterns()
public void deleteIgnorePattern(java.lang.String pattern)
pattern
- a patterna to be removedaddIgnorePattern(String)
public void addIgnorePattern(java.lang.String pattern)
pattern
- an ignore pattern to be addeddeleteIgnorePattern(String)
public java.util.Map getAutoProperties()
Map
where each key is a file name pattern and the corresponding
value is a string in the form of "propName=propValue"
.Map
containing autopropertiespublic void setAutoProperties(java.util.Map autoProperties)
There can be several properties specified for one file pattern - they should be delimited by ";".
autoProperties
- a Map
which keys are file
name patterns and their values are strings
in the form of "propName=propValue"
getAutoProperties()
public java.lang.String getEditor()
public java.lang.String getMergeTool()
public void deleteAutoProperty(java.lang.String pattern)
pattern
- a file name patternsetAutoProperty(String, String)
public void setAutoProperty(java.lang.String pattern, java.lang.String properties)
"propName=propValue"
.pattern
- a file name pattern (usually containing
wildcards)properties
- a property for pattern
public boolean isInteractiveConflictResolution()
public void setInteractiveConflictResolution(boolean interactive)
public java.util.Map applyAutoProperties(java.io.File file, java.util.Map target)
ISVNOptions
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 ";".
applyAutoProperties
in interface ISVNOptions
file
- a target filetarget
- a Map
that will receive
autopropertiestarget
itselfpublic ISVNMergerFactory getMergerFactory()
ISVNOptions
getMergerFactory
in interface ISVNOptions
public void setMergerFactory(ISVNMergerFactory mergerFactory)
mergerFactory
- a factory that produces merger drivers
for merge operationsgetMergerFactory()
public java.lang.String getPropertyValue(java.lang.String propertyName)
propertyName
- a SVNKit specific config property namepublic void setPropertyValue(java.lang.String propertyName, java.lang.String propertyValue)
propertyName
- a SVNKit specific config property namepropertyValue
- a new value for the property; if
null the
property is removedpublic void setConflictHandler(ISVNConflictHandler resolver)
public ISVNConflictHandler getConflictResolver()
getConflictResolver
in interface ISVNOptions
public static boolean matches(java.lang.String pattern, java.lang.String fileName)
public ISVNMerger createMerger(byte[] conflictStart, byte[] conflictSeparator, byte[] conflictEnd)
ISVNMergerFactory
If a merger driver can not cleanly apply delta to a file (in case of a conflict state)
then for each conflicting contents fragment the driver puts local data between the
specified conflictStart
and conflictSeparator
bytes, and the newcomer
data between the specified conflictSeparator
and conflictEnd
ones.
And all these bytes are then written to the file in the place of a conflict.
createMerger
in interface ISVNMergerFactory
conflictStart
- bytes that come in the very beginning of a conflictconflictSeparator
- bytes that are used to separate two conflicting fragments -
local data and the newcomer oneconflictEnd
- bytes that come in the very end of a conflictpublic ISVNConnector createTunnelConnector(SVNURL url)
ISVNTunnelProvider
createTunnelConnector
in interface ISVNTunnelProvider
public java.text.DateFormat getKeywordDateFormat()
ISVNOptions
getKeywordDateFormat
in interface ISVNOptions
public java.lang.String[] getPreservedConflictFileExtensions()
ISVNOptions
getPreservedConflictFileExtensions
in interface ISVNOptions
public boolean isAllowAllForwardMergesFromSelf()
ISVNOptions
isAllowAllForwardMergesFromSelf
in interface ISVNOptions
public java.lang.String getLogEncoding()
public java.lang.String getGlobalCharset()
public void setGlobalCharset(java.lang.String charset)
public java.lang.String getNativeCharset()
ISVNOptions
SVNProperty.NATIVE
.getNativeCharset
in interface ISVNOptions
public byte[] getNativeEOL()
ISVNOptions
getNativeEOL
in interface ISVNOptions
public java.util.Map getFileExtensionsToMimeTypes()
ISVNOptions
getFileExtensionsToMimeTypes
in interface ISVNOptions
String
file extensions, and values are String
MIME typespublic java.lang.String getDiffCommand()
public void setDiffCommand(java.lang.String diffCmd)
public java.lang.String[] getPasswordStorageTypes()
public int getDefaultSSHPortNumber()
public java.lang.String getDefaultSSHUserName()
public java.lang.String getDefaultSSHPassword()
public java.lang.String getDefaultSSHKeyFile()
public java.lang.String getDefaultSSHPassphrase()
public static boolean getBooleanValue(java.lang.String value, boolean defaultValue)
Copyright © 2004-2012 TMate Software Ltd. All Rights Reserved.