当前位置: 首页>>代码示例>>Java>>正文


Java MediaType.APPLICATION_FORM_URLENCODED属性代码示例

本文整理汇总了Java中javax.ws.rs.core.MediaType.APPLICATION_FORM_URLENCODED属性的典型用法代码示例。如果您正苦于以下问题:Java MediaType.APPLICATION_FORM_URLENCODED属性的具体用法?Java MediaType.APPLICATION_FORM_URLENCODED怎么用?Java MediaType.APPLICATION_FORM_URLENCODED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.ws.rs.core.MediaType的用法示例。


在下文中一共展示了MediaType.APPLICATION_FORM_URLENCODED属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateServiceInfo

@PUT
@Path("/{id}")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED  })
@ApiOperation(value = "Update ServiceInfo", response = ServiceInfoDetailModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a ServiceInfo entity was updated", response = ServiceInfoDetailModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })
public Response updateServiceInfo(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext,
		@ApiParam(value = "id of ServiceInfo that need to be update") @PathParam("id") long id,
		@ApiParam(value = "body input for update") @BeanParam ServiceInfoInputModel input);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:15,代码来源:ServiceInfoManagement.java

示例2: updateProcessOption

@PUT
@Path("/{id}/processes/{optionId}")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@ApiOperation(value = "Add ProcessOption", response = ProcessOptionInputModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a ProcessOption was updated", response = ProcessOptionInputModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })
public Response updateProcessOption(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext,
		@ApiParam(value = "serviceconfigId for get detail") @PathParam("id") long id,
		@ApiParam(value = "processOptionId for get detail") @PathParam("optionId") long optionId,
		@ApiParam(value = "input model for ProcessOption") @BeanParam ProcessOptionInputModel input);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:16,代码来源:ServiceConfigManagement.java

示例3: getApplicantDetail

@GET
@Path("/{id}")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@ApiOperation(value = "Get a detail applicant", response = ApplicantModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a applicant", response = ApplicantModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })

public Response getApplicantDetail(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext, @PathParam("id") long id);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:ApplicantManagement.java

示例4: saveBook

@POST
@Path("book")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.APPLICATION_JSON)
public Book saveBook(
      @FormParam("name") String name,
      @FormParam("pages") int pages,
      @FormParam("author") String author
) {
    Book book = new Book();
    book.setName(name);
    book.setPages(pages);
    book.setAuthor(authorRepository.byName(author));
    return bookRepository.save(book);
}
 
开发者ID:mcarleio,项目名称:strix,代码行数:15,代码来源:ExampleResource.java

示例5: prepareData

/**
 * Initialize data for next bench tests.
 * 
 * @param blob
 *            the BLOB file to attach.
 * @param nb
 *            the amount of data to persist.
 * @return the the bench result. The return type is text/html for IE7 support.
 */
@POST
@Produces(MediaType.TEXT_HTML)
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED, MediaType.MULTIPART_FORM_DATA })
public String prepareData(@Multipart(value = "blob", required = false) final InputStream blob, @Multipart("nb") final int nb) throws IOException {
	final long start = System.currentTimeMillis();
	final byte[] lobData = blob == null ? new byte[0] : IOUtils.toByteArray(blob);
	log.info("Content size :" + lobData.length);
	final BenchResult result = jpaDao.initialize(nb, lobData);
	result.setDuration(System.currentTimeMillis() - start);
	return new org.ligoj.bootstrap.core.json.ObjectMapperTrim().writeValueAsString(result);
}
 
开发者ID:ligoj,项目名称:bootstrap,代码行数:20,代码来源:JpaBenchResource.java

示例6: getFileTemplatesOfServiceInfo

@GET
@Path("/{id}/filetemplates")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Get FileTemplate list of ServiceInfo by its id)", response = FileTemplateResultsModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns the list of FileTemplate of ServiceInfo", response = FileTemplateResultsModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })
public Response getFileTemplatesOfServiceInfo(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext,
		@ApiParam(value = "id of ServiceInfo that need to be get the list of FileTemplates", required = true) @PathParam("id") String id);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:ServiceInfoManagement.java

示例7: getFormScriptByDossierId_ReferenceUid

@GET
@Path("/{id}/files/{referenceUid}/formscript")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@ApiOperation(value = "getDossierFilesByDossierReferenceUid", response = JSONObject.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a formscript", response = DossierFileResultsModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })
public Response getFormScriptByDossierId_ReferenceUid(@Context HttpServletRequest request,
		@Context HttpHeaders header, @Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext,
		@ApiParam(value = "id of dossier", required = true) @PathParam("id") long id,
		@ApiParam(value = "referenceUid of dossierfile", required = true) @PathParam("referenceUid") String referenceUid);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:DossierFileManagement.java

示例8: getCommentTop

@GET
@Path("/top")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response getCommentTop(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context ServiceContext serviceContext,
		@ApiParam(value = "seach model") @BeanParam CommentSearchModel searchModel);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:7,代码来源:CommentManagement.java

示例9: updateDeliverableType

@PUT
@Path("/{id}")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "update Deliverabletypes")
@ApiResponses(value = { @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns", response = DeliverableTypesModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class) })
public Response updateDeliverableType(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext, @BeanParam DeliverableTypeInputModel input,
		@ApiParam(value = "id of dossier", required = true) @PathParam("id") long id);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:DeliverableTypesManagement.java

示例10: deleteFormbyRegId

@DELETE
@Path("/registrations/{id}/forms/{referenceUid}")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
public Response deleteFormbyRegId(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext, 
		@PathParam("id") long id,
		@PathParam("referenceUid") String referenceUid);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:9,代码来源:RegistrationFormManagement.java

示例11: getById

@POST
@Path("{id}")
@Produces(MediaType.APPLICATION_JSON)
@Consumes({MediaType.APPLICATION_FORM_URLENCODED})
public Cliente getById(@PathParam("id") int id,
		@QueryParam("citta") String citta,
		@FormParam("parametro") String nome) {
	Cliente c = new Cliente();
	c.setNome(nome + " : " + id);
	c.setPartitaIva("658736457634");
	c.setTelefono(citta);
	return c;
}
 
开发者ID:andrea-colleoni,项目名称:corso-lutech,代码行数:13,代码来源:ClienteAPI.java

示例12: helloHelloPost

@POST
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces(MediaType.TEXT_PLAIN)
public String helloHelloPost(@FormParam("me") final String me) {

    return "HelloHello " + me;
}
 
开发者ID:trajano,项目名称:app-ms,代码行数:7,代码来源:SingleHello2.java

示例13: addInvoiceForm

@POST
@Path("/{id}/invoiceform")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Add InvoiceForm", response = PaymentConfigSingleInputModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns InvoiceForm was added", response = PaymentConfigSingleInputModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) })

public Response addInvoiceForm(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext, @PathParam("id") long id,
		@BeanParam PaymentConfigSingleInputModel input);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:15,代码来源:PaymentConfigManagement.java

示例14: update

@PUT
@Path("/{n}")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response update(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext,
		@DefaultValue("0") @PathParam("n") int n, @BeanParam WorkTimeInputModel input);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:7,代码来源:WorkTimeManagement.java

示例15: deletePermissionByKey

@DELETE
@Path("/{id}/permissions/{actionId}")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response deletePermissionByKey(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext,
		@DefaultValue("0") @PathParam("id") long id, @PathParam("actionId") String actionId);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:7,代码来源:JobposManagement.java


注:本文中的javax.ws.rs.core.MediaType.APPLICATION_FORM_URLENCODED属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。