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(String from, String to, CheckoutRules parentRules)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IncludeRule
createDefaultInstance()
String
createFullPath(String relativeFileName)
boolean
equals(Object o)
String
getMatchedHead(String path)
returns matched head path without trailing wildcards if matched with path, null otherwiseString
getTo()
int
hashCode()
boolean
intersects(IncludeRule rule)
Computes whether this rule intersects with specified rule.boolean
isAbsolutePathTo()
String
map(String path)
Maps vcs relative file path to path described by checkout rules.String
toDescriptiveString()
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 String from, @NotNull String to, CheckoutRules parentRules)
-
-
Method Detail
-
getTo
public String getTo()
-
getMatchedHead
@Nullable public String getMatchedHead(@Nullable 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 String toString()
- Overrides:
toString
in classFileRule<CheckoutRules>
-
toDescriptiveString
public String toDescriptiveString()
-
map
@Nullable public String map(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.
-
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()
-
-