Java Code Examples for org.pentaho.di.trans.Trans#getContainerObjectId()
The following examples show how to use
org.pentaho.di.trans.Trans#getContainerObjectId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RunTransServlet.java From pentaho-kettle with Apache License 2.0 | 5 votes |
/** If the transformation has at least one step in a transformation, which writes it's data straight to a servlet output we should wait transformation's termination. Otherwise the servlet's response lifecycle may come to an end and the response will be closed by container while the transformation will be still trying writing data into it. */ @VisibleForTesting void finishProcessing( Trans trans, PrintWriter out ) { if ( trans.getSteps().stream().anyMatch( step -> step.meta.passDataToServletOutput() ) ) { trans.waitUntilFinished(); } else { WebResult webResult = new WebResult( WebResult.STRING_OK, "Transformation started", trans.getContainerObjectId() ); out.println( webResult.getXML() ); out.flush(); } }
Example 2
Source File: TransformationMap.java From pentaho-kettle with Apache License 2.0 | 4 votes |
public void registerTransformation( Trans trans, TransConfiguration transConfiguration ) { trans.setContainerObjectId( UUID.randomUUID().toString() ); CarteObjectEntry entry = new CarteObjectEntry( trans.getTransMeta().getName(), trans.getContainerObjectId() ); transMap.put( entry, new TransData( trans, transConfiguration ) ); }
Example 3
Source File: RegisterTransServlet.java From pentaho-kettle with Apache License 2.0 | 3 votes |
@Override WebResult generateBody( HttpServletRequest request, HttpServletResponse response, boolean useXML ) throws IOException, KettleException { final String xml = IOUtils.toString( request.getInputStream() ); // Parse the XML, create a transformation configuration TransConfiguration transConfiguration = TransConfiguration.fromXML( xml ); Trans trans = createTrans( transConfiguration ); String message = "Transformation '" + trans.getName() + "' was added to Carte with id " + trans.getContainerObjectId(); return new WebResult( WebResult.STRING_OK, message, trans.getContainerObjectId() ); }