wt.fc
Class IconDelegate

java.lang.Object
  extended bywt.fc.IconDelegate
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
ActionIconDelegate, CabinetIconDelegate, ContainerTemplateIconDelegate, DataFormatIconDelegate, EPMDocumentMasterIconDelegate, FormatIconDelegate, RevisionControlledIconDelegate, ShortcutIconDelegate, WildfireIconDelegate

public class IconDelegate
extends Object
implements Externalizable



Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static String COMPUTE_SHARED_FROM_GLYPH
           
static String COMPUTE_SHARED_TO_GLYPH
           
private  WTContainer contextContainer
           
static String DISPLAY_SHARED_FROM_GLYPH
           
static String DISPLAY_SHARED_TO_GLYPH
           
static long EXTERNALIZATION_VERSION_UID
           
private  IconDelegateFactory factory
           
static String NO_SHARED_FROM_GLYPH
           
static String NO_SHARED_TO_GLYPH
           
private  WTObject object
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String PROJECTLINK_INSTALL_KEY
           
private static boolean ProjectLinkInstalled
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static String SHARED_FROM
           
static String SHARED_TO
           
private  String sharedFromGlyph
           
private  String sharedToGlyph
           
private  Class targetClass
           
private static boolean VERBOSE
           
 
Constructor Summary
IconDelegate()
          

Supported API: false
 
Method Summary
private static boolean displaySharedFromGlyph(WTContained obj, WTContainer currentContext)
          Determine whether a shared-from glyph should be displayed on the icon.
private static boolean displaySharedToGlyph(WTContained obj, WTContainer currentContext)
          Determine whether a shared-to glyph should be displayed on the icon.
private  void factoryValidate(IconDelegateFactory a_Factory)
           
 WTContainer getContextContainer()
          Returns the value of the current context container.
 IconDelegateFactory getFactory()
          Gets the object for the association that plays role: factory.
 WTObject getObject()
          Gets the object for the association that plays role: object.
 IconSelector getOpenIconSelector()
          

Supported API: false
 String getSharedFromDisplay()
          Returns how this instance will handle shared-from glyph display

Supported API: false
 String getSharedToDisplay()
          Returns how this instance will handle shared-to glyph display

Supported API: false
 IconSelector getStandardIconSelector()
          

