com.ptc.wvs.server.publish
Class PublishJob

java.lang.Object
  extended bycom.ptc.wvs.server.publish.PublishJob
All Implemented Interfaces:
CadLogger, EDRLogger, Serializable

public class PublishJob
extends Object
implements EDRLogger, Serializable, CadLogger

See Also:
Serialized Form

Field Summary
protected  String actionFileString
           
static int ASSEMBLY_OK
           
protected  String cadTimes
           
static int COMPONENT_OK
           
(package private)  ConfigSpec configSpec
           
protected  String configSpecString
           
(package private)  Representation createdRepresentation
           
(package private)  WTContainerRef currentContainerRef
           
protected  String currentContainerRefString
           
(package private)  DateFormat dateFormat
           
static int DOCUMENT_OK
           
static int DRAWING_OK
           
protected  long endTime
           
static int ERROR
           
protected  boolean forceRepublish
           
protected  String jobStatus
           
protected  boolean jobStatusFlag
           
protected  StringBuffer logBuffer
           
protected  File logFile
           
(package private)  PrintWriter logFilePrint
           
static int NOTHING_TO_PUBLISH
           
protected  String[] numberNameVersion
           
static int PART_OK
           
(package private)  ConfigSpec partConfigSpec
           
protected  String partConfigSpecString
           
protected  String pubdocContainerRef
           
protected  String pubdocRef
           
protected  File publishLastEDFile
           
protected  File publishTempDir
           
protected  boolean repDefault
           
protected  String repDescription
           
protected  String repName
           
protected  String requestQueue
           
protected  int requestSource
           
protected  int requestType
           
private static String RESOURCE
           
protected  long startTime
           
protected  int structureType
           
protected  long submitTime
           
protected  String[] visData
           
protected static WVSProperties wvsProperties
           
 
Constructor Summary
PublishJob(boolean forceRepublish, String docRef, ConfigSpec configSpec, ConfigSpec partConfigSpec, boolean repDefault, String repName, String repDescription, int structureType)
           
 
Method Summary
 void addStatusLine(String s)
           
 void addStatusLine(String messageKey, Object singleTextInsert)
           
 void addStatusMsg(String s)
           
 int convertPreconvertedEDZ(EPMDocument epmDoc, Representable part, boolean store)
           
 CadConvert createCadConverter(EPMDocument doc, Representable part)
           
 void createVeto(Persistable eventObject)
           
private  void deletePreconvertedEDZFile(EPMDocument epmDoc)
           
 void doPublishJob()
           
static void doPublishJob(PublishJob job)
          doPublishJob is executed from PublisherQueuexx and does the work
 boolean emptyTempDir()
           
 boolean emptyTempDir(File tempDir)
           
private  int executePublishJob(Persistable persistable)
           
 String getActionFileString()
           
 int getAssemblyCADTimeout()
           
 String getCadTimes()
           
 int getComponentCADTimeout()
           
 ConfigSpec getConfigSpec()
           
 String getContainerRef()
           
 Representation getCreatedRepresentation()
           
 WTContainerRef getCurrentContainerRef()
           
 int getDrawingCADTimeout()
           
 long getEndTime()
           
 String getJobStatus()
           
 boolean getJobStatusFlag()
           
 File getLastEDFile()
           
 String getLogBuffer()
           
 File getLogFile()
           
 String[] getNumberNameVersion(boolean detail)
           
 ConfigSpec getPartConfigSpec()
           
 String getPersistableRef()
           
 String getRepDesc()
           
 String getRepName()
           
 String getRequestQueue()
           
 int getRequestSource()
           
 int getRequestType()
           
 long getStartTime()
           
 int getStructureType()
           
 long getSubmitTime()
           
 File getTempDir()
           
 String[] getVisualData()
           
 boolean isForceRepublish()
           
 boolean isRepDefault()
           
 boolean makeTempDir()
           
 File makeTempDir(String suffix)
           
 void performNotification(Persistable eventObject, boolean success)
           
 int publishAssembly(CadConvert conv, boolean cleanTemp, boolean getContent, boolean doConversion, boolean store, boolean doChildren)
           
 int publishComponent(CadConvert conv, boolean cleanTemp, boolean getContent, boolean doConversion, boolean store)
           
 int publishDrawing(CadConvert conv, boolean cleanTemp, boolean getContent, boolean doConversion, boolean store)
           
 int publishObject(CadConvert conv, EPMDocument epmDoc, Representable part, boolean cleanTemp, boolean getContent, boolean doConversion, boolean store, boolean doChildren)
           
private  int publishPreconvertedData(Representable part, boolean cleanTemp, boolean getContent, boolean doConversion, boolean store, boolean doChildren)
           
