com.microsoft.tfs.core.clients.versioncontrol.localworkspace
Class LocalItemExclusionEvaluator

java.lang.Object
  extended by com.microsoft.tfs.core.clients.versioncontrol.localworkspace.LocalItemExclusionEvaluator

public class LocalItemExclusionEvaluator
extends java.lang.Object

Thread-safety:
thread-compatible

Field Summary
static java.lang.String IGNORE_FILE_NAME
          The name of the ignore file (like ".tfignore" but might be configured by the user to be a different name).
static java.lang.String IGNORE_FILE_NAME_WITH_SEPARATOR_PREFIX
          The name of the ignore file with the appropriate local filesystem path separator prefix (like "/.tfignore" on Unix).
 
Constructor Summary
LocalItemExclusionEvaluator(com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.LocalWorkspaceProperties wp, java.lang.String startLocalItem)
           
LocalItemExclusionEvaluator(Workspace workspace, java.lang.String startLocalItem)
          Create an LocalItemExclusionEvaluator object to evaluate local item exclusions for the provided Workspace.
 
Method Summary
 boolean isExcluded(java.lang.String localItem)
          Check the provided local item against the LocalItemExclusionEvaluator to see if it should be excluded from addition to version control.
 boolean isExcluded(java.lang.String localItem, boolean isFolder)
          Check the provided local item against the LocalItemExclusionEvaluator to see if it should be excluded from addition to version control.
 boolean isExcluded(java.lang.String localItem, boolean isFolder, java.util.concurrent.atomic.AtomicReference<java.lang.String> appliedExclusion, java.util.concurrent.atomic.AtomicReference<java.lang.String> ignoreFilePath)
          Check the provided local item against the LocalItemExclusionEvaluator to see if it should be excluded from addition to version control.
 boolean isUseOnlyStartLocalItemExclusions()
          If true, ignore files below the start local item will not be processed when evaluating exclusions.
 void setUseOnlyStartLocalItemExclusions(boolean value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IGNORE_FILE_NAME

public static final java.lang.String IGNORE_FILE_NAME
The name of the ignore file (like ".tfignore" but might be configured by the user to be a different name).


IGNORE_FILE_NAME_WITH_SEPARATOR_PREFIX

public static final java.lang.String IGNORE_FILE_NAME_WITH_SEPARATOR_PREFIX
The name of the ignore file with the appropriate local filesystem path separator prefix (like "/.tfignore" on Unix).

Constructor Detail

LocalItemExclusionEvaluator

public LocalItemExclusionEvaluator(Workspace workspace,
                                   java.lang.String startLocalItem)
Create an LocalItemExclusionEvaluator object to evaluate local item exclusions for the provided Workspace. Path parts at or above the start local item will not be checked for exclusions.

Parameters:
workspace - the workspace to check (must not be null)
startLocalItem - the start local item (must not be null or empty)

LocalItemExclusionEvaluator

public LocalItemExclusionEvaluator(com.microsoft.tfs.core.clients.versioncontrol.internal.localworkspace.LocalWorkspaceProperties wp,
                                   java.lang.String startLocalItem)
Method Detail

isUseOnlyStartLocalItemExclusions

public boolean isUseOnlyStartLocalItemExclusions()
If true, ignore files below the start local item will not be processed when evaluating exclusions. The default value for this flag is false.


setUseOnlyStartLocalItemExclusions

public void setUseOnlyStartLocalItemExclusions(boolean value)

isExcluded

public boolean isExcluded(java.lang.String localItem)
Check the provided local item against the LocalItemExclusionEvaluator to see if it should be excluded from addition to version control.

Parameters:
localItem - the local item to check (must not be null)
Returns:
true if the item is excluded; false otherwise

isExcluded

public boolean isExcluded(java.lang.String localItem,
                          boolean isFolder)
Check the provided local item against the LocalItemExclusionEvaluator to see if it should be excluded from addition to version control.

Parameters:
localItem - the local item to check (must not be null)
isFolder - true if the local item to check is a folder; false otherwise
Returns:
true if the item is excluded; false otherwise

isExcluded

public boolean isExcluded(java.lang.String localItem,
                          boolean isFolder,
                          java.util.concurrent.atomic.AtomicReference<java.lang.String> appliedExclusion,
                          java.util.concurrent.atomic.AtomicReference<java.lang.String> ignoreFilePath)
Check the provided local item against the LocalItemExclusionEvaluator to see if it should be excluded from addition to version control.

Parameters:
localItem - the local item to check (must not be null)
isFolder - true if the local item to check is a folder; false otherwise
appliedExclusion - if the item is excluded, the exclusion which was applied (may be null)
ignoreFilePath - if the item is excluded, the name of the ignore file on disk which contains the applied exclusion. If the applied exclusion came from the global exclusion list for the Team Project Collection, the value is the empty string (may be null)
Returns:
true if the item is excluded; false otherwise


© 2015 Microsoft. All rights reserved.