public final class SearchCriteria extends Object
Constructor and Description |
---|
SearchCriteria()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public SearchCriteria()
public File[] getFiles()
public void setFiles(File[] files) throws IllegalArgumentException
files
- non null array of filesIllegalArgumentException
- if files is nullpublic int getLimit()
-1
for
all commits.public void setLimit(int limit)
limit
- number of commits, -1
for all commits.public String getRevisionFrom()
public void setRevisionFrom(String revisionFrom)
revisionFrom
- ancestor commit idpublic String getRevisionTo()
public void setRevisionTo(String revisionTo)
revisionTo
- commit id of the latest satisfiable commitpublic Date getFrom()
public void setFrom(Date date)
date
- lower bounds datepublic Date getTo()
public void setTo(Date date)
date
- upper dounds datepublic boolean isIncludeMerges()
false
then no merge commits may
satisfy the criteria. Default value is true
.true
if merge commits are in compliance with
the criteria, false
if they should be omitted.public void setIncludeMerges(boolean flag)
false
then no merge commits will
satisfy the criteria and be processed.flag
- true to include mergespublic String getUsername()
public void setUsername(String username)
username
- substringpublic String getMessage()
public void setMessage(String message)
message
- substringpublic boolean isFollow()
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.public void setFollowRenames(boolean flag)
flag
- follow renames