Package jetbrains.buildServer.vcs
Class IncludeRule
- java.lang.Object
-
- jetbrains.buildServer.vcs.FileRule<CheckoutRules>
-
- 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
-
-
Constructor Summary
Constructors Constructor Description IncludeRule(java.lang.String from, java.lang.String to, CheckoutRules parentRules)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 otherwisejava.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, getPattern, getProperty, isAbsolutePath, isIsInclude, isRoot, preparePathWithLowercase, propertiesMatch
-
-
-
-
Constructor Detail
-
IncludeRule
public IncludeRule(@NotNull java.lang.String from, @NotNull 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 classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getMatchedHead
@Nullable public java.lang.String getMatchedHead(@Nullable 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 classFileRule<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 classFileRule<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()
-
-