com.ptc.windchill.cadx.common.picker
Class PickerHelper

java.lang.Object
  extended bycom.ptc.windchill.cadx.common.picker.PickerHelper
All Implemented Interfaces:
Externalizable, Serializable

public class PickerHelper
extends Object
implements Externalizable



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
static String PICKER_PROPERTY_PREFIX
          This is the selection mode value for single selection.
private static String[] pickerSubmitProperties
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
PickerHelper()
           
 
Method Summary
static boolean containerRequiresFolderPathConversion(WTContainer container)
           
private static String fixDisplayPathForContainer(String path, WTContainer container)
           
static String getDisplayLocation(Folder folder)
           
static String getDisplayLocation(String folderPath, WTContainer folderContainer)
           
static Folder getFolderFromDisplayLocation(String folderDisplayName, WTContainer container)
           
private static Object getLastObject(List list)
           
static Object getLastSelectedObject(ContextHolder contextHolder)
          Returns the last selected object found in the ContextHolder.
static String getLastSelectedObjectNumber(ContextHolder contextHolder)
           
static String getLastSelectedOID(ContextHolder contextHolder)
          Returns the last selected OID found in the ContextHolder.
static WTReference getLastSelectedReferenceObject(ContextHolder contextHolder)
          Returns the last selected reference object found in the ContextHolder.
static Map getPickerProperties(ContextHolder contextHolder)
          Returns Map of properties passed to the initial Picker page, via form data or query data, that have names pre-pended with PickerHelper.PICKER_PROPERTY_PREFIX.
private static PickerUtilities getPickerUtilities(Properties props)
           
static List getSelectedObjects(ContextHolder contextHolder)
          Returns list of selected objects found in the ContextHolder.
static List getSelectedOIDs(ContextHolder contextHolder)
          Returns list of selected OIDs found in the ContextHolder.
static List getSelectedReferenceObjects(ContextHolder contextHolder)
          Returns list of selected reference objects found in the ContextHolder.
static Map getSubmitProperties(ContextHolder contextHolder)
          Returns Map object which contains Picker related properties available in the Context Holders form data.
 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(PickerHelper thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
static List removeSelectedObjects(ContextHolder contextHolder)
          Removes the selected object entries from the ContextHolder.
static Map removeSubmitProperties(ContextHolder contextHolder)
          Removes the following properties from the Context Holders form data: PickerUtilities..
static boolean showAllCabinetsForContainer(WTContainer container)
           
 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

PICKER_PROPERTY_PREFIX

public static final String PICKER_PROPERTY_PREFIX
This is the selection mode value for single selection.

Supported API: false

See Also:
Constant Field Values

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

pickerSubmitProperties

private static String[] pickerSubmitProperties
Constructor Detail

PickerHelper

public PickerHelper()
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(PickerHelper 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

getSelectedObjects

public static List getSelectedObjects(ContextHolder contextHolder)
                               throws WTException
Returns list of selected objects found in the ContextHolder.

Supported API: false

Parameters:
contextHolder -
Returns:
List
Throws:
WTException

getLastSelectedObject

public static Object getLastSelectedObject(ContextHolder contextHolder)
                                    throws WTException
Returns the last selected object found in the ContextHolder.

Supported API: false

Parameters:
contextHolder -
Returns:
Object
Throws:
WTException

getSelectedReferenceObjects

public static List getSelectedReferenceObjects(ContextHolder contextHolder)
                                        throws WTException
Returns list of selected reference objects found in the ContextHolder.

Supported API: false

Parameters:
contextHolder -
Returns:
List
Throws:
WTException

getLastSelectedReferenceObject

public static WTReference getLastSelectedReferenceObject(ContextHolder contextHolder)
                                                  throws WTException
Returns the last selected reference object found in the ContextHolder.

Supported API: false

Parameters:
contextHolder -
Returns:
WTReference
Throws:
WTException

getSelectedOIDs

public static List getSelectedOIDs(ContextHolder contextHolder)
                            throws WTException
Returns list of selected OIDs found in the ContextHolder.

Supported API: false

Parameters:
contextHolder -
Returns:
List
Throws:
WTException

getLastSelectedOID

public static String getLastSelectedOID(ContextHolder contextHolder)
                                 throws WTException
Returns the last selected OID found in the ContextHolder.

Supported API: false

Parameters:
contextHolder -
Returns:
String
Throws:
WTException

getPickerProperties

public static Map getPickerProperties(ContextHolder contextHolder)
                               throws WTException
Returns Map of properties passed to the initial Picker page, via form data or query data, that have names pre-pended with PickerHelper.PICKER_PROPERTY_PREFIX.

Supported API: false

Parameters:
contextHolder -
Returns:
Map
Throws:
WTException

getSubmitProperties

public static Map getSubmitProperties(ContextHolder contextHolder)
                               throws WTException
Returns Map object which contains Picker related properties available in the Context Holders form data. These properties are: PickerUtilities.. In addition any properties passed to the initial Picker page, via form data or query data, that have names pre-pended with PickerHelper.PICKER_PROPERTY_PREFIX. NOTE: The keys returned have the PICKER_PROPERTY_PREFIX stripped off.

Supported API: false

Parameters:
contextHolder -
Returns:
Map
Throws:
WTException

removeSelectedObjects

public static List removeSelectedObjects(ContextHolder contextHolder)
                                  throws WTException
Removes the selected object entries from the ContextHolder. Returns list of selected objects found in the ContextHolder.

Supported API: false

Parameters:
contextHolder -
Returns:
List
Throws:
WTException

removeSubmitProperties

public static Map removeSubmitProperties(ContextHolder contextHolder)
                                  throws WTException
Removes the following properties from the Context Holders form data: PickerUtilities.. In addition any properties passed to the initial Picker page, via form data or query data, that have names pre-pended with PickerHelper.PICKER_PROPERTY_PREFIX are removed. Returns the Map object returned by getSubmitProperties.

Supported API: false

Parameters:
contextHolder -
Returns:
Map
Throws:
WTException

getLastObject

private static Object getLastObject(List list)
                             throws WTException
Throws:
WTException

getPickerUtilities

private static PickerUtilities getPickerUtilities(Properties props)

getLastSelectedObjectNumber

public static String getLastSelectedObjectNumber(ContextHolder contextHolder)
                                          throws Exception
Throws:
Exception

getDisplayLocation

public static String getDisplayLocation(Folder folder)
                                 throws WTException
Throws:
WTException

getDisplayLocation

public static String getDisplayLocation(String folderPath,
                                        WTContainer folderContainer)
                                 throws WTException
Throws:
WTException

fixDisplayPathForContainer

private static String fixDisplayPathForContainer(String path,
                                                 WTContainer container)

getFolderFromDisplayLocation

public static Folder getFolderFromDisplayLocation(String folderDisplayName,
                                                  WTContainer container)
                                           throws WTException
Throws:
WTException

containerRequiresFolderPathConversion

public static boolean containerRequiresFolderPathConversion(WTContainer container)

showAllCabinetsForContainer

public static boolean showAllCabinetsForContainer(WTContainer container)