com.ibm.rational.rpe.api.docgen
Class LocalDocumentGenerator

java.lang.Object
  extended by com.ibm.rational.rpe.api.docgen.LocalDocumentGenerator
All Implemented Interfaces:
IDocumentGenerator, IControl

public class LocalDocumentGenerator
extends java.lang.Object
implements IDocumentGenerator

Utility class for publishing reports by using a local instance. For publishing reports by using a remote web service, see RemoteDocumentGenerator.


Constructor Summary
LocalDocumentGenerator(com.ibm.rational.rpe.engine.RRDGEngine engine)
          Builds a LocalDocument generator instance by using the provided RRDGEngine.
 
Method Summary
 void addStatusListener(RPEListener listener)
          Deprecated. 
 void enableDebug(boolean debug)
          Enables the core debug mode for this document generation.
 java.lang.String getConfigurationPath(java.net.URI path)
          Deprecated. 
 IConnectionConfigurator getConnectionConfigurator()
          Returns the IConnectionConfigurator object that is used by the generator, if any.
 java.util.List<RPEResult> getResults()
          Retrieves the results of a publishing process.
 com.ibm.rational.rpe.engine.RRDGEngine.EngineStatus getStatus()
          See IDocumentGenerator.getStatus()
 com.ibm.rational.rpe.common.utils.IURIResolver getURIResolver()
          Returns the IURIResolver object that is used by the generator, if any.
 void pause()
          Pauses the publishing process.
 java.lang.Thread publish(RPEDocumentSpecification docSpec)
          Deprecated. 
 java.lang.Thread publish(RPEDocumentSpecification docSpec, int previewLimit)
          Starts the publishing process for a given document specification in a separate thread.
 void publishSync(RPEDocumentSpecification docSpec)
          Deprecated. 
 com.ibm.rational.rpe.engine.RRDGEngine.EngineStatus publishSync(RPEDocumentSpecification docSpec, int previewLimit)
          Starts the publishing process for a given document specification in the calling thread.
 void registerListener(RPEListener listener)
          See IDocumentGenerator#registerListener().
 void removeStatusListener(RPEListener listener)
          Deprecated. 
 void resume()
          Resumes a paused publishing process.
 void setConnectionConfigurator(IConnectionConfigurator connectionConfigurator)
          Optional: Sets the IConnectionConfigurator object to be used by the generator
 void setMCData(com.ibm.rational.rpe.api.monitor.MCData mcdata)
          Set the MCData information to be used if this document generation is to be made available to the Rational Publishing Engine Monitor & Control service.
 void setURIResolver(com.ibm.rational.rpe.common.utils.IURIResolver uriResolver)
          Optional: Sets the IURIResolver object to be used by the generator
 void stop()
          Stops a running publishing process.
 void unregisterListener(RPEListener listener)
          See IDocumentGenerator#unregisterListener().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalDocumentGenerator

public LocalDocumentGenerator(com.ibm.rational.rpe.engine.RRDGEngine engine)
Builds a LocalDocument generator instance by using the provided RRDGEngine.

Parameters:
engine -
Method Detail

enableDebug

public void enableDebug(boolean debug)
Enables the core debug mode for this document generation. See IDocumentGenerator.enableDebug(boolean).

Specified by:
enableDebug in interface IDocumentGenerator

getConfigurationPath

@Deprecated
public java.lang.String getConfigurationPath(java.net.URI path)
Deprecated. 

Deprecated.


setMCData

public void setMCData(com.ibm.rational.rpe.api.monitor.MCData mcdata)
Set the MCData information to be used if this document generation is to be made available to the Rational Publishing Engine Monitor & Control service.

Parameters:
mcdata -

publish

public java.lang.Thread publish(RPEDocumentSpecification docSpec,
                                int previewLimit)
                         throws RPEException
Starts the publishing process for a given document specification in a separate thread. Status messages regarding the progress are passed to the registered listeners.

This method returns immediately after it has been called. The returning Thread object can be used to determine when the publish process has ended.

Specified by:
publish in interface IDocumentGenerator
Parameters:
docSpec - the document specification to be published
Returns:
the publishing execution Thread
Throws:
RPEException

publishSync

public com.ibm.rational.rpe.engine.RRDGEngine.EngineStatus publishSync(RPEDocumentSpecification docSpec,
                                                                       int previewLimit)
                                                                throws RPEException
Starts the publishing process for a given document specification in the calling thread. Status messages regarding the progress are passed to the registered listeners.

NOTE: This operation can be time consuming and locks the caller thread until it completes.

This method does not return until the publishing thread has ended its execution.

Specified by:
publishSync in interface IDocumentGenerator
Parameters:
docSpec - the Document Specification to be published
Returns:
Throws:
RPEException

getResults

public java.util.List<RPEResult> getResults()
Retrieves the results of a publishing process. This method returns a valid list of the results requested in the document specification after a publishing process has ended successfully. See IDocumentGenerator.getResults().

Specified by:
getResults in interface IDocumentGenerator
Returns:
the list of RPEResult objects

pause

public void pause()
Pauses the publishing process. If there are no processes running, this action has no effect. See IControl.pause().

Specified by:
pause in interface IControl

resume

public void resume()
Resumes a paused publishing process. If there are no processes paused, this action has no effect. See IControl.resume().

Specified by:
resume in interface IControl

stop

public void stop()
Stops a running publishing process. See IControl.stop().

Specified by:
stop in interface IControl

setConnectionConfigurator

public void setConnectionConfigurator(IConnectionConfigurator connectionConfigurator)
Optional: Sets the IConnectionConfigurator object to be used by the generator


getConnectionConfigurator

public IConnectionConfigurator getConnectionConfigurator()
Returns the IConnectionConfigurator object that is used by the generator, if any.


setURIResolver

public void setURIResolver(com.ibm.rational.rpe.common.utils.IURIResolver uriResolver)
Optional: Sets the IURIResolver object to be used by the generator


getURIResolver

public com.ibm.rational.rpe.common.utils.IURIResolver getURIResolver()
Returns the IURIResolver object that is used by the generator, if any.


registerListener

public void registerListener(RPEListener listener)
See IDocumentGenerator#registerListener().

Specified by:
registerListener in interface IDocumentGenerator

unregisterListener

public void unregisterListener(RPEListener listener)
See IDocumentGenerator#unregisterListener().

Specified by:
unregisterListener in interface IDocumentGenerator

addStatusListener

@Deprecated
public void addStatusListener(RPEListener listener)
Deprecated. 

Deprecated, use registerListener


removeStatusListener

@Deprecated
public void removeStatusListener(RPEListener listener)
Deprecated. 

Deprecated, use unregisterLIstener


publish

@Deprecated
public java.lang.Thread publish(RPEDocumentSpecification docSpec)
                         throws RPEException
Deprecated. 

Deprecated, use publish(RPEDocumentSpecification docSpec, int previewLimit)

Throws:
RPEException

publishSync

@Deprecated
public void publishSync(RPEDocumentSpecification docSpec)
                 throws RPEException
Deprecated. 

Deprecated, use publishSync(RPEDocumentSpecification docSpec, int previewLimit)

Throws:
RPEException

getStatus

public com.ibm.rational.rpe.engine.RRDGEngine.EngineStatus getStatus()
See IDocumentGenerator.getStatus()

Specified by:
getStatus in interface IDocumentGenerator
Returns: