|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.dna.connector.svn.SVNRepositorySource
@ThreadSafe public class SVNRepositorySource
The RepositorySource
for the connector that exposes an area of the local/remote svn repository as content in a
repository. This source considers a workspace name to be the path to the directory on the repository's root directory location
that represents the root of that workspace. New workspaces can be created, as long as the names represent valid paths to
existing directories.
Field Summary | |
---|---|
static int |
DEFAULT_CACHE_TIME_TO_LIVE_IN_SECONDS
|
static int |
DEFAULT_RETRY_LIMIT
|
static boolean |
DEFAULT_SUPPORTS_UPDATES
This source supports udpates by default, but each instance may be configured to be read-only or updateable}. |
Constructor Summary | |
---|---|
SVNRepositorySource()
Create a repository source instance. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
int |
getCacheTimeToLiveInMilliseconds()
Get the time in milliseconds that content returned from this source may used while in the cache. |
RepositorySourceCapabilities |
getCapabilities()
Get the capabilities for this source. |
RepositoryConnection |
getConnection()
Get a connection from this source. |
String |
getDirectoryForDefaultWorkspace()
Get the file system path to the existing directory that should be used for the default workspace. |
String |
getName()
Get the name for this repository source. |
Object |
getObjectInstance(Object obj,
Name name,
Context nameCtx,
Hashtable<?,?> environment)
|
String |
getPassword()
|
String[] |
getPredefinedWorkspaceNames()
Gets the names of the workspaces that are available when this source is created. |
Reference |
getReference()
|
String |
getRepositoryRootURL()
|
int |
getRetryLimit()
Get the maximum number of retries that may be performed on a given operation when using connections created by this source. |
boolean |
getSupportsUpdates()
Get whether this source supports updates. |
String |
getUsername()
|
void |
initialize(RepositoryContext context)
Initialize this source to use the supplied RepositoryContext , from which this source can obtain the
configuration defining this source,
connections to other sources , and the
execution context . |
boolean |
isCreatingWorkspacesAllowed()
Get whether this source allows workspaces to be created dynamically. |
void |
setCacheTimeToLiveInMilliseconds(int cacheTimeToLive)
Set the time in milliseconds that content returned from this source may used while in the cache. |
void |
setCreatingWorkspacesAllowed(boolean allowWorkspaceCreation)
Set whether this source allows workspaces to be created dynamically. |
void |
setDirectoryForDefaultWorkspace(String pathToDirectoryForDefaultWorkspace)
Set the file system path to the existing directory that should be used for the default workspace. |
void |
setName(String name)
Set the name for the source |
void |
setPassword(String password)
|
void |
setPredefinedWorkspaceNames(String[] predefinedWorkspaceNames)
Sets the names of the workspaces that are available when this source is created. |
void |
setRepositoryRootURL(String url)
Set the url for the subversion repository. |
void |
setRetryLimit(int limit)
Set the maximum number of retries that may be performed on a given operation when using connections created by this source. |
void |
setUsername(String username)
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_SUPPORTS_UPDATES
public static final int DEFAULT_RETRY_LIMIT
public static final int DEFAULT_CACHE_TIME_TO_LIVE_IN_SECONDS
Constructor Detail |
---|
public SVNRepositorySource()
Method Detail |
---|
public RepositorySourceCapabilities getCapabilities()
getCapabilities
in interface RepositorySource
RepositorySource.getCapabilities()
public String getName()
getName
in interface RepositorySource
public void setName(String name)
name
- the new name for the sourcepublic String getRepositoryRootURL()
public void setRepositoryRootURL(String url)
url
- - the url location.
IllegalArgumentException
- If svn url is null or emptypublic String getUsername()
public void setUsername(String username)
username
- public String getPassword()
public void setPassword(String password)
password
- public boolean getSupportsUpdates()
public String getDirectoryForDefaultWorkspace()
new File(".")
.
public void setDirectoryForDefaultWorkspace(String pathToDirectoryForDefaultWorkspace)
new File(".")
.
pathToDirectoryForDefaultWorkspace
- the valid and resolvable file system path to the directory representing the
default workspace, or null if the current working directory should be used as the default workspacepublic String[] getPredefinedWorkspaceNames()
setPredefinedWorkspaceNames(String[])
,
setCreatingWorkspacesAllowed(boolean)
public void setPredefinedWorkspaceNames(String[] predefinedWorkspaceNames)
predefinedWorkspaceNames
- the names of the workspaces that this source should start with, or null if there are no
such workspacessetCreatingWorkspacesAllowed(boolean)
,
getPredefinedWorkspaceNames()
public boolean isCreatingWorkspacesAllowed()
setPredefinedWorkspaceNames(String[])
,
getPredefinedWorkspaceNames()
,
setCreatingWorkspacesAllowed(boolean)
public void setCreatingWorkspacesAllowed(boolean allowWorkspaceCreation)
allowWorkspaceCreation
- true if this source allows workspaces to be created by clients, or false if the set of
workspaces is fixedsetPredefinedWorkspaceNames(String[])
,
getPredefinedWorkspaceNames()
,
isCreatingWorkspacesAllowed()
public int getRetryLimit()
connections
created by this source. This value does not constitute a minimum number of retries; in fact, the connection
user is not required to retry any operations.
getRetryLimit
in interface RepositorySource
RepositorySource.getRetryLimit()
public void setRetryLimit(int limit)
connections
created by this source. This value does not constitute a minimum number of retries; in fact, the connection
user is not required to retry any operations.
setRetryLimit
in interface RepositorySource
limit
- the maximum number of allowable retries, or 0 if the source has no limitRepositorySource.setRetryLimit(int)
public int getCacheTimeToLiveInMilliseconds()
public void setCacheTimeToLiveInMilliseconds(int cacheTimeToLive)
cacheTimeToLive
- the time to live, in milliseconds; 0 if the time to live is not specified by this source; or a
negative number for the default valuepublic void initialize(RepositoryContext context) throws RepositorySourceException
RepositoryContext
, from which this source can obtain the
configuration
defining this source,
connections
to other sources
, and the
execution context
.
This method may be called each time the configuration changes, allowing the source to update itself.
initialize
in interface RepositorySource
RepositorySourceException
RepositorySource.initialize(org.jboss.dna.graph.connector.RepositoryContext)
public boolean equals(Object obj)
equals
in class Object
public Reference getReference()
getReference
in interface Referenceable
Referenceable.getReference()
public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception
getObjectInstance
in interface ObjectFactory
Exception
ObjectFactory.getObjectInstance(java.lang.Object, javax.naming.Name, javax.naming.Context,
java.util.Hashtable)
public RepositoryConnection getConnection() throws RepositorySourceException
getConnection
in interface RepositorySource
RepositorySourceException
- if there is a problem obtaining a connectionRepositorySource.getConnection()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |