com.ptc.epm.commands.transaction
Class AddContentOp

java.lang.Object
  extended bycom.ptc.epm.commands.transaction.AbstractContentOp
      extended bycom.ptc.epm.commands.transaction.AddContentOp
All Implemented Interfaces:
Serializable, TransactionOp

public class AddContentOp
extends AbstractContentOp

See Also:
Serialized Form

Field Summary
private static int BUFSIZ
           
private  boolean consumed
           
private  boolean upload
           
 
Fields inherited from class com.ptc.epm.commands.transaction.AbstractContentOp
applData, contentHolder, EDA_CATEGORY, file, NATIVE_CATEGORY
 
Constructor Summary
AddContentOp()
           
AddContentOp(ContentHolder holder, File file, ApplicationData applData)
           
 
Method Summary
 Object execute(DataExchange exchange)
           
protected static ApplicationData getApplData(ContentHolder holder, File file, boolean asPrimary)
           
private  void readObject(ObjectInputStream inputStream)
           
 String toString()
           
private  ApplicationData updateContent(ContentHolder contentHolder, ApplicationData applData, InputStream inputStream)
           
private  void writeObject(ObjectOutputStream outputStream)
           
 
Methods inherited from class com.ptc.epm.commands.transaction.AbstractContentOp
getApplData, isEDAFile, isNativeFile, publishResults, updateInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUFSIZ

private static final int BUFSIZ
See Also:
Constant Field Values

consumed

private transient boolean consumed

upload

private transient boolean upload
Constructor Detail

AddContentOp

public AddContentOp()

AddContentOp

public AddContentOp(ContentHolder holder,
                    File file,
                    ApplicationData applData)
             throws WTException,
                    FileNotFoundException
Method Detail

getApplData

protected static ApplicationData getApplData(ContentHolder holder,
                                             File file,
                                             boolean asPrimary)
                                      throws WTException,
                                             FileNotFoundException
Throws:
WTException
FileNotFoundException

execute

public Object execute(DataExchange exchange)
               throws WTException
Specified by:
execute in interface TransactionOp
Overrides:
execute in class AbstractContentOp
Throws:
WTException

readObject

private void readObject(ObjectInputStream inputStream)
                 throws IOException,
                        ClassNotFoundException
Throws:
IOException
ClassNotFoundException

updateContent

private ApplicationData updateContent(ContentHolder contentHolder,
                                      ApplicationData applData,
                                      InputStream inputStream)
                               throws WTException,
                                      PropertyVetoException,
                                      IOException
Throws:
WTException
PropertyVetoException
IOException

writeObject

private void writeObject(ObjectOutputStream outputStream)
                  throws IOException
Throws:
IOException

toString

public String toString()