summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/utils
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-11-04 17:21:30 -0400
committerJames Moger <james.moger@gitblit.com>2011-11-04 17:22:06 -0400
commit33d8d8b21c5586f1328c8c3e7f6049037ae5fd0d (patch)
tree63bb27e42dda5047704f3f66f99809ecb11f5016 /src/com/gitblit/utils
parentb7646f8a02db486a08c9b2951966aa8fdaf0ba7a (diff)
downloadgitblit-33d8d8b21c5586f1328c8c3e7f6049037ae5fd0d.tar.gz
gitblit-33d8d8b21c5586f1328c8c3e7f6049037ae5fd0d.zip
Moved SearchType enum to Constants
Diffstat (limited to 'src/com/gitblit/utils')
-rw-r--r--src/com/gitblit/utils/JGitUtils.java23
-rw-r--r--src/com/gitblit/utils/SyndicationUtils.java4
2 files changed, 2 insertions, 25 deletions
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index 80147d46..c61b3d9f 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -925,27 +925,6 @@ public class JGitUtils {
}
/**
- * Enumeration of the search types.
- */
- public static enum SearchType {
- AUTHOR, COMMITTER, COMMIT;
-
- public static SearchType forName(String name) {
- for (SearchType type : values()) {
- if (type.name().equalsIgnoreCase(name)) {
- return type;
- }
- }
- return COMMIT;
- }
-
- @Override
- public String toString() {
- return name().toLowerCase();
- }
- }
-
- /**
* Search the commit history for a case-insensitive match to the value.
* Search results require a specified SearchType of AUTHOR, COMMITTER, or
* COMMIT. Results may be paginated using offset and maxCount. If the
@@ -963,7 +942,7 @@ public class JGitUtils {
* @return matching list of commits
*/
public static List<RevCommit> searchRevlogs(Repository repository, String objectId,
- String value, final SearchType type, int offset, int maxCount) {
+ String value, final com.gitblit.Constants.SearchType type, int offset, int maxCount) {
final String lcValue = value.toLowerCase();
List<RevCommit> list = new ArrayList<RevCommit>();
if (maxCount == 0) {
diff --git a/src/com/gitblit/utils/SyndicationUtils.java b/src/com/gitblit/utils/SyndicationUtils.java
index 85d5f8d2..4ba56223 100644
--- a/src/com/gitblit/utils/SyndicationUtils.java
+++ b/src/com/gitblit/utils/SyndicationUtils.java
@@ -22,13 +22,11 @@ import java.io.OutputStreamWriter;
import java.net.URLConnection;
import java.text.MessageFormat;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import com.gitblit.Constants;
import com.gitblit.GitBlitException;
import com.gitblit.models.SyndicatedEntryModel;
-import com.gitblit.utils.JGitUtils.SearchType;
import com.sun.syndication.feed.synd.SyndCategory;
import com.sun.syndication.feed.synd.SyndCategoryImpl;
import com.sun.syndication.feed.synd.SyndContent;
@@ -163,7 +161,7 @@ public class SyndicationUtils {
* @throws {@link IOException}
*/
public static List<SyndicatedEntryModel> readSearchFeed(String url, String repository,
- String branch, String fragment, SearchType searchType, int numberOfEntries,
+ String branch, String fragment, Constants.SearchType searchType, int numberOfEntries,
String username, char[] password) throws IOException {
// determine parameters
List<String> parameters = new ArrayList<String>();