Package jetbrains.buildServer.vcs
Class FileRule<ParentRules extends FileRuleSet>
- java.lang.Object
-
- jetbrains.buildServer.vcs.FileRule<ParentRules>
-
- Direct Known Subclasses:
ArtifactDependencyFileRule
,IncludeRule
public class FileRule<ParentRules extends FileRuleSet> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected String
myFromFull
protected String
myFromPath
-
Constructor Summary
Constructors Constructor Description FileRule(String fromPath, String additionalProperties, ParentRules parentRules, boolean isInclude)
FileRule(String from, ParentRules parentRules, boolean isInclude)
FileRule(String from, ParentRules parentRules, boolean isInclude, boolean usePattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
createPatternString(String from)
Map<String,String>
getAdditionalProperties()
String
getFrom()
String
getMatchedHead(String path)
returns matched head path without trailing wildcards if matched with path, null otherwiseParentRules
getParentRules()
protected Pattern
getPattern()
String
getProperty(String propName)
boolean
isAbsolutePath()
boolean
isIsInclude()
boolean
isRoot()
protected String
preparePathWithLowercase(String path)
boolean
propertiesMatch(Map<String,String> props)
String
toString()
-
-
-
Constructor Detail
-
FileRule
public FileRule(@NotNull String from, ParentRules parentRules, boolean isInclude)
-
FileRule
public FileRule(@NotNull String from, ParentRules parentRules, boolean isInclude, boolean usePattern)
- Parameters:
from
- from part of the ruleparentRules
- parent rulesisInclude
- true if it is an include ruleusePattern
- true if regexp pattern should be used to match paths (can be slow and require more memory), false if pattern shouldn't be created and ancestor of this class does all the matching in the overriddengetMatchedHead(java.lang.String)
method
-
FileRule
public FileRule(@NotNull String fromPath, @Nullable String additionalProperties, ParentRules parentRules, boolean isInclude)
-
-
Method Detail
-
getPattern
@Nullable protected Pattern getPattern()
-
getFrom
public String getFrom()
-
getParentRules
public ParentRules getParentRules()
-
isIsInclude
public boolean isIsInclude()
-
getMatchedHead
@Nullable public String getMatchedHead(@NotNull String path)
returns matched head path without trailing wildcards if matched with path, null otherwise- Parameters:
path
- file path to match with- Returns:
- matched head path without trailing wildcards
-
isAbsolutePath
public boolean isAbsolutePath()
-
isRoot
public boolean isRoot()
- Returns:
- true if from part represents root directory (from = ".")
-
-