hudson.scm
Class SubversionSCM.ModuleLocation

java.lang.Object
  extended by hudson.scm.SubversionSCM.ModuleLocation
All Implemented Interfaces:
Serializable
Enclosing class:
SubversionSCM

@ExportedBean
public static final class SubversionSCM.ModuleLocation
extends Object
implements Serializable

small structure to store local and remote (repository) location information of the repository. As a addition it holds the invalid field to make failure messages when doing a checkout possible

See Also:
Serialized Form

Field Summary
 String depthOption
          Subversion remote depth.
 boolean ignoreExternalsOption
          Flag to ignore subversion externals definitions.
 String local
          Deprecated. Code should use getLocalDir(). This field is only intended for form binding.
 String remote
          Subversion URL to check out.
 
Constructor Summary
SubversionSCM.ModuleLocation(String remote, String local)
          Constructor to support backwards compatibility.
SubversionSCM.ModuleLocation(String remote, String local, String depthOption, boolean ignoreExternalsOption)
           
 
Method Summary
 String getDepthOption()
          Returns the value of remote depth option.
 SubversionSCM.ModuleLocation getExpandedLocation(hudson.model.AbstractBuild<?,?> build)
          Deprecated. Use getExpandedLocation(EnvVars) for vars expansion to be performed on all env vars rather than just build parameters.
 SubversionSCM.ModuleLocation getExpandedLocation(hudson.EnvVars env)
          Expand location value based on environment variables.
 String getLocalDir()
          Local directory to place the file to.
 org.tmatesoft.svn.core.SVNURL getRepositoryRoot(hudson.model.AbstractProject context)
           
 org.tmatesoft.svn.core.wc.SVNRevision getRevision(org.tmatesoft.svn.core.wc.SVNRevision defaultValue)
          Figures out which revision to check out.
 org.tmatesoft.svn.core.SVNURL getSVNURL()
          Gets remote as SVNURL.
 String getURL()
          Returns the pure URL portion of remote by removing possible "@NNN" suffix.
 UUID getUUID(hudson.model.AbstractProject context)
          Repository UUID.
 boolean isIgnoreExternalsOption()
          Determines if subversion externals definitions should be ignored.
 org.tmatesoft.svn.core.io.SVNRepository openRepository(hudson.model.AbstractProject context)
           
static List<SubversionSCM.ModuleLocation> parse(String[] remoteLocations, String[] localLocations, String[] depthOptions, boolean[] isIgnoreExternals)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

remote

@Exported
public final String remote
Subversion URL to check out. This may include "@NNN" at the end to indicate a fixed revision.


local

@Exported
public final String local
Deprecated. Code should use getLocalDir(). This field is only intended for form binding.
Remembers the user-given value. Can be null.


depthOption

@Exported
public final String depthOption
Subversion remote depth. Used as "--depth" option for checkout and update commands. Default value is "infinity".


ignoreExternalsOption

@Exported
public boolean ignoreExternalsOption
Flag to ignore subversion externals definitions.

Constructor Detail

SubversionSCM.ModuleLocation

public SubversionSCM.ModuleLocation(String remote,
                                    String local)
Constructor to support backwards compatibility.


SubversionSCM.ModuleLocation

@DataBoundConstructor
public SubversionSCM.ModuleLocation(String remote,
                                                         String local,
                                                         String depthOption,
                                                         boolean ignoreExternalsOption)
Method Detail

getLocalDir

public String getLocalDir()
Local directory to place the file to. Relative to the workspace root.


getURL

public String getURL()
Returns the pure URL portion of remote by removing possible "@NNN" suffix.


getSVNURL

public org.tmatesoft.svn.core.SVNURL getSVNURL()
                                        throws org.tmatesoft.svn.core.SVNException
Gets remote as SVNURL.

Throws:
org.tmatesoft.svn.core.SVNException

getUUID

public UUID getUUID(hudson.model.AbstractProject context)
             throws org.tmatesoft.svn.core.SVNException
Repository UUID. Lazy computed and cached.

Throws:
org.tmatesoft.svn.core.SVNException

openRepository

public org.tmatesoft.svn.core.io.SVNRepository openRepository(hudson.model.AbstractProject context)
                                                       throws org.tmatesoft.svn.core.SVNException
Throws:
org.tmatesoft.svn.core.SVNException

getRepositoryRoot

public org.tmatesoft.svn.core.SVNURL getRepositoryRoot(hudson.model.AbstractProject context)
                                                throws org.tmatesoft.svn.core.SVNException
Throws:
org.tmatesoft.svn.core.SVNException

getRevision

public org.tmatesoft.svn.core.wc.SVNRevision getRevision(org.tmatesoft.svn.core.wc.SVNRevision defaultValue)
Figures out which revision to check out. If remote is url@rev, then this method returns that specific revision.

Parameters:
defaultValue - If "@NNN" portion is not in the URL, this value will be returned. Normally, this is the SVN revision timestamped at the build date.

getDepthOption

public String getDepthOption()
Returns the value of remote depth option.

Returns:
the value of remote depth option.

isIgnoreExternalsOption

public boolean isIgnoreExternalsOption()
Determines if subversion externals definitions should be ignored.

Returns:
true if subversion externals definitions should be ignored.

getExpandedLocation

public SubversionSCM.ModuleLocation getExpandedLocation(hudson.model.AbstractBuild<?,?> build)
Deprecated. Use getExpandedLocation(EnvVars) for vars expansion to be performed on all env vars rather than just build parameters.

Expand location value based on Build parametric execution.

Parameters:
build - Build instance for expanding parameters into their values
Returns:
Output ModuleLocation expanded according to Build parameters values.

getExpandedLocation

public SubversionSCM.ModuleLocation getExpandedLocation(hudson.EnvVars env)
Expand location value based on environment variables.

Returns:
Output ModuleLocation expanded according to specified env vars.

toString

public String toString()
Overrides:
toString in class Object

parse

public static List<SubversionSCM.ModuleLocation> parse(String[] remoteLocations,
                                                       String[] localLocations,
                                                       String[] depthOptions,
                                                       boolean[] isIgnoreExternals)


Copyright © 2004-2013. All Rights Reserved.