类javax.ws.rs.Path源码实例Demo

下面列出了怎么用javax.ws.rs.Path的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: o2oa   文件: WorkAction.java
@JaxrsMethodDescribe(value = "流转一个流程实例,以非阻塞队列方式运行.", action = ActionProcessingNonblocking.class)
@PUT
@Path("{id}/processing/nonblocking")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void processingNonblocking(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		@JaxrsParameterDescribe("工作标识") @PathParam("id") String id, JsonElement jsonElement) {
	ActionResult<ActionProcessingNonblocking.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionProcessingNonblocking().execute(effectivePerson, id, jsonElement);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, jsonElement);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码2 项目: syndesis   文件: ConnectorEndpoint.java
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@Path("/{connectorId}/actions/{actionId}")
public SyndesisMetadata actions(@PathParam("connectorId") final String connectorId, @PathParam("actionId") final String actionId,
                                final Map<String, Object> properties) {
    MetadataRetrieval adapter = findAdapter(connectorId);
    try {
        return adapter.fetch(camelContext, connectorId, actionId, properties);
    } catch (RuntimeException e) {
        LOGGER.error("Unable to fetch and process metadata for connector: {}, action: {}", connectorId, actionId);
        LOGGER.debug("Unable to fetch and process metadata for connector: {}, action: {}, properties: {}", connectorId, actionId,
            properties, e);
        throw adapter.handle(e);
    }
}
 
@ApiOperation("Update a Go group repository")
@ApiResponses(value = {
    @ApiResponse(code = 204, message = REPOSITORY_UPDATED),
    @ApiResponse(code = 401, message = AUTHENTICATION_REQUIRED),
    @ApiResponse(code = 403, message = INSUFFICIENT_PERMISSIONS),
    @ApiResponse(code = 404, message = REPOSITORY_NOT_FOUND)
})
@PUT
@Path("/{repositoryName}")
@RequiresAuthentication
@Validate
@Override
public Response updateRepository(
    final GolangGroupRepositoryApiRequest request,
    @ApiParam(value = "Name of the repository to update") @PathParam("repositoryName") final String repositoryName)
{
  return super.updateRepository(request, repositoryName);
}
 
源代码4 项目: o2oa   文件: UnitAttributeAction.java
@JaxrsMethodDescribe(value = "获取组织属性对象.", action = ActionGet.class)
@GET
@Path("{flag}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		@JaxrsParameterDescribe("组织属性标识") @PathParam("flag") String id) {
	ActionResult<ActionGet.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionGet().execute(effectivePerson, id);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, null);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码5 项目: dremio-oss   文件: SQLResource.java
@POST
@Path("/analyze/suggest")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public SuggestionResponse suggestSQL(AnalyzeRequest analyzeRequest) {
  final String sql = analyzeRequest.getSql();
  final List<String> context = analyzeRequest.getContext();
  final int cursorPosition = analyzeRequest.getCursorPosition();

  // Setup dependencies and execute suggestion acquisition
  SQLAnalyzer SQLAnalyzer =
    SQLAnalyzerFactory.createSQLAnalyzer(
      securityContext.getUserPrincipal().getName(), sabotContext, context, true, projectOptionManager);

  List<SqlMoniker> sqlEditorHints = SQLAnalyzer.suggest(sql, cursorPosition);

  // Build response object and return
  return buildSuggestionResponse(sqlEditorHints);
}
 
源代码6 项目: o2oa   文件: DataAction.java
@JaxrsMethodDescribe(value = "对指定的document删除局部data数据.", action = ActionDeleteWithDocumentPath7.class)
@DELETE
@Path("document/{id}/{path0}/{path1}/{path2}/{path3}/{path4}/{path5}/{path6}/{path7}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void deleteWithDocumentWithPath7(@Suspended final AsyncResponse asyncResponse,
		@Context HttpServletRequest request, @JaxrsParameterDescribe("文档ID") @PathParam("id") String id,
		@JaxrsParameterDescribe("0级路径") @PathParam("path0") String path0,
		@JaxrsParameterDescribe("1级路径") @PathParam("path1") String path1,
		@JaxrsParameterDescribe("2级路径") @PathParam("path2") String path2,
		@JaxrsParameterDescribe("3级路径") @PathParam("path3") String path3,
		@JaxrsParameterDescribe("4级路径") @PathParam("path4") String path4,
		@JaxrsParameterDescribe("5级路径") @PathParam("path5") String path5,
		@JaxrsParameterDescribe("6级路径") @PathParam("path6") String path6,
		@JaxrsParameterDescribe("7级路径") @PathParam("path7") String path7) {
	ActionResult<ActionDeleteWithDocumentPath7.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionDeleteWithDocumentPath7().execute(effectivePerson, id, path0, path1, path2, path3, path4,
				path5, path6, path7);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, null);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码7 项目: osiris   文件: SearchResourceImpl.java
