com.ptc.wvs.server.publish
Class PublishHelper
java.lang.Object
com.ptc.wvs.server.publish.PublishHelper
- public class PublishHelper
- extends Object
Method Summary |
private static void |
addNonUploadedToWS(Vector addToWSList,
WildfireDownload wfd)
|
static Properties |
addPreconvertedProperties(String actionString)
|
static void |
addSubObjectLink(String options,
String propName,
String type,
String doc,
File edFile)
|
private static void |
addSubObjectLinkInternal(String baseURL,
String propName,
DefaultMutableTreeNode n)
|
private static boolean |
checkRepresentationForOutOfDate(EPMDocument epmdoc,
Representation rep,
String matchString,
Timestamp timestamp,
EPMDocument reasonEPMDoc,
WTContainerRef reasonProject)
|
private static int |
checkRepresentationsForOutOfDate(EPMDocument doc,
String matchString,
Timestamp timestamp,
EPMDocument reasonEPMDoc)
|
static boolean |
copyClipboardMarkups(PublishJob publishJob,
String clipRepString)
|
static File |
doWTPartConversion(PublishJob publishJob,
WTPart wtpart)
|
static int |
expandPackageFile(ContentHolder doc,
String cadName,
File tempDir)
|
static int |
getAdditionalFiles(Object xmlDocument,
File tempDir,
FileConvert conv,
ConfigSpec publishJobCS)
|
static String |
getAuthenticationStringForHost(String host,
String port)
|
static String |
getAuthenticationStringForURL(URL url)
|
static String[] |
getCadConvertClassAndOptions(EPMDocument doc)
|
static Hashtable |
getDestinationLookup(Document document)
|
static int |
getFilesForNodeList(NodeList nodelist,
File tempDir,
FileConvert conv,
ConfigSpec configSpec)
|
static Element |
getFirstChildElementByName(Node parent,
String childName)
|
static String[] |
getLocationData(Element model,
String locationType)
|
static String |
getPackageFileModelName(ContentHolder doc,
String cadName)
|
static String |
getRequestType(Object xmlDocument)
|
static Element |
getRootModel(Document xmlDocument)
|
static EPMDocument |
getSourceEPMDocument(Object xmlDocument,
EPMDocument doc)
|
static Object |
getXMLDocument(PublishJob publishJob)
|
static Object |
getXMLFromAttributes(String options,
String extension,
EPMDocument doc,
Representable part,
String name,
Hashtable fileLookup)
|
static boolean |
hasModelRequest(Element model,
String request)
|
static boolean |
hasModelRequestRecursive(Element model,
String request)
|
private static boolean |
initAuthData()
|
static void |
main(String[] args)
|
static void |
markParentsOutOfDate(EPMDocument epmdoc,
Representable repable,
PublishJob publishJob)
|
private static int |
markParentsOutOfDateInternal(EPMDocumentMaster child,
String matchString,
Timestamp timestamp,
EPMDocument reasonEPMDoc,
ArrayList visited)
|
static Boolean |
markRepublishAll(EPMDocument epmdoc,
Representation rep,
EPMDocument reasonEPMDoc)
|
static Boolean |
markRepublishNone(EPMDocument epmdoc,
Representation rep,
EPMDocument reasonEPMDoc)
|
static boolean[] |
processClipboardData(PublishJob publishJob,
String clipRepString,
File outDir)
|
static boolean[] |
processPreconvertedData(PublishJob publishJob,
File inputFile,
File outDir,
String outName,
boolean removeDirectories)
|
static void |
publishReferencedFiles(String options,
PublishJob publishJob,
String[] ret)
|
static void |
setWorkerThumbnail(CadProxy proxy,
boolean thumbnailRequired,
Persistable doc,
Persistable repable)
|
static boolean |
storeAdditionalFiles(Representable part,
PublishJob publishJob,
Object xmlDocument,
File outDir)
|
static boolean |
storeAdditionalFiles(Representable part,
PublishJob publishJob,
Object xmlDocument,
File outDir,
Hashtable fileLookup)
|
private static int |
storeAdditionalModels(Element model,
File outDir,
Hashtable fileLookup,
int count,
boolean processChildren,
WildfireDownload[] wfd,
Vector addToWSList,
boolean addSrcDepToWS)
|
static void |
storeAdditionalRepresentation(String typesString,
String edProperty,
String repName,
Representable part,
PublishJob publishJob,
File outDir,
Hashtable dstLookup)
|
static int |
storePreconvertedData(PublishJob publishJob,
Representable part,
File outDir,
boolean thumb)
|
static int |
storeRepresentation(WTObject doc,
Representable part,
File tempDir,
boolean storeEDZ,
boolean createThumbnail,
ConfigSpec configSpec,
ConfigSpec partConfigSpec,
boolean repDefault,
String repName,
String repDescription,
int structureType,
PublishJob logger)
|
static int |
storeRepresentation(WTObject doc,
Representable part,
File tempDir,
boolean storeEDZ,
boolean createThumbnail,
ConfigSpec configSpec,
ConfigSpec partConfigSpec,
boolean repDefault,
String repName,
String repDescription,
int structureType,
PublishJob logger,
String cadPartName,
String cadFormName)
|
static int |
storeRepresentation(WTObject doc,
Representable part,
File tempDir,
boolean storeEDZ,
boolean createThumbnail,
ConfigSpec configSpec,
ConfigSpec partConfigSpec,
boolean repDefault,
String repName,
String repDescription,
int structureType,
PublishJob logger,
String cadPartName,
String cadFormName,
boolean isPosAssy)
|
static int |
storeWTPartRepresentation(PublishJob publishJob,
WTPart wtpart,
File outDir)
|
private static void |
updateFileLookup(Hashtable fileLookup)
|
private static void |
uploadCADFile(EPMDocument dstDoc,
File f,
String src_oid,
boolean addSrcDepToWS,
WildfireDownload[] wfd)
|
static void |
writeActionFile(PublishJob publishJob,
String xmlFileName)
|
static boolean |
writeXMLFile(Object xmlDocument,
File file)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
service
public static final PublishService service
wvsProperties
private static WVSProperties wvsProperties
VERBOSE
private static boolean VERBOSE
markUsesRepresentations
private static boolean markUsesRepresentations
markReferencesRepresentations
private static boolean markReferencesRepresentations
markOnlyDirectUsesRepresentations
private static boolean markOnlyDirectUsesRepresentations
markPositioningAssemblyRepresentations
private static boolean markPositioningAssemblyRepresentations
filterOutOfDateMethod
private static Method filterOutOfDateMethod
republishOutOfDateMethod
private static Method republishOutOfDateMethod
defaultNewCharset
private static String defaultNewCharset
latestEPMDoc
private static QuerySpec latestEPMDoc
PACKAGE_MANIFEST_FILE
public static final String PACKAGE_MANIFEST_FILE
- See Also:
- Constant Field Values
AUTH_PROPERTY_PREFIX
private static final String AUTH_PROPERTY_PREFIX
- See Also:
- Constant Field Values
authDataLoaded
private static boolean authDataLoaded
authData
private static Properties authData
PublishHelper
public PublishHelper()
storeRepresentation
public static int storeRepresentation(WTObject doc,
Representable part,
File tempDir,
boolean storeEDZ,
boolean createThumbnail,
ConfigSpec configSpec,
ConfigSpec partConfigSpec,
boolean repDefault,
String repName,
String repDescription,
int structureType,
PublishJob logger)
storeRepresentation
public static int storeRepresentation(WTObject doc,
Representable part,
File tempDir,
boolean storeEDZ,
boolean createThumbnail,
ConfigSpec configSpec,
ConfigSpec partConfigSpec,
boolean repDefault,
String repName,
String repDescription,
int structureType,
PublishJob logger,
String cadPartName,
String cadFormName)
storeRepresentation
public static int storeRepresentation(WTObject doc,
Representable part,
File tempDir,
boolean storeEDZ,
boolean createThumbnail,
ConfigSpec configSpec,
ConfigSpec partConfigSpec,
boolean repDefault,
String repName,
String repDescription,
int structureType,
PublishJob logger,
String cadPartName,
String cadFormName,
boolean isPosAssy)
setWorkerThumbnail
public static void setWorkerThumbnail(CadProxy proxy,
boolean thumbnailRequired,
Persistable doc,
Persistable repable)
getCadConvertClassAndOptions
public static String[] getCadConvertClassAndOptions(EPMDocument doc)
doWTPartConversion
public static File doWTPartConversion(PublishJob publishJob,
WTPart wtpart)
storeWTPartRepresentation
public static int storeWTPartRepresentation(PublishJob publishJob,
WTPart wtpart,
File outDir)
markParentsOutOfDate
public static void markParentsOutOfDate(EPMDocument epmdoc,
Representable repable,
PublishJob publishJob)
markParentsOutOfDateInternal
private static int markParentsOutOfDateInternal(EPMDocumentMaster child,
String matchString,
Timestamp timestamp,
EPMDocument reasonEPMDoc,
ArrayList visited)
throws Exception
- Throws:
Exception
checkRepresentationsForOutOfDate
private static int checkRepresentationsForOutOfDate(EPMDocument doc,
String matchString,
Timestamp timestamp,
EPMDocument reasonEPMDoc)
throws Exception
- Throws:
Exception
checkRepresentationForOutOfDate
private static boolean checkRepresentationForOutOfDate(EPMDocument epmdoc,
Representation rep,
String matchString,
Timestamp timestamp,
EPMDocument reasonEPMDoc,
WTContainerRef reasonProject)
throws Exception
- Throws:
Exception
markRepublishNone
public static Boolean markRepublishNone(EPMDocument epmdoc,
Representation rep,
EPMDocument reasonEPMDoc)
markRepublishAll
public static Boolean markRepublishAll(EPMDocument epmdoc,
Representation rep,
EPMDocument reasonEPMDoc)
processPreconvertedData
public static boolean[] processPreconvertedData(PublishJob publishJob,
File inputFile,
File outDir,
String outName,
boolean removeDirectories)
processClipboardData
public static boolean[] processClipboardData(PublishJob publishJob,
String clipRepString,
File outDir)
copyClipboardMarkups
public static boolean copyClipboardMarkups(PublishJob publishJob,
String clipRepString)
addPreconvertedProperties
public static Properties addPreconvertedProperties(String actionString)
storePreconvertedData
public static int storePreconvertedData(PublishJob publishJob,
Representable part,
File outDir,
boolean thumb)
addSubObjectLink
public static void addSubObjectLink(String options,
String propName,
String type,
String doc,
File edFile)
addSubObjectLinkInternal
private static void addSubObjectLinkInternal(String baseURL,
String propName,
DefaultMutableTreeNode n)
publishReferencedFiles
public static void publishReferencedFiles(String options,
PublishJob publishJob,
String[] ret)
getPackageFileModelName
public static String getPackageFileModelName(ContentHolder doc,
String cadName)
expandPackageFile
public static int expandPackageFile(ContentHolder doc,
String cadName,
File tempDir)
initAuthData
private static boolean initAuthData()
getAuthenticationStringForURL
public static String getAuthenticationStringForURL(URL url)
getAuthenticationStringForHost
public static String getAuthenticationStringForHost(String host,
String port)
main
public static void main(String[] args)
writeActionFile
public static void writeActionFile(PublishJob publishJob,
String xmlFileName)
getXMLDocument
public static Object getXMLDocument(PublishJob publishJob)
getSourceEPMDocument
public static EPMDocument getSourceEPMDocument(Object xmlDocument,
EPMDocument doc)
getFirstChildElementByName
public static Element getFirstChildElementByName(Node parent,
String childName)
getRootModel
public static Element getRootModel(Document xmlDocument)
getLocationData
public static String[] getLocationData(Element model,
String locationType)
getRequestType
public static String getRequestType(Object xmlDocument)
hasModelRequestRecursive
public static boolean hasModelRequestRecursive(Element model,
String request)
throws Exception
- Throws:
Exception
hasModelRequest
public static boolean hasModelRequest(Element model,
String request)
storeAdditionalFiles
public static boolean storeAdditionalFiles(Representable part,
PublishJob publishJob,
Object xmlDocument,
File outDir)
storeAdditionalFiles
public static boolean storeAdditionalFiles(Representable part,
PublishJob publishJob,
Object xmlDocument,
File outDir,
Hashtable fileLookup)
storeAdditionalModels
private static int storeAdditionalModels(Element model,
File outDir,
Hashtable fileLookup,
int count,
boolean processChildren,
WildfireDownload[] wfd,
Vector addToWSList,
boolean addSrcDepToWS)
throws Exception
- Throws:
Exception
uploadCADFile
private static void uploadCADFile(EPMDocument dstDoc,
File f,
String src_oid,
boolean addSrcDepToWS,
WildfireDownload[] wfd)
throws Exception
- Throws:
Exception
addNonUploadedToWS
private static void addNonUploadedToWS(Vector addToWSList,
WildfireDownload wfd)
throws Exception
- Throws:
Exception
updateFileLookup
private static void updateFileLookup(Hashtable fileLookup)
throws Exception
- Throws:
Exception
getDestinationLookup
public static Hashtable getDestinationLookup(Document document)
storeAdditionalRepresentation
public static void storeAdditionalRepresentation(String typesString,
String edProperty,
String repName,
Representable part,
PublishJob publishJob,
File outDir,
Hashtable dstLookup)
getAdditionalFiles
public static int getAdditionalFiles(Object xmlDocument,
File tempDir,
FileConvert conv,
ConfigSpec publishJobCS)
getFilesForNodeList
public static int getFilesForNodeList(NodeList nodelist,
File tempDir,
FileConvert conv,
ConfigSpec configSpec)
getXMLFromAttributes
public static Object getXMLFromAttributes(String options,
String extension,
EPMDocument doc,
Representable part,
String name,
Hashtable fileLookup)
writeXMLFile
public static boolean writeXMLFile(Object xmlDocument,
File file)