@RestController
@CrossOrigin(origins="*")
@RequestMapping(value="/api/v1/zip")
public class ZipController
extends java.lang.Object
| Constructor and Description |
|---|
ZipController(ZipService injectedZipService,
ConfigurationHandler injectedConfigurationHandler,
NotificationResponse injectedNotificationResponse,
ApplicationProperties injectedApplicationProperties,
Utilities injectedUtilities)
Constructor responsible for DI.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<java.lang.String> |
handleFileUpload(org.springframework.web.multipart.MultipartFile file)
Upload a file and check whether it is a ServerPackCreator valid ZIP-archive.
|
org.springframework.http.ResponseEntity<java.lang.String> |
requestGenerationFromZip(java.lang.String zipName,
java.lang.String clientMods,
java.lang.String minecraftVersion,
java.lang.String modLoader,
java.lang.String modLoaderVersion)
Request the generation of a server pack from a previously uploaded ZIP-archive, which passed
validation checks, and from a barebones configuration, including:
clientModsminecraftVersionmodLoadermodLoaderVersion |
@Autowired public ZipController(ZipService injectedZipService, ConfigurationHandler injectedConfigurationHandler, NotificationResponse injectedNotificationResponse, ApplicationProperties injectedApplicationProperties, Utilities injectedUtilities)
injectedZipService - Instance of ZipService.injectedConfigurationHandler - Instance of ConfigurationHandler.injectedNotificationResponse - Instance of NotificationResponse.injectedApplicationProperties - Instance of ApplicationProperties.injectedUtilities - Instance of Utilities.@PostMapping(value="/upload")
public org.springframework.http.ResponseEntity<java.lang.String> handleFileUpload(@RequestParam(value="file")
org.springframework.web.multipart.MultipartFile file)
throws java.io.IOException
file - The file uploaded to ServerPackCreator.java.io.IOException - if an errors occurred saving or reading the file.@GetMapping(value="/{zipName}&{clientMods}&{minecraftVersion}&{modLoader}&{modLoaderVersion}")
public org.springframework.http.ResponseEntity<java.lang.String> requestGenerationFromZip(@PathVariable(value="zipName")
java.lang.String zipName,
@PathVariable(value="clientMods")
java.lang.String clientMods,
@PathVariable(value="minecraftVersion")
java.lang.String minecraftVersion,
@PathVariable(value="modLoader")
java.lang.String modLoader,
@PathVariable(value="modLoaderVersion")
java.lang.String modLoaderVersion)
clientModsminecraftVersionmodLoadermodLoaderVersionzipName - The name of the previously uploaded ZIP-archive.clientMods - A comma separated list of clientside-only mods to exclude from the
server pack.minecraftVersion - The Minecraft version the modpack, and therefor the server pack, uses.modLoader - The modloader the modpack, and therefor the server pack, uses.modLoaderVersion - The modloader version the modpack, and therefor the server pack, uses.