<dependency>
<groupId>com.subshell.sophora.ugc</groupId>
<artifactId>ugc-weblib</artifactId>
<version>X.X.X</version>
</dependency>
The weblibrary provides you with Spring Beans for you application.
ResultWriter
The ResultWriter
provides you with the ability to write user input into the "normal" folder of a S3 bucket.
It needs a S3Configuration
with the following fields:
Attributes | Description |
---|---|
sophora.ugc.weblib.s3.accessKeyId | Access key for your S3 bucket |
sophora.ugc.weblib.s3.secretAccessKey | Secret key, usually bundled with the previous access key |
sophora.ugc.weblib.s3.host | Host for the S3 bucket, e.g. "storage.googleapis.com" |
sophora.ugc.weblib.s3.bucketName | Name of the bucket in which UGC submissions are stored |
VotingReportService
The VotingReportService
can be used to access the RankingVotingReports
and SimpleVotingReports
of votings. For both, it needs the sophoraIds of the corresponding votings.
The URL to access UGC needs to be configured in WeblibConfiguration
. Additionally, there is an optional configuration option to configure a cache used by the VotingReportService
.
Attributes | Description |
---|---|
sophora.ugc.weblib.ugcBaseUrl | URL that points to the location of UGC, including the HTTP protocol |
sophora.ugc.weblib.voting.cacheTime | Duration for which a cached report is returned. After the duration is elapsed the next request will call the UGC backend to get the report. Default PT10S |