@Override			
@Path("/room")
@GET
@ValidationRequired(processor = RestViolationProcessor.class)
@ApiOperation(value = "Get room according to indoor location", httpMethod="GET",response=RoomDTO.class)
@ApiResponses(value = {
		@ApiResponse(code = 200, message = "Room belongs to location", response=RoomDTO.class),
		@ApiResponse(code = 400, message = "Invalid input parameter"),
		@ApiResponse(code = 404, message = "Room not found"),
		@ApiResponse(code = 500, message = "Problem in the system")})
public Response getRoomByLocation(@Auth BasicAuth principal,
		@ApiParam(value = "Application identifier", required = true) @NotBlank @NotNull @HeaderParam("api_key") String appIdentifier, 			
		@ApiParam(value="Longitude of location", required=true) @Min(-180) @Max(180) @NotNull @QueryParam("longitude") Double longitude,
		@ApiParam(value="Latitude of location", required=true) @Min(-90) @Max(90) @NotNull @QueryParam("latitude") Double latitude,
		@ApiParam(value = "Floor of location", required = true) @NotNull  @QueryParam("floor") Integer floor) throws AssemblyException, RoomNotFoundException{
	validations.checkIsNotNullAndNotBlank(appIdentifier);
	validations.checkMin(-180.0, longitude);
	validations.checkMax(180.0, longitude);
	validations.checkMin(-90.0, latitude);
	validations.checkMax(90.0, latitude);
	validations.checkIsNotNull(floor);
	
	Feature room=searchManager.getRoomByLocation(appIdentifier, longitude, latitude, floor);			
	RoomDTO roomDTO=roomAssembler.createDataTransferObject(room);				
	return Response.ok(roomDTO).build();		
}
 
源代码8 项目: o2oa   文件: OkrConfigWorkLevelAction.java
@JaxrsMethodDescribe(value = "获取所有工作级别信息列表", action = ActionListAll.class)
@GET
@Path("all")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void all(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
	EffectivePerson effectivePerson = this.effectivePerson(request);
	ActionResult<List<ActionListAll.Wo>> result = new ActionResult<>();
	try {
		result = new ActionListAll().execute(request, effectivePerson);
	} catch (Exception e) {
		result = new ActionResult<>();
		logger.warn("system excute ExcuteListAll got an exception.");
		logger.error(e, effectivePerson, request, null);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码9 项目: o2oa   文件: TestAction.java
@JaxrsMethodDescribe(value = "文字转换.", action = ActionExtract.class)
@POST
@Path("extract")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.MULTIPART_FORM_DATA)
public void extract(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		@FormDataParam(FILE_FIELD) final byte[] bytes,
		@FormDataParam(FILE_FIELD) final FormDataContentDisposition disposition) {
	ActionResult<ActionExtract.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionExtract().execute(effectivePerson, bytes, disposition);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, null);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));

}
 
