本文整理汇总了Java中org.pentaho.di.www.WebResult.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java WebResult.getMessage方法的具体用法?Java WebResult.getMessage怎么用?Java WebResult.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.www.WebResult
的用法示例。
在下文中一共展示了WebResult.getMessage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: pause
import org.pentaho.di.www.WebResult; //导入方法依赖的package包/类
protected void pause() {
TreeEntry treeEntry = getTreeEntry();
if (treeEntry == null)
return;
// Transformations
//
if (treeEntry.isTransformation()) {
try {
WebResult webResult = slaveServer.pauseResumeTransformation(treeEntry.name, treeEntry.id);
if (!webResult.getResult().equalsIgnoreCase(WebResult.STRING_OK)) {
EnterTextDialog dialog = new EnterTextDialog(shell, BaseMessages.getString(PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Title"),
BaseMessages.getString(PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Message"), webResult.getMessage());
dialog.setReadOnly();
dialog.open();
}
} catch (Exception e) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Title"), BaseMessages.getString(PKG,
"SpoonSlave.ErrorPausingOrResumingTrans.Message"), e);
}
}
}
示例2: cancel
import org.pentaho.di.www.WebResult; //导入方法依赖的package包/类
public synchronized void cancel() throws SQLException {
// Kill the service transformation on the server...
// Only ever try once.
//
if (!stopped.get()) {
stopped.set(true);
try {
String reply = HttpUtil.execService(new Variables(),
connection.getHostname(), connection.getPort(), connection.getWebAppName(),
connection.getService()+"/stopTrans"+"/?name="+URLEncoder.encode(serviceTransName, "UTF-8")+"&id="+Const.NVL(serviceObjectId, "")+"&xml=Y",
connection.getUsername(), connection.getPassword(),
connection.getProxyHostname(), connection.getProxyPort(), connection.getNonProxyHosts());
WebResult webResult = new WebResult(XMLHandler.loadXMLString(reply, WebResult.XML_TAG));
if (!"OK".equals(webResult.getResult())) {
throw new SQLException("Cancel on remote server failed: "+webResult.getMessage());
}
} catch(Exception e) {
throw new SQLException("Couldn't cancel SQL query on slave server", e);
}
}
}
示例3: cleanupSlaveServer
import org.pentaho.di.www.WebResult; //导入方法依赖的package包/类
/**
* Cleanup the slave server as part of a clustered transformation.
*
* @param transSplitter
* the TransSplitter object
* @param slaveServer
* the slave server
* @param slaveTransMeta
* the slave transformation meta-data
* @throws KettleException
* if any errors occur during cleanup
*/
public static void cleanupSlaveServer( TransSplitter transSplitter, SlaveServer slaveServer,
TransMeta slaveTransMeta ) throws KettleException {
String transName = slaveTransMeta.getName();
try {
String carteObjectId = transSplitter.getCarteObjectMap().get( slaveTransMeta );
WebResult webResult = slaveServer.cleanupTransformation( transName, carteObjectId );
if ( !WebResult.STRING_OK.equals( webResult.getResult() ) ) {
throw new KettleException( "Unable to run clean-up on slave server '" + slaveServer + "' for transformation '"
+ transName + "' : " + webResult.getMessage() );
}
} catch ( Exception e ) {
throw new KettleException( "Unexpected error contacting slave server '" + slaveServer
+ "' to clear up transformation '" + transName + "'", e );
}
}
示例4: pause
import org.pentaho.di.www.WebResult; //导入方法依赖的package包/类
protected void pause() {
TreeEntry treeEntry = getTreeEntry();
if ( treeEntry == null ) {
return;
}
if ( treeEntry.isTransformation() ) {
// Transformation
try {
WebResult webResult = slaveServer.pauseResumeTransformation( treeEntry.name, treeEntry.id );
if ( !WebResult.STRING_OK.equalsIgnoreCase( webResult.getResult() ) ) {
EnterTextDialog dialog =
new EnterTextDialog( shell,
BaseMessages.getString( PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Title" ),
BaseMessages.getString( PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Message" ),
webResult.getMessage() );
dialog.setReadOnly();
dialog.open();
}
} catch ( Exception e ) {
new ErrorDialog( shell,
BaseMessages.getString( PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Title" ),
BaseMessages.getString( PKG, "SpoonSlave.ErrorPausingOrResumingTrans.Message" ), e );
}
}
}
示例5: cleanupSlaveServer
import org.pentaho.di.www.WebResult; //导入方法依赖的package包/类
public static void cleanupSlaveServer(TransSplitter transSplitter, SlaveServer slaveServer, TransMeta slaveTransMeta) throws KettleException {
String transName = slaveTransMeta.getName();
try {
String carteObjectId = transSplitter.getCarteObjectMap().get(slaveTransMeta);
WebResult webResult = slaveServer.cleanupTransformation(transName, carteObjectId);
if (!WebResult.STRING_OK.equals(webResult.getResult()))
{
throw new KettleException("Unable to run clean-up on slave server '"+slaveServer+"' for transformation '"+transName+"' : "+webResult.getMessage());
}
} catch(Exception e) {
throw new KettleException("Unexpected error contacting slave server '"+slaveServer+"' to clear up transformation '"+transName+"'", e);
}
}
示例6: remove
import org.pentaho.di.www.WebResult; //导入方法依赖的package包/类
protected void remove() {
TreeEntry treeEntry = getTreeEntry();
if (treeEntry == null)
return;
// Transformations
//
if (treeEntry.isTransformation()) {
SlaveServerTransStatus transStatus = slaveServerStatus.findTransStatus(treeEntry.name, treeEntry.id);
if (transStatus != null) {
if (!transStatus.isRunning() && !transStatus.isPaused() && !transStatus.isStopped()) {
try {
WebResult webResult = slaveServer.removeTransformation(treeEntry.name, transStatus.getId());
if (!webResult.getResult().equalsIgnoreCase(WebResult.STRING_OK)) {
EnterTextDialog dialog = new EnterTextDialog(shell, BaseMessages.getString(PKG, "SpoonSlave.ErrorRemovingTrans.Title"), BaseMessages.getString(
PKG, "SpoonSlave.ErrorRemovingTrans.Message"), webResult.getMessage());
dialog.setReadOnly();
dialog.open();
}
} catch (Exception e) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "SpoonSlave.ErrorRemovingTrans.Title"), BaseMessages.getString(PKG,
"SpoonSlave.ErrorRemovingTrans.Message"), e);
}
}
}
}
// TODO: support for jobs
}
示例7: cleanupSlaveServer
import org.pentaho.di.www.WebResult; //导入方法依赖的package包/类
/**
* Cleanup the slave server as part of a clustered transformation.
*
* @param transSplitter the TransSplitter object
* @param slaveServer the slave server
* @param slaveTransMeta the slave transformation meta-data
* @throws KettleException if any errors occur during cleanup
*/
public static void cleanupSlaveServer(TransSplitter transSplitter, SlaveServer slaveServer, TransMeta slaveTransMeta) throws KettleException {
String transName = slaveTransMeta.getName();
try {
String carteObjectId = transSplitter.getCarteObjectMap().get(slaveTransMeta);
WebResult webResult = slaveServer.cleanupTransformation(transName, carteObjectId);
if (!WebResult.STRING_OK.equals(webResult.getResult()))
{
throw new KettleException("Unable to run clean-up on slave server '"+slaveServer+"' for transformation '"+transName+"' : "+webResult.getMessage());
}
} catch(Exception e) {
throw new KettleException("Unexpected error contacting slave server '"+slaveServer+"' to clear up transformation '"+transName+"'", e);
}
}