- Notifications
You must be signed in to change notification settings - Fork0
PSA Report API to generate reports for Sporttag PSA.
License
BilledTrain380/PRA
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
PRA is an api specification to generate reports for theSporttag PSA.
This api provides a factory class to get the specific implementation. Make sure an implementationof PRA is in your dependency list.
privateTotalRankingApiapi =newReportApiFactory.getTotalRanking();
The following APIs are available:
- discipline group ranking api - to generate ranking for specific disciplines
- discipline ranking api - to generate ranking for a single discipline
- total ranking api - to generate the total ranking for all disciplines
- participant list api - to generate a participant list of a single sport
- event sheet api - to generate sheets for a discipline to fill in the results of competitors
- start list api - to generate a start list of the competitors
To implement your own report generation you have to add this project as a dependency to your report project.This project is not available on any public repository expect Github. I recommend to useJitPack to add this project as a dependency.
Step 1. Add the JitPack repository to your build file
Add it into your rootbuild.gradle
at the end of repositories:
allprojects { repositories {... maven { url'https://jitpack.io' } }}
Step 2. Add PRA dependency
dependencies { compile'com.github.BilledTrain380:PRA:1.0.0'}
Step 3. Implement the APIs you wanna support
Available APIs:
ch.schulealtendorf.pra.api.DisciplineGroupRankingAPI
ch.schulealtendorf.pra.api.DisciplineRankingAPI
ch.schulealtendorf.pra.api.EventSheetAPI
ch.schulealtendorf.pra.api.ParticipantListAPI
ch.schulealtendorf.pra.api.TotalRankingAPI
ch.schulealtendorf.pra.api.StarListAPI
Example
importch.schulealtendorf.pra.api.EventSheetAPI;importch.schulealtendorf.pra.pojo.EventSheet;importjava.io.InputStream;publicclassMyEventSheetAPIimplementsEventSheetAPI {@OverridepublicInputStreamcreateReport(EventSheetdata) {// Do your stuff here }}
Step 4. Register your implementation as a service
You must register your implementation in order to be found by the service loader used.
- Create a
META-INF/services
directory inside yourresources
directory - Create a file with the FQDN of the interface you wanna support
- Write the FQDN of your implementation to the file
example with gradle / maven:
src/main/resources/META-INF/services/ch.schulealtendorf.pra.api.EventSheetAPI
ch.schulealtendorf.report.MyCustomEventSheetAPI
- Gradle - Dependency Management
I useSemVer for versioning. For the versions available, see thetags on this repository.
- Nicolas Märchy -Initial work -BilledTrain380
See also the list ofcontributors who participated in this project.
This project is licensed under the GNU GPL-3.0 License - see theLICENSE.md file for details
About
PSA Report API to generate reports for Sporttag PSA.