private  int publishPreconvertedData1(Representable part, boolean cleanTemp, boolean getContent, boolean doConversion, boolean store, boolean doChildren)
           
private  int publishWTPart(WTPart wtpart, boolean cleanTemp, boolean getContent, boolean doConversion, boolean store, boolean doChildren)
           
static void queuePublishJob(PublishJob job)
          queuePublishJob is executed from PublisherQueue and adds this job to a free PublisherQueuexx queue
 boolean removeTempDir()
           
 boolean removeTempDir(File tempDir)
           
 void setActionFileString(String s)
           
 void setCadTimes(String s)
           
 void setCreatedRepresentation(Representation r)
           
 void setCurrentContainerRef(WTContainerRef ref)
           
 void setCurrentContainerRefString(String ref)
           
 void setEndTime(long l)
           
private  void setJobStatus(String s)
           
private  void setJobStatusFlag(boolean s)
           
 void setLastEDFile(File t)
           
 void setLogFile(File logFile)
           
 void setNumberNameVersion(Persistable persistable)
           
 void setRepName(String r)
           
 void setRequestQueue(String i)
           
 void setRequestSource(int i)
           
 void setRequestType(int i)
           
 void setStartTime(long l)
           
 void setSubmitTime(long l)
           
 void setTempDir(File t)
           
