├── .gitignore ├── README.md ├── bsdata_icon.svg ├── nbactions.xml ├── pom.xml └── src └── main ├── java └── org │ ├── battlescribedata │ ├── constants │ │ ├── DataConstants.java │ │ ├── FileConstants.java │ │ ├── PropertiesConstants.java │ │ └── WebConstants.java │ ├── dao │ │ ├── GitHubDao.java │ │ ├── Release.java │ │ └── ReleaseService.java │ ├── model │ │ ├── Catalogue.java │ │ ├── DataFile.java │ │ ├── DataIndex.java │ │ ├── DataIndexEntry.java │ │ ├── GameSystem.java │ │ └── Roster.java │ ├── repository │ │ ├── Indexer.java │ │ ├── SAXParseCompleteException.java │ │ └── XmlException.java │ ├── rest │ │ ├── BattleScribeDataRestConfig.java │ │ └── RepoResource.java │ ├── service │ │ └── GitHubService.java │ ├── utils │ │ ├── Stopwatch.java │ │ └── Utils.java │ └── viewmodel │ │ ├── RepositoryFileVm.java │ │ ├── RepositorySourceVm.java │ │ ├── RepositoryVm.java │ │ └── ResponseVm.java │ └── eclipse │ └── egit │ └── github │ └── core │ ├── Application.java │ ├── Authorization.java │ ├── Blob.java │ ├── Comment.java │ ├── Commit.java │ ├── CommitComment.java │ ├── CommitFile.java │ ├── CommitStats.java │ ├── CommitStatus.java │ ├── CommitUser.java │ ├── Contributor.java │ ├── Download.java │ ├── DownloadResource.java │ ├── FieldError.java │ ├── Gist.java │ ├── GistChangeStatus.java │ ├── GistFile.java │ ├── GistRevision.java │ ├── GollumPage.java │ ├── IRepositoryIdProvider.java │ ├── IResourceProvider.java │ ├── Id.java │ ├── Issue.java │ ├── IssueEvent.java │ ├── Key.java │ ├── Label.java │ ├── Languages.java │ ├── MergeStatus.java │ ├── Milestone.java │ ├── Organization.java │ ├── PullRequest.java │ ├── PullRequestMarker.java │ ├── Reference.java │ ├── Release.java │ ├── Rename.java │ ├── Repository.java │ ├── RepositoryBranch.java │ ├── RepositoryCommit.java │ ├── RepositoryCommitCompare.java │ ├── RepositoryContents.java │ ├── RepositoryHook.java │ ├── RepositoryHookResponse.java │ ├── RepositoryId.java │ ├── RepositoryIssue.java │ ├── RepositoryMerging.java │ ├── RepositoryMergingResponse.java │ ├── RepositoryTag.java │ ├── RequestError.java │ ├── SearchIssue.java │ ├── SearchRepository.java │ ├── ShaResource.java │ ├── Tag.java │ ├── Team.java │ ├── TeamMembership.java │ ├── Tree.java │ ├── TreeEntry.java │ ├── TypedResource.java │ ├── User.java │ ├── UserPlan.java │ ├── client │ ├── DateFormatter.java │ ├── EventFormatter.java │ ├── GitHubClient.java │ ├── GitHubRequest.java │ ├── GitHubResponse.java │ ├── GsonUtils.java │ ├── IGitHubConstants.java │ ├── NoSuchPageException.java │ ├── PageIterator.java │ ├── PageLinks.java │ ├── PagedRequest.java │ └── RequestException.java │ ├── event │ ├── CommitCommentPayload.java │ ├── CreatePayload.java │ ├── DeletePayload.java │ ├── DownloadPayload.java │ ├── Event.java │ ├── EventPayload.java │ ├── EventRepository.java │ ├── FollowPayload.java │ ├── ForkApplyPayload.java │ ├── ForkPayload.java │ ├── GistPayload.java │ ├── GollumPayload.java │ ├── IssueCommentPayload.java │ ├── IssuesPayload.java │ ├── MemberPayload.java │ ├── PublicPayload.java │ ├── PullRequestPayload.java │ ├── PullRequestReviewCommentPayload.java │ ├── PushPayload.java │ ├── ReleasePayload.java │ ├── TeamAddPayload.java │ └── WatchPayload.java │ ├── service │ ├── CollaboratorService.java │ ├── CommitService.java │ ├── ContentsService.java │ ├── DataService.java │ ├── DeployKeyService.java │ ├── DownloadService.java │ ├── EventService.java │ ├── GistService.java │ ├── GitHubService.java │ ├── IssueService.java │ ├── LabelService.java │ ├── MarkdownService.java │ ├── MilestoneService.java │ ├── OAuthService.java │ ├── OrganizationService.java │ ├── PullRequestService.java │ ├── RepositoryService.java │ ├── StargazerService.java │ ├── TeamService.java │ └── UserService.java │ └── util │ ├── Base64.java │ ├── DateUtils.java │ ├── EncodingUtils.java │ ├── LabelComparator.java │ ├── MilestoneComparator.java │ ├── MultiPartUtils.java │ └── UrlUtils.java ├── resources ├── common │ ├── java │ │ ├── jersey-multipart-config.properties │ │ └── transform │ │ │ ├── catalogue_1_15.xsl │ │ │ ├── catalogue_2_00.xsl │ │ │ ├── catalogue_2_01.xsl │ │ │ ├── catalogue_2_02.xsl │ │ │ ├── catalogue_2_03.xsl │ │ │ ├── game_system_1_15.xsl │ │ │ ├── game_system_2_00.xsl │ │ │ ├── game_system_2_01.xsl │ │ │ ├── game_system_2_02.xsl │ │ │ └── game_system_2_03.xsl │ └── webapp │ │ ├── logging.properties │ │ ├── urlrewrite.xml │ │ └── web.xml ├── dev │ ├── java │ │ └── application.properties │ └── webapp │ │ └── appengine-web.xml ├── local │ ├── java │ │ └── application.properties │ └── webapp │ │ └── appengine-web.xml ├── prod │ ├── java │ │ └── application.properties │ └── webapp │ │ └── appengine-web.xml └── test │ ├── java │ └── application.properties │ └── webapp │ └── appengine-web.xml └── webapp ├── 404.html ├── META-INF └── context.xml ├── app ├── css │ ├── .gitkeep │ ├── ie6.css │ ├── ie7.css │ ├── main.css │ └── normalize.css ├── img │ ├── .gitkeep │ ├── Discord-Logo-Color.png │ ├── blank.png │ ├── bsdata_icon_border.svg │ ├── bsdata_logo.png │ ├── discord_icon_24.png │ ├── download_dark_24.png │ ├── download_dark_32.png │ ├── download_light_24.png │ ├── download_light_32.png │ ├── facebook_icon_24.png │ ├── favicon.ico │ ├── github_icon_16.png │ ├── github_icon_24.png │ ├── github_icon_32.png │ ├── ribbons │ │ ├── left-cerulean@2x.png │ │ ├── left-chardonnay@2x.png │ │ ├── left-chocolate@2x.png │ │ ├── left-dusk-blue@2x.png │ │ ├── left-graphite@2x.png │ │ ├── left-green@2x.png │ │ ├── left-grey@2x.png │ │ ├── left-old-burgundy@2x.png │ │ ├── left-orange@2x.png │ │ ├── left-red@2x.png │ │ ├── left-turquoise@2x.png │ │ ├── left-white@2x.png │ │ ├── right-cerulean.png │ │ ├── right-chardonnay@2x.png │ │ ├── right-chocolate@2x.png │ │ ├── right-dusk-blue@2x.png │ │ ├── right-graphite@2x.png │ │ ├── right-green@2x.png │ │ ├── right-grey@2x.png │ │ ├── right-old-burgundy@2x.png │ │ ├── right-orange@2x.png │ │ ├── right-red.png │ │ ├── right-turquoise@2x.png │ │ └── right-white@2x.png │ ├── rss_icon_16.png │ ├── rss_icon_24.png │ ├── rss_icon_32.png │ ├── spinner.gif │ └── twitter_icon_24.png ├── js │ ├── app.js │ ├── controllers.js │ ├── directives.js │ ├── filters.js │ ├── main.js │ ├── plugins.js │ ├── services.js │ └── vendor │ │ └── modernizr-2.7.2.min.js ├── lib │ ├── angular-file-upload.min.js │ ├── angular-file-upload.min.map │ └── angular │ │ ├── angular-animate.js │ │ ├── angular-animate.min.js │ │ ├── angular-animate.min.js.map │ │ ├── angular-cookies.js │ │ ├── angular-cookies.min.js │ │ ├── angular-cookies.min.js.map │ │ ├── angular-csp.css │ │ ├── angular-loader.js │ │ ├── angular-loader.min.js │ │ ├── angular-loader.min.js.map │ │ ├── angular-mocks.js │ │ ├── angular-resource.js │ │ ├── angular-resource.min.js │ │ ├── angular-resource.min.js.map │ │ ├── angular-route.js │ │ ├── angular-route.min.js │ │ ├── angular-route.min.js.map │ │ ├── angular-sanitize.js │ │ ├── angular-sanitize.min.js │ │ ├── angular-sanitize.min.js.map │ │ ├── angular-scenario.js │ │ ├── angular-touch.js │ │ ├── angular-touch.min.js │ │ ├── angular-touch.min.js.map │ │ ├── angular.js │ │ ├── angular.min.js │ │ ├── angular.min.js.map │ │ ├── errors.json │ │ ├── i18n │ │ ├── angular-locale_af-na.js │ │ ├── angular-locale_af-za.js │ │ ├── angular-locale_af.js │ │ ├── angular-locale_am-et.js │ │ ├── angular-locale_am.js │ │ ├── angular-locale_ar-001.js │ │ ├── angular-locale_ar-ae.js │ │ ├── angular-locale_ar-bh.js │ │ ├── angular-locale_ar-dz.js │ │ ├── angular-locale_ar-eg.js │ │ ├── angular-locale_ar-iq.js │ │ ├── angular-locale_ar-jo.js │ │ ├── angular-locale_ar-kw.js │ │ ├── angular-locale_ar-lb.js │ │ ├── angular-locale_ar-ly.js │ │ ├── angular-locale_ar-ma.js │ │ ├── angular-locale_ar-om.js │ │ ├── angular-locale_ar-qa.js │ │ ├── angular-locale_ar-sa.js │ │ ├── angular-locale_ar-sd.js │ │ ├── angular-locale_ar-sy.js │ │ ├── angular-locale_ar-tn.js │ │ ├── angular-locale_ar-ye.js │ │ ├── angular-locale_ar.js │ │ ├── angular-locale_bg-bg.js │ │ ├── angular-locale_bg.js │ │ ├── angular-locale_bn-bd.js │ │ ├── angular-locale_bn-in.js │ │ ├── angular-locale_bn.js │ │ ├── angular-locale_ca-ad.js │ │ ├── angular-locale_ca-es.js │ │ ├── angular-locale_ca.js │ │ ├── angular-locale_cs-cz.js │ │ ├── angular-locale_cs.js │ │ ├── angular-locale_da-dk.js │ │ ├── angular-locale_da.js │ │ ├── angular-locale_de-at.js │ │ ├── angular-locale_de-be.js │ │ ├── angular-locale_de-ch.js │ │ ├── angular-locale_de-de.js │ │ ├── angular-locale_de-li.js │ │ ├── angular-locale_de-lu.js │ │ ├── angular-locale_de.js │ │ ├── angular-locale_el-cy.js │ │ ├── angular-locale_el-gr.js │ │ ├── angular-locale_el.js │ │ ├── angular-locale_en-as.js │ │ ├── angular-locale_en-au.js │ │ ├── angular-locale_en-bb.js │ │ ├── angular-locale_en-be.js │ │ ├── angular-locale_en-bm.js │ │ ├── angular-locale_en-bw.js │ │ ├── angular-locale_en-bz.js │ │ ├── angular-locale_en-ca.js │ │ ├── angular-locale_en-dsrt-us.js │ │ ├── angular-locale_en-dsrt.js │ │ ├── angular-locale_en-fm.js │ │ ├── angular-locale_en-gb.js │ │ ├── angular-locale_en-gu.js │ │ ├── angular-locale_en-gy.js │ │ ├── angular-locale_en-hk.js │ │ ├── angular-locale_en-ie.js │ │ ├── angular-locale_en-in.js │ │ ├── angular-locale_en-iso.js │ │ ├── angular-locale_en-jm.js │ │ ├── angular-locale_en-mh.js │ │ ├── angular-locale_en-mp.js │ │ ├── angular-locale_en-mt.js │ │ ├── angular-locale_en-mu.js │ │ ├── angular-locale_en-na.js │ │ ├── angular-locale_en-nz.js │ │ ├── angular-locale_en-ph.js │ │ ├── angular-locale_en-pk.js │ │ ├── angular-locale_en-pr.js │ │ ├── angular-locale_en-pw.js │ │ ├── angular-locale_en-sg.js │ │ ├── angular-locale_en-tc.js │ │ ├── angular-locale_en-tt.js │ │ ├── angular-locale_en-um.js │ │ ├── angular-locale_en-us.js │ │ ├── angular-locale_en-vg.js │ │ ├── angular-locale_en-vi.js │ │ ├── angular-locale_en-za.js │ │ ├── angular-locale_en-zw.js │ │ ├── angular-locale_en.js │ │ ├── angular-locale_es-419.js │ │ ├── angular-locale_es-ar.js │ │ ├── angular-locale_es-bo.js │ │ ├── angular-locale_es-cl.js │ │ ├── angular-locale_es-co.js │ │ ├── angular-locale_es-cr.js │ │ ├── angular-locale_es-do.js │ │ ├── angular-locale_es-ea.js │ │ ├── angular-locale_es-ec.js │ │ ├── angular-locale_es-es.js │ │ ├── angular-locale_es-gq.js │ │ ├── angular-locale_es-gt.js │ │ ├── angular-locale_es-hn.js │ │ ├── angular-locale_es-ic.js │ │ ├── angular-locale_es-mx.js │ │ ├── angular-locale_es-ni.js │ │ ├── angular-locale_es-pa.js │ │ ├── angular-locale_es-pe.js │ │ ├── angular-locale_es-pr.js │ │ ├── angular-locale_es-py.js │ │ ├── angular-locale_es-sv.js │ │ ├── angular-locale_es-us.js │ │ ├── angular-locale_es-uy.js │ │ ├── angular-locale_es-ve.js │ │ ├── angular-locale_es.js │ │ ├── angular-locale_et-ee.js │ │ ├── angular-locale_et.js │ │ ├── angular-locale_eu-es.js │ │ ├── angular-locale_eu.js │ │ ├── angular-locale_fa-af.js │ │ ├── angular-locale_fa-ir.js │ │ ├── angular-locale_fa.js │ │ ├── angular-locale_fi-fi.js │ │ ├── angular-locale_fi.js │ │ ├── angular-locale_fil-ph.js │ │ ├── angular-locale_fil.js │ │ ├── angular-locale_fr-be.js │ │ ├── angular-locale_fr-bf.js │ │ ├── angular-locale_fr-bi.js │ │ ├── angular-locale_fr-bj.js │ │ ├── angular-locale_fr-bl.js │ │ ├── angular-locale_fr-ca.js │ │ ├── angular-locale_fr-cd.js │ │ ├── angular-locale_fr-cf.js │ │ ├── angular-locale_fr-cg.js │ │ ├── angular-locale_fr-ch.js │ │ ├── angular-locale_fr-ci.js │ │ ├── angular-locale_fr-cm.js │ │ ├── angular-locale_fr-dj.js │ │ ├── angular-locale_fr-fr.js │ │ ├── angular-locale_fr-ga.js │ │ ├── angular-locale_fr-gf.js │ │ ├── angular-locale_fr-gn.js │ │ ├── angular-locale_fr-gp.js │ │ ├── angular-locale_fr-gq.js │ │ ├── angular-locale_fr-km.js │ │ ├── angular-locale_fr-lu.js │ │ ├── angular-locale_fr-mc.js │ │ ├── angular-locale_fr-mf.js │ │ ├── angular-locale_fr-mg.js │ │ ├── angular-locale_fr-ml.js │ │ ├── angular-locale_fr-mq.js │ │ ├── angular-locale_fr-ne.js │ │ ├── angular-locale_fr-re.js │ │ ├── angular-locale_fr-yt.js │ │ ├── angular-locale_fr.js │ │ ├── angular-locale_gl-es.js │ │ ├── angular-locale_gl.js │ │ ├── angular-locale_gsw-ch.js │ │ ├── angular-locale_gsw.js │ │ ├── angular-locale_gu-in.js │ │ ├── angular-locale_gu.js │ │ ├── angular-locale_he-il.js │ │ ├── angular-locale_he.js │ │ ├── angular-locale_hi-in.js │ │ ├── angular-locale_hi.js │ │ ├── angular-locale_hr-hr.js │ │ ├── angular-locale_hr.js │ │ ├── angular-locale_hu-hu.js │ │ ├── angular-locale_hu.js │ │ ├── angular-locale_id-id.js │ │ ├── angular-locale_id.js │ │ ├── angular-locale_in.js │ │ ├── angular-locale_is-is.js │ │ ├── angular-locale_is.js │ │ ├── angular-locale_it-it.js │ │ ├── angular-locale_it-sm.js │ │ ├── angular-locale_it.js │ │ ├── angular-locale_iw.js │ │ ├── angular-locale_ja-jp.js │ │ ├── angular-locale_ja.js │ │ ├── angular-locale_kn-in.js │ │ ├── angular-locale_kn.js │ │ ├── angular-locale_ko-kr.js │ │ ├── angular-locale_ko.js │ │ ├── angular-locale_ln-cd.js │ │ ├── angular-locale_ln.js │ │ ├── angular-locale_lt-lt.js │ │ ├── angular-locale_lt.js │ │ ├── angular-locale_lv-lv.js │ │ ├── angular-locale_lv.js │ │ ├── angular-locale_ml-in.js │ │ ├── angular-locale_ml.js │ │ ├── angular-locale_mr-in.js │ │ ├── angular-locale_mr.js │ │ ├── angular-locale_ms-my.js │ │ ├── angular-locale_ms.js │ │ ├── angular-locale_mt-mt.js │ │ ├── angular-locale_mt.js │ │ ├── angular-locale_nl-cw.js │ │ ├── angular-locale_nl-nl.js │ │ ├── angular-locale_nl-sx.js │ │ ├── angular-locale_nl.js │ │ ├── angular-locale_no.js │ │ ├── angular-locale_or-in.js │ │ ├── angular-locale_or.js │ │ ├── angular-locale_pl-pl.js │ │ ├── angular-locale_pl.js │ │ ├── angular-locale_pt-br.js │ │ ├── angular-locale_pt-pt.js │ │ ├── angular-locale_pt.js │ │ ├── angular-locale_ro-ro.js │ │ ├── angular-locale_ro.js │ │ ├── angular-locale_ru-ru.js │ │ ├── angular-locale_ru.js │ │ ├── angular-locale_sk-sk.js │ │ ├── angular-locale_sk.js │ │ ├── angular-locale_sl-si.js │ │ ├── angular-locale_sl.js │ │ ├── angular-locale_sq-al.js │ │ ├── angular-locale_sq.js │ │ ├── angular-locale_sr-cyrl-rs.js │ │ ├── angular-locale_sr-latn-rs.js │ │ ├── angular-locale_sr.js │ │ ├── angular-locale_sv-se.js │ │ ├── angular-locale_sv.js │ │ ├── angular-locale_sw-tz.js │ │ ├── angular-locale_sw.js │ │ ├── angular-locale_ta-in.js │ │ ├── angular-locale_ta.js │ │ ├── angular-locale_te-in.js │ │ ├── angular-locale_te.js │ │ ├── angular-locale_th-th.js │ │ ├── angular-locale_th.js │ │ ├── angular-locale_tl.js │ │ ├── angular-locale_tr-tr.js │ │ ├── angular-locale_tr.js │ │ ├── angular-locale_uk-ua.js │ │ ├── angular-locale_uk.js │ │ ├── angular-locale_ur-pk.js │ │ ├── angular-locale_ur.js │ │ ├── angular-locale_vi-vn.js │ │ ├── angular-locale_vi.js │ │ ├── angular-locale_zh-cn.js │ │ ├── angular-locale_zh-hans-cn.js │ │ ├── angular-locale_zh-hk.js │ │ ├── angular-locale_zh-tw.js │ │ ├── angular-locale_zh.js │ │ ├── angular-locale_zu-za.js │ │ └── angular-locale_zu.js │ │ ├── version.json │ │ └── version.txt └── partials │ ├── repo.html │ └── repos.html └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | *.class 3 | *.war 4 | *.ear 5 | build/ 6 | dist/ 7 | target/ 8 | nbproject/ 9 | .idea 10 | *.iml 11 | nb-configuration.xml 12 | maven.properties 13 | github-user.properties -------------------------------------------------------------------------------- /nbactions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CUSTOM-appengine:run 5 | appengine:run 6 | 7 | appengine:run 8 | 9 | 10 | 11 | CUSTOM-appengine:deploy 12 | appengine:deploy 13 | 14 | appengine:deploy 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/constants/FileConstants.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.constants; 3 | 4 | 5 | /** 6 | * Filename/path constants 7 | */ 8 | public class FileConstants { 9 | 10 | public static final String GAME_SYSTEM_1_15_XSL_FILE_PATH = "/transform/game_system_1_15.xsl"; 11 | public static final String CATALOGUE_1_15_XSL_FILE_PATH = "/transform/catalogue_1_15.xsl"; 12 | 13 | public static final String GAME_SYSTEM_2_00_XSL_FILE_PATH = "/transform/game_system_2_00.xsl"; 14 | public static final String CATALOGUE_2_00_XSL_FILE_PATH = "/transform/catalogue_2_00.xsl"; 15 | 16 | public static final String GAME_SYSTEM_2_01_XSL_FILE_PATH = "/transform/game_system_2_01.xsl"; 17 | public static final String CATALOGUE_2_01_XSL_FILE_PATH = "/transform/catalogue_2_01.xsl"; 18 | 19 | public static final String GAME_SYSTEM_2_02_XSL_FILE_PATH = "/transform/game_system_2_02.xsl"; 20 | public static final String CATALOGUE_2_02_XSL_FILE_PATH = "/transform/catalogue_2_02.xsl"; 21 | 22 | public static final String GAME_SYSTEM_2_03_XSL_FILE_PATH = "/transform/game_system_2_03.xsl"; 23 | public static final String CATALOGUE_2_03_XSL_FILE_PATH = "/transform/catalogue_2_03.xsl"; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/constants/PropertiesConstants.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.constants; 3 | 4 | 5 | /** 6 | * Constants for .propertis files 7 | */ 8 | public class PropertiesConstants { 9 | 10 | public static final String LOGGER_NAME = "org.battlescribedata"; 11 | 12 | public static final String APPLICATION_PROPERTIES_FILE_PATH = "application.properties"; 13 | public static final String GITHUB_USER_PROPERTIES_FILE_PATH = "github-user.properties"; 14 | 15 | public static final String GITHUB_ANON_USERNAME = "github.anon.username"; 16 | public static final String GITHUB_ANON_EMAIL = "github.anon.email"; 17 | public static final String GITHUB_ANON_TOKEN = "github.anon.token"; 18 | 19 | public static final String GITHUB_ORGANIZATION = "github.organisation"; 20 | public static final String GITHUB_MASTER_BRANCH = "github.master.branch"; 21 | public static final String GITHUB_BSDATA_REPO = "github.bsdata.repo"; 22 | 23 | public static final String SITE_NAME = "site.name"; 24 | public static final String SITE_DESCRIPTION = "site.description"; 25 | public static final String SITE_WEBSITE_URL = "site.website.url"; 26 | public static final String SITE_GITHUB_URL = "site.github.url"; 27 | public static final String SITE_DISCORD_URL = "site.discord.url"; 28 | public static final String SITE_TWITTER_URL = "site.twitter.url"; 29 | public static final String SITE_FACEBOOK_URL = "site.facebook.url"; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/constants/WebConstants.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.constants; 3 | 4 | 5 | public class WebConstants { 6 | 7 | public static final String REST_RESOURCE_PACKAGE = "org.battlescribedata.rest"; 8 | 9 | public static final String REPO_SERVICE_PATH = "repos"; 10 | public static final String ALL_REPO_FEEDS = "all"; 11 | public static final int MAX_FEED_ENTRIES = 100; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/dao/Release.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.dao; 3 | 4 | import java.io.Serializable; 5 | import java.util.Date; 6 | 7 | 8 | public class Release implements Serializable { 9 | 10 | private String name; 11 | private String tagName; 12 | private Date publishedAt; 13 | private String body; 14 | private String htmlUrl; 15 | 16 | public String getName() { 17 | return name; 18 | } 19 | 20 | public void setName(String name) { 21 | this.name = name; 22 | } 23 | 24 | public String getTagName() { 25 | return tagName; 26 | } 27 | 28 | public void setTagName(String tagName) { 29 | this.tagName = tagName; 30 | } 31 | 32 | public Date getPublishedAt() { 33 | return publishedAt; 34 | } 35 | 36 | public void setPublishedAt(Date publishedAt) { 37 | this.publishedAt = publishedAt; 38 | } 39 | 40 | public String getBody() { 41 | return body; 42 | } 43 | 44 | public void setBody(String body) { 45 | this.body = body; 46 | } 47 | 48 | public String getHtmlUrl() { 49 | return htmlUrl; 50 | } 51 | 52 | public void setHtmlUrl(String htmlUrl) { 53 | this.htmlUrl = htmlUrl; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/dao/ReleaseService.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.dao; 3 | 4 | import com.google.gson.reflect.TypeToken; 5 | import java.io.IOException; 6 | import java.util.List; 7 | import org.eclipse.egit.github.core.IRepositoryIdProvider; 8 | import org.eclipse.egit.github.core.client.GitHubClient; 9 | import org.eclipse.egit.github.core.client.IGitHubConstants; 10 | import org.eclipse.egit.github.core.client.PagedRequest; 11 | import org.eclipse.egit.github.core.service.GitHubService; 12 | 13 | 14 | public class ReleaseService extends GitHubService { 15 | 16 | private static final String SEGMENT_RELEASES = "/releases"; 17 | 18 | 19 | public ReleaseService(GitHubClient client) { 20 | super(client); 21 | } 22 | 23 | /** 24 | * Get all releases in given repository 25 | * 26 | * @param repository 27 | * @return list of releases 28 | * @throws IOException 29 | */ 30 | public List getAllReleases(IRepositoryIdProvider repository) throws IOException { 31 | return getReleases(repository, -1, -1); 32 | } 33 | 34 | /** 35 | * Get releases in given repository for a given start page and number of pages 36 | * 37 | * @param repository 38 | * @return list of releases 39 | * @throws IOException 40 | */ 41 | public List getReleases(IRepositoryIdProvider repository, int start, int size) throws IOException { 42 | String id = getId(repository); 43 | StringBuilder uri = new StringBuilder(IGitHubConstants.SEGMENT_REPOS); 44 | uri.append('/').append(id); 45 | uri.append(SEGMENT_RELEASES); 46 | PagedRequest request; 47 | if (start == -1 || size == -1) { 48 | request = createPagedRequest(); 49 | } 50 | else { 51 | request = createPagedRequest(start, size); 52 | } 53 | request.setUri(uri); 54 | request.setType(new TypeToken>() {}.getType()); 55 | return getAll(request); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/model/Catalogue.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.model; 3 | 4 | 5 | public class Catalogue extends DataFile { 6 | 7 | private String gameSystemId; 8 | private int gameSystemRevision; 9 | 10 | public Catalogue() { 11 | } 12 | 13 | public String getGameSystemId() { 14 | return gameSystemId; 15 | } 16 | 17 | public void setGameSystemId(String value) { 18 | this.gameSystemId = value; 19 | } 20 | 21 | public int getGameSystemRevision() { 22 | return gameSystemRevision; 23 | } 24 | 25 | public void setGameSystemRevision(int value) { 26 | this.gameSystemRevision = value; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/model/DataFile.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.model; 3 | 4 | import java.io.Serializable; 5 | 6 | 7 | public class DataFile implements Serializable { 8 | 9 | private transient byte[] data; 10 | 11 | private String id; 12 | private String name; 13 | private int revision; 14 | private String battleScribeVersion; 15 | private String authorName; 16 | private String authorContact; 17 | private String authorUrl; 18 | 19 | public byte[] getData() { 20 | return data; 21 | } 22 | 23 | public void setData(byte[] data) { 24 | this.data = data; 25 | } 26 | 27 | public String getName() { 28 | return name; 29 | } 30 | 31 | public void setName(String value) { 32 | this.name = value; 33 | } 34 | 35 | public String getBattleScribeVersion() { 36 | return battleScribeVersion; 37 | } 38 | 39 | public void setBattleScribeVersion(String value) { 40 | this.battleScribeVersion = value; 41 | } 42 | 43 | public String getAuthorName() { 44 | return authorName; 45 | } 46 | 47 | public void setAuthorName(String authorName) { 48 | this.authorName = authorName; 49 | } 50 | 51 | public String getAuthorContact() { 52 | return authorContact; 53 | } 54 | 55 | public void setAuthorContact(String authorContact) { 56 | this.authorContact = authorContact; 57 | } 58 | 59 | public String getAuthorUrl() { 60 | return authorUrl; 61 | } 62 | 63 | public void setAuthorUrl(String authorUrl) { 64 | this.authorUrl = authorUrl; 65 | } 66 | 67 | public int getRevision() { 68 | return revision; 69 | } 70 | 71 | public void setRevision(int revision) { 72 | this.revision = revision; 73 | } 74 | 75 | public String getId() { 76 | return id; 77 | } 78 | 79 | public void setId(String id) { 80 | this.id = id; 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/model/GameSystem.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.model; 3 | 4 | 5 | public class GameSystem extends DataFile { 6 | 7 | public GameSystem () { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/model/Roster.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.model; 3 | 4 | 5 | public class Roster extends DataFile { 6 | 7 | private double points; 8 | private double pointsLimit; 9 | private String description; 10 | private String gameSystemId; 11 | private String gameSystemName; 12 | private int gameSystemRevision; 13 | 14 | public Roster() { 15 | } 16 | 17 | public double getPoints() { 18 | return points; 19 | } 20 | 21 | public void setPoints(double value) { 22 | this.points = value; 23 | } 24 | 25 | public double getPointsLimit() { 26 | return pointsLimit; 27 | } 28 | 29 | public void setPointsLimit(double value) { 30 | this.pointsLimit = value; 31 | } 32 | 33 | public String getDescription() { 34 | return description; 35 | } 36 | 37 | public void setDescription(String description) { 38 | this.description = description; 39 | } 40 | 41 | public String getGameSystemId() { 42 | return gameSystemId; 43 | } 44 | 45 | public void setGameSystemId(String gameSystemId) { 46 | this.gameSystemId = gameSystemId; 47 | } 48 | 49 | public String getGameSystemName() { 50 | return gameSystemName; 51 | } 52 | 53 | public void setGameSystemName(String gameSystemName) { 54 | this.gameSystemName = gameSystemName; 55 | } 56 | 57 | public int getGameSystemRevision() { 58 | return gameSystemRevision; 59 | } 60 | 61 | public void setGameSystemRevision(int gameSystemRevision) { 62 | this.gameSystemRevision = gameSystemRevision; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/repository/SAXParseCompleteException.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.repository; 3 | 4 | import org.xml.sax.SAXException; 5 | 6 | 7 | public class SAXParseCompleteException extends SAXException { 8 | 9 | public SAXParseCompleteException(String message) { 10 | super(message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/repository/XmlException.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.repository; 3 | 4 | import java.io.IOException; 5 | 6 | 7 | public class XmlException extends IOException { 8 | 9 | public XmlException(Throwable cause) { 10 | super(cause.getMessage(), cause); 11 | } 12 | 13 | public XmlException(String message) { 14 | super(message); 15 | } 16 | 17 | public XmlException(String message, Throwable cause) { 18 | super (message, cause); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/service/GitHubService.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.service; 3 | 4 | 5 | public class GitHubService { 6 | 7 | public GitHubService() {} 8 | 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/utils/Stopwatch.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.utils; 3 | 4 | 5 | public class Stopwatch { 6 | 7 | private long startTime; 8 | 9 | public Stopwatch() { 10 | reset(); 11 | } 12 | 13 | public final void reset() { 14 | startTime = System.currentTimeMillis(); 15 | } 16 | 17 | public long getTime() { 18 | return System.currentTimeMillis() - startTime; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/battlescribedata/viewmodel/ResponseVm.java: -------------------------------------------------------------------------------- 1 | 2 | package org.battlescribedata.viewmodel; 3 | 4 | 5 | public class ResponseVm { 6 | 7 | private String errorMessage; 8 | private String successMessage; 9 | private String responseUrl; 10 | 11 | public String getErrorMessage() { 12 | return errorMessage; 13 | } 14 | 15 | public void setErrorMessage(String errorMessage) { 16 | this.errorMessage = errorMessage; 17 | } 18 | 19 | public String getSuccessMessage() { 20 | return successMessage; 21 | } 22 | 23 | public void setSuccessMessage(String successMessage) { 24 | this.successMessage = successMessage; 25 | } 26 | 27 | public String getResponseUrl() { 28 | return responseUrl; 29 | } 30 | 31 | public void setResponseUrl(String responseUrl) { 32 | this.responseUrl = responseUrl; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/Application.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Authorized application model class 19 | */ 20 | public class Application implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = 5675660442127228497L; 24 | 25 | private String name; 26 | 27 | private String url; 28 | 29 | /** 30 | * @return name 31 | */ 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | /** 37 | * @param name 38 | * @return this application 39 | */ 40 | public Application setName(String name) { 41 | this.name = name; 42 | return this; 43 | } 44 | 45 | /** 46 | * @return url 47 | */ 48 | public String getUrl() { 49 | return url; 50 | } 51 | 52 | /** 53 | * @param url 54 | * @return this application 55 | */ 56 | public Application setUrl(String url) { 57 | this.url = url; 58 | return this; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/Blob.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Blob model class 19 | */ 20 | public class Blob implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = -7538850340225102994L; 24 | 25 | /** 26 | * ENCODING_BASE64 27 | */ 28 | public static final String ENCODING_BASE64 = "base64"; //$NON-NLS-1$ 29 | 30 | /** 31 | * ENCODING_UTF8 32 | */ 33 | public static final String ENCODING_UTF8 = "utf-8"; //$NON-NLS-1$ 34 | 35 | private String content; 36 | 37 | private String encoding; 38 | 39 | /** 40 | * @return content 41 | */ 42 | public String getContent() { 43 | return content; 44 | } 45 | 46 | /** 47 | * @param content 48 | * @return this blob 49 | */ 50 | public Blob setContent(String content) { 51 | this.content = content; 52 | return this; 53 | } 54 | 55 | /** 56 | * @return encoding 57 | */ 58 | public String getEncoding() { 59 | return encoding; 60 | } 61 | 62 | /** 63 | * @param encoding 64 | * @return this blob 65 | */ 66 | public Blob setEncoding(String encoding) { 67 | this.encoding = encoding; 68 | return this; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/CommitStats.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Model class containing line differences introduced by a commit 19 | */ 20 | public class CommitStats implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = -4398346227258322028L; 24 | 25 | private int additions; 26 | 27 | private int deletions; 28 | 29 | private int total; 30 | 31 | /** 32 | * @return additions 33 | */ 34 | public int getAdditions() { 35 | return additions; 36 | } 37 | 38 | /** 39 | * @param additions 40 | * @return this commit stats 41 | */ 42 | public CommitStats setAdditions(int additions) { 43 | this.additions = additions; 44 | return this; 45 | } 46 | 47 | /** 48 | * @return deletions 49 | */ 50 | public int getDeletions() { 51 | return deletions; 52 | } 53 | 54 | /** 55 | * @param deletions 56 | * @return this commit stats 57 | */ 58 | public CommitStats setDeletions(int deletions) { 59 | this.deletions = deletions; 60 | return this; 61 | } 62 | 63 | /** 64 | * @return total 65 | */ 66 | public int getTotal() { 67 | return total; 68 | } 69 | 70 | /** 71 | * @param total 72 | * @return this commit stats 73 | */ 74 | public CommitStats setTotal(int total) { 75 | this.total = total; 76 | return this; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/CommitUser.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | import java.util.Date; 17 | 18 | import org.eclipse.egit.github.core.util.DateUtils; 19 | 20 | /** 21 | * Commit user model class 22 | */ 23 | public class CommitUser implements Serializable { 24 | 25 | /** serialVersionUID */ 26 | private static final long serialVersionUID = -180887492938484405L; 27 | 28 | private Date date; 29 | 30 | private String email; 31 | 32 | private String name; 33 | 34 | /** 35 | * @return date 36 | */ 37 | public Date getDate() { 38 | return DateUtils.clone(date); 39 | } 40 | 41 | /** 42 | * @param date 43 | * @return this commit user 44 | */ 45 | public CommitUser setDate(Date date) { 46 | this.date = DateUtils.clone(date); 47 | return this; 48 | } 49 | 50 | /** 51 | * @return email 52 | */ 53 | public String getEmail() { 54 | return email; 55 | } 56 | 57 | /** 58 | * @param email 59 | * @return this commit user 60 | */ 61 | public CommitUser setEmail(String email) { 62 | this.email = email; 63 | return this; 64 | } 65 | 66 | /** 67 | * @return name 68 | */ 69 | public String getName() { 70 | return name; 71 | } 72 | 73 | /** 74 | * @param name 75 | * @return this commit user 76 | */ 77 | public CommitUser setName(String name) { 78 | this.name = name; 79 | return this; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/GistChangeStatus.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Gist change status class. 19 | */ 20 | public class GistChangeStatus implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = 9189375293271905239L; 24 | 25 | private int additions; 26 | 27 | private int deletions; 28 | 29 | private int total; 30 | 31 | /** 32 | * @return additions 33 | */ 34 | public int getAdditions() { 35 | return additions; 36 | } 37 | 38 | /** 39 | * @param additions 40 | * @return this gist change status 41 | */ 42 | public GistChangeStatus setAdditions(int additions) { 43 | this.additions = additions; 44 | return this; 45 | } 46 | 47 | /** 48 | * @return deletions 49 | */ 50 | public int getDeletions() { 51 | return deletions; 52 | } 53 | 54 | /** 55 | * @param deletions 56 | * @return this gist change status 57 | */ 58 | public GistChangeStatus setDeletions(int deletions) { 59 | this.deletions = deletions; 60 | return this; 61 | } 62 | 63 | /** 64 | * @return total 65 | */ 66 | public int getTotal() { 67 | return total; 68 | } 69 | 70 | /** 71 | * @param total 72 | * @return this gist change status 73 | */ 74 | public GistChangeStatus setTotal(int total) { 75 | this.total = total; 76 | return this; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/GistFile.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Gist file class. 19 | */ 20 | public class GistFile implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = 2067939890126207032L; 24 | 25 | private int size; 26 | 27 | private String content; 28 | 29 | private String filename; 30 | 31 | private String rawUrl; 32 | 33 | /** 34 | * @return size 35 | */ 36 | public int getSize() { 37 | return size; 38 | } 39 | 40 | /** 41 | * @param size 42 | * @return this gist file 43 | */ 44 | public GistFile setSize(int size) { 45 | this.size = size; 46 | return this; 47 | } 48 | 49 | /** 50 | * @return content 51 | */ 52 | public String getContent() { 53 | return content; 54 | } 55 | 56 | /** 57 | * @param content 58 | * @return this gist file 59 | */ 60 | public GistFile setContent(String content) { 61 | this.content = content; 62 | return this; 63 | } 64 | 65 | /** 66 | * @return filename 67 | */ 68 | public String getFilename() { 69 | return filename; 70 | } 71 | 72 | /** 73 | * @param filename 74 | * @return this gist file 75 | */ 76 | public GistFile setFilename(String filename) { 77 | this.filename = filename; 78 | return this; 79 | } 80 | 81 | /** 82 | * @return rawUrl 83 | */ 84 | public String getRawUrl() { 85 | return rawUrl; 86 | } 87 | 88 | /** 89 | * @param rawUrl 90 | * @return this gist file 91 | */ 92 | public GistFile setRawUrl(String rawUrl) { 93 | this.rawUrl = rawUrl; 94 | return this; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/IRepositoryIdProvider.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | /** 16 | * Interface to provide an ID for a repository. This refers to the unique 17 | * identifier of any GitHub repository that is currently the owner and name of 18 | * the repository joined by a single '/'. 19 | */ 20 | public interface IRepositoryIdProvider { 21 | 22 | /** 23 | * Generate a repository id 24 | * 25 | * @return repository id 26 | */ 27 | String generateId(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/IResourceProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.util.List; 16 | 17 | /** 18 | * Interface for container classes that can provide a collection of resources of 19 | * the same type. 20 | * 21 | * @param 22 | */ 23 | public interface IResourceProvider { 24 | 25 | /** 26 | * Get collection of resources 27 | * 28 | * @return non-null but possibly empty collection 29 | */ 30 | List getResources(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/Id.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Id model class. 19 | */ 20 | public class Id implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = -1074145490136786429L; 24 | 25 | private String id; 26 | 27 | /** 28 | * Get id 29 | * 30 | * @return id 31 | */ 32 | public String getId() { 33 | return id; 34 | } 35 | 36 | /** 37 | * @param id 38 | * @return this id 39 | */ 40 | public Id setId(String id) { 41 | this.id = id; 42 | return this; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/Key.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Key model class. 19 | */ 20 | public class Key implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = -7763033793023520265L; 24 | 25 | private int id; 26 | 27 | private String key; 28 | 29 | private String title; 30 | 31 | private String url; 32 | 33 | /** 34 | * @return id 35 | */ 36 | public int getId() { 37 | return id; 38 | } 39 | 40 | /** 41 | * @param id 42 | * @return this deploy key 43 | */ 44 | public Key setId(int id) { 45 | this.id = id; 46 | return this; 47 | } 48 | 49 | /** 50 | * @return key 51 | */ 52 | public String getKey() { 53 | return key; 54 | } 55 | 56 | /** 57 | * @param key 58 | * @return this deploy key 59 | */ 60 | public Key setKey(String key) { 61 | this.key = key; 62 | return this; 63 | } 64 | 65 | /** 66 | * @return title 67 | */ 68 | public String getTitle() { 69 | return title; 70 | } 71 | 72 | /** 73 | * @param title 74 | * @return this deploy key 75 | */ 76 | public Key setTitle(String title) { 77 | this.title = title; 78 | return this; 79 | } 80 | 81 | /** 82 | * @return url 83 | */ 84 | public String getUrl() { 85 | return url; 86 | } 87 | 88 | /** 89 | * @param url 90 | * @return this deploy key 91 | */ 92 | public Key setUrl(String url) { 93 | this.url = url; 94 | return this; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/MergeStatus.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Pull request merge status model class. 19 | */ 20 | public class MergeStatus implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = 2003332803236436488L; 24 | 25 | private boolean merged; 26 | 27 | private String sha; 28 | 29 | private String message; 30 | 31 | /** 32 | * @return merged 33 | */ 34 | public boolean isMerged() { 35 | return merged; 36 | } 37 | 38 | /** 39 | * @param merged 40 | * @return this merge status 41 | */ 42 | public MergeStatus setMerged(boolean merged) { 43 | this.merged = merged; 44 | return this; 45 | } 46 | 47 | /** 48 | * @return sha 49 | */ 50 | public String getSha() { 51 | return sha; 52 | } 53 | 54 | /** 55 | * @param sha 56 | * @return this merge status 57 | */ 58 | public MergeStatus setSha(String sha) { 59 | this.sha = sha; 60 | return this; 61 | } 62 | 63 | /** 64 | * @return message 65 | */ 66 | public String getMessage() { 67 | return message; 68 | } 69 | 70 | /** 71 | * @param message 72 | * @return this merge status 73 | */ 74 | public MergeStatus setMessage(String message) { 75 | this.message = message; 76 | return this; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/Reference.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Reference model class 19 | */ 20 | public class Reference implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = -4092126502387796380L; 24 | 25 | private String ref; 26 | 27 | private String url; 28 | 29 | private TypedResource object; 30 | 31 | /** 32 | * @return ref 33 | */ 34 | public String getRef() { 35 | return ref; 36 | } 37 | 38 | /** 39 | * @param ref 40 | * @return this reference 41 | */ 42 | public Reference setRef(String ref) { 43 | this.ref = ref; 44 | return this; 45 | } 46 | 47 | /** 48 | * @return url 49 | */ 50 | public String getUrl() { 51 | return url; 52 | } 53 | 54 | /** 55 | * @param url 56 | * @return this reference 57 | */ 58 | public Reference setUrl(String url) { 59 | this.url = url; 60 | return this; 61 | } 62 | 63 | /** 64 | * @return object 65 | */ 66 | public TypedResource getObject() { 67 | return object; 68 | } 69 | 70 | /** 71 | * @param object 72 | * @return this reference 73 | */ 74 | public Reference setObject(TypedResource object) { 75 | this.object = object; 76 | return this; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/Rename.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2015 Jon Ander Peñalba . 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jon Ander Peñalba - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Rename model class 19 | */ 20 | public class Rename implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private final static long serialVersionUID = -4700399891066053425L; 24 | 25 | private String from; 26 | 27 | private String to; 28 | 29 | /** 30 | * @return from 31 | */ 32 | public String getFrom() { 33 | return from; 34 | } 35 | 36 | /** 37 | * @param from 38 | * @return this rename model 39 | */ 40 | public Rename setFrom(String from) { 41 | this.from = from; 42 | return this; 43 | } 44 | 45 | /** 46 | * @return to 47 | */ 48 | public String getTo() { 49 | return to; 50 | } 51 | 52 | /** 53 | * @param to 54 | * @return this rename model 55 | */ 56 | public Rename setTo(String to) { 57 | this.to = to; 58 | return this; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/RepositoryBranch.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Repository branch model class 19 | */ 20 | public class RepositoryBranch implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = 4927461901146433920L; 24 | 25 | private String name; 26 | 27 | private TypedResource commit; 28 | 29 | /** 30 | * @return name 31 | */ 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | /** 37 | * @param name 38 | * @return this branch 39 | */ 40 | public RepositoryBranch setName(String name) { 41 | this.name = name; 42 | return this; 43 | } 44 | 45 | /** 46 | * @return commit 47 | */ 48 | public TypedResource getCommit() { 49 | return commit; 50 | } 51 | 52 | /** 53 | * @param commit 54 | * @return this branch 55 | */ 56 | public RepositoryBranch setCommit(TypedResource commit) { 57 | this.commit = commit; 58 | return this; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/RepositoryHookResponse.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Repository hook response model class 19 | */ 20 | public class RepositoryHookResponse implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = -1168379336046512838L; 24 | 25 | private int code; 26 | 27 | private String message; 28 | 29 | /** 30 | * @return code 31 | */ 32 | public int getCode() { 33 | return code; 34 | } 35 | 36 | /** 37 | * @param code 38 | * @return this repsonse 39 | */ 40 | public RepositoryHookResponse setCode(int code) { 41 | this.code = code; 42 | return this; 43 | } 44 | 45 | /** 46 | * @return message 47 | */ 48 | public String getMessage() { 49 | return message; 50 | } 51 | 52 | /** 53 | * @param message 54 | * @return this response 55 | */ 56 | public RepositoryHookResponse setMessage(String message) { 57 | this.message = message; 58 | return this; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/RepositoryIssue.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2012 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import org.eclipse.egit.github.core.service.IssueService; 16 | 17 | /** 18 | * Extension of {@link Issue} that includes the {@link Repository} that the 19 | * issue is in. 20 | *

21 | * This type of issue is returned from {@link IssueService} calls that don't 22 | * require an {@link IRepositoryIdProvider} to be specified and therefore the 23 | * repository information is needed to correlate which issues occur in which 24 | * repositories. 25 | */ 26 | public class RepositoryIssue extends Issue { 27 | 28 | private static final long serialVersionUID = 6219926097588214812L; 29 | 30 | private Repository repository; 31 | 32 | /** 33 | * @return repository 34 | */ 35 | public Repository getRepository() { 36 | return repository; 37 | } 38 | 39 | /** 40 | * @param repository 41 | * @return this issue 42 | */ 43 | public RepositoryIssue setRepository(Repository repository) { 44 | this.repository = repository; 45 | return this; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/RepositoryMerging.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2018 Frédéric Cilia 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Frédéric Cilia - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Repository merging model class 19 | * 20 | * @since 5.3 21 | */ 22 | public class RepositoryMerging implements Serializable { 23 | 24 | private static final long serialVersionUID = 6179934015396875505L; 25 | 26 | private String base; 27 | 28 | private String head; 29 | 30 | private String commitMessage; 31 | 32 | /** 33 | * @return base 34 | */ 35 | public String getBase() { 36 | return base; 37 | } 38 | 39 | /** 40 | * @param base 41 | * @return this merge 42 | */ 43 | public RepositoryMerging setBase(String base) { 44 | this.base = base; 45 | return this; 46 | } 47 | 48 | /** 49 | * @return head 50 | */ 51 | public String getHead() { 52 | return head; 53 | } 54 | 55 | /** 56 | * @param head 57 | * @return this merge 58 | */ 59 | public RepositoryMerging setHead(String head) { 60 | this.head = head; 61 | return this; 62 | } 63 | 64 | /** 65 | * @return commitMessage 66 | */ 67 | public String getCommitMessage() { 68 | return commitMessage; 69 | } 70 | 71 | /** 72 | * @param commitMessage 73 | * @return this merge 74 | */ 75 | public RepositoryMerging setCommitMessage(String commitMessage) { 76 | this.commitMessage = commitMessage; 77 | return this; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/RepositoryTag.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Repository tag model class 19 | */ 20 | public class RepositoryTag implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = 1070566274663989459L; 24 | 25 | private String name; 26 | 27 | private String tarballUrl; 28 | 29 | private String zipballUrl; 30 | 31 | private TypedResource commit; 32 | 33 | /** 34 | * @return name 35 | */ 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | /** 41 | * @param name 42 | * @return this tag 43 | */ 44 | public RepositoryTag setName(String name) { 45 | this.name = name; 46 | return this; 47 | } 48 | 49 | /** 50 | * @return tarballUrl 51 | */ 52 | public String getTarballUrl() { 53 | return tarballUrl; 54 | } 55 | 56 | /** 57 | * @param tarballUrl 58 | * @return this tag 59 | */ 60 | public RepositoryTag setTarballUrl(String tarballUrl) { 61 | this.tarballUrl = tarballUrl; 62 | return this; 63 | } 64 | 65 | /** 66 | * @return zipballUrl 67 | */ 68 | public String getZipballUrl() { 69 | return zipballUrl; 70 | } 71 | 72 | /** 73 | * @param zipballUrl 74 | * @return this tag 75 | */ 76 | public RepositoryTag setZipballUrl(String zipballUrl) { 77 | this.zipballUrl = zipballUrl; 78 | return this; 79 | } 80 | 81 | /** 82 | * @return commit 83 | */ 84 | public TypedResource getCommit() { 85 | return commit; 86 | } 87 | 88 | /** 89 | * @param commit 90 | * @return this tag 91 | */ 92 | public RepositoryTag setCommit(TypedResource commit) { 93 | this.commit = commit; 94 | return this; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/RequestError.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | import java.util.List; 17 | 18 | /** 19 | * GitHub request error class 20 | */ 21 | public class RequestError implements Serializable { 22 | 23 | /** serialVersionUID */ 24 | private static final long serialVersionUID = -7842670602124573940L; 25 | 26 | // This field is required for legacy v2 error support 27 | private String error; 28 | 29 | private String message; 30 | 31 | private List errors; 32 | 33 | /** 34 | * @return message 35 | */ 36 | public String getMessage() { 37 | return message != null ? message : error; 38 | } 39 | 40 | /** 41 | * Get errors 42 | * 43 | * @return list of errors 44 | */ 45 | public List getErrors() { 46 | return errors; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/ShaResource.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Model class for resources identified by a SHA-1 19 | */ 20 | public class ShaResource implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = 7029184412278953778L; 24 | 25 | private String sha; 26 | 27 | /** 28 | * @return sha 29 | */ 30 | public String getSha() { 31 | return sha; 32 | } 33 | 34 | /** 35 | * @param sha 36 | * @return this resource 37 | */ 38 | public ShaResource setSha(String sha) { 39 | this.sha = sha; 40 | return this; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/TeamMembership.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2014, 2015 Arizona Board of Regents 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Michael Mathews (Arizona Board of Regents) - (Bug: 447419) 12 | * Team Membership API implementation 13 | *****************************************************************************/ 14 | package org.eclipse.egit.github.core; 15 | 16 | import java.io.Serializable; 17 | 18 | /** 19 | * Team Membership model class. 20 | */ 21 | public class TeamMembership implements Serializable { 22 | 23 | private static final long serialVersionUID = -8207728181588115431L; 24 | 25 | /** 26 | * The possible states of a Team Membership 27 | */ 28 | public static enum TeamMembershipState { 29 | /** Active member. */ 30 | ACTIVE, 31 | /** Not yet active member. */ 32 | PENDING; 33 | } 34 | 35 | private TeamMembershipState state; 36 | 37 | private String url; 38 | 39 | /** 40 | * @return state 41 | */ 42 | public TeamMembershipState getState() { 43 | return state; 44 | } 45 | 46 | /** 47 | * @param state 48 | */ 49 | public void setState(TeamMembershipState state) { 50 | this.state = state; 51 | } 52 | 53 | /** 54 | * @return url 55 | */ 56 | public String getUrl() { 57 | return url; 58 | } 59 | 60 | /** 61 | * @param url 62 | */ 63 | public void setUrl(String url) { 64 | this.url = url; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/Tree.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | import java.util.List; 17 | 18 | /** 19 | * Tree model class 20 | */ 21 | public class Tree implements Serializable { 22 | 23 | /** serialVersionUID */ 24 | private static final long serialVersionUID = 6518261551932913340L; 25 | 26 | private List tree; 27 | 28 | private String sha; 29 | 30 | private String url; 31 | 32 | /** 33 | * @return tree 34 | */ 35 | public List getTree() { 36 | return tree; 37 | } 38 | 39 | /** 40 | * @param tree 41 | * @return this tree 42 | */ 43 | public Tree setTree(List tree) { 44 | this.tree = tree; 45 | return this; 46 | } 47 | 48 | /** 49 | * @return sha 50 | */ 51 | public String getSha() { 52 | return sha; 53 | } 54 | 55 | /** 56 | * @param sha 57 | * @return this tree 58 | */ 59 | public Tree setSha(String sha) { 60 | this.sha = sha; 61 | return this; 62 | } 63 | 64 | /** 65 | * @return url 66 | */ 67 | public String getUrl() { 68 | return url; 69 | } 70 | 71 | /** 72 | * @param url 73 | * @return this tree 74 | */ 75 | public Tree setUrl(String url) { 76 | this.url = url; 77 | return this; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/TypedResource.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | /** 16 | * Resource that has type and URL fields 17 | */ 18 | public class TypedResource extends ShaResource { 19 | 20 | /** serialVersionUID */ 21 | private static final long serialVersionUID = -7285665432528832240L; 22 | 23 | /** 24 | * TYPE_COMMIT 25 | */ 26 | public static final String TYPE_COMMIT = "commit"; //$NON-NLS-1$ 27 | 28 | /** 29 | * TYPE_TAG 30 | */ 31 | public static final String TYPE_TAG = "tag"; //$NON-NLS-1$ 32 | 33 | /** 34 | * TYPE_BLOB 35 | */ 36 | public static final String TYPE_BLOB = "blob"; //$NON-NLS-1$ 37 | 38 | private String type; 39 | 40 | private String url; 41 | 42 | /** 43 | * @return type 44 | */ 45 | public String getType() { 46 | return type; 47 | } 48 | 49 | /** 50 | * @param type 51 | * @return this resource 52 | */ 53 | public TypedResource setType(String type) { 54 | this.type = type; 55 | return this; 56 | } 57 | 58 | /** 59 | * @return url 60 | */ 61 | public String getUrl() { 62 | return url; 63 | } 64 | 65 | /** 66 | * @param url 67 | * @return this resource 68 | */ 69 | public TypedResource setUrl(String url) { 70 | this.url = url; 71 | return this; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/UserPlan.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * User plan model class. 19 | */ 20 | public class UserPlan implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = 4759542049129654659L; 24 | 25 | private long collaborators; 26 | 27 | private long privateRepos; 28 | 29 | private long space; 30 | 31 | private String name; 32 | 33 | /** 34 | * @return collaborators 35 | */ 36 | public long getCollaborators() { 37 | return collaborators; 38 | } 39 | 40 | /** 41 | * @param collaborators 42 | * @return this user plan 43 | */ 44 | public UserPlan setCollaborators(long collaborators) { 45 | this.collaborators = collaborators; 46 | return this; 47 | } 48 | 49 | /** 50 | * @return privateRepos 51 | */ 52 | public long getPrivateRepos() { 53 | return privateRepos; 54 | } 55 | 56 | /** 57 | * @param privateRepos 58 | * @return this user plan 59 | */ 60 | public UserPlan setPrivateRepos(long privateRepos) { 61 | this.privateRepos = privateRepos; 62 | return this; 63 | } 64 | 65 | /** 66 | * @return space 67 | */ 68 | public long getSpace() { 69 | return space; 70 | } 71 | 72 | /** 73 | * @param space 74 | * @return this user plan 75 | */ 76 | public UserPlan setSpace(long space) { 77 | this.space = space; 78 | return this; 79 | } 80 | 81 | /** 82 | * @return name 83 | */ 84 | public String getName() { 85 | return name; 86 | } 87 | 88 | /** 89 | * @param name 90 | * @return this user plan 91 | */ 92 | public UserPlan setName(String name) { 93 | this.name = name; 94 | return this; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/client/NoSuchPageException.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core.client; 14 | 15 | import java.io.IOException; 16 | import java.util.NoSuchElementException; 17 | 18 | /** 19 | * Exception class to be thrown when iterating over pages fails. This exception 20 | * wraps an {@link IOException} that is the actual exception that occurred when 21 | * the page request was made. 22 | */ 23 | public class NoSuchPageException extends NoSuchElementException { 24 | 25 | /** 26 | * serialVersionUID 27 | */ 28 | private static final long serialVersionUID = 6795637952359586293L; 29 | 30 | /** 31 | * Cause exception 32 | */ 33 | protected final IOException cause; 34 | 35 | /** 36 | * Create no such page exception 37 | * 38 | * @param cause 39 | */ 40 | public NoSuchPageException(IOException cause) { 41 | this.cause = cause; 42 | } 43 | 44 | @Override 45 | public String getMessage() { 46 | return cause != null ? cause.getMessage() : super.getMessage(); 47 | } 48 | 49 | @Override 50 | public IOException getCause() { 51 | return cause; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/CommitCommentPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.CommitComment; 16 | 17 | /** 18 | * CommitCommentEvent payload model class. 19 | */ 20 | public class CommitCommentPayload extends EventPayload { 21 | 22 | private static final long serialVersionUID = -2606554911096551099L; 23 | 24 | private CommitComment comment; 25 | 26 | /** 27 | * @return comment 28 | */ 29 | public CommitComment getComment() { 30 | return comment; 31 | } 32 | 33 | /** 34 | * @param comment 35 | * @return this CommitCommentPayload 36 | */ 37 | public CommitCommentPayload setComment(CommitComment comment) { 38 | this.comment = comment; 39 | return this; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/CreatePayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | /** 16 | * CreateEvent payload model class. 17 | */ 18 | public class CreatePayload extends EventPayload { 19 | 20 | private static final long serialVersionUID = -7033027645721954674L; 21 | 22 | private String refType; 23 | 24 | private String ref; 25 | 26 | private String masterBranch; 27 | 28 | private String description; 29 | 30 | /** 31 | * @return refType 32 | */ 33 | public String getRefType() { 34 | return refType; 35 | } 36 | 37 | /** 38 | * @param refType 39 | * @return this CreatePayload 40 | */ 41 | public CreatePayload setRefType(String refType) { 42 | this.refType = refType; 43 | return this; 44 | } 45 | 46 | /** 47 | * @return ref 48 | */ 49 | public String getRef() { 50 | return ref; 51 | } 52 | 53 | /** 54 | * @param ref 55 | * @return this CreatePayload 56 | */ 57 | public CreatePayload setRef(String ref) { 58 | this.ref = ref; 59 | return this; 60 | } 61 | 62 | /** 63 | * @return masterBranch 64 | */ 65 | public String getMasterBranch() { 66 | return masterBranch; 67 | } 68 | 69 | /** 70 | * @param masterBranch 71 | * @return this CreatePayload 72 | */ 73 | public CreatePayload setMasterBranch(String masterBranch) { 74 | this.masterBranch = masterBranch; 75 | return this; 76 | } 77 | 78 | /** 79 | * @return description 80 | */ 81 | public String getDescription() { 82 | return description; 83 | } 84 | 85 | /** 86 | * @param description 87 | * @return this CreatePayload 88 | */ 89 | public CreatePayload setDescription(String description) { 90 | this.description = description; 91 | return this; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/DeletePayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | /** 16 | * DeleteEvent payload model class. 17 | */ 18 | public class DeletePayload extends EventPayload { 19 | 20 | private static final long serialVersionUID = -7571623946339106873L; 21 | 22 | private String refType; 23 | 24 | private String ref; 25 | 26 | /** 27 | * @return refType 28 | */ 29 | public String getRefType() { 30 | return refType; 31 | } 32 | 33 | /** 34 | * @param refType 35 | * @return this DeletePayload 36 | */ 37 | public DeletePayload setRefType(String refType) { 38 | this.refType = refType; 39 | return this; 40 | } 41 | 42 | /** 43 | * @return ref 44 | */ 45 | public String getRef() { 46 | return ref; 47 | } 48 | 49 | /** 50 | * @param ref 51 | * @return this DeletePayload 52 | */ 53 | public DeletePayload setRef(String ref) { 54 | this.ref = ref; 55 | return this; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/DownloadPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.Download; 16 | 17 | /** 18 | * DownloadEvent payload model class. 19 | */ 20 | public class DownloadPayload extends EventPayload { 21 | 22 | private static final long serialVersionUID = 4246935370658381214L; 23 | 24 | private Download download; 25 | 26 | /** 27 | * @return download 28 | */ 29 | public Download getDownload() { 30 | return download; 31 | } 32 | 33 | /** 34 | * @param download 35 | * @return this DownloadPayload 36 | */ 37 | public DownloadPayload setDownload(Download download) { 38 | this.download = download; 39 | return this; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/EventPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Parent class for event payloads 19 | * 20 | * @see GitHub Event types 21 | * API documentation 22 | */ 23 | public class EventPayload implements Serializable { 24 | 25 | private static final long serialVersionUID = 1022083387039340606L; 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/EventRepository.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import java.io.Serializable; 16 | 17 | /** 18 | * Model class for repository information contained in an {@link Event} 19 | */ 20 | public class EventRepository implements Serializable { 21 | 22 | /** serialVersionUID */ 23 | private static final long serialVersionUID = -8910798454171899699L; 24 | 25 | private long id; 26 | 27 | private String name; 28 | 29 | private String url; 30 | 31 | /** 32 | * @return id 33 | */ 34 | public long getId() { 35 | return id; 36 | } 37 | 38 | /** 39 | * @param id 40 | * @return this event repository 41 | */ 42 | public EventRepository setId(long id) { 43 | this.id = id; 44 | return this; 45 | } 46 | 47 | /** 48 | * @return name 49 | */ 50 | public String getName() { 51 | return name; 52 | } 53 | 54 | /** 55 | * @param name 56 | * @return this event repository 57 | */ 58 | public EventRepository setName(String name) { 59 | this.name = name; 60 | return this; 61 | } 62 | 63 | /** 64 | * @return url 65 | */ 66 | public String getUrl() { 67 | return url; 68 | } 69 | 70 | /** 71 | * @param url 72 | * @return this event repository 73 | */ 74 | public EventRepository setUrl(String url) { 75 | this.url = url; 76 | return this; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/FollowPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.User; 16 | 17 | /** 18 | * FollowEvent payload model class. 19 | */ 20 | public class FollowPayload extends EventPayload { 21 | 22 | private static final long serialVersionUID = -4345668254608800406L; 23 | 24 | private User target; 25 | 26 | /** 27 | * @return target 28 | */ 29 | public User getTarget() { 30 | return target; 31 | } 32 | 33 | /** 34 | * @param target 35 | * @return this FollowPayload 36 | */ 37 | public FollowPayload setTarget(User target) { 38 | this.target = target; 39 | return this; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/ForkApplyPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | /** 16 | * ForkApplyEvent payload model class. 17 | */ 18 | public class ForkApplyPayload extends EventPayload { 19 | 20 | private static final long serialVersionUID = -7527740351672699770L; 21 | 22 | private String head; 23 | 24 | private String before; 25 | 26 | private String after; 27 | 28 | /** 29 | * @return head 30 | */ 31 | public String getHead() { 32 | return head; 33 | } 34 | 35 | /** 36 | * @param head 37 | * @return this ForkApplyPayload 38 | */ 39 | public ForkApplyPayload setHead(String head) { 40 | this.head = head; 41 | return this; 42 | } 43 | 44 | /** 45 | * @return before 46 | */ 47 | public String getBefore() { 48 | return before; 49 | } 50 | 51 | /** 52 | * @param before 53 | * @return this ForkApplyPayload 54 | */ 55 | public ForkApplyPayload setBefore(String before) { 56 | this.before = before; 57 | return this; 58 | } 59 | 60 | /** 61 | * @return after 62 | */ 63 | public String getAfter() { 64 | return after; 65 | } 66 | 67 | /** 68 | * @param after 69 | * @return this ForkApplyPayload 70 | */ 71 | public ForkApplyPayload setAfter(String after) { 72 | this.after = after; 73 | return this; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/ForkPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.Repository; 16 | 17 | /** 18 | * ForkEvent payload model class. 19 | */ 20 | public class ForkPayload extends EventPayload { 21 | 22 | private static final long serialVersionUID = 2110456722558520113L; 23 | 24 | private Repository forkee; 25 | 26 | /** 27 | * @return forkee 28 | */ 29 | public Repository getForkee() { 30 | return forkee; 31 | } 32 | 33 | /** 34 | * @param forkee 35 | * @return this ForkPayload 36 | */ 37 | public ForkPayload setForkee(Repository forkee) { 38 | this.forkee = forkee; 39 | return this; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/GistPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.Gist; 16 | 17 | /** 18 | * GistEvent payload model class. 19 | */ 20 | public class GistPayload extends EventPayload { 21 | 22 | private static final long serialVersionUID = 8916400800708594462L; 23 | 24 | private String action; 25 | 26 | private Gist gist; 27 | 28 | /** 29 | * @return action 30 | */ 31 | public String getAction() { 32 | return action; 33 | } 34 | 35 | /** 36 | * @param action 37 | * @return this GistPayload 38 | */ 39 | public GistPayload setAction(String action) { 40 | this.action = action; 41 | return this; 42 | } 43 | 44 | /** 45 | * @return gist 46 | */ 47 | public Gist getGist() { 48 | return gist; 49 | } 50 | 51 | /** 52 | * @param gist 53 | * @return this GistPayload 54 | */ 55 | public GistPayload setGist(Gist gist) { 56 | this.gist = gist; 57 | return this; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/GollumPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import java.util.List; 16 | 17 | import org.eclipse.egit.github.core.GollumPage; 18 | 19 | /** 20 | * GollumEvent payload model class. 21 | */ 22 | public class GollumPayload extends EventPayload { 23 | 24 | private static final long serialVersionUID = 7111499446827257290L; 25 | 26 | private List pages; 27 | 28 | /** 29 | * @return pages 30 | */ 31 | public List getPages() { 32 | return pages; 33 | } 34 | 35 | /** 36 | * @param pages 37 | * @return this GollumPayload 38 | */ 39 | public GollumPayload setPages(List pages) { 40 | this.pages = pages; 41 | return this; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/IssueCommentPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.Comment; 16 | import org.eclipse.egit.github.core.Issue; 17 | 18 | /** 19 | * IssueCommentEvent payload model class. 20 | */ 21 | public class IssueCommentPayload extends EventPayload { 22 | 23 | private static final long serialVersionUID = 2661548417314120170L; 24 | 25 | private String action; 26 | 27 | private Issue issue; 28 | 29 | private Comment comment; 30 | 31 | /** 32 | * @return action 33 | */ 34 | public String getAction() { 35 | return action; 36 | } 37 | 38 | /** 39 | * @param action 40 | * @return this IssueCommentPayload 41 | */ 42 | public IssueCommentPayload setAction(String action) { 43 | this.action = action; 44 | return this; 45 | } 46 | 47 | /** 48 | * @return issue 49 | */ 50 | public Issue getIssue() { 51 | return issue; 52 | } 53 | 54 | /** 55 | * @param issue 56 | * @return this IssueCommentPayload 57 | */ 58 | public IssueCommentPayload setIssue(Issue issue) { 59 | this.issue = issue; 60 | return this; 61 | } 62 | 63 | /** 64 | * @return comment 65 | */ 66 | public Comment getComment() { 67 | return comment; 68 | } 69 | 70 | /** 71 | * @param comment 72 | * @return this IssueCommentPayload 73 | */ 74 | public IssueCommentPayload setComment(Comment comment) { 75 | this.comment = comment; 76 | return this; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/IssuesPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.Issue; 16 | 17 | /** 18 | * IssuesEvent payload model class. 19 | */ 20 | public class IssuesPayload extends EventPayload { 21 | 22 | private static final long serialVersionUID = 3210795492806809443L; 23 | 24 | private String action; 25 | 26 | private Issue issue; 27 | 28 | /** 29 | * @return action 30 | */ 31 | public String getAction() { 32 | return action; 33 | } 34 | 35 | /** 36 | * @param action 37 | * @return this IssuesPayload 38 | */ 39 | public IssuesPayload setAction(String action) { 40 | this.action = action; 41 | return this; 42 | } 43 | 44 | /** 45 | * @return issue 46 | */ 47 | public Issue getIssue() { 48 | return issue; 49 | } 50 | 51 | /** 52 | * @param issue 53 | * @return this IssuesPayload 54 | */ 55 | public IssuesPayload setIssue(Issue issue) { 56 | this.issue = issue; 57 | return this; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/MemberPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.User; 16 | 17 | /** 18 | * MemberEvent payload model class. 19 | */ 20 | public class MemberPayload extends EventPayload { 21 | 22 | private static final long serialVersionUID = -4261757812093447848L; 23 | 24 | private User member; 25 | 26 | private String action; 27 | 28 | /** 29 | * @return member 30 | */ 31 | public User getMember() { 32 | return member; 33 | } 34 | 35 | /** 36 | * @param member 37 | * @return this MemberPayload 38 | */ 39 | public MemberPayload setMember(User member) { 40 | this.member = member; 41 | return this; 42 | } 43 | 44 | /** 45 | * @return action 46 | */ 47 | public String getAction() { 48 | return action; 49 | } 50 | 51 | /** 52 | * @param action 53 | * @return this MemberPayload 54 | */ 55 | public MemberPayload setAction(String action) { 56 | this.action = action; 57 | return this; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/PublicPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | /** 16 | * PublicEvent payload model class. 17 | */ 18 | public class PublicPayload extends EventPayload { 19 | 20 | private static final long serialVersionUID = 5262549236565872052L; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/PullRequestPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | 14 | package org.eclipse.egit.github.core.event; 15 | 16 | import org.eclipse.egit.github.core.PullRequest; 17 | 18 | /** 19 | * PullRequestEvent payload model class. 20 | */ 21 | public class PullRequestPayload extends EventPayload { 22 | 23 | private static final long serialVersionUID = -8234504270587265625L; 24 | 25 | private String action; 26 | 27 | private int number; 28 | 29 | private PullRequest pullRequest; 30 | 31 | /** 32 | * @return action 33 | */ 34 | public String getAction() { 35 | return action; 36 | } 37 | 38 | /** 39 | * @param action 40 | * @return this PullRequestPayload 41 | */ 42 | public PullRequestPayload setAction(String action) { 43 | this.action = action; 44 | return this; 45 | } 46 | 47 | /** 48 | * @return number 49 | */ 50 | public int getNumber() { 51 | return number; 52 | } 53 | 54 | /** 55 | * @param number 56 | * @return this PullRequestPayload 57 | */ 58 | public PullRequestPayload setNumber(int number) { 59 | this.number = number; 60 | return this; 61 | } 62 | 63 | /** 64 | * @return pullRequest 65 | */ 66 | public PullRequest getPullRequest() { 67 | return pullRequest; 68 | } 69 | 70 | /** 71 | * @param pullRequest 72 | * @return this PullRequestPayload 73 | */ 74 | public PullRequestPayload setPullRequest(PullRequest pullRequest) { 75 | this.pullRequest = pullRequest; 76 | return this; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/PullRequestReviewCommentPayload.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2012 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.CommitComment; 16 | import org.eclipse.egit.github.core.PullRequest; 17 | 18 | /** 19 | * Payload for an event with type {@link Event#TYPE_PULL_REQUEST_REVIEW_COMMENT} 20 | */ 21 | public class PullRequestReviewCommentPayload extends EventPayload { 22 | 23 | private static final long serialVersionUID = -2403658752886394741L; 24 | 25 | private String action; 26 | 27 | private CommitComment comment; 28 | 29 | private PullRequest pullRequest; 30 | 31 | /** 32 | * @return action 33 | * @since 4.1 34 | */ 35 | public String getAction() { 36 | return action; 37 | } 38 | 39 | /** 40 | * @param action 41 | * @return this PullRequestReviewCommentPayload 42 | * @since 4.1 43 | */ 44 | public PullRequestReviewCommentPayload setAction(String action) { 45 | this.action = action; 46 | return this; 47 | } 48 | 49 | /** 50 | * @return comment 51 | */ 52 | public CommitComment getComment() { 53 | return comment; 54 | } 55 | 56 | /** 57 | * @param comment 58 | * @return this payload 59 | */ 60 | public PullRequestReviewCommentPayload setComment(CommitComment comment) { 61 | this.comment = comment; 62 | return this; 63 | } 64 | 65 | /** 66 | * @return pullRequest 67 | * @since 4.1 68 | */ 69 | public PullRequest getPullRequest() { 70 | return pullRequest; 71 | } 72 | 73 | /** 74 | * @param pullRequest 75 | * @return this PullRequestReviewCommentPayload 76 | * @since 4.1 77 | */ 78 | public PullRequestReviewCommentPayload setPullRequest(PullRequest pullRequest) { 79 | this.pullRequest = pullRequest; 80 | return this; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/ReleasePayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2015 Jon Ander Peñalba . 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jon Ander Peñalba - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.Release; 16 | 17 | /** 18 | * ReleaseEvent payload model class. 19 | * @since 4.2 20 | */ 21 | public class ReleasePayload extends EventPayload { 22 | 23 | private static final long serialVersionUID = 3309944674574815351L; 24 | 25 | private String action; 26 | 27 | private Release release; 28 | 29 | /** 30 | * @return action 31 | */ 32 | public String getAction() { 33 | return action; 34 | } 35 | 36 | /** 37 | * @param action 38 | * @return this ReleasePayload 39 | */ 40 | public ReleasePayload setAction(String action) { 41 | this.action = action; 42 | return this; 43 | } 44 | 45 | /** 46 | * @return release 47 | */ 48 | public Release getRelease() { 49 | return release; 50 | } 51 | 52 | /** 53 | * @param release 54 | * @return this ReleasePayload 55 | */ 56 | public ReleasePayload setRelease(Release release) { 57 | this.release = release; 58 | return this; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/TeamAddPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | import org.eclipse.egit.github.core.Repository; 16 | import org.eclipse.egit.github.core.Team; 17 | import org.eclipse.egit.github.core.User; 18 | 19 | /** 20 | * TeamAddEvent payload model class 21 | */ 22 | public class TeamAddPayload extends EventPayload { 23 | 24 | private static final long serialVersionUID = 7660176723347977144L; 25 | 26 | private Team team; 27 | 28 | private User user; 29 | 30 | private Repository repo; 31 | 32 | /** 33 | * @return team 34 | */ 35 | public Team getTeam() { 36 | return team; 37 | } 38 | 39 | /** 40 | * @param team 41 | * @return this TeamAddPayload 42 | */ 43 | public TeamAddPayload setTeam(Team team) { 44 | this.team = team; 45 | return this; 46 | } 47 | 48 | /** 49 | * @return user 50 | */ 51 | public User getUser() { 52 | return user; 53 | } 54 | 55 | /** 56 | * @param user 57 | * @return this TeamAddPayload 58 | */ 59 | public TeamAddPayload setUser(User user) { 60 | this.user = user; 61 | return this; 62 | } 63 | 64 | /** 65 | * @return repo 66 | */ 67 | public Repository getRepo() { 68 | return repo; 69 | } 70 | 71 | /** 72 | * @param repo 73 | * @return this TeamAddPayload 74 | */ 75 | public TeamAddPayload setRepo(Repository repo) { 76 | this.repo = repo; 77 | return this; 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/event/WatchPayload.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Jason Tsay (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.event; 14 | 15 | /** 16 | * WatchEvent payload model class. 17 | */ 18 | public class WatchPayload extends EventPayload { 19 | 20 | private static final long serialVersionUID = -1600566006173513492L; 21 | 22 | private String action; 23 | 24 | /** 25 | * @return action 26 | */ 27 | public String getAction() { 28 | return action; 29 | } 30 | 31 | /** 32 | * @param action 33 | * @return this WatchPayload 34 | */ 35 | public WatchPayload setAction(String action) { 36 | this.action = action; 37 | return this; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/util/DateUtils.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core.util; 14 | 15 | import java.util.Date; 16 | 17 | /** 18 | * Date utilities 19 | */ 20 | public final class DateUtils { 21 | 22 | private DateUtils() { 23 | // utility class 24 | } 25 | 26 | /** 27 | * Clone date if non-null 28 | * 29 | * @param date 30 | * @return copied date 31 | */ 32 | public static Date clone(final Date date) { 33 | if (date == null) 34 | return null; 35 | return new Date(date.getTime()); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/util/EncodingUtils.java: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *****************************************************************************/ 13 | package org.eclipse.egit.github.core.util; 14 | 15 | import static org.eclipse.egit.github.core.client.IGitHubConstants.CHARSET_UTF8; 16 | 17 | import java.io.UnsupportedEncodingException; 18 | 19 | /** 20 | * Encoding utilities 21 | */ 22 | public final class EncodingUtils { 23 | 24 | private EncodingUtils() { 25 | // utility class 26 | } 27 | 28 | /** 29 | * Decode base64 encoded string 30 | * 31 | * @param content 32 | * @return byte array 33 | */ 34 | public static final byte[] fromBase64(final String content) { 35 | return Base64.decode(content); 36 | } 37 | 38 | /** 39 | * Base64 encode given byte array 40 | * 41 | * @param content 42 | * @return byte array 43 | */ 44 | public static final String toBase64(final byte[] content) { 45 | return Base64.encodeBytes(content); 46 | } 47 | 48 | /** 49 | * Base64 encode given byte array 50 | * 51 | * @param content 52 | * @return byte array 53 | */ 54 | public static final String toBase64(final String content) { 55 | byte[] bytes; 56 | try { 57 | bytes = content.getBytes(CHARSET_UTF8); 58 | } catch (UnsupportedEncodingException e) { 59 | bytes = content.getBytes(); 60 | } 61 | return toBase64(bytes); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/org/eclipse/egit/github/core/util/LabelComparator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2011 GitHub Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Kevin Sawicki (GitHub Inc.) - initial API and implementation 12 | *******************************************************************************/ 13 | package org.eclipse.egit.github.core.util; 14 | 15 | import java.io.Serializable; 16 | import java.util.Comparator; 17 | 18 | import org.eclipse.egit.github.core.Label; 19 | 20 | /** 21 | * Label comparator using case-insensitive name comparisons. 22 | */ 23 | public class LabelComparator implements Comparator

All Repositories

4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | This data requires BattleScribe version {{m.battleScribeVersion}} or above. 12 |
13 | Get the latest version from the BattleScribe downloads page. 14 |
15 | 16 | 17 |
18 |

19 | The data files are currently being loaded. This may take some time. Please try again in a few minutes. 20 |

21 | 22 |

23 | There was an error getting the data files. The site may be overloaded right now. Please try again later. 24 |

25 |
26 | 27 | 38 | --------------------------------------------------------------------------------