com.ptc.wvs.common.ui
Class Publisher

java.lang.Object
  extended bycom.ptc.wvs.common.ui.Publisher

public class Publisher
extends Object

Methods associated with the submission of data to be published

Supported API: false


Field Summary
static int EPM
           
static int EPM_PLUS_PARTS
           
protected  boolean markedNotPublishable
           
static int NONE
           
static int PART
           
static int PART_AND_EPM
           
protected  String publishLog
           
private static boolean SERVER
           
private static String SERVER_CLASS
           
protected  String viewableLink
           
protected  String viewableObjRef
           
 
Constructor Summary
Publisher()
           
 
Method Summary
 boolean createVeto(String number, String containerRef, boolean thumbnailOnly, boolean isPosAssy, String desc)
          Create an entry in Prohibition list

Supported API: false
 void deleteVeto(String objref)
          Delete an entry from Prohibition list

Supported API: false
private  Object[] doClientPublish(boolean viewableLink, boolean forceRepublish, String docObjectReference, ConfigSpec configSpec, ConfigSpec partConfigSpec, boolean defaultRep, String repName, String repDescription, int structureType, String actionString, int jobSource)
           
private  Object[] doClientPublish(boolean viewableLink, boolean forceRepublish, String docObjectReference, String configReference, String partConfigReference, boolean defaultRep, String repName, String repDescription, int structureType, String actionString, int jobSource)
           
 boolean doPublish(boolean viewableLink, boolean forceRepublish, String objectReference, ConfigSpec configSpec, boolean defaultRep, String repName, String repDescription, int structureType)
          Attempts to publish a Representable generating a Representation

Supported API: false
 boolean doPublish(boolean viewableLink, boolean forceRepublish, String objectReference, ConfigSpec configSpec, ConfigSpec partConfigSpec, boolean defaultRep, String repName, String repDescription, int structureType)
          Attempts to publish a Representable generating a Representation

Supported API: false
 boolean doPublish(boolean viewableLink, boolean forceRepublish, String objectReference, ConfigSpec configSpec, ConfigSpec partConfigSpec, boolean defaultRep, String repName, String repDescription, int structureType, String actionString)
          Attempts to publish a Representable generating a Representation

Supported API: false
 boolean doPublish(boolean viewableLink, boolean forceRepublish, String objectReference, ConfigSpec configSpec, ConfigSpec partConfigSpec, boolean defaultRep, String repName, String repDescription, int structureType, String actionString, int jobSource)
          Attempts to publish a Representable generating a Representation

Supported API: false
 boolean doPublish(boolean viewableLink, boolean forceRepublish, String objectReference, String configReference, boolean defaultRep, String repName, String repDescription, int structureType)
          Attempts to publish a Representable generating a Representation

Supported API: false
 boolean doPublish(boolean viewableLink, boolean forceRepublish, String objectReference, String configReference, String partConfigReference, boolean defaultRep, String repName, String repDescription, int structureType)
          Attempts to publish a Representable generating a Representation

Supported API: false
 boolean doPublish(boolean viewableLink, boolean forceRepublish, String objectReference, String configReference, String partConfigReference, boolean defaultRep, String repName, String repDescription, int structureType, String actionString)
          Attempts to publish a Representable generating a Representation

Supported API: false
 boolean doPublish(boolean viewableLink, boolean forceRepublish, String objectReference, String configReference, String partConfigReference, boolean defaultRep, String repName, String repDescription, int structureType, String actionString, int jobSource)
          Attempts to publish a Representable generating a Representation

Supported API: false
 String getActionString(File actionFile)
          get the action file as a string

Supported API: false
 String[] getCADRepList(String objRef, ConfigSpec cs, Locale locale)
          Gets the potential list of CAD "reps" that the user can choose to publish.
static String getDocumentPublishableFileList(String objRef)
          Gets HTLM OPTION fagments that lists a WTDocuemnts publishable files if the input object is not a WTDocuemnt, return null, if the WTDocument dooes not have an publishable file, returns ""

Supported API: false
 String getPublishLog()
          Returns the publishJob log as an String, only if the job was executed synchronously

Supported API: false
 String getPublishRepCADTypes(Locale locale)
          Gets HTLM OPTION fagments that lists the EPMAuthoringAppType's that can be used to load/convert CAD data in new representation wizard

Supported API: false
 String getPublishRepGatewayURL()
          Gets the Gateway URL to upload a new representation

Supported API: false
 List[] getStatisticsList(String containerRef, String filterType, String fromDate, String toDate, Locale locale)
          List information for publish statistics summary

Supported API: false
 String getStatisticsSaveGatewayURL()
          Gets the Gateway URL to save publish statistics as a csv file

Supported API: false
 ArrayList getVetoList(String containerRef)
          List entries in Prohibition list

Supported API: false
 String[][] getVetoSearch(String name, String number, String containerRef)
          Search for EPMDoc Masters with the name numbeer in the container

Supported API: false
 String getViewableLink()
          Returns an HTML fragment used to launch ProductView from the last data to be to be set to the doPublish, when viewableLink was true

Supported API: false
 String getViewableObjRef()
          Returns an object reference of the represetation generated from the last call to the doPublish, when viewableLink was true

Supported API: false
 boolean isMarkedNotPublishable()
          Returns the notPublishable string to indicate that the EPMDocument is marked as not publishable

Supported API: false
 boolean republishRepresentation(String objectReference, String repRef)
          Attempts to republish an existing Representation of a Representatable

Supported API: false
 boolean republishRepresentation(String objectReference, String repRef, int jobSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewableLink

protected String viewableLink

viewableObjRef

protected String viewableObjRef

publishLog

protected String publishLog

markedNotPublishable

protected boolean markedNotPublishable

SERVER_CLASS

private static final String SERVER_CLASS

SERVER

private static final boolean SERVER

NONE

public static final int NONE
See Also:
Constant Field Values

EPM

public static final int EPM
See Also:
Constant Field Values

PART

public static final int PART
See Also:
Constant Field Values

EPM_PLUS_PARTS

public static final int EPM_PLUS_PARTS
See Also:
Constant Field Values

PART_AND_EPM

public static final int PART_AND_EPM
See Also:
Constant Field Values
Constructor Detail

Publisher

public Publisher()
Method Detail

getViewableLink

public String getViewableLink()
Returns an HTML fragment used to launch ProductView from the last data to be to be set to the doPublish, when viewableLink was true

Supported API: false

Returns:
String HTML fragment to launch ProductView

getViewableObjRef

public String getViewableObjRef()
Returns an object reference of the represetation generated from the last call to the doPublish, when viewableLink was true

Supported API: false

Returns:
String HTML fragment to launch ProductView

getPublishLog

public String getPublishLog()
Returns the publishJob log as an String, only if the job was executed synchronously

Supported API: false

Returns:
String the publish log

isMarkedNotPublishable

public boolean isMarkedNotPublishable()
Returns the notPublishable string to indicate that the EPMDocument is marked as not publishable

Supported API: false

Returns:
boolean not publishable flag

doPublish

public boolean doPublish(boolean viewableLink,
                         boolean forceRepublish,
                         String objectReference,
                         String configReference,
                         boolean defaultRep,
                         String repName,
                         String repDescription,
                         int structureType)
Attempts to publish a Representable generating a Representation

Supported API: false

Parameters:
viewableLink - If true and the data has already been published, the viewable data will be passed back to allow access by getViewableLink
forceRepublish - Overwrites an existing representation should one already exist
objectReference - Reference of the Representable to be published
configReference - Reference of the EPM Config Spec, if null, latest is used.
repName - Name of The representation to be created
repDescription - Description of the representation to be created
structureType - The type of structure walk to be performed
Returns:
boolean true if successful

doPublish

public boolean doPublish(boolean viewableLink,
                         boolean forceRepublish,
                         String objectReference,
                         String configReference,
                         String partConfigReference,
                         boolean defaultRep,
                         String repName,
                         String repDescription,
                         int structureType)
Attempts to publish a Representable generating a Representation

Supported API: false

Parameters:
viewableLink - If true and the data has already been published, the viewable data will be passed back to allow access by getViewableLink
forceRepublish - Overwrites an existing representation should one already exist
objectReference - Reference of the Representable to be published
configReference - Reference of the EPM Config Spec, if null, latest is used.
partConfigReference - Reference of the Part Config Spec, if null, latest is used.
repName - Name of The representation to be created
repDescription - Description of the representation to be created
structureType - The type of structure walk to be performed
Returns:
boolean true if successful

doPublish

public boolean doPublish(boolean viewableLink,
                         boolean forceRepublish,
                         String objectReference,
                         String configReference,
                         String partConfigReference,
                         boolean defaultRep,
                         String repName,
                         String repDescription,
                         int structureType,
                         String actionString)
Attempts to publish a Representable generating a Representation

Supported API: false

Parameters:
viewableLink - If true and the data has already been published, the viewable data will be passed back to allow access by getViewableLink
forceRepublish - Overwrites an existing representation should one already exist
objectReference - Reference of the Representable to be published
configReference - Reference of the EPM Config Spec, if null, latest is used.
partConfigReference - Reference of the Part Config Spec, if null, latest is used.
repName - Name of The representation to be created
repDescription - Description of the representation to be created
structureType - The type of structure walk to be performed
actionString - string representation of the action XML file contents
Returns:
boolean true if successful

doPublish

public boolean doPublish(boolean viewableLink,
                         boolean forceRepublish,
                         String objectReference,
                         String configReference,
                         String partConfigReference,
                         boolean defaultRep,
                         String repName,
                         String repDescription,
                         int structureType,
                         String actionString,
                         int jobSource)
Attempts to publish a Representable generating a Representation

Supported API: false

Parameters:
viewableLink - If true and the data has already been published, the viewable data will be passed back to allow access by getViewableLink
forceRepublish - Overwrites an existing representation should one already exist
objectReference - Reference of the Representable to be published
configReference - Reference of the EPM Config Spec, if null, latest is used.
partConfigReference - Reference of the Part Config Spec, if null, latest is used.
repName - Name of The representation to be created
repDescription - Description of the representation to be created
structureType - The type of structure walk to be performed
actionString - string representation of the action XML file contents
jobSource - int of source that submitted the job, 0=unknown, 1=manual, 2=checkin, 3=schedule
Returns:
boolean true if successful

doClientPublish

private Object[] doClientPublish(boolean viewableLink,
                                 boolean forceRepublish,
                                 String docObjectReference,
                                 String configReference,
                                 String partConfigReference,
                                 boolean defaultRep,
                                 String repName,
                                 String repDescription,
                                 int structureType,
                                 String actionString,
                                 int jobSource)

doPublish

public boolean doPublish(boolean viewableLink,
                         boolean forceRepublish,
                         String objectReference,
                         ConfigSpec configSpec,
                         boolean defaultRep,
                         String repName,
                         String repDescription,
                         int structureType)
Attempts to publish a Representable generating a Representation

Supported API: false

Parameters:
viewableLink - If true and the data has already been published, the viewable data will be passed back to allow access by getViewableLink
forceRepublish - Overwrites an existing representation should one already exist
objectReference - Reference of the Representable to be published
configSpec - The EPM Config Spec to be used during the product structure tree walk, if null, latest is used.
repName - Name of The representation to be created
repDescription - Description of the representation to be created
structureType - The type of structure walk to be performed
Returns:
boolean true if successful

doPublish

public boolean doPublish(boolean viewableLink,
                         boolean forceRepublish,
                         String objectReference,
                         ConfigSpec configSpec,
                         ConfigSpec partConfigSpec,
                         boolean defaultRep,
                         String repName,
                         String repDescription,
                         int structureType)
Attempts to publish a Representable generating a Representation

Supported API: false

Parameters:
viewableLink - If true and the data has already been published, the viewable data will be passed back to allow access by getViewableLink
forceRepublish - Overwrites an existing representation should one already exist
objectReference - Reference of the Representable to be published
configSpec - The EPM Config Spec to be used during the product structure tree walk, if null, latest is used.
partConfigSpec - The Part Config Spec to be used during the product structure tree walk, if null, latest is used.
repName - Name of The representation to be created
repDescription - Description of the representation to be created
structureType - The type of structure walk to be performed
Returns:
boolean true if successful

doPublish

public boolean doPublish(boolean viewableLink,
                         boolean forceRepublish,
                         String objectReference,
                         ConfigSpec configSpec,
                         ConfigSpec partConfigSpec,
                         boolean defaultRep,
                         String repName,
                         String repDescription,
                         int structureType,
                         String actionString)
Attempts to publish a Representable generating a Representation

Supported API: false

Parameters:
viewableLink - If true and the data has already been published, the viewable data will be passed back to allow access by getViewableLink
forceRepublish - Overwrites an existing representation should one already exist
objectReference - Reference of the Representable to be published
configSpec - The EPM Config Spec to be used during the product structure tree walk, if null, latest is used.
partConfigSpec - The Part Config Spec to be used during the product structure tree walk, if null, latest is used.
repName - Name of The representation to be created
repDescription - Description of the representation to be created
structureType - The type of structure walk to be performed
actionString - string representation of the action XML file contents
Returns:
boolean true if successful

doPublish

public boolean doPublish(boolean viewableLink,
                         boolean forceRepublish,
                         String objectReference,
                         ConfigSpec configSpec,
                         ConfigSpec partConfigSpec,
                         boolean defaultRep,
                         String repName,
                         String repDescription,
                         int structureType,
                         String actionString,
                         int jobSource)
Attempts to publish a Representable generating a Representation

Supported API: false

Parameters:
viewableLink - If true and the data has already been published, the viewable data will be passed back to allow access by getViewableLink
forceRepublish - Overwrites an existing representation should one already exist
objectReference - Reference of the Representable to be published
configSpec - The EPM Config Spec to be used during the product structure tree walk, if null, latest is used.
partConfigSpec - The Part Config Spec to be used during the product structure tree walk, if null, latest is used.
repName - Name of The representation to be created
repDescription - Description of the representation to be created
structureType - The type of structure walk to be performed
actionString - string representation of the action XML file contents
jobSource - int of source that submitted the job, 0=unknown, 1=manual, 2=checkin, 3=schedule
Returns:
boolean true if successful

doClientPublish

private Object[] doClientPublish(boolean viewableLink,
                                 boolean forceRepublish,
                                 String docObjectReference,
                                 ConfigSpec configSpec,
                                 ConfigSpec partConfigSpec,
                                 boolean defaultRep,
                                 String repName,
                                 String repDescription,
                                 int structureType,
                                 String actionString,
                                 int jobSource)

republishRepresentation

public boolean republishRepresentation(String objectReference,
                                       String repRef)
Attempts to republish an existing Representation of a Representatable

Supported API: false

Parameters:
objectReference - Reference of the Representable to be published
Returns:
boolean true if successful

republishRepresentation

public boolean republishRepresentation(String objectReference,
                                       String repRef,
                                       int jobSource)

getActionString

public String getActionString(File actionFile)
get the action file as a string

Supported API: false

Parameters:
actionFile - the action file

getPublishRepGatewayURL

public String getPublishRepGatewayURL()
Gets the Gateway URL to upload a new representation

Supported API: false

Returns:
String the gateway URL

getPublishRepCADTypes

public String getPublishRepCADTypes(Locale locale)
Gets HTLM OPTION fagments that lists the EPMAuthoringAppType's that can be used to load/convert CAD data in new representation wizard

Supported API: false

Returns:
String the HTML OPTION fragment

getCADRepList

public String[] getCADRepList(String objRef,
                              ConfigSpec cs,
                              Locale locale)
Gets the potential list of CAD "reps" that the user can choose to publish. Used by the new Representation wizard

Supported API: false

Returns:
String[] of the reps names. [0] is the display message. [1] - [n] are the rep names, if known. User can still type names in. If return is null then there can be no reps.

getDocumentPublishableFileList

public static String getDocumentPublishableFileList(String objRef)
Gets HTLM OPTION fagments that lists a WTDocuemnts publishable files if the input object is not a WTDocuemnt, return null, if the WTDocument dooes not have an publishable file, returns ""

Supported API: false

Returns:
String the HTML OPTION fragment

createVeto

public boolean createVeto(String number,
                          String containerRef,
                          boolean thumbnailOnly,
                          boolean isPosAssy,
                          String desc)
Create an entry in Prohibition list

Supported API: false

Parameters:
number - EPMDoc number to add
containerRef - container EPMDoc is in
thumbnailOnly - only probibit thumbnails not publishing
isPosAssy - mark this EPMDoc as a positioning assembly
desc - description of why this is probihited
Returns:
success

deleteVeto

public void deleteVeto(String objref)
Delete an entry from Prohibition list

Supported API: false

Parameters:
objref - the probibition object

getVetoList

public ArrayList getVetoList(String containerRef)
List entries in Prohibition list

Supported API: false

Parameters:
containerRef - container who's objects should be included in the list
Returns:
ArrayList containing String[] of data

getVetoSearch

public String[][] getVetoSearch(String name,
                                String number,
                                String containerRef)
Search for EPMDoc Masters with the name numbeer in the container

Supported API: false

Parameters:
name - EPMDoc Master Name
containerRef - container
Returns:
String[] of EPMDOc numbers

getStatisticsSaveGatewayURL

public String getStatisticsSaveGatewayURL()
Gets the Gateway URL to save publish statistics as a csv file

Supported API: false

Returns:
String the gateway URL

getStatisticsList

public List[] getStatisticsList(String containerRef,
                                String filterType,
                                String fromDate,
                                String toDate,
                                Locale locale)
                         throws Exception
List information for publish statistics summary

Supported API: false

Parameters:
containerRef - container who's publish summaries should be included
Returns:
List[] containing Lists of String[] of data
Throws:
Exception