Java Code Examples for org.apache.commons.lang3.Validate#matchesPattern()
The following examples show how to use
org.apache.commons.lang3.Validate#matchesPattern() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GitlabApi.java From scava with Eclipse Public License 2.0 | 6 votes |
@Override public IData<Project> getV3GroupsProjectsProject(String id, Boolean archived, String visibility, String search, String orderBy, String sort, Boolean simple, Integer page, Integer perPage){ Validate.notNull(id); if (visibility != null) { Validate.matchesPattern(visibility,"(public|internal|private)"); } if (orderBy != null) { Validate.matchesPattern(orderBy,"(id|name|path|created_at|updated_at|last_activity_at)"); } if (sort != null) { Validate.matchesPattern(sort,"(asc|desc)"); } return entityClient.getV3GroupsProjectsProject(id, archived, visibility, search, orderBy, sort, simple, page, perPage); }
Example 2
Source File: GitHubApi.java From scava with Eclipse Public License 2.0 | 5 votes |
@Override public IDataSet<SearchRepositories> getSearchRepositories(String order, String q, String sort){ if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } Validate.notNull(q); if (sort != null) { Validate.matchesPattern(sort,"(stars|forks|updated)"); } return searchClient.getSearchRepositories(order, q, sort); }
Example 3
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<UsersResponse> getUsersUsersResponse(String inname, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(reputation|creation|name|modified)"); } Validate.notNull(site); return entityClient.getUsersUsersResponse(inname, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 4
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<QuestionsResponse> getUsersQuestionsUnacceptedQuestionsResponse(String ids, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(ids); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(activity|creation|votes)"); } Validate.notNull(site); return entityClient.getUsersQuestionsUnacceptedQuestionsResponse(ids, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 5
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Comments> getMeComments(String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(creation|votes)"); } Validate.notNull(site); return entityClient.getMeComments(order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 6
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<TagSynonyms> getTagsSynonymsTagSynonyms(String tags, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(tags); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(creation|applied|activity)"); } Validate.notNull(site); return entityClient.getTagsSynonymsTagSynonyms(tags, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 7
Source File: BitbucketApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IData<Error> getHook_eventsErrorBySubjectType(String subjectType){ Validate.notNull(subjectType); Validate.matchesPattern(subjectType,"(user|repository|team)"); return entityClient.getHook_eventsErrorBySubjectType(subjectType); }
Example 8
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Answers> getUsersAnswers(String ids, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(ids); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(activity|creation|votes)"); } Validate.notNull(site); return entityClient.getUsersAnswers(ids, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 9
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Badges> getUsersBadges(String ids, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(ids); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(rank|name|type|awarded)"); } Validate.notNull(site); return entityClient.getUsersBadges(ids, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 10
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Answers> getQuestionsAnswers(String ids, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(ids); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(activity|creation|votes)"); } Validate.notNull(site); return entityClient.getQuestionsAnswers(ids, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 11
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<QuestionsResponse> getSimilarQuestionsResponse(String tagged, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site, String nottagged, String title){ if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(activity|creation|votes|relevance)"); } Validate.notNull(site); return entityClient.getSimilarQuestionsResponse(tagged, order, max, min, sort, fromdate, todate, filter, callback, site, nottagged, title); }
Example 12
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Answers> getUsersTagsTop_answersAnswers(Integer id, String tags, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(id); Validate.notNull(tags); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(activity|creation|votes)"); } Validate.notNull(site); return entityClient.getUsersTagsTop_answersAnswers(id, tags, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 13
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Comments> getMeCommentsByToId(Integer toId, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(toId); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(creation|votes)"); } Validate.notNull(site); return entityClient.getMeCommentsByToId(toId, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 14
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<QuestionsResponse> getUsersTagsTop_questionsQuestionsResponse(Integer id, String tags, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(id); Validate.notNull(tags); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(activity|creation|votes)"); } Validate.notNull(site); return entityClient.getUsersTagsTop_questionsQuestionsResponse(id, tags, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 15
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<QuestionsResponse> getUsersQuestionsUnansweredQuestionsResponse(String ids, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(ids); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(activity|creation|votes)"); } Validate.notNull(site); return entityClient.getUsersQuestionsUnansweredQuestionsResponse(ids, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 16
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Tags> getTags(String inname, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(popular|activity|name)"); } Validate.notNull(site); return entityClient.getTags(inname, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 17
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Badges> getBadgesByIds(String ids, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ Validate.notNull(ids); if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(rank|name|type)"); } Validate.notNull(site); return entityClient.getBadgesByIds(ids, order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 18
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<QuestionsResponse> getMeQuestionsUnansweredQuestionsResponse(String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(activity|creation|votes)"); } Validate.notNull(site); return entityClient.getMeQuestionsUnansweredQuestionsResponse(order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 19
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<TagSynonyms> getTagsSynonymsTagSynonyms(String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(creation|applied|activity)"); } Validate.notNull(site); return entityClient.getTagsSynonymsTagSynonyms(order, max, min, sort, fromdate, todate, filter, callback, site); }
Example 20
Source File: StackExchangeApi.java From scava with Eclipse Public License 2.0 | 4 votes |
@Override public IDataSet<Tags> getTagsRequiredTags(String inname, String order, String max, String min, String sort, Integer fromdate, Integer todate, String filter, String callback, String site){ if (order != null) { Validate.matchesPattern(order,"(desc|asc)"); } if (sort != null) { Validate.matchesPattern(sort,"(popular|activity|name)"); } Validate.notNull(site); return entityClient.getTagsRequiredTags(inname, order, max, min, sort, fromdate, todate, filter, callback, site); }