Class CustomScriptResource


  • @Path("/config/scripts")
    @Consumes("application/json")
    @Produces("application/json")
    public class CustomScriptResource
    extends ConfigBaseResource
    • Constructor Detail

      • CustomScriptResource

        public CustomScriptResource()
    • Method Detail

      • getAllCustomScripts

        @GET
        public jakarta.ws.rs.core.Response getAllCustomScripts()
        Method to fetch a custom scripts
        Parameters:
        type - - type of the script
        Throws:
        jakarta.ws.rs.NotAuthorizedException
      • getCustomScriptsByTypePattern

        @GET
        @Path("/type/{type}")
        public jakarta.ws.rs.core.Response getCustomScriptsByTypePattern​(@PathParam("type") @NotNull
                                                                         @NotNull String type,
                                                                         @DefaultValue("") @QueryParam("pattern")
                                                                         String pattern,
                                                                         @DefaultValue("50") @QueryParam("limit")
                                                                         int limit)
        Method to fetch a custom script by type
        Parameters:
        type - - type of the script
        Returns:
        - List of CustomScript object
        Throws:
        jakarta.ws.rs.NotAuthorizedException
      • getCustomScriptByInum

        @GET
        @Path("/inum/{inum}")
        public jakarta.ws.rs.core.Response getCustomScriptByInum​(@PathParam("inum") @NotNull
                                                                 @NotNull String inum)
        Method to fetch a custom script by identifier - inum
        Parameters:
        inum - - unique identifier of the script
        Returns:
        - CustomScript object
        Throws:
        jakarta.ws.rs.NotAuthorizedException
      • createScript

        @POST
        public jakarta.ws.rs.core.Response createScript​(@Valid
                                                        @Valid io.jans.model.custom.script.model.CustomScript customScript)
        Method to create a new custom script
        Parameters:
        customScript - - CustomScript object
        Returns:
        - CustomScript object
        Throws:
        jakarta.ws.rs.NotAuthorizedException
      • updateScript

        @PUT
        public jakarta.ws.rs.core.Response updateScript​(@Valid @NotNull
                                                        @Valid @NotNull io.jans.model.custom.script.model.CustomScript customScript)
        Method to update custom script
        Parameters:
        customScript - - CustomScript object
        Returns:
        - CustomScript object
        Throws:
        jakarta.ws.rs.NotAuthorizedException
        jakarta.ws.rs.NotFoundException
      • deleteScript

        @DELETE
        @Path("{inum}")
        public jakarta.ws.rs.core.Response deleteScript​(@PathParam("inum") @NotNull
                                                        @NotNull String inum)
        Method to delete custom script
        Parameters:
        inum - - unique identifier of the script
        Returns:
        Throws:
        jakarta.ws.rs.NotAuthorizedException
      • patchAtribute

        @PATCH
        @Consumes("application/json-patch+json")
        @Path("{inum}")
        public jakarta.ws.rs.core.Response patchAtribute​(@PathParam("inum") @NotNull
                                                         @NotNull String inum,
                                                         @NotNull
                                                         @NotNull String pathString)
                                                  throws com.github.fge.jsonpatch.JsonPatchException,
                                                         IOException
        Method to patch custom script
        Parameters:
        inum - - unique identifier of the script
        pathString - - A JSON Patch JSON file containing an array of patch operations.
        Returns:
        - CustomScript object
        Throws:
        jakarta.ws.rs.NotAuthorizedException
        jakarta.ws.rs.NotFoundException
        com.github.fge.jsonpatch.JsonPatchException
        IOException