Supported API: false
 Class getTargetClass()
          Gets the object for the association that plays role: targetClass.
 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(IconDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 IconDelegate resolveSelector(IconSelector selector)
          

Supported API: false
 void setFactory(IconDelegateFactory a_Factory)
          Sets the object for the association that plays role: factory.
 void setObject(WTObject a_Object)
          Sets the object for the association that plays role: object.
 void setShareGlyphDisplay(String sharedFrom, String sharedTo, WTContainer container)
          Specify whether this instance should display shared-to and shared-from glyphs on the icon.
 void setTargetClass(Class a_TargetClass)
          Sets the object for the association that plays role: targetClass.
 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

factory

private IconDelegateFactory factory

object

private WTObject object

targetClass

private Class targetClass

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

DISPLAY_SHARED_FROM_GLYPH

public static final String DISPLAY_SHARED_FROM_GLYPH
See Also:
Constant Field Values

NO_SHARED_FROM_GLYPH

public static final String NO_SHARED_FROM_GLYPH
See Also:
Constant Field Values

COMPUTE_SHARED_FROM_GLYPH

public static final String COMPUTE_SHARED_FROM_GLYPH
See Also:
Constant Field Values

DISPLAY_SHARED_TO_GLYPH

public static final String DISPLAY_SHARED_TO_GLYPH
See Also:
Constant Field Values

NO_SHARED_TO_GLYPH

public static final String NO_SHARED_TO_GLYPH
See Also:
Constant Field Values

COMPUTE_SHARED_TO_GLYPH

public static final String COMPUTE_SHARED_TO_GLYPH
See Also:
Constant Field Values

SHARED_TO

public static final String SHARED_TO
See Also:
Constant Field Values

SHARED_FROM

public static final String SHARED_FROM
See Also:
Constant Field Values

sharedToGlyph

private String sharedToGlyph

sharedFromGlyph

private String sharedFromGlyph

contextContainer

private WTContainer contextContainer

VERBOSE

private static boolean VERBOSE

PROJECTLINK_INSTALL_KEY

private static final String PROJECTLINK_INSTALL_KEY
See Also:
Constant Field Values

ProjectLinkInstalled

private static boolean ProjectLinkInstalled
Constructor Detail

IconDelegate

public IconDelegate()


Supported API: false

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(IconDelegate 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

getFactory

public IconDelegateFactory getFactory()
Gets the object for the association that plays role: factory.

Supported API: false

Returns:
IconDelegateFactory

setFactory

public void setFactory(IconDelegateFactory a_Factory)
                throws WTPropertyVetoException
Sets the object for the association that plays role: factory.

Supported API: false

Parameters:
a_Factory -
Throws:
WTPropertyVetoException

factoryValidate

private void factoryValidate(IconDelegateFactory a_Factory)
                      throws WTPropertyVetoException
Parameters:
a_Factory -
Throws:
WTPropertyVetoException

getObject

public WTObject getObject()
Gets the object for the association that plays role: object.

Supported API: false

Returns:
WTObject

setObject

public void setObject(WTObject a_Object)
               throws WTPropertyVetoException
Sets the object for the association that plays role: object.

Supported API: false

Parameters:
a_Object -
Throws:
WTPropertyVetoException

getTargetClass

public Class getTargetClass()
Gets the object for the association that plays role: targetClass.

Supported API: false

Returns:
Class

setTargetClass

public void setTargetClass(Class a_TargetClass)
                    throws WTPropertyVetoException
Sets the object for the association that plays role: targetClass.

Supported API: false

Parameters:
a_TargetClass -
Throws:
WTPropertyVetoException

getStandardIconSelector

public IconSelector getStandardIconSelector()
                                     throws WTException,
                                            IllegalAccessException,
                                            InvocationTargetException


Supported API: false

Returns:
IconSelector
Throws:
WTException
IllegalAccessException
InvocationTargetException

getOpenIconSelector

public IconSelector getOpenIconSelector()
                                 throws WTException,
                                        IllegalAccessException,
                                        InvocationTargetException


Supported API: false

Returns:
IconSelector
Throws:
WTException
IllegalAccessException
InvocationTargetException

resolveSelector

public IconDelegate resolveSelector(IconSelector selector)
                             throws WTException,
                                    IllegalAccessException,
                                    InvocationTargetException


Supported API: false

Parameters:
selector -
Returns:
IconDelegate
Throws:
WTException
IllegalAccessException
InvocationTargetException

setShareGlyphDisplay

public void setShareGlyphDisplay(String sharedFrom,
                                 String sharedTo,
                                 WTContainer container)
Specify whether this instance should display shared-to and shared-from glyphs on the icon.

Supported API: false

Parameters:
sharedFrom - The following values are recognized:
  • DISPLAY_SHARED_FROM_GLYPH - display a glyph on the icon indicating the object has been shared into the contegxt container from another container
  • NO_SHARED_FROM_GLYPH - don't display a glyph indicating the object has been shared into the context container from another container
  • COMPUTE_SHARED_FROM_GLYPH - using the value of the currentContainerContext, determine if the object has been shared into the context container from another container and display the shared-from glyph if it has.
sharedTo - The following values are recognized:
  • DISPLAY_SHARED_TO_GLYPH - display a glyph on the icon indicating the object has been shared to another container by the context container
  • NO_SHARED_TO_GLYPH - don't display a glyph indicating the object has been shared to another container
  • COMPUTE_SHARED_TO_GLYPH - if obj is a SubFolder and the context container is the objects's owning container determine if the object has been shared to another container and display the shared-to glyph if it has. This computation requires a database query.
container - The container forming the context from which the object is being viewed. Required if sharedFrom = COMPUTE_SHARED_FROM_GLYPH or sharedTo = COMPUTE_SHARED_TO_GLYPH. Otherwise may be null.

getSharedFromDisplay

public String getSharedFromDisplay()
Returns how this instance will handle shared-from glyph display

Supported API: false

Returns:
The following values are possible:
  • DISPLAY_SHARED_FROM_GLYPH - will display a glyph on the icon indicating the object has been shared into the context container from another container
  • NO_SHARED_FROM_GLYPH - will not display a glyph indicating the object has been shared into the context container from another container
  • COMPUTE_SHARED_FROM_GLYPH - will determine whether the object has been shared into the context container from another container and display the shared-from glyph if it has. The current context container must have been set with a call to setShareGlyphDisplay().

getSharedToDisplay

public String getSharedToDisplay()
Returns how this instance will handle shared-to glyph display

Supported API: false

Returns:
The following values are possible:
  • DISPLAY_SHARED_TO_GLYPH - will display a glyph on the icon indicating the object has been shared out of the context container to another container
  • NO_SHARED_FROM_GLYPH - will not display a glyph indicating the object has been shared out of the context container to another container
  • COMPUTE_SHARED_FROM_GLYPH - if obj is a SubFolder, will determine whether the object has been shared out of the context container to another container and display the shared-from glyph if it has. The context container must have been set with a call to setShareGlyphDisplay().

getContextContainer

public WTContainer getContextContainer()
Returns the value of the current context container. Will return null if the container has not been set by a call to setShareGlyphDisplay().

Supported API: false

Returns:
WTContainer

displaySharedFromGlyph

private static boolean displaySharedFromGlyph(WTContained obj,
                                              WTContainer currentContext)
Determine whether a shared-from glyph should be displayed on the icon. This glyph means the object has been shared into the current context container from another container.

Supported API: false

Parameters:
obj - object whose icon is being displayed
currentContext - context container; may be null, in which case this method returns false
Returns:
boolean

displaySharedToGlyph

private static boolean displaySharedToGlyph(WTContained obj,
                                            WTContainer currentContext)
Determine whether a shared-to glyph should be displayed on the icon. This glyph means the object has been shared out of the current context container into another container. By design, the shared-to glyph will only be displayed on SubFolder objects. If obj is a SubFolder, a database hit may be needed to make the share determination.

Supported API: false

Parameters:
obj - object whose icon is being displayed
currentContext - context container; may be null, in which case this method returns false
Returns:
boolean