Package com.ptc.wvs.server.util
Class PublishUtils
java.lang.Object
com.ptc.wvs.server.util.PublishUtils
This is Utility class containing helper methods for Publishing activity
Supported API: true
Extendable: false
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionstatic WTValuedMapfindRepresentable(WTCollection collection) Multi-object version of the APIfindRepresentable(Persistable)static WTValuedMapgetDefaultRepresentations(WTCollection collection) Returns default representation for given collection of Representablestatic PersistablegetObjectFromRef(String refString) This method return Persistable object for given reference Stringstatic StringThis method returns String reference for given Persistable objectstatic WTKeyedMapgetRepresentationForBuildObject(WTKeyedMap partsToUsageLinks) This API find the representation associated to the cad document that was built for the parts WTPartUsageLink.static WTKeyedMapgetRepresentations(WTCollection collection) This method return Map of Representable key to the list of corresponding representations
-
Method Details
-
getRefFromObject
This method returns String reference for given Persistable object- Parameters:
obj- - persistable object for which String Reference is needed- Returns:
- string representing reference to input persistable object.
Supported API: true
Extendable: false
-
getObjectFromRef
This method return Persistable object for given reference String- Parameters:
refString- string reference to persistable object- Returns:
- persistable object representing string referenence.
Supported API: true
Extendable: false
-
getDefaultRepresentations
Returns default representation for given collection of Representable- Parameters:
collection- - collection containing Representable- Returns:
- map containing key as Representable and value as default representation
Supported API: true
Extendable: false
-
getRepresentations
This method return Map of Representable key to the list of corresponding representations- Parameters:
collection- containing Representable- Returns:
- map of Representable key to the list of corresponding representations
Supported API: true
Extendable: false
-
findRepresentable
Multi-object version of the APIfindRepresentable(Persistable)For each object in the input collection,
- if the input object is neither an
EPMDocumentnor aRepresentable, returns null. - if the input object is not an
EPMDocumentbut is aRepresentable, returns the object itself. - if the input object is an
EPMDocument, returns theWTPartwhose owner link with the EPMDocument has the smallest BuildRuleID (and the smallest creation timestamp) among all the owner links the EPMDocument has. - if no part is found, and the EPMDocument is a sandbox working copy, returns the WTPart from the build rule if that WTPart is also a sandbox working copy in the same container.
- returns null if above steps found nothing for the EPMDocument.
- Parameters:
collection- - the input EPMDocuments.- Returns:
- the Representables for the specified EPMDocuments, with the keys of the returned
map a subset of the input collection.
Supported API: true
Extendable: false
- if the input object is neither an
-
getRepresentationForBuildObject
public static WTKeyedMap getRepresentationForBuildObject(WTKeyedMap partsToUsageLinks) throws WTException This API find the representation associated to the cad document that was built for the parts WTPartUsageLink.
Supported API: true- Parameters:
partsToUsageLinks- A map of parts to a collection of WTPartUsage links. There can only be one representation returned for each part so the code will use the first usage link in the collection when finding the EPM document of interest.- Returns:
- A map of parts to the representation associated to the cad document that was build for the parts WTPartUsageLink.
- Throws:
WTException- An exception that may be thrown in lower level code.
-