public class SVNResource
extends org.opensaml.util.resource.AbstractFilteredResource
SVNResource
operating on the same local copy are undefined.Constructor and Description |
---|
SVNResource(org.tmatesoft.svn.core.wc.SVNClientManager svnClientMgr,
org.tmatesoft.svn.core.SVNURL repositoryUrl,
File workingCopy,
long workingRevision,
String resourceFile)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkoutOrUpdateResource()
Checks out the resource specified by the
remoteRepository in to the working copy
workingCopyDirectory . |
protected void |
checkWorkingCopyDirectory(File directory)
Checks that the given file exists, or can be created, is a directory, and is read/writable by this process.
|
boolean |
exists() |
InputStream |
getInputStream() |
org.joda.time.DateTime |
getLastModifiedTime() |
String |
getLocation() |
protected File |
getResourceFile()
Gets
File for the resource. |
public SVNResource(org.tmatesoft.svn.core.wc.SVNClientManager svnClientMgr, org.tmatesoft.svn.core.SVNURL repositoryUrl, File workingCopy, long workingRevision, String resourceFile) throws org.opensaml.util.resource.ResourceException
svnClientMgr
- manager used to create SVN clientsrepositoryUrl
- URL of the remote repositoryworkingCopy
- directory that will serve as the root of the local working copyworkingRevision
- revision of the resource to retrieve or -1 for HEAD revisionresourceFile
- file, within the working copy, represented by this resourceorg.opensaml.util.resource.ResourceException
- thrown if there is a problem initializing the SVN resourcepublic boolean exists() throws org.opensaml.util.resource.ResourceException
org.opensaml.util.resource.ResourceException
public InputStream getInputStream() throws org.opensaml.util.resource.ResourceException
org.opensaml.util.resource.ResourceException
public org.joda.time.DateTime getLastModifiedTime() throws org.opensaml.util.resource.ResourceException
org.opensaml.util.resource.ResourceException
public String getLocation()
protected File getResourceFile() throws org.opensaml.util.resource.ResourceException
File
for the resource.org.opensaml.util.resource.ResourceException
- thrown if there is a problem fetching the resource or checking on its statusprotected void checkWorkingCopyDirectory(File directory) throws org.opensaml.util.resource.ResourceException
directory
- the directory to checkorg.opensaml.util.resource.ResourceException
- thrown if the file is invalidprotected void checkoutOrUpdateResource() throws org.opensaml.util.resource.ResourceException
remoteRepository
in to the working copy
workingCopyDirectory
. If the working copy is empty than an SVN checkout is performed if the working copy
already exists then an SVN update is performed.org.opensaml.util.resource.ResourceException
- thrown if there is a problem communicating with the remote repository, the revision
does not exist, or the working copy is unusableCopyright © 1999–2014. All rights reserved.