Class TemplateRestResource

    • Constructor Detail

      • TemplateRestResource

        public TemplateRestResource()
        Creates a new instance of xxxResource
    • Method Detail

      • getEntityLegacyFormat

        @GET
        public ActionReportResult getEntityLegacyFormat​(@QueryParam("expandLevel") @DefaultValue("1")
                                                        int expandLevel)
      • getEntity

        @GET
        @Produces("application/vnd.oracle.glassfish+json")
        public Map<String,​String> getEntity​(@QueryParam("expandLevel") @DefaultValue("1")
                                                  int expandLevel)
      • createOrUpdateEntityLegacyFormat

        @POST
        public jakarta.ws.rs.core.Response createOrUpdateEntityLegacyFormat​(HashMap<String,​String> data)
      • createOrUpdateEntity

        @POST
        @Produces("application/vnd.oracle.glassfish+json")
        public jakarta.ws.rs.core.Response createOrUpdateEntity​(HashMap<String,​String> data)
      • postLegacyFormat

        @POST
        @Consumes("multipart/form-data")
        public Object postLegacyFormat​(org.glassfish.jersey.media.multipart.FormDataMultiPart formData)
        allows for remote files to be put in a tmp area and we pass the local location of this file to the corresponding command instead of the content of the file * Yu need to add enctype="multipart/form-data" in the form for ex: <form action="http://localhost:4848/management/domain/applications/application" method="post" enctype="multipart/form-data"> then any param of type="file" will be uploaded, stored locally and the param will use the local location on the server side (ie. just the path)
      • post

        @POST
        @Consumes("multipart/form-data")
        @Produces("application/vnd.oracle.glassfish+json")
        public Object post​(org.glassfish.jersey.media.multipart.FormDataMultiPart formData)
      • delete

        @DELETE
        public jakarta.ws.rs.core.Response delete​(Map<String,​String> data)
      • optionsLegacyFormat

        @OPTIONS
        @Produces("application/json")
        public ActionReportResult optionsLegacyFormat()
      • options

        @OPTIONS
        @Produces("application/vnd.oracle.glassfish+json")
        public RestResourceMetadata options()
      • doCreateOrUpdate

        protected RestActionReporter doCreateOrUpdate​(Map<String,​String> data)
        This method performs the creation or updating of an entity, regardless of the request's mime type. If an error occurs, a WebApplicationException is thrown, so if the method returns, the create/update was successful.
        Parameters:
        data -
        Returns:
      • setUriInfo

        public void setUriInfo​(jakarta.ws.rs.core.UriInfo uriInfo)
        Specified by:
        setUriInfo in interface OptionsCapable
      • setEntity

        public void setEntity​(Dom p)
      • getEntity

        public Dom getEntity()
      • setParentAndTagName

        public void setParentAndTagName​(Dom parent,
                                        String tagName)
      • createDataBasedOnForm

        public static HashMap<String,​String> createDataBasedOnForm​(org.glassfish.jersey.media.multipart.FormDataMultiPart formData)
        allows for remote files to be put in a tmp area and we pass the local location of this file to the corresponding command instead of the content of the file * Yu need to add enctype="multipart/form-data" in the form for ex: then any param of type="file" will be uploaded, stored locally and the param will use the local location on the server side (ie. just the path)
      • buildActionReportResult

        protected ActionReportResult buildActionReportResult​(boolean showEntityValues)
      • removeAttributesToBeSkipped

        protected void removeAttributesToBeSkipped​(Map<String,​String> data)
      • getCommandResourcesPaths

        protected String[][] getCommandResourcesPaths()
      • getDeleteCommand

        protected String getDeleteCommand()
      • throwError

        protected void throwError​(jakarta.ws.rs.core.Response.Status error,
                                  String message)
                           throws jakarta.ws.rs.WebApplicationException
        Throws:
        jakarta.ws.rs.WebApplicationException
      • handleError

        protected jakarta.ws.rs.core.Response handleError​(jakarta.ws.rs.core.Response.Status error,
                                                          String message)
                                                   throws jakarta.ws.rs.WebApplicationException
        Throws:
        jakarta.ws.rs.WebApplicationException