jetbrains.buildServer.vcs
Class IncludeRule

java.lang.Object
  extended by jetbrains.buildServer.vcs.FileRule<CheckoutRules>
      extended by jetbrains.buildServer.vcs.IncludeRule

public class IncludeRule
extends FileRule<CheckoutRules>

Being used in checkout rules, contains source (from) part and to (destination) part


Field Summary
 
Fields inherited from class jetbrains.buildServer.vcs.FileRule
myFromFull, myFromPath, myPattern
 
Constructor Summary
IncludeRule(java.lang.String from, java.lang.String to, CheckoutRules parentRules)
           
 
Method Summary
static IncludeRule createDefaultInstance()
           
 java.lang.String createFullPath(java.lang.String relativeFileName)
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getMatchedHead(java.lang.String path)
          returns matched head path without trailing wildcards if matched with path, null otherwise
 java.lang.String getTo()
           
 int hashCode()
           
 boolean intersects(IncludeRule rule)
          Computes whether this rule intersects with specified rule.
 boolean isAbsolutePathTo()
           
 java.lang.String map(java.lang.String path)
          Maps vcs relative file path to path described by checkout rules.
 java.lang.String toDescriptiveString()
           
 java.lang.String toString()
           
 
Methods inherited from class jetbrains.buildServer.vcs.FileRule
createPatternString, getAdditionalProperties, getFrom, getParentRules, getProperty, isAbsolutePath, isIsInclude, isRoot, prepareRulePath, propertiesMatch
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IncludeRule

public IncludeRule(java.lang.String from,
                   java.lang.String to,
                   CheckoutRules parentRules)
Method Detail

getTo

public java.lang.String getTo()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

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

getMatchedHead

@Nullable
public java.lang.String getMatchedHead(java.lang.String path)
Description copied from class: FileRule
returns matched head path without trailing wildcards if matched with path, null otherwise

Overrides:
getMatchedHead in class FileRule<CheckoutRules>
Parameters:
path - file path to match with
Returns:
matched head path without trailing wildcards

createDefaultInstance

public static IncludeRule createDefaultInstance()

toString

public java.lang.String toString()
Overrides:
toString in class FileRule<CheckoutRules>

toDescriptiveString

public java.lang.String toDescriptiveString()

map

@Nullable
public java.lang.String map(java.lang.String path)
Maps vcs relative file path to path described by checkout rules.

Parameters:
path - to map
Returns:
mapped path or null if path should be skipped.

createFullPath

public java.lang.String createFullPath(java.lang.String relativeFileName)

intersects

public boolean intersects(IncludeRule rule)
Computes whether this rule intersects with specified rule. Rules intersect if their right part (getTo()) intersects, i.e if one is sub directory of another or both rules mapped to the same path.

Parameters:
rule - rule to check
Returns:
true if rules intersect

isAbsolutePathTo

public boolean isAbsolutePathTo()