Class SvnCopySource

java.lang.Object
org.tmatesoft.svn.core.wc2.SvnObject
org.tmatesoft.svn.core.wc2.SvnCopySource

public class SvnCopySource extends SvnObject
Provides copy source information in copy operations.
Version:
1.7
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     
    private SVNRevision
     
    private SvnTarget
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    SvnCopySource(SvnTarget source, SVNRevision revision)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(SvnTarget source, SVNRevision revision)
    Creates a new SvnCopySource object and initializes its fields.
    boolean
    equals(java.lang.Object obj)
     
    Returns the revision of the source.
    Returns the copy source target, can be working copy file or URL with optional pegRevision.
    int
     
    boolean
    Tells whether the contents of this copy source should be copied rather than the copy source itself.
    boolean
    Calculates whether source is local and revision is local.
    void
    setCopyContents(boolean copyContents)
    Sets whether to expand this copy source to its contents or not.
    private void
    Sets the revision of the source.
    private void
    Sets the copy source target, can be working copy file or URL with optional pegRevision.
    java.lang.String
    Returns String representation of the object

    Methods inherited from class org.tmatesoft.svn.core.wc2.SvnObject

    getUserData, setUserData

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • source

      private SvnTarget source
    • revision

      private SVNRevision revision
    • copyContents

      private boolean copyContents
  • Constructor Details

  • Method Details

    • create

      public static SvnCopySource create(SvnTarget source, SVNRevision revision)
      Creates a new SvnCopySource object and initializes its fields.
      Parameters:
      source - source target with optional pegRevision, can be file or URL
      revision - revision of target
    • isLocal

      public boolean isLocal()
      Calculates whether source is local and revision is local.
      Returns:
      true if the source and revision are local, otherwise false
    • getSource

      public SvnTarget getSource()
      Returns the copy source target, can be working copy file or URL with optional pegRevision.
      Returns:
      copy source target
    • getRevision

      public SVNRevision getRevision()
      Returns the revision of the source.
      Returns:
      source revision
    • setSource

      private void setSource(SvnTarget source)
      Sets the copy source target, can be working copy file or URL with optional pegRevision.
      Parameters:
      source - copy source target
    • setRevision

      private void setRevision(SVNRevision revision)
      Sets the revision of the source.
      Parameters:
      revision - source revision
    • isCopyContents

      public boolean isCopyContents()
      Tells whether the contents of this copy source should be copied rather than the copy source itself. This is relevant only for directory copy sources. If a user specifies to copy contents of a file he will get an SVNException. So, if this copy source represents a directory and if this method returns true, children of this copy source directory will be copied to the target instead of the copy source.
      Returns:
      true to expand copy source to children; otherwise false
    • setCopyContents

      public void setCopyContents(boolean copyContents)
      Sets whether to expand this copy source to its contents or not.
      Parameters:
      copyContents - true to expand copy source to children; otherwise false
      See Also:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • equals

      public boolean equals(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • toString

      public java.lang.String toString()
      Returns String representation of the object
      Overrides:
      toString in class java.lang.Object
      Returns:
      object as String