源代码10 项目: o2oa   文件: AttendanceWorkDayConfigAction.java
@JaxrsMethodDescribe(value = "根据ID删除节假日配置信息", action = ActionDelete.class)
@DELETE
@Path("{id}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void delete(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		@JaxrsParameterDescribe("节假日配置信息ID") @PathParam("id") String id) {
	ActionResult<ActionDelete.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	Boolean check = true;

	if (check) {
		try {
			result = new ActionDelete().execute(request, effectivePerson, id);
		} catch (Exception e) {
			result = new ActionResult<>();
			Exception exception = new ExceptionAttendanceProcess(e, "根据ID删除考勤统计需求信息时发生异常!");
			result.error(exception);
			logger.error(e, effectivePerson, request, null);
		}
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码11 项目: o2oa   文件: GroupAction.java
@JaxrsMethodDescribe(value = "查询群组的直接下级群组.", action = ActionListWithGroupSubDirect.class)
@POST
@Path("list/group/sub/direct")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void listWithGroupSubDirect(@Suspended final AsyncResponse asyncResponse,
		@Context HttpServletRequest request, JsonElement jsonElement) {
	ActionResult<ActionListWithGroupSubDirect.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionListWithGroupSubDirect().execute(effectivePerson, jsonElement);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, jsonElement);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码12 项目: Knowage-Server   文件: I18nResource.java
@DELETE
@Path("/deletedefault/{id}")
public Response deleteDefaultI18NMessage(@PathParam("id") Integer id) {
	I18NMessagesDAO I18NMessagesDAO = null;
	try {
		I18NMessagesDAO = DAOFactory.getI18NMessageDAO();
		SbiI18NMessages message = I18NMessagesDAO.getSbiI18NMessageById(id);
		I18NMessagesDAO.deleteNonDefaultI18NMessages(message);
		I18NMessagesDAO.deleteI18NMessage(id);
		String encodedI18NMessage = URLEncoder.encode("" + id, "UTF-8");
		return Response.ok().entity(encodedI18NMessage).build();
	} catch (Exception e) {
		logger.error("Error has occurred while deleting Default-Language I18NMessage", e);
		throw new SpagoBIRestServiceException("Error while deleting Default-Language I18NMessage", buildLocaleFromSession(), e);
	}
}
 
源代码13 项目: o2oa   文件: PersonAction.java
@JaxrsMethodDescribe(value = "判断个人是否拥有指定角色中的一个或者多个", action = ActionHasRole.class)
@POST
@Path("has/role")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void hasRole(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		JsonElement jsonElement) {
	ActionResult<ActionHasRole.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionHasRole().execute(effectivePerson, jsonElement);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, jsonElement);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码14 项目: vxms   文件: RESTServiceChainObjectTest.java
@Path("/basicTestAndThen")
@GET
public void basicTestAndThen(RestHandler reply) {
  System.out.println("basicTestAndThen: " + reply);
  reply
      .response()
      .<Integer>supply(
          (future) -> {
            future.complete(1);
          })
      .<String>andThen(
          (value, future) -> {
            future.complete(value + 1 + "");
          })
      .mapToObjectResponse(
          (val, future) -> {
            Payload<String> pp = new Payload<>(val + " final");
            future.complete(pp);
          },
          new ExampleByteEncoder())
      .execute();
}
 
源代码15 项目: o2oa   文件: PersonAction.java
@JaxrsMethodDescribe(value = "查询最近登录人员对象", action = ActionListLoginRecentObject.class)
@POST
@Path("list/login/recent/object")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void listLoginRecentObject(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		JsonElement jsonElement) {
	ActionResult<List<ActionListLoginRecentObject.Wo>> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionListLoginRecentObject().execute(effectivePerson, jsonElement);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, jsonElement);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码16 项目: digdag   文件: AdminResource.java
@Deprecated
@GET
@Path("/api/admin/attempts/{id}/userinfo")
@ApiOperation("(deprecated)")
public Config getUserInfo(@PathParam("id") long id)
        throws ResourceNotFoundException
{
    return tm.begin(() -> {
        StoredSessionAttemptWithSession session = sm.getAttemptWithSessionById(id);

        if (!session.getWorkflowDefinitionId().isPresent()) {
            // TODO: is 404 appropriate in this situation?
            throw new NotFoundException();
        }

        StoredRevision revision = pm.getRevisionOfWorkflowDefinition(session.getWorkflowDefinitionId().get());

        return revision.getUserInfo();
    }, ResourceNotFoundException.class);
}
 
源代码17 项目: Knowage-Server   文件: MemberResource.java
@GET
@Path("/sort/disable")
public String sorten() {
	WhatIfEngineInstance ei = getWhatIfEngineInstance();
	SpagoBIPivotModel model = (SpagoBIPivotModel) ei.getPivotModel();
	ModelConfig modelConfig = getWhatIfEngineInstance().getModelConfig();

	model.removeSubset();

	getWhatIfEngineInstance().getModelConfig().setSortingEnabled(!modelConfig.getSortingEnabled());
	if (!modelConfig.getSortingEnabled()) {
		model.setSortCriteria(null);
		model.setSorting(false);
	}

	model.removeOrder(Axis.ROWS);
	model.removeOrder(Axis.COLUMNS);
	List<Member> a = model.getSortPosMembers1();
	a.clear();

	return renderModel(model);
}
 
源代码18 项目: o2oa   文件: RegistAction.java
@JaxrsMethodDescribe(value = "校验name是否已经存在", action = ActionCheckName.class)
@GET
@Path("check/name/{name}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void checkName(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		@JaxrsParameterDescribe("用户名") @PathParam("name") String name) {
	ActionResult<ActionCheckName.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionCheckName().execute(effectivePerson, name);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, null);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码19 项目: o2oa   文件: DataAction.java
@JaxrsMethodDescribe(value = "对指定的work添加局部data数据.", action = ActionCreateWithWorkPath0.class)
@POST
@Path("work/{id}/{path0}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void createWithWorkPath0(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		@JaxrsParameterDescribe("工作标识") @PathParam("id") String id,
		@JaxrsParameterDescribe("0级路径") @PathParam("path0") String path0, JsonElement jsonElement) {
	ActionResult<ActionCreateWithWorkPath0.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionCreateWithWorkPath0().execute(effectivePerson, id, path0, jsonElement);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, jsonElement);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码20 项目: o2oa   文件: OkrStatisticReportStatusAction.java
@JaxrsMethodDescribe(value = "测试定时代理,对工作的汇报提交情况进行统计分析", action = ActionStReportStatusCaculateAll.class)
@GET
@Path("excute/all")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void excuteAll(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
	EffectivePerson effectivePerson = this.effectivePerson(request);
	ActionResult<WrapOutString> result = new ActionResult<>();
	try {
		result = new ActionStReportStatusCaculateAll().execute(request, effectivePerson);
	} catch (Exception e) {
		result = new ActionResult<>();
		result.error(e);
		logger.warn("system excute ExcuteStReportStatusCaculateAll got an exception. ");
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码21 项目: o2oa   文件: ProcessAction.java
@JaxrsMethodDescribe(value = "升级流程.", action = ActionUpgrade.class)
@POST
@Path("{id}/upgrade")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void upgrade(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
					@JaxrsParameterDescribe("标识") @PathParam("id") String id, JsonElement jsonElement) {
	ActionResult<ActionUpgrade.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionUpgrade().execute(effectivePerson, id, jsonElement);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, jsonElement);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码22 项目: incubator-atlas   文件: LineageREST.java
/**
 * Returns lineage info about entity.
 * @param guid - unique entity id
 * @param direction - input, output or both
 * @param depth - number of hops for lineage
 * @return AtlasLineageInfo
 * @throws AtlasBaseException
 * @HTTP 200 If Lineage exists for the given entity
 * @HTTP 400 Bad query parameters
 * @HTTP 404 If no lineage is found for the given entity
 */
@GET
@Path("/{guid}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasLineageInfo getLineageGraph(@PathParam("guid") String guid,
                                        @QueryParam("direction") @DefaultValue(DEFAULT_DIRECTION)  LineageDirection direction,
                                        @QueryParam("depth") @DefaultValue(DEFAULT_DEPTH) int depth) throws AtlasBaseException {
    AtlasPerfTracer perf = null;

    try {
        if (AtlasPerfTracer.isPerfTraceEnabled(PERF_LOG)) {
            perf = AtlasPerfTracer.getPerfTracer(PERF_LOG, "LineageREST.getLineageGraph(" + guid + "," + direction +
                                                           "," + depth + ")");
        }

        return atlasLineageService.getAtlasLineageInfo(guid, direction, depth);
    } finally {
        AtlasPerfTracer.log(perf);
    }
}
 
源代码23 项目: o2oa   文件: DataAction.java
@JaxrsMethodDescribe(value = "对指定的work删除局部data数据.", action = ActionDeleteWithWorkPath3.class)
@DELETE
@Path("work/{id}/{path0}/{path1}/{path2}/{path3}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void deleteWithWorkPath3(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		@JaxrsParameterDescribe("工作标识") @PathParam("id") String id,
		@JaxrsParameterDescribe("0级路径") @PathParam("path0") String path0,
		@JaxrsParameterDescribe("1级路径") @PathParam("path1") String path1,
		@JaxrsParameterDescribe("2级路径") @PathParam("path2") String path2,
		@JaxrsParameterDescribe("3级路径") @PathParam("path3") String path3) {
	ActionResult<ActionDeleteWithWorkPath3.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionDeleteWithWorkPath3().execute(effectivePerson, id, path0, path1, path2, path3);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, null);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
@GET
@Path("schema")
@Produces(MediaType.APPLICATION_JSON)
@ApiOperation(value = "Get an certificate's schema",
        notes = "There is no particular permission needed. User must be authenticated.")
public void getSchema(
        @PathParam("certificate") String certificateId,
        @Suspended final AsyncResponse response) {

    // Check that the certificate exists
    certificatePluginService.findById(certificateId)
            .switchIfEmpty(Maybe.error(new CertificatePluginNotFoundException(certificateId)))
            .flatMap(irrelevant -> certificatePluginService.getSchema(certificateId))
            .switchIfEmpty(Maybe.error(new CertificatePluginSchemaNotFoundException(certificateId)))
            .map(certificatePluginSchema -> Response.ok(certificatePluginSchema).build())
            .subscribe(response::resume, response::resume);
}
 
源代码25 项目: o2oa   文件: TableAction.java
@JaxrsMethodDescribe(value = "根据标识获取表.", action = ActionGet.class)
@GET
@Path("{flag}")
@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
@Consumes(MediaType.APPLICATION_JSON)
public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
		@JaxrsParameterDescribe("标识") @PathParam("flag") String flag) {
	ActionResult<ActionGet.Wo> result = new ActionResult<>();
	EffectivePerson effectivePerson = this.effectivePerson(request);
	try {
		result = new ActionGet().execute(effectivePerson, flag);
	} catch (Exception e) {
		logger.error(e, effectivePerson, request, null);
		result.error(e);
	}
	asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
}
 
源代码26 项目: streamline   文件: WindowCatalogResource.java
@GET
@Path("/topologies/{topologyId}/windows")
@Timed
public Response listTopologyWindows(@PathParam("topologyId") Long topologyId, @Context UriInfo uriInfo,
                                    @Context SecurityContext securityContext) throws Exception {
    Long currentVersionId = catalogService.getCurrentVersionId(topologyId);
    return listTopologyWindows(
            buildTopologyIdAndVersionIdAwareQueryParams(topologyId, currentVersionId, uriInfo),
            topologyId,
            securityContext);
}
 
源代码27 项目: component-runtime   文件: ComponentServerMock.java
@POST
@Path("action/execute")
public Map<String, String> execute(@QueryParam("family") final String family, @QueryParam("type") final String type,
        @QueryParam("action") final String action, @QueryParam("lang") final String lang,
        final Map<String, String> params) {
    final Map<String, String> out = new HashMap<>(params);
    out.put("family", family);
    out.put("type", type);
    out.put("action", action);
    out.put("lang", lang);
    return out;
}
 
源代码28 项目: govpay   文件: Profilo.java
@GET
@Path("/")

@Produces({ "application/json" })
public Response getProfilo(@Context UriInfo uriInfo, @Context HttpHeaders httpHeaders){
    this.buildContext();
    return this.controller.getProfilo(this.getUser(), uriInfo, httpHeaders);
}
 
源代码29 项目: attic-apex-core   文件: StramWebServices.java
@GET
@Path(PATH_LOGICAL_PLAN_OPERATORS + "/{operatorName}/ports/{portName}")
@Produces(MediaType.APPLICATION_JSON)
public JSONObject getPort(@PathParam("operatorName") String operatorName, @PathParam("portName") String portName)
{
  init();
  OperatorMeta logicalOperator = dagManager.getLogicalPlan().getOperatorMeta(operatorName);
  Set<LogicalPlan.InputPortMeta> inputPorts;
  Set<LogicalPlan.OutputPortMeta> outputPorts;
  if (logicalOperator == null) {
    ModuleMeta logicalModule = dagManager.getModuleMeta(operatorName);
    if (logicalModule == null) {
      throw new NotFoundException();
    }
    inputPorts = logicalModule.getInputStreams().keySet();
    outputPorts = logicalModule.getOutputStreams().keySet();
  } else {
    inputPorts = logicalOperator.getInputStreams().keySet();
    outputPorts = logicalOperator.getOutputStreams().keySet();
  }

  try {
    JSONObject resp = getPortObject(inputPorts, outputPorts, portName);
    if (resp != null) {
      return resp;
    }
  } catch (JSONException ex) {
    throw new RuntimeException(ex);
  }
  throw new NotFoundException();
}
 
源代码30 项目: keywhiz   文件: SecretResource.java
/**
 * Retrieve listing of secrets expiring soon in a group
 *
 * @param time timestamp for farthest expiry to include
 * @param name Group name
 * responseMessage 200 List of secrets expiring soon in group
 */
@Timed @ExceptionMetered
@Path("expiring/{time}/{name}")
@GET
@Produces(APPLICATION_JSON)
public Iterable<String> secretListingExpiringForGroup(@Auth AutomationClient automationClient,
    @PathParam("time") Long time, @PathParam("name") String name) {
  Group group = groupDAO.getGroup(name).orElseThrow(NotFoundException::new);

  List<SanitizedSecret> secrets = secretControllerReadOnly.getSanitizedSecrets(time, group);
  return secrets.stream()
      .map(SanitizedSecret::name)
      .collect(toSet());
}
 
 类所在包
 类方法
 同包方法