|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.netmarkets.msproject.NmMsProjectCommands
Supported API: false
Extendable: false
Field Summary | |
private static String |
CLASSNAME
|
private static String |
CONTENT_DISPOSITION
|
private static String |
CONTENT_LENGTH
|
private static String |
DEFAULT_DOWNLOAD_FILENAME
|
private static int |
DEFAULT_DOWNLOAD_TIMEOUT
|
private static String |
DEFAULT_IMPORT_ACTION
|
private static String |
DEFAULT_REQUEST_IMPORT_ACTION
|
private static boolean |
DELETE_TEMP_FILES
|
private static int |
DOWNLOAD_TIMEOUT
|
static long |
EXTERNALIZATION_VERSION_UID
|
private static String |
IMPORT_ACTION
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
REQUEST_IMPORT_ACTION
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private static String |
USER_AGENT
|
Constructor Summary | |
NmMsProjectCommands()
|
Method Summary | |
private static String |
addQueryParam(String url,
String name,
Hashtable values,
EncodingConverter encoder,
boolean first)
Adds the parameter named name to the specified
url . |
private static void |
downloadFile(NmCommandBean cb,
File file,
String downloadFilename,
String encoding)
Write the contents of the specified File
onto the response's writer. |
static void |
editProjectPlan(NmCommandBean cb)
Export the project plan as XML that conforms to the Microsoft
Project XML Schema . |
private static void |
export(NmCommandBean cb,
Hashtable params,
ImportExportInfo info)
Export XML to a temporary file. |
static void |
exportProjectPlan(NmCommandBean cb)
Export the project plan as XML that conforms to the Microsoft
Project XML Schema . |
static void |
generateImportRequest(NmCommandBean cb)
Generate the XML that is sent to the client as a request
to import a file into a ProjectPlan
or SummaryActivity . |
private static String |
getFilename(WfContainer c,
Locale locale)
Get an appropriate XML filename based on the name
of the specified WfContainer . |
private static ImportInfo |
getImportInfo(Hashtable params)
Create an ImportInfo object based on
the values in the specified Hashtable . |
private static String |
getImportRequestURL(Hashtable params)
Create the URL that can be used to generate the
import project plan request XML . |
static NmChangeModel[] |
importProjectPlan(NmCommandBean cb)
Update the project plan using the specified XML file. |
private static void |
initializeInfo(ImportExportInfo info)
Set the locale and the preferred time zone of the current user as the local and time zone of the specified ImportExportInfo . |
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(NmMsProjectCommands thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
static NmChangeModel[] |
requestImportProjectPlan(NmCommandBean cb)
Update the project plan using the specified file. |
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
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static final String CONTENT_DISPOSITION
private static final String CONTENT_LENGTH
private static final String IMPORT_ACTION
private static final String DEFAULT_IMPORT_ACTION
private static final String REQUEST_IMPORT_ACTION
private static final String DEFAULT_REQUEST_IMPORT_ACTION
private static final int DOWNLOAD_TIMEOUT
private static final int DEFAULT_DOWNLOAD_TIMEOUT
private static final boolean DELETE_TEMP_FILES
private static final String DEFAULT_DOWNLOAD_FILENAME
private static final String USER_AGENT
Constructor Detail |
public NmMsProjectCommands()
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(NmMsProjectCommands 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 NmChangeModel[] importProjectPlan(NmCommandBean cb) throws WTException, WTPropertyVetoException, IOException
Since an import will usually cause substantial changes and occurs
infrequently, return a NmChangeModel
that invalidates all the caches.
Supported API: false
cb
-
WTException
WTPropertyVetoException
IOException
public static void exportProjectPlan(NmCommandBean cb) throws WTException, IOException
XML
that conforms to the Microsoft
Project XML Schema
.
cb
-
WTException
IOException
public static NmChangeModel[] requestImportProjectPlan(NmCommandBean cb) throws WTException, WTPropertyVetoException, IOException
If the file is a MPP file then generate a request for the client to
import the file into a ProjectPlan
or SummaryActivity
. The client should
use the information in the generated XML
to send an importProjectPlan
request to the server. The generated XML
conforms to
the Existing Project XML Schema
.
If the file is an XML file then the call is redirected to importProjectPlan
.
This call will import the XML directly.
Supported API: false
cb
-
WTException
WTPropertyVetoException
IOException
public static void generateImportRequest(NmCommandBean cb) throws WTException, IOException
XML
that is sent to the client as a request
to import a file into a ProjectPlan
or SummaryActivity
.
The client should use the information in the generated XML
to send an importProjectPlan
request to the server.
The generated XML
conforms to the Existing Project
XML Schema
.
Supported API: false
cb
-
WTException
IOException
public static void editProjectPlan(NmCommandBean cb) throws WTException, IOException
XML
that conforms to the Microsoft
Project XML Schema
.
Additional information is included in the XML
file that
identifies the Windchill
objects that the data corresponds
to. This allows the client to save changes back to the server.
Supported API: false
cb
-
WTException
IOException
private static final String getFilename(WfContainer c, Locale locale) throws WTException
XML
filename based on the name
of the specified WfContainer
.
WTException
private static final String getImportRequestURL(Hashtable params)
URL
that can be used to generate the
import project plan request XML
.
params
- the request parameters
private static final String addQueryParam(String url, String name, Hashtable values, EncodingConverter encoder, boolean first)
name
to the specified
url
. The new url is returned.
private static final void export(NmCommandBean cb, Hashtable params, ImportExportInfo info) throws WTException, IOException
XML
to a temporary file. The XML
is produced using thea specified op
: export, edit or
request. After the XML
is generated to the temporary
file, download the file by writing its contents to the response's
writer.
cb
- the command bean
WTException
IOException
downloadFile(com.ptc.netmarkets.util.beans.NmCommandBean, java.io.File, java.lang.String, java.lang.String)
private static final void downloadFile(NmCommandBean cb, File file, String downloadFilename, String encoding) throws IOException
File
onto the response's writer.
cb
- the command beanfile
- the file to whose content should be written to the responseencoding
- the character encoding to use
IOException
private static final ImportInfo getImportInfo(Hashtable params) throws WTException
ImportInfo
object based on
the values in the specified Hashtable
.
WTException
private static void initializeInfo(ImportExportInfo info) throws WTException
ImportExportInfo
.
info
- the import-export info object to be initialized
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |