|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.netmarkets.msproject.NmMsProjectHelper
This helper class provides access to the NmMsProjectService
implementation. It also provides some useful utilities for working with
the Microsoft Project Integration
features of ProjectLink
.
Supported API: false
Extendable: false
Constructor Summary | |
NmMsProjectHelper()
|
Method Summary | |
private static ExecutionObject |
checkForExecutionObject(Object obj)
|
static File |
createTempFile()
Create a temporary file in the Windchill temporary
directory. |
static WfContainer |
getContainer(NmCommandBean cb,
Hashtable params)
Return the WfContainer that is referenced
byby data in the params or by the OID data
in the specified NmCommandBean . |
static File |
getContent(javax.servlet.http.HttpServletRequest request)
Copy the content of the request to a temporary file. |
static ExecutionObject |
getExecutionObject(NmCommandBean cb,
Hashtable params)
Return the ExecutionObject that is referenced
by data in the params or by the OID data
in the specified NmCommandBean . |
static void |
printRequestParameters(Hashtable params)
Print out the request parameters contained in the hashtable. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(NmMsProjectHelper thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final NmMsProjectService service
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
public static final String OID
public static final String ID
public static final String CLASS
public static final String XML_FILE
public static final String XML_PATH
public static final String NATIVE_FILE
public static final String NATIVE_FILE_TEMP
public static final String NATIVE_PATH
public static final String IMPORT_TASKS
public static final String TASK_IMPORT_SCOPE
public static final String IMPORT_RESOURCES
public static final String IMPORT_DEPENDENCIES
public static final String START_DATE_TO_USE
public static final String USE_XML_START_DATE
public static final String USE_PTC_START_DATE
public static final String IMPORT_MODE
public static final String IMPORT_ACTION
public static final String PROVIDE_FEEDBACK
public static final String TEMP_PATH
public static final File TMP_DIR
public static final String MPP_FILE_EXT
public static final String XML_FILE_EXT
public static final String DEFAULT_XML_FILE_EXT
public static final String XML_MIME_TYPE
public static final String DEFAULT_XML_MIME_TYPE
public static final String TMP_FILE_PREFIX
public static final boolean VERBOSE
public static final String ENCODING
Constructor Detail |
public NmMsProjectHelper()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(NmMsProjectHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public static ExecutionObject getExecutionObject(NmCommandBean cb, Hashtable params) throws WTException
ExecutionObject
that is referenced
by data in the params
or by the OID
data
in the specified NmCommandBean
.
When searching for the execution object these method follows the
following steps:
NmMsProjectHelper.ID
and NmMsProjectHelper.CLASS
keys in the specified params
hashtable and tries to find an execution object that corresponds to
this data. If an object is found that is an instance of the specified
class, has the specified persistence ID and is an instance of ExecutionObject
,
then that object is returned.
ExecutionObject
, then that object is returned.
ExecutionObject
, then that object is returned.
One special case is handled: If the object found in any of the cases
above is a Project2
object, then the project's
ProjectPlan
is returned if it has one.
cb
- params
- the request parameters
WTException
public static WfContainer getContainer(NmCommandBean cb, Hashtable params) throws WTException
WfContainer
that is referenced
byby data in the params
or by the OID
data
in the specified NmCommandBean
.
This method first calls getExecutionObject(com.ptc.netmarkets.util.beans.NmCommandBean, java.util.Hashtable)
. It returns the
result of that method cast to a WfContainer
if it is
an instance of WfContainer
. Otherwise, it throws an
exception.
Supported API: false
cb
- params
- the request parameters
WTException
getExecutionObject(com.ptc.netmarkets.util.beans.NmCommandBean, java.util.Hashtable)
public static final void printRequestParameters(Hashtable params)
public static final File createTempFile() throws IOException
Windchill
temporary
directory. Mark it as deleteOnExit.
IOException
public static File getContent(javax.servlet.http.HttpServletRequest request) throws IOException
null
if the request has no content.
IOException
private static ExecutionObject checkForExecutionObject(Object obj) throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |