wt.epm
Class EPMDefaultContentDelegate

java.lang.Object
  extended bywt.epm.EPMDefaultContentDelegate
All Implemented Interfaces:
EPMContentDelegate, Externalizable, Serializable
Direct Known Subclasses:
EPMDocContentDelegate

public class EPMDefaultContentDelegate
extends Object
implements EPMContentDelegate, Externalizable

Implements full renumberIteration, default versions of renumberContents and checkContents. Common utility functions are included if desired.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
private static String EPMRESOURCE
           
static long EXTERNALIZATION_VERSION_UID
           
private static String JAR
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private static String ZIP
           
 
Constructor Summary
EPMDefaultContentDelegate()
           
 
Method Summary
 void checkContents(EPMObject target, String newNumber)
          For a given WTObject check that the numbering change is permissible given the current content on any and all iterations.
protected  void checkIterationContents(FormatContentHolder holder, String displayID, String oldNumber, String newNumber)
           
protected  String convertFamInstContentName(String text)
           
protected  String getContentdata(WTObject obj)
           
protected  String getExtension(String text)
           
protected  boolean isContentAPackage(String cdata)
           
protected  boolean isEmbedded(String value, int index, String contentdata)
           
protected  String lastExtension(String cdata)
           
protected  boolean noExtensionTest(String newNumber, String oldNumber, Vector contents)
           
 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(EPMDefaultContentDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
protected  boolean rejectExtension(String newNumber, String oldNumber, String contentdata)
           
protected  boolean rejectNewNumber(String newNumber, String contentdata)
           
 void renumberContents(EPMObject target, String oldNumber, String newNumber)
          Perform the number change for any and all iterations of the given object.
 void renumberIteration(FormatContentHolder holder, String oldNumber, String newNumber)
          For a given FormatContentHolder, do the required modification of content for a number change

Supported API: false
 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

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values

JAR

private static final String JAR
See Also:
Constant Field Values

ZIP

private static final String ZIP
See Also:
Constant Field Values
Constructor Detail

EPMDefaultContentDelegate

public EPMDefaultContentDelegate()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(EPMDefaultContentDelegate thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

renumberContents

public void renumberContents(EPMObject target,
                             String oldNumber,
                             String newNumber)
                      throws WTException
Perform the number change for any and all iterations of the given object.

Supported API: false

Specified by:
renumberContents in interface EPMContentDelegate
Parameters:
target -
oldNumber -
newNumber - The proposed new value for the "number" identifier.
Throws:
WTException

checkContents

public void checkContents(EPMObject target,
                          String newNumber)
                   throws WTException
For a given WTObject check that the numbering change is permissible given the current content on any and all iterations.

Supported API: false

Specified by:
checkContents in interface EPMContentDelegate
Parameters:
target -
newNumber - The proposed new value for the "number" identifier.
Throws:
WTException

renumberIteration

public void renumberIteration(FormatContentHolder holder,
                              String oldNumber,
                              String newNumber)
                       throws WTException,
                              PropertyVetoException,
                              IOException
For a given FormatContentHolder, do the required modification of content for a number change

Supported API: false

Specified by:
renumberIteration in interface EPMContentDelegate
Parameters:
holder -
oldNumber -
newNumber -
Throws:
WTException
PropertyVetoException
IOException

checkIterationContents

protected void checkIterationContents(FormatContentHolder holder,
                                      String displayID,
                                      String oldNumber,
                                      String newNumber)
                               throws WTException
Throws:
WTException

rejectExtension

protected boolean rejectExtension(String newNumber,
                                  String oldNumber,
                                  String contentdata)

rejectNewNumber

protected boolean rejectNewNumber(String newNumber,
                                  String contentdata)

isEmbedded

protected boolean isEmbedded(String value,
                             int index,
                             String contentdata)

isContentAPackage

protected boolean isContentAPackage(String cdata)

lastExtension

protected String lastExtension(String cdata)

getExtension

protected String getExtension(String text)

convertFamInstContentName

protected String convertFamInstContentName(String text)

noExtensionTest

protected boolean noExtensionTest(String newNumber,
                                  String oldNumber,
                                  Vector contents)

getContentdata

protected String getContentdata(WTObject obj)