private  void setVisualData(Representable part, Representation representation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wvsProperties

protected static WVSProperties wvsProperties

forceRepublish

protected boolean forceRepublish

pubdocRef

protected String pubdocRef

pubdocContainerRef

protected String pubdocContainerRef

configSpec

transient ConfigSpec configSpec

configSpecString

protected String configSpecString

partConfigSpec

transient ConfigSpec partConfigSpec

partConfigSpecString

protected String partConfigSpecString

currentContainerRef

transient WTContainerRef currentContainerRef

currentContainerRefString

protected String currentContainerRefString

repDefault

protected boolean repDefault

repName

protected String repName

repDescription

protected String repDescription

structureType

protected int structureType

requestSource

protected int requestSource

requestType

protected int requestType

requestQueue

protected String requestQueue

submitTime

protected long submitTime

startTime

protected long startTime

endTime

protected long endTime

cadTimes

protected String cadTimes

actionFileString

protected String actionFileString

logBuffer

protected StringBuffer logBuffer

logFile

protected File logFile

logFilePrint

transient PrintWriter logFilePrint

publishTempDir

protected File publishTempDir

publishLastEDFile

protected File publishLastEDFile

jobStatus

protected String jobStatus

jobStatusFlag

protected boolean jobStatusFlag

visData

protected String[] visData

numberNameVersion

protected String[] numberNameVersion

createdRepresentation

transient Representation createdRepresentation

dateFormat

transient DateFormat dateFormat

ERROR

public static final int ERROR
See Also:
Constant Field Values

COMPONENT_OK

public static final int COMPONENT_OK
See Also:
Constant Field Values

ASSEMBLY_OK

public static final int ASSEMBLY_OK
See Also:
Constant Field Values

DRAWING_OK

public static final int DRAWING_OK
See Also:
Constant Field Values

PART_OK

public static final int PART_OK
See Also:
Constant Field Values

DOCUMENT_OK

public static final int DOCUMENT_OK
See Also:
Constant Field Values

NOTHING_TO_PUBLISH

public static final int NOTHING_TO_PUBLISH
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values
Constructor Detail

PublishJob

public PublishJob(boolean forceRepublish,
                  String docRef,
                  ConfigSpec configSpec,
                  ConfigSpec partConfigSpec,
                  boolean repDefault,
                  String repName,
                  String repDescription,
                  int structureType)
Method Detail

setLogFile

public void setLogFile(File logFile)

getLogFile

public File getLogFile()

isForceRepublish

public boolean isForceRepublish()

getPersistableRef

public String getPersistableRef()

getContainerRef

public String getContainerRef()

getConfigSpec

public ConfigSpec getConfigSpec()

getPartConfigSpec

public ConfigSpec getPartConfigSpec()

isRepDefault

public boolean isRepDefault()

getRepName

public String getRepName()

setRepName

public void setRepName(String r)

getRepDesc

public String getRepDesc()

getStructureType

public int getStructureType()

getActionFileString

public String getActionFileString()

setRequestSource

public void setRequestSource(int i)

getRequestSource

public int getRequestSource()

setRequestType

public void setRequestType(int i)

getRequestType

public int getRequestType()

setRequestQueue

public void setRequestQueue(String i)

getRequestQueue

public String getRequestQueue()

setSubmitTime

public void setSubmitTime(long l)

getSubmitTime

public long getSubmitTime()

setStartTime

public void setStartTime(long l)

getStartTime

public long getStartTime()

setEndTime

public void setEndTime(long l)

getEndTime

public long getEndTime()

setActionFileString

public void setActionFileString(String s)

getLogBuffer

public String getLogBuffer()

getTempDir

public File getTempDir()

setTempDir

public void setTempDir(File t)

getLastEDFile

public File getLastEDFile()

setLastEDFile

public void setLastEDFile(File t)

setCreatedRepresentation

public void setCreatedRepresentation(Representation r)

getCreatedRepresentation

public Representation getCreatedRepresentation()

addStatusLine

public void addStatusLine(String messageKey,
                          Object singleTextInsert)

addStatusMsg

public void addStatusMsg(String s)
Specified by:
addStatusMsg in interface CadLogger

addStatusLine

public void addStatusLine(String s)
Specified by:
addStatusLine in interface EDRLogger

setCadTimes

public void setCadTimes(String s)
Specified by:
setCadTimes in interface CadLogger

getCadTimes

public String getCadTimes()

getComponentCADTimeout

public int getComponentCADTimeout()

getAssemblyCADTimeout

public int getAssemblyCADTimeout()

getDrawingCADTimeout

public int getDrawingCADTimeout()

setCurrentContainerRef

public void setCurrentContainerRef(WTContainerRef ref)

setCurrentContainerRefString

public void setCurrentContainerRefString(String ref)

getCurrentContainerRef

public WTContainerRef getCurrentContainerRef()

getNumberNameVersion

public String[] getNumberNameVersion(boolean detail)

setNumberNameVersion

public void setNumberNameVersion(Persistable persistable)

queuePublishJob

public static void queuePublishJob(PublishJob job)
queuePublishJob is executed from PublisherQueue and adds this job to a free PublisherQueuexx queue


doPublishJob

public static void doPublishJob(PublishJob job)
doPublishJob is executed from PublisherQueuexx and does the work


doPublishJob

public void doPublishJob()

getJobStatus

public String getJobStatus()

setJobStatus

private void setJobStatus(String s)

getJobStatusFlag

public boolean getJobStatusFlag()

setJobStatusFlag

private void setJobStatusFlag(boolean s)

getVisualData

public String[] getVisualData()

setVisualData

private void setVisualData(Representable part,
                           Representation representation)

executePublishJob

private int executePublishJob(Persistable persistable)

performNotification

public void performNotification(Persistable eventObject,
                                boolean success)

createVeto

public void createVeto(Persistable eventObject)

publishObject

public int publishObject(CadConvert conv,
                         EPMDocument epmDoc,
                         Representable part,
                         boolean cleanTemp,
                         boolean getContent,
                         boolean doConversion,
                         boolean store,
                         boolean doChildren)

convertPreconvertedEDZ

public int convertPreconvertedEDZ(EPMDocument epmDoc,
                                  Representable part,
                                  boolean store)

deletePreconvertedEDZFile

private void deletePreconvertedEDZFile(EPMDocument epmDoc)

publishComponent

public int publishComponent(CadConvert conv,
                            boolean cleanTemp,
                            boolean getContent,
                            boolean doConversion,
                            boolean store)

publishDrawing

public int publishDrawing(CadConvert conv,
                          boolean cleanTemp,
                          boolean getContent,
                          boolean doConversion,
                          boolean store)

publishAssembly

public int publishAssembly(CadConvert conv,
                           boolean cleanTemp,
                           boolean getContent,
                           boolean doConversion,
                           boolean store,
                           boolean doChildren)

publishWTPart

private int publishWTPart(WTPart wtpart,
                          boolean cleanTemp,
                          boolean getContent,
                          boolean doConversion,
                          boolean store,
                          boolean doChildren)

publishPreconvertedData

private int publishPreconvertedData(Representable part,
                                    boolean cleanTemp,
                                    boolean getContent,
                                    boolean doConversion,
                                    boolean store,
                                    boolean doChildren)

publishPreconvertedData1

private int publishPreconvertedData1(Representable part,
                                     boolean cleanTemp,
                                     boolean getContent,
                                     boolean doConversion,
                                     boolean store,
                                     boolean doChildren)

makeTempDir

public boolean makeTempDir()

makeTempDir

public File makeTempDir(String suffix)

emptyTempDir

public boolean emptyTempDir()

emptyTempDir

public boolean emptyTempDir(File tempDir)

removeTempDir

public boolean removeTempDir()

removeTempDir

public boolean removeTempDir(File tempDir)

createCadConverter

public CadConvert createCadConverter(EPMDocument doc,
                                     Representable part)