Class AssetResource


  • @Path("/jans-assets")
    @Produces("application/json")
    @Consumes("application/json")
    public class AssetResource
    extends ConfigBaseResource
    • Field Summary

      • Fields inherited from class io.jans.configapi.core.rest.BaseResource

        FIELD_VALUE_SEPARATOR, MISSING_ATTRIBUTE_CODE, MISSING_ATTRIBUTE_MESSAGE, TOKEN_DELIMITER
    • Constructor Summary

      Constructors 
      Constructor Description
      AssetResource()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      jakarta.ws.rs.core.Response deleteAsset​(@NotNull String inum)  
      jakarta.ws.rs.core.Response getAssetByInum​(@NotNull String inum)  
      jakarta.ws.rs.core.Response getAssetByName​(@NotNull String name)  
      jakarta.ws.rs.core.Response getAssets​(int limit, String pattern, String status, int startIndex, String sortBy, String sortOrder, String fieldValuePair)  
      jakarta.ws.rs.core.Response updateAsset​(AssetForm assetForm)  
      jakarta.ws.rs.core.Response uploadAsset​(AssetForm assetForm)  
      • Methods inherited from class io.jans.configapi.core.rest.BaseResource

        checkNotEmpty, checkNotEmpty, checkNotNull, checkNotNull, checkNotNull, checkResourceNotNull, createSearchRequest, findRootError, getBadRequestException, getBadRequestException, getBadRequestException, getHttpHeaders, getHttpRequest, getInternalServerException, getInternalServerException, getMissingAttributeError, getNotAcceptableException, getNotFoundError, getNotFoundError, getUriInfo, throwBadRequestException, throwBadRequestException, throwBadRequestException, throwInternalServerException, throwInternalServerException, throwInternalServerException, throwInternalServerException, throwMissingAttributeError, throwNotFoundException, throwNotFoundException
    • Constructor Detail

      • AssetResource

        public AssetResource()
    • Method Detail

      • getAssets

        @GET
        public jakarta.ws.rs.core.Response getAssets​(@DefaultValue("50") @QueryParam("limit")
                                                     int limit,
                                                     @DefaultValue("") @QueryParam("pattern")
                                                     String pattern,
                                                     @DefaultValue("all") @QueryParam("status")
                                                     String status,
                                                     @DefaultValue("0") @QueryParam("startIndex")
                                                     int startIndex,
                                                     @DefaultValue("inum") @QueryParam("sortBy")
                                                     String sortBy,
                                                     @DefaultValue("ascending") @QueryParam("sortOrder")
                                                     String sortOrder,
                                                     @DefaultValue("") @QueryParam("fieldValuePair")
                                                     String fieldValuePair)
                                              throws Exception
        Throws:
        Exception
      • getAssetByInum

        @GET
        @Path("{inum}")
        public jakarta.ws.rs.core.Response getAssetByInum​(@PathParam("inum") @NotNull
                                                          @NotNull String inum)
                                                   throws Exception
        Throws:
        Exception
      • getAssetByName

        @GET
        @Path("name/{name}")
        public jakarta.ws.rs.core.Response getAssetByName​(@PathParam("name") @NotNull
                                                          @NotNull String name)
                                                   throws Exception
        Throws:
        Exception
      • uploadAsset

        @Consumes("multipart/form-data")
        @POST
        @Path("/upload")
        public jakarta.ws.rs.core.Response uploadAsset​(AssetForm assetForm)
                                                throws Exception
        Throws:
        Exception
      • updateAsset

        @Consumes("multipart/form-data")
        @PUT
        @Path("/upload")
        public jakarta.ws.rs.core.Response updateAsset​(AssetForm assetForm)
                                                throws Exception
        Throws:
        Exception
      • deleteAsset

        @DELETE
        @Path("{inum}")
        public jakarta.ws.rs.core.Response deleteAsset​(@PathParam("inum") @NotNull
                                                       @NotNull String inum)