org.netbeans.libs.git/1 1.1

org.netbeans.libs.git
Class SearchCriteria

java.lang.Object
  extended by org.netbeans.libs.git.SearchCriteria

public final class SearchCriteria
extends Object

Describes required search criteria for git commands that iterate through git commits.


Constructor Summary
SearchCriteria()
          Default constructor.
 
Method Summary
 File[] getFiles()
          Returns an array of files that an examined commit should touch.
 Date getFrom()
          No commit that was created before than the date returned by this method does not satisfy the criteria.
 int getLimit()
          A maximum number of commits to list in a command result.
 String getMessage()
          Returns the string that must be part of a commit's message string for the commit to pass the criteria.
 String getRevisionFrom()
          A commit is in compliance with this criteria if: its id is equal to the return value it is a descendant of the commit identified by the return value That means no ancestors commit of the one identified by the value satisfy the criteria.
 String getRevisionTo()
          A commit is in compliance with this criteria if: its id is equal to the return value it is an ancestor of the commit identified by the return value That means no descendant commits of the one identified by the value satisfy the criteria.
 Date getTo()
          No commit that was created later than the date returned by this method does not satisfy the criteria.
 String getUsername()
          Returns the string that must be part of a commit's author or committer string for the commit to pass the criteria.
 boolean isFollow()
          Returns true if a command that iterates through a collection of commits should follow path renames and do not stop on a commit where an interesting file (given by the getFiles method) is renamed to another.
 boolean isIncludeMerges()
          If the return value is false then no merge commits may satisfy the criteria.
 void setFiles(File[] files)
          Sets files that a commit has to modify to satisfy the criteria.
 void setFollowRenames(boolean flag)
          Set the flag indicating the commits where a renamed file is modified satisfy the given criteria.
 void setFrom(Date date)
          Sets the limit date all commits must satisfy.
 void setIncludeMerges(boolean flag)
          If the given value is false then no merge commits will satisfy the criteria and be processed.
 void setLimit(int limit)
          Sets the number of commits to list in a command's result.
 void setMessage(String message)
          Sets the string that must be part of a commit's message string for the commit to pass the criteria.
 void setRevisionFrom(String revisionFrom)
          Sets the id of an ancestor commit for all commits that should satisfy the criteria.
 void setRevisionTo(String revisionTo)
          Sets the id of the latest commit that satisfies the criteria
 void setTo(Date date)
          Sets the limit date all commits must satisfy.
 void setUsername(String username)
          Sets the string that must be part of a commit's author or committer string for the commit to pass the criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchCriteria

public SearchCriteria()
Default constructor. Sets search criteria that every commit in the repository satisfies.

Method Detail

getFiles

public File[] getFiles()
Returns an array of files that an examined commit should touch. A commit satisfies this criteria if:

Returns:
non null array of files

setFiles

public void setFiles(File[] files)
              throws IllegalArgumentException
Sets files that a commit has to modify to satisfy the criteria.

Parameters:
files - non null array of files
Throws:
IllegalArgumentException - if files is null

getLimit

public int getLimit()
A maximum number of commits to list in a command result.

Returns:
number of commits to return in a result or -1 for all commits.

setLimit

public void setLimit(int limit)
Sets the number of commits to list in a command's result.

Parameters:
limit - number of commits, -1 for all commits.

getRevisionFrom

public String getRevisionFrom()
A commit is in compliance with this criteria if: That means no ancestors commit of the one identified by the value satisfy the criteria.

Returns:
commit id

setRevisionFrom

public void setRevisionFrom(String revisionFrom)
Sets the id of an ancestor commit for all commits that should satisfy the criteria.

Parameters:
revisionFrom - ancestor commit id

getRevisionTo

public String getRevisionTo()
A commit is in compliance with this criteria if: That means no descendant commits of the one identified by the value satisfy the criteria.

Returns:
commit id of the latest satisfiable commit

setRevisionTo

public void setRevisionTo(String revisionTo)
Sets the id of the latest commit that satisfies the criteria

Parameters:
revisionTo - commit id of the latest satisfiable commit

getFrom

public Date getFrom()
No commit that was created before than the date returned by this method does not satisfy the criteria.


setFrom

public void setFrom(Date date)
Sets the limit date all commits must satisfy.


getTo

public Date getTo()
No commit that was created later than the date returned by this method does not satisfy the criteria.


setTo

public void setTo(Date date)
Sets the limit date all commits must satisfy.


isIncludeMerges

public boolean isIncludeMerges()
If the return value is false then no merge commits may satisfy the criteria. Default value is true.

Returns:
true if merge commits are in compliance with the criteria, false if they should be omitted.

setIncludeMerges

public void setIncludeMerges(boolean flag)
If the given value is false then no merge commits will satisfy the criteria and be processed.


getUsername

public String getUsername()
Returns the string that must be part of a commit's author or committer string for the commit to pass the criteria.

Returns:
username substring

setUsername

public void setUsername(String username)
Sets the string that must be part of a commit's author or committer string for the commit to pass the criteria.


getMessage

public String getMessage()
Returns the string that must be part of a commit's message string for the commit to pass the criteria.

Returns:
message substring

setMessage

public void setMessage(String message)
Sets the string that must be part of a commit's message string for the commit to pass the criteria.


isFollow

public boolean isFollow()
Returns true if a command that iterates through a collection of commits should follow path renames and do not stop on a commit where an interesting file (given by the getFiles method) is renamed to another.


setFollowRenames

public void setFollowRenames(boolean flag)
Set the flag indicating the commits where a renamed file is modified satisfy the given criteria.


org.netbeans.libs.git/1 1.1

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.