本文整理汇总了Java中org.jboss.resteasy.util.HttpResponseCodes.SC_BAD_REQUEST属性的典型用法代码示例。如果您正苦于以下问题:Java HttpResponseCodes.SC_BAD_REQUEST属性的具体用法?Java HttpResponseCodes.SC_BAD_REQUEST怎么用?Java HttpResponseCodes.SC_BAD_REQUEST使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.jboss.resteasy.util.HttpResponseCodes
的用法示例。
在下文中一共展示了HttpResponseCodes.SC_BAD_REQUEST属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: removeDataFlowNodeLink
public boolean removeDataFlowNodeLink(String serviceRootURL, String dataFlowId, String sourceDataFlowNodeId, String sinkDataFlowNodeId)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowNodeLinkClient.removeDataFlowNodeLink: " + serviceRootURL + ", " + dataFlowId + ", " + sourceDataFlowNodeId + ", " + sinkDataFlowNodeId);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflownodelink/{dataflowid}");
request.pathParameter("dataflowid", dataFlowId);
request.queryParameter("sourcedataflownodeid", sourceDataFlowNodeId);
request.queryParameter("sinkdataflownodeid", sinkDataFlowNodeId);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<Boolean> response = request.delete(new GenericType<Boolean>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "Problem with rest call for 'removeDataFlowNodeLink'");
throw new RequestProblemException("Problem during request for link removal");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'removeDataFlowNodeLink'", throwable);
throw new RequestProblemException("Problem requesting of link removal");
}
}
示例2: getDataFlowNodeClassNames
public List<String> getDataFlowNodeClassNames(String serviceRootURL, String dataflowId, String factoryName)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.getDataFlowNodeClassNames: " + serviceRootURL + ", " + dataflowId + ", " + factoryName);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowid}/_dataflownodeclassnames");
request.pathParameter("dataflowid", dataflowId);
request.queryParameter("factoryname", factoryName);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<ClassNamesDTO> response = request.get(new GenericType<ClassNamesDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity().getClassNames();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.getDataFlowNodeClassNames: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of class names");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.getDataFlowNodeClassNames'", throwable);
throw new RequestProblemException("Problem requesting of class names");
}
}
示例3: getFactoryNames
public List<String> getFactoryNames(String serviceRootURL, String dataFlowId, String dataFlowNodeClassName)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.getFactoryNames: " + serviceRootURL + ", " + dataFlowId);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowid}/_factorynames");
request.pathParameter("dataflowid", dataFlowId);
request.queryParameter("dataflownodeclassname", dataFlowNodeClassName);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<FactoryNamesDTO> response = request.get(new GenericType<FactoryNamesDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity().getFactoryNames();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.getFactoryNames: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of factory names");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.getFactoryNames'", throwable);
throw new RequestProblemException("Problem requesting of factory names");
}
}
示例4: getFactoryInfo
public DataFlowNodeFactorySummary getFactoryInfo(String serviceRootURL, String dataFlowId, String factoryName)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.getFactoryInfo: " + serviceRootURL + ", " + dataFlowId);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowid}/_factoryinfo");
request.pathParameter("dataflowid", dataFlowId);
request.queryParameter("factoryname", factoryName);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<DataFlowNodeFactoryDTO> response = request.get(new GenericType<DataFlowNodeFactoryDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
{
DataFlowNodeFactoryDTO dataFlowNodeFactoryDTO = response.getEntity();
return new DataFlowNodeFactorySummary(dataFlowNodeFactoryDTO.getAttribute(), dataFlowNodeFactoryDTO.getProperties(), dataFlowNodeFactoryDTO.isDataSourceFactory(), dataFlowNodeFactoryDTO.isDataSinkFactory(), dataFlowNodeFactoryDTO.isDataProcessorFactory(), dataFlowNodeFactoryDTO.isDataServiceFactory(), dataFlowNodeFactoryDTO.isDataStoreFactory());
}
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.getFactoryInfo: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of factory information");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.getFactoryInfo'", throwable);
throw new RequestProblemException("Problem requesting of factory information");
}
}
示例5: getMetaPropertyNames
public List<String> getMetaPropertyNames(String serviceRootURL, String dataFlowId, String dataFlowNodeClassName, String factoryName)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.getMetaPropertyNames: " + serviceRootURL + ", " + dataFlowId + ", " + dataFlowNodeClassName + ", " + factoryName);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowid}/_metapropertynames");
request.pathParameter("dataflowid", dataFlowId);
request.queryParameter("dataflownodeclassname", dataFlowNodeClassName);
request.queryParameter("factoryname", factoryName);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<PropertyNamesDTO> response = request.get(new GenericType<PropertyNamesDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity().getPropertyNames();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.getMetaPropertyNames: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of meta-property names");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.getMetaPropertyNames'", throwable);
throw new RequestProblemException("Problem requesting of meta-property names");
}
}
示例6: getPropertyNames
public List<String> getPropertyNames(String serviceRootURL, String dataFlowId, String dataFlowNodeClassName, String factoryName, Map<String, String> metaProperties)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.getPropertyNames: " + serviceRootURL + ", " + dataFlowId + "," + dataFlowNodeClassName + "," + factoryName + "," + metaProperties);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowId}/_propertynames");
request.pathParameter("dataflowId", dataFlowId);
request.queryParameter("dataflownodeclassname", dataFlowNodeClassName);
request.queryParameter("factoryname", factoryName);
request.body(MediaType.APPLICATION_JSON, new PropertiesDTO(metaProperties));
ClientResponse<PropertyNamesDTO> response = request.post(new GenericType<PropertyNamesDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity().getPropertyNames();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.getPropertyNames: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of property names");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.getPropertyNames'", throwable);
throw new RequestProblemException("Problem requesting of property names");
}
}
示例7: createDataFlowNode
public String createDataFlowNode(String serviceRootURL, String dataFlowId, String dataFlowNodeClassName, String factoryName, Map<String, String> metaProperties, String name, Map<String, String> properties)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.createDataFlowNode: " + serviceRootURL + ", " + dataFlowId + ", " + dataFlowNodeClassName + ", " + factoryName + ", " + metaProperties + ", " + name + ", " + properties);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowId}");
request.pathParameter("dataflowId", dataFlowId);
request.queryParameter("factoryname", factoryName);
request.queryParameter("name", name);
request.queryParameter("dataflownodeclassname", dataFlowNodeClassName);
request.body(MediaType.APPLICATION_JSON, new CreatePropertiesDTO(metaProperties, properties));
ClientResponse<String> response = request.post(new GenericType<String>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.createDataFlowNode: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of creation data flow node");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.createDataFlowNode'", throwable);
throw new RequestProblemException("Problem requesting of creation data flow node");
}
}
示例8: getDataFlowNodeInfo
public DataFlowNodeSummary getDataFlowNodeInfo(String serviceRootURL, String dataFlowId, String dataFlowNodeid)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.getDataFlowNodeInfo: " + serviceRootURL + ", " + dataFlowId + ", " + dataFlowNodeid);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowid}/{dataflownodeid}");
request.pathParameter("dataflowid", dataFlowId);
request.pathParameter("dataflownodeid", dataFlowNodeid);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<DataFlowNodeDTO> response = request.get(new GenericType<DataFlowNodeDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
{
DataFlowNodeDTO dataFlowNodeDTO = response.getEntity();
return new DataFlowNodeSummary(dataFlowNodeDTO.getName(), dataFlowNodeDTO.getType(), dataFlowNodeDTO.getProperties());
}
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.getDataFlowNodeInfo: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of data flow node info");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.getDataFlowNodeInfo'", throwable);
throw new RequestProblemException("Problem requesting of data flow node info");
}
}
示例9: removeDataFlowNode
public Boolean removeDataFlowNode(String serviceRootURL, String dataFlowId, String dataFlowNodeid)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.removeDataFlowNode: " + serviceRootURL + ", " + dataFlowId + ", " + dataFlowNodeid);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowid}/{dataflownodeid}");
request.pathParameter("dataflowid", dataFlowId);
request.pathParameter("dataflownodeid", dataFlowNodeid);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<Boolean> response = request.delete(new GenericType<Boolean>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.removeDataFlowNode: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of removal data flow node");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.removeDataFlowNode'", throwable);
throw new RequestProblemException("Problem requesting of removal data flow node");
}
}
示例10: addDataFlowNodeFactory
public Boolean addDataFlowNodeFactory(String serviceRootURL, String dataFlowId, String dataFlowNodeFactoryName)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.addDataFlowNodeFactory: " + serviceRootURL + ", " + dataFlowId + ", " + dataFlowNodeFactoryName);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowid}/_factories");
request.pathParameter("dataflowid", dataFlowId);
request.queryParameter("dataflownodefactoryname", dataFlowNodeFactoryName);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<Boolean> response = request.post(new GenericType<Boolean>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.addDataFlowNodeFactory: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of addition of data flow node factory");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.addDataFlowNodeFactory'", throwable);
throw new RequestProblemException("Problem requesting of addition of data flow node factory");
}
}
示例11: removeDataFlowNodeFactory
public Boolean removeDataFlowNodeFactory(String serviceRootURL, String dataFlowId, String dataFlowNodeFactoryName)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowClient.removeDataFlowNodeFactory: " + serviceRootURL + ", " + dataFlowId + ", " + dataFlowNodeFactoryName);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflow/{dataflowid}/_factories");
request.pathParameter("dataflowid", dataFlowId);
request.queryParameter("dataflownodefactoryname", dataFlowNodeFactoryName);
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<Boolean> response = request.delete(new GenericType<Boolean>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowClient.removeDataFlowNodeFactory: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of removal of data flow node factory");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowClient.removeDataFlowNodeFactory'", throwable);
throw new RequestProblemException("Problem requesting of removal of data flow node factory");
}
}
示例12: getInfo
public DataFlowFactorySummary getInfo(String serviceRootURL)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowFactoryClient.getMetaPropertyNames: " + serviceRootURL);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflowfactory/_info");
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<DataFlowFactoryDTO> response = request.get(new GenericType<DataFlowFactoryDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
{
DataFlowFactoryDTO dataFlowFactory = response.getEntity();
return new DataFlowFactorySummary(dataFlowFactory.getName(), dataFlowFactory.getProperties());
}
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowFactoryClient.getMetaPropertyNames: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of meta-property names");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowFactoryClient.getMetaPropertyNames'", throwable);
throw new RequestProblemException("Problem requesting of meta-property names");
}
}
示例13: getMetaPropertyNames
public List<String> getMetaPropertyNames(String serviceRootURL)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowFactoryClient.getMetaPropertyNames: " + serviceRootURL);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflowfactory/_metapropertynames");
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<PropertyNamesDTO> response = request.get(new GenericType<PropertyNamesDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity().getPropertyNames();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowFactoryClient.getMetaPropertyNames: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of meta-property names");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowFactoryClient.getMetaPropertyNames'", throwable);
throw new RequestProblemException("Problem requesting of meta-property names");
}
}
示例14: getPropertyNames
public List<String> getPropertyNames(String serviceRootURL, Map<String, String> metaProperties)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowFactoryClient.getPropertyNames: " + serviceRootURL + "," + metaProperties);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflowfactory/_propertynames");
request.body(MediaType.APPLICATION_JSON, new PropertiesDTO(metaProperties));
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<PropertyNamesDTO> response = request.post(new GenericType<PropertyNamesDTO>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity().getPropertyNames();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowFactoryClient.getPropertyNames: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of property names");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'DataFlowFactoryClient.getPropertyNames'", throwable);
throw new RequestProblemException("Problem requesting of property names");
}
}
示例15: createDataFlow
public String createDataFlow(String serviceRootURL, String name, Map<String, String> metaProperties, Map<String, String> properties)
throws RequestProblemException
{
logger.log(Level.FINE, "DataFlowFactoryClient.createDataFlow: " + serviceRootURL + ", " + name + ", " + metaProperties + ", " + properties);
try
{
ClientRequest request = new ClientRequest(serviceRootURL + "/control/ws/dataflowfactory");
request.queryParameter("name", name);
request.body(MediaType.APPLICATION_JSON, new CreatePropertiesDTO(metaProperties, properties));
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<String> response = request.post(new GenericType<String>() {});
if (response.getStatus() == HttpResponseCodes.SC_OK)
return response.getEntity();
else if (response.getStatus() == HttpResponseCodes.SC_BAD_REQUEST)
throw new RequestProblemException(response.getEntity(String.class));
else
{
logger.log(Level.WARNING, "DataFlowFactoryClient.createDataFlow: status = " + response.getStatus());
throw new RequestProblemException("Problem during request of creation of data flow");
}
}
catch (RequestProblemException requestProblemException)
{
throw requestProblemException;
}
catch (Throwable throwable)
{
logger.log(Level.WARNING, "Problem in 'createDataFlow'", throwable);
throw new RequestProblemException("Problem requesting of creation of data flow");
}
}