ReleasesController

@RestController
@RequestMapping(value = "BASE_EQUINOX_ENDPOINT + "{" + IDENTIFIER_KEY + "}/" + PROJECTS_KEY + "/{" + PROJECT_IDENTIFIER_KEY + "}/" + RELEASES_KEY")
open class ReleasesController : ProjectManager

The ReleasesController class is useful to manage all the release operations

Author

N7ghtm4r3 - Tecknobit

See also

Constructors

Link copied to clipboard
@Autowired
constructor(projectsHelper: ProjectsHelper, releasesHelper: ReleasesHelper)
Constructor to init the ProjectsController controller

Properties

Link copied to clipboard
protected open var currentProject: Project
currentProject the current project in use
Link copied to clipboard
protected open var jsonHelper: JsonHelper
Link copied to clipboard
protected val mantis: Mantis
Link copied to clipboard
protected open var me: T
Link copied to clipboard
Link copied to clipboard
projectsHelper helper to manage the project database operations
Link copied to clipboard
releasesHelper helper to manage the releases database operations
Link copied to clipboard
open var resourcesProvider: ResourcesProvider
Link copied to clipboard
val RESPONSE_SUCCESSFUL_MESSAGE: String = "operation_executed_successfully_key"
Link copied to clipboard
protected open var serverProtector: ServerProtector
Link copied to clipboard
protected open var usersRepository: EquinoxUsersRepository<T>
Link copied to clipboard
val WRONG_PROCEDURE_MESSAGE: String = "wrong_procedure_key"

Functions

Link copied to clipboard
@PostMapping(headers = [])
open fun addRelease(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @RequestHeader(value = "token") token: String, @RequestBody payload: Map<String, String>): String
Method to add a release
Link copied to clipboard
protected open fun amIProjectMember(userId: String, projectId: String): Boolean
Method to get whether the user who made a request on server is an authorized member of a project
Link copied to clipboard
@PostMapping(path = "/{" + RELEASE_IDENTIFIER_KEY + "}" + COMMENT_ASSET_ENDPOINT + "{" + ASSET_UPLOADING_EVENT_IDENTIFIER_KEY + "}", headers = [])
open fun commentAssets(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @PathVariable(value = "release_id") releaseId: String, @PathVariable(value = "asset_uploading_event_id") eventId: String, @RequestHeader(value = "token") token: String, @RequestBody payload: String): String
Method to comment the last assets uploaded on a release
Link copied to clipboard
@GetMapping(path = ""/{" + RELEASE_IDENTIFIER_KEY + "}" + CREATE_REPORT_ENDPOINT", headers = [])
open fun createReport(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @PathVariable(value = "release_id") releaseId: String, @RequestHeader(value = "token") token: String): String
Method to create a report for a release
Link copied to clipboard
@DeleteMapping(path = "/{" + RELEASE_IDENTIFIER_KEY + "}", headers = [])
open fun deleteRelease(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @PathVariable(value = "release_id") releaseId: String, @RequestHeader(value = "token") token: String): String
Method to delete a release
Link copied to clipboard
@PatchMapping(path = "/{" + RELEASE_IDENTIFIER_KEY + "}", headers = [])
open fun editRelease(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @PathVariable(value = "release_id") releaseId: String, @RequestHeader(value = "token") token: String, @RequestBody payload: Map<String, String>): String
Method to add a release
Link copied to clipboard
protected open fun failedResponse(error: String): String
Link copied to clipboard
@PutMapping(path = "/{" + RELEASE_IDENTIFIER_KEY + "}" + EVENTS_ENDPOINT + "{" + RELEASE_EVENT_IDENTIFIER_KEY + "}" + TAGS_ENDPOINT + "{" + RELEASE_TAG_IDENTIFIER_KEY + "}", headers = [])
open fun fillRejectedTag(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @PathVariable(value = "release_id") releaseId: String, @PathVariable(value = "release_event_id") eventId: String, @PathVariable(value = "release_tag_id") rejectedTagId: String, @RequestHeader(value = "token") token: String, @RequestBody payload: Map<String, String>): String
Method to fill a rejected tag
Link copied to clipboard
private open fun formatReleaseVersion(): String
Method to format the version of a release No-any params required
Link copied to clipboard
Link copied to clipboard
@GetMapping(path = "/{" + RELEASE_IDENTIFIER_KEY + "}", headers = [])
open fun <T> getRelease(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @PathVariable(value = "release_id") releaseId: String, @RequestHeader(value = "token") token: String): T
Method to get a release
Link copied to clipboard
private open fun getReleaseIfAuthorized(releaseId: String): Release
Method to get a release if the user is authorized and if the release is attached to the requested project
Link copied to clipboard
open fun initEquinoxEnvironment(storagePath: String, saveMessage: String, context: Class<out Any>, args: Array<String>, customSubDirectories: Array<String>)
Link copied to clipboard
protected open fun isAuthorizedUser(userId: String, projectId: String): Boolean
Method to get whether the user who made a request on server is an authorized member to make operations on the checked project such upload asset or promote releases, so is the author or a Vendor
Link copied to clipboard
protected open fun isMe(id: String, token: String): Boolean
Link copied to clipboard
protected open fun isProjectAuthor(project: Project, userId: String): Boolean
protected open fun isProjectAuthor(userId: String, projectId: String): Boolean
Method to get whether the user who made a request on server is the author of the checked project
Link copied to clipboard
protected open fun isUserQualified(userId: String, projectId: String): Boolean
Method to get whether the user who made a request on server is a qualified member to make operations on the checked project such comment release, so is a Customer
Link copied to clipboard
protected open fun <V> loadJsonHelper(payload: Map<String, V>)
Link copied to clipboard
@PatchMapping(path = ""/{" + RELEASE_IDENTIFIER_KEY + "}" + PROMOTE_RELEASE_ENDPOINT", headers = [])
open fun promoteRelease(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @PathVariable(value = "release_id") releaseId: String, @RequestHeader(value = "token") token: String, @RequestBody payload: Map<String, String>): String
Method to promote a release
Link copied to clipboard
protected open fun successResponse(): String
protected open fun <V> successResponse(value: V): HashMap<String, V>
Link copied to clipboard
@PostMapping(path = ""/{" + RELEASE_IDENTIFIER_KEY + "}" + UPLOAD_ASSETS_ENDPOINT", headers = [])
open fun uploadAsset(@PathVariable(value = "id") id: String, @PathVariable(value = "project_id") projectId: String, @PathVariable(value = "release_id") releaseId: String, @RequestHeader(value = "token") token: String, @RequestParam(value = "assets_uploaded") assets: Array<MultipartFile>, @RequestParam(name = AssetUploadingEvent.COMMENT_KEY, required = false) comment: String): String
Method to upload some assets on a release