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 using a local instance, also for other available operations. For publishing reports using a remote web service, see RemoteDocumentGenerator.


Constructor Summary
LocalDocumentGenerator(com.ibm.rational.rpe.engine.RRDGEngine engine)
           
 
Method Summary
 void addStatusListener(RPEListener listener)
          Deprecated. 
 void enableDebug(boolean debug)
          Enables the core debug mode for the document generation
 java.lang.String getConfigurationPath(java.net.URI path)
          Retrieves the path to the configuration file that needs to be passed to DocumentSpecificationBuilder methods.
 com.ibm.rational.rpe.common.utils.IConnectionConfigurator getConnectionConfigurator()
           
 java.util.List<RPEResult> getResults()
          Retrieves the results of a publishing process.
 com.ibm.rational.rpe.engine.RRDGEngine.EngineStatus getStatus()
          Returns the status of the generation
 com.ibm.rational.rpe.common.utils.IURIResolver getURIResolver()
           
 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.
 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.
 void registerListener(RPEListener listener)
          Registers a RPE listener for receiving important progress messages from the document generation
 void removeStatusListener(RPEListener listener)
          Deprecated. 
 void resume()
          Resumes a paused publishing process.
 void setConnectionConfigurator(com.ibm.rational.rpe.common.utils.IConnectionConfigurator connectionConfigurator)
           
 void setMCData(com.ibm.rational.rpe.api.monitor.MCData mcdata)
          Set the MCData information to be used for this local document generation.
 void setURIResolver(com.ibm.rational.rpe.common.utils.IURIResolver uriResolver)
           
 void stop()
          Stops a running publishing process.
 void unregisterListener(RPEListener listener)
          Unregisters the listener from the engine
 
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)
Method Detail

enableDebug

public void enableDebug(boolean debug)
Description copied from interface: IDocumentGenerator
Enables the core debug mode for the document generation

Specified by:
enableDebug in interface IDocumentGenerator

getConfigurationPath

public java.lang.String getConfigurationPath(java.net.URI path)
Retrieves the path to the configuration file that needs to be passed to DocumentSpecificationBuilder methods.

Parameters:
path - an URI consisting of a path to the configuration folder. If this parameter is null, this method returns a path computed based on the "RPE_HOME" system environment variable.
Returns:
the path to the appropriate configuration file, depending on the input parameter. If the return value is null, it means that both the "RPE_HOME" variable and the input parameter are not set correctly.

setMCData

public void setMCData(com.ibm.rational.rpe.api.monitor.MCData mcdata)
Set the MCData information to be used for this local document generation. If null the generation will not connect to a RPE Monitor&Control servlet

Parameters:
mcdata -

publish

public java.lang.Thread publish(RPEDocumentSpecification docSpec,
                                int previewLimit)
                         throws RPEException
Starts the publishing process for a given Document Specification. This can be a time consuming operation. 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. This can be a time consuming operation. Status messages regarding the progress are passed to the registered listeners.

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, once a publishing process has ended successfully.

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

pause

public void pause()
Pauses the publishing process. Has no effect if there is no process running.

Specified by:
pause in interface IControl

resume

public void resume()
Resumes a paused publishing process. Has no effect if there is no paused process.

Specified by:
resume in interface IControl

stop

public void stop()
Stops a running publishing process.

Specified by:
stop in interface IControl

setConnectionConfigurator

public void setConnectionConfigurator(com.ibm.rational.rpe.common.utils.IConnectionConfigurator connectionConfigurator)

getConnectionConfigurator

public com.ibm.rational.rpe.common.utils.IConnectionConfigurator getConnectionConfigurator()

setURIResolver

public void setURIResolver(com.ibm.rational.rpe.common.utils.IURIResolver uriResolver)

getURIResolver

public com.ibm.rational.rpe.common.utils.IURIResolver getURIResolver()

registerListener

public void registerListener(RPEListener listener)
Description copied from interface: IDocumentGenerator
Registers a RPE listener for receiving important progress messages from the document generation

Specified by:
registerListener in interface IDocumentGenerator

unregisterListener

public void unregisterListener(RPEListener listener)
Description copied from interface: IDocumentGenerator
Unregisters the listener from the engine

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()
Description copied from interface: IDocumentGenerator
Returns the status of the generation

Specified by:
getStatus in interface IDocumentGenerator
Returns: