@Service
public class CurseService
extends java.lang.Object
| Constructor and Description |
|---|
CurseService(ConfigurationHandler injectedConfigurationHandler,
NotificationResponse injectedNotificationResponse,
ApplicationProperties injectedApplicationProperties,
ServerPackService injectedServerPackService,
TaskSubmitter injectedTaskSubmitter)
Constructor responsible for our DI.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
createFromCurseModpack(int projectID,
int fileID)
Check a passed CurseForge project and file ID combination.
|
java.lang.String |
regenerateFromCurseModpack(java.lang.String modpack)
Regenerates server pack for the given CurseForge project and file ID.
Requires de.griefed.serverpackcreator.spring.cursecontroller.regenerate.enabled=true, otherwise a message is returned
telling the requester that regeneration is disabled on this instance of ServerPackCreator. |
@Autowired public CurseService(ConfigurationHandler injectedConfigurationHandler, NotificationResponse injectedNotificationResponse, ApplicationProperties injectedApplicationProperties, ServerPackService injectedServerPackService, TaskSubmitter injectedTaskSubmitter)
injectedConfigurationHandler - Instance of ConfigurationHandler.injectedNotificationResponse - Instance of NotificationResponse.injectedApplicationProperties - Instance of ApplicationProperties.injectedServerPackService - Instance of ServerPackService.injectedTaskSubmitter - Instance of TaskSubmitter.public java.lang.String createFromCurseModpack(int projectID,
int fileID)
throws com.therandomlabs.curseapi.CurseException
NotificationResponse. If a server pack is not
available for the given combination, a scan task is sent to TaskSubmitter.scanCurseProject(String) with the
given CurseForge project and file ID combination.projectID - Integer. CurseForge projectID.fileID - Integer. CurseForge fileID.NotificationResponse with some information about the requested project and file, as well as the status, which is either of Status 0: Already exists, Status 1: OK, generating or Status 2: Error occurred.com.therandomlabs.curseapi.CurseException - Exception thrown if an error occurs during the acquisition of information from CurseForge.public java.lang.String regenerateFromCurseModpack(java.lang.String modpack)
de.griefed.serverpackcreator.spring.cursecontroller.regenerate.enabled=true, otherwise a message is returned
telling the requester that regeneration is disabled on this instance of ServerPackCreator.modpack - CurseForge projectID and fileID combination.NotificationResponse.curseResponse(String, int, String, int, String, String) telling the requester the status of their request.