org.appng.appngizer.controller

## Class RepositoryController

- java.lang.Object
- - org.appng.appngizer.controller.ControllerBase
  - - org.appng.appngizer.controller.RepositoryController

-     @RestController
      public class RepositoryController
      extends ControllerBase

- - ### Field Summary

    - ### Fields inherited from class org.appng.appngizer.controller.ControllerBase

      `configurer, context, coreService, databaseService, session, templateService`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RepositoryController()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.http.ResponseEntity<Repository>` | `createRepository(Repository repository)`
    `org.springframework.http.ResponseEntity<Void>` | `deleteRepository(String name)`
    `org.springframework.http.ResponseEntity<Packages>` | `deleteRepositoryPackage(String name, String packageName, String packageVersion, String packageTimestamp)`
    `protected Package` | `getPackage(String repository, Identifier installedApp, Identifier installedTemplate, PackageInfo pkg)`
    `org.springframework.http.ResponseEntity<Repository>` | `getRepository(String name)`
    `org.springframework.http.ResponseEntity<Package>` | `getRepositoryPackage(String name, String packageName, String packageVersion, String packageTimestamp)`
    `org.springframework.http.ResponseEntity<Packages>` | `getRepositoryPackages(String name, String packageName)`
    `org.springframework.http.ResponseEntity<Package>` | `installPackage(String name, Package pkg)`
    `protected boolean` | `isInstalled(Identifier installed, PackageInfo pkg)`
    `org.springframework.http.ResponseEntity<Repositories>` | `listRepositories()`
    `org.springframework.http.ResponseEntity<Repository>` | `updateRepository(String name, Repository repository)`
    `org.springframework.http.ResponseEntity<Package>` | `uploadPackage(String name, org.springframework.web.multipart.MultipartFile file, boolean install, boolean privileged, boolean hidden)`

    - ### Methods inherited from class org.appng.appngizer.controller.ControllerBase

      `getDatabaseStatus, getSharedSecret, onBusinessException, onConflictException, onConstraintViolationException`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RepositoryController

          public RepositoryController()

  - ### Method Detail

    - #### listRepositories

          @GetMapping(value="/repository")
          public org.springframework.http.ResponseEntity<Repositories> listRepositories()

    - #### getRepository

          @GetMapping(value="/repository/{name}")
          public org.springframework.http.ResponseEntity<Repository> getRepository(@PathVariable(value="name")
                                                                                                                           String name)
                                                                                                                    throws BusinessException

      Throws:
        `BusinessException`

    - #### getRepositoryPackages

          @GetMapping(value="/repository/{name}/{package}")
          public org.springframework.http.ResponseEntity<Packages> getRepositoryPackages(@PathVariable(value="name")
                                                                                                                                           String name,
                                                                                                                                           @PathVariable(value="package")
                                                                                                                                           String packageName)

    - #### getPackage

          protected Package getPackage(String repository,
                                       Identifier installedApp,
                                       Identifier installedTemplate,
                                       PackageInfo pkg)

    - #### getRepositoryPackage

          @GetMapping(value="/repository/{name}/{package}/{version}/{timestamp}")
          public org.springframework.http.ResponseEntity<Package> getRepositoryPackage(@PathVariable(value="name")
                                                                                                                                                               String name,
                                                                                                                                                               @PathVariable(value="package")
                                                                                                                                                               String packageName,
                                                                                                                                                               @PathVariable(value="version")
                                                                                                                                                               String packageVersion,
                                                                                                                                                               @PathVariable(value="timestamp")
                                                                                                                                                               String packageTimestamp)

    - #### deleteRepositoryPackage

          @DeleteMapping(value="/repository/{name}/{package}/{version}/{timestamp}")
          public org.springframework.http.ResponseEntity<Packages> deleteRepositoryPackage(@PathVariable(value="name")
                                                                                                                                                                      String name,
                                                                                                                                                                      @PathVariable(value="package")
                                                                                                                                                                      String packageName,
                                                                                                                                                                      @PathVariable(value="version")
                                                                                                                                                                      String packageVersion,
                                                                                                                                                                      @PathVariable(value="timestamp")
                                                                                                                                                                      String packageTimestamp)
                                                                                                                                                               throws BusinessException

      Throws:
        `BusinessException`

    - #### isInstalled

          protected boolean isInstalled(Identifier installed,
                                        PackageInfo pkg)

    - #### createRepository

          @PostMapping(value="/repository")
          public org.springframework.http.ResponseEntity<Repository> createRepository(@RequestBody
                                                                                                                        Repository repository)
                                                                                                                 throws BusinessException,
                                                                                                                        URISyntaxException

      Throws:
        `BusinessException`
        `URISyntaxException`

    - #### updateRepository

          @PutMapping(value="/repository/{name}")
          public org.springframework.http.ResponseEntity<Repository> updateRepository(@PathVariable(value="name")
                                                                                                                              String name,
                                                                                                                              @RequestBody
                                                                                                                              Repository repository)
                                                                                                                       throws URISyntaxException

      Throws:
        `URISyntaxException`

    - #### installPackage

          @PutMapping(value="/repository/{name}/install")
          public org.springframework.http.ResponseEntity<Package> installPackage(@PathVariable(value="name")
                                                                                                                                 String name,
                                                                                                                                 @RequestBody
                                                                                                                                 Package pkg)
                                                                                                                          throws BusinessException

      Throws:
        `BusinessException`

    - #### uploadPackage

          @PostMapping(value="/repository/{name}/upload")
          public org.springframework.http.ResponseEntity<Package> uploadPackage(@PathVariable(value="name")
                                                                                                                                String name,
                                                                                                                                @RequestParam(value="file")
                                                                                                                                org.springframework.web.multipart.MultipartFile file,
                                                                                                                                @RequestParam(required=false,defaultValue="false")
                                                                                                                                boolean install,
                                                                                                                                @RequestParam(required=false,defaultValue="false")
                                                                                                                                boolean privileged,
                                                                                                                                @RequestParam(required=false,defaultValue="false")
                                                                                                                                boolean hidden)
                                                                                                                         throws BusinessException

      Throws:
        `BusinessException`

    - #### deleteRepository

          @DeleteMapping(value="/repository/{name}")
          public org.springframework.http.ResponseEntity<Void> deleteRepository(@PathVariable(value="name")
                                                                                                                           String name)

Copyright © 2011–2023 aiticon GmbH. All rights reserved.