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


Java HttpURLConnection.HTTP_FORBIDDEN属性代码示例

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


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

示例1: updateRegFormFormData

@PUT
@Path("/registrations/{id}/forms/{referenceUid}/formdata")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "update RegistrationForm")
@ApiResponses(value = { @ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns"),
		@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 updateRegFormFormData(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext,
		@ApiParam(value = "registrationId", required = true) @PathParam("id") long id,
		@ApiParam(value = "referenceUid", required = true) @PathParam("referenceUid") String referenceUid,
		@ApiParam(value = "formdata of registrationForm", required = true) @FormParam("formdata") String formdata)
		throws PortalException;
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:16,代码来源:RegistrationFormManagement.java

示例2: 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

示例3: updateDossierNo

@PUT
@Path("/{id}/dossierno")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Processed to doing a ProcessAction on the Dossier", response = DoActionModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a ProcessAction has been Processed", response = DoActionModel.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 updateDossierNo(@Context HttpServletRequest request, @Context HttpHeaders header, @Context Company company,
		@Context Locale locale, @Context User user, @Context ServiceContext serviceContext,
		@PathParam("id") String id);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:DossierManagement.java

示例4: getEpaymentconfig

@GET
@Path("/{id}/epaymentconfig")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Get the epaymentconfig", response = PaymentConfigSingleInputModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns epaymentconfig of PaymentConfig", 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 getEpaymentconfig(@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,代码来源:PaymentConfigManagement.java

示例5: getServerConfigDetail

@GET
@Path("/{id}")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Get the ServerConfig detail", response = ServerConfigDetailModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns detail of ServerConfig", response = ServerConfigDetailModel.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 getServerConfigDetail(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext, @PathParam("id") String id);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:ServerConfigManagement.java

示例6: removePaymentConfig

@DELETE
@Path("/{id}")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Remove a PaymentConfig", response = PaymentConfigInputModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns the PaymentConfig was deleted", response = PaymentConfigInputModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_UNAUTHORIZED, message = "Unauthorized", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_FORBIDDEN, message = "Access denied", response = ExceptionModel.class),
		@ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal error", response = ExceptionModel.class) })

public Response removePaymentConfig(@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,代码来源:PaymentConfigManagement.java

示例7: removeProcessAction

@DELETE
@Path("/{id}/actions/{actionid}")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Remove the ProcessAction of a ServiceProcess", response = ProcessActionInputModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a ProcessAction was removed", response = ProcessActionInputModel.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 removeProcessAction(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext, @PathParam("id") long id, @PathParam("actionid") long actionid);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:ServiceProcessManagement.java

示例8: downloadConfirmFile

@GET
@Path("/{id}/payments/{referenceUid}/confirmfile")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@ApiOperation(value = "Download confirm file")
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns"),
		@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 defined", response = ExceptionModel.class) })
public Response downloadConfirmFile(@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") String id,
		@ApiParam (value = "reference of paymentFile", required = true) @PathParam("referenceUid") String referenceUid);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:PaymentFileManagement.java

示例9: getListContacts

@GET
@Path("/{id}/contacts")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Get List Contacts", response = ListContacts.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns list contacts", response = ListContacts.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 getListContacts(@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,代码来源:DossierActionManagement.java

示例10: getPreview

@GET
@Path("/deliverables/{id}/preview")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@ApiOperation(value = "Get info preview for deliverable id")
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns"),
		@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 defined", response = ExceptionModel.class) })
public Response getPreview(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user, @Context ServiceContext serviceContext,
		@ApiParam(value = "id of Deliverable", required = true) @PathParam("id") Long id);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:DeliverablesManagement.java

示例11: getApplicantProfile

@GET
@Path("/{id}/profile")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_FORM_URLENCODED })
@ApiOperation(value = "Get the profile of applicant", response = JSONObject.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns the profile of applicant", response = JSONObject.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 getApplicantProfile(@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

示例12: removeRegistrationTemplate

@DELETE
@Path("/{id}")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Remove a  registrationTemplate by its id", response = RegistrationTemplatesModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns a Dossier was removed", response = RegistrationTemplatesModel.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 removeRegistrationTemplate(@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,代码来源:RegistrationTemplatesManagement.java

示例13: getDossierTemplateDetail

@GET
@Path("/{id}")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Get a DossierTemplate", response = DossierTemplateDetailModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns detail of DossierTemplate", response = DossierTemplateDetailModel.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 getDossierTemplateDetail(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext, @PathParam("id") String id);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:13,代码来源:DossierTemplateManagement.java

示例14: isUnauthorized

public static boolean isUnauthorized(@Nullable Throwable e) {
    if (e == null || !(e instanceof HttpException)) {
        return false;
    }
    HttpException httpEx = (HttpException) e;
    // Ghost returns 403 Forbidden in some cases, inappropriately
    // see this for what 401 vs 403 should mean: http://stackoverflow.com/a/3297081/504611
    return httpEx.code() == HttpURLConnection.HTTP_UNAUTHORIZED
            || httpEx.code() == HttpURLConnection.HTTP_FORBIDDEN;
}
 
开发者ID:TryGhost,项目名称:Ghost-Android,代码行数:10,代码来源:NetworkUtils.java

示例15: getListActions

@GET
@Path("/{id}/nextactions")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@ApiOperation(value = "Get List Actions", response = ActionResultModel.class)
@ApiResponses(value = {
		@ApiResponse(code = HttpURLConnection.HTTP_OK, message = "Returns list action can be executed", response = ActionResultModel.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 getListActions(@Context HttpServletRequest request, @Context HttpHeaders header,
		@Context Company company, @Context Locale locale, @Context User user,
		@Context ServiceContext serviceContext, @BeanParam DossierActionSearchModel query,
		@PathParam("id") String id);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:14,代码来源:DossierActionManagement.java


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