WebNMS 5 API Specification

com.adventnet.beans.chassis
Class ShelfHelper

java.lang.Object
  |
  +--com.adventnet.beans.chassis.BaseHelper
        |
        +--com.adventnet.beans.chassis.ShelfHelper
Direct Known Subclasses:
ShelfPositioner

public class ShelfHelper
extends BaseHelper

An extended version of com.adventnet.beans.chassis.BaseHelper, that adds support for placing the cards in their respective parent panels during the runtime. This class takes care of passing the ManagedObject name to the card Objects.

See Also:
BaseHelper

Field Summary
protected  java.lang.String[] curIndexes
           
protected  java.lang.String[] defaultTypeClassNames
           
protected  java.lang.String[] identifiers
           
 
Fields inherited from class com.adventnet.beans.chassis.BaseHelper
applet, debug, DUMMY_ARRAY, holders, parentComponent
 
Constructor Summary
ShelfHelper()
          Default Constructor to create the ShelfHelper object.
ShelfHelper(java.applet.Applet applet)
          Applet Constructor to instantiate the ShelfHelper Object
ShelfHelper(java.applet.Applet appletArg, java.lang.String instanceNameArg)
          Constructor for passing the applet as well as the instanceName to create the ShelfHelper object
ShelfHelper(java.lang.String instanceNameArg)
          Constructor for creating an instance of ShelfHelper object with the instance name as argument
 
Method Summary
 void setAllToDefaultTypes()
          This API call creates instances for each of the defaultCardNames, set using the setDefaultCardNames and places these objects on the Holder Panels, specified by setPlaceHolders method.
protected  java.lang.Object setCurrentType(ChassisPlaceHolder holderArg, java.lang.String classNameArg, java.lang.String indexArg)
          Set the passed argument as the current type on the Holder Panels.
 void setDefaultCardNames(java.lang.String[] defaultTypeClassNamesArg)
          Required to pass an array of default card names.
 void setSlotIdentifiers(java.lang.String[] identifiersArg)
          Required to pass an array of slot identifiers that identifies the slot numbers.
 void setStaticIndexes(java.lang.String[] curIndexesArg)
          Used to pass the indeces on the cards.
 
Methods inherited from class com.adventnet.beans.chassis.BaseHelper
debug, getChassisComponent, getInstance, getPlaceHolders, reinitialize, setApplet, setChassisComponent, setDebug, setInstanceName, setPlaceHolders, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

identifiers

protected java.lang.String[] identifiers

defaultTypeClassNames

protected java.lang.String[] defaultTypeClassNames

curIndexes

protected java.lang.String[] curIndexes
Constructor Detail

ShelfHelper

public ShelfHelper()
Default Constructor to create the ShelfHelper object.

ShelfHelper

public ShelfHelper(java.lang.String instanceNameArg)
Constructor for creating an instance of ShelfHelper object with the instance name as argument
Parameters:
instanceNameArg - Used as an identifier while debug messages are printed out to the console

ShelfHelper

public ShelfHelper(java.applet.Applet applet)
Applet Constructor to instantiate the ShelfHelper Object

ShelfHelper

public ShelfHelper(java.applet.Applet appletArg,
                   java.lang.String instanceNameArg)
Constructor for passing the applet as well as the instanceName to create the ShelfHelper object
Parameters:
appletArg - applet to be passed to the ShelfHelper object
instanceNameArg - Used as an identifier while debug messages are printed out to the console
Method Detail

setSlotIdentifiers

public void setSlotIdentifiers(java.lang.String[] identifiersArg)
Required to pass an array of slot identifiers that identifies the slot numbers. The passed array length should match with the holder's array, set on this Object, using setPlaceHolders. The parent PlaceHolders for each card are found with the help of the identifier array that has been passed. To construct identifiers for the HolderPanels, use the setIdentificationName property of the Holder Objects to create identifiers.
Parameters:
identifiersArg[] - The array of the identifiersArg should match with the holders array set using the setPlaceHolders.

setDefaultCardNames

public void setDefaultCardNames(java.lang.String[] defaultTypeClassNamesArg)
Required to pass an array of default card names. The passed array length should match with the holder's array set on this Object using setPlaceHolders. The classes for the corresponding cards are created, when the Chassis Application is not able to find out a card according to the user configuration.
Parameters:
defaultTypeClassNamesArg[] - The array of the defaultTypeClassNamesArg should match with the holders array set using the setPlaceHolders.

setStaticIndexes

public void setStaticIndexes(java.lang.String[] curIndexesArg)
Used to pass the indeces on the cards. This is useful in the case of StaticChassis, where the indeces has to be passed by the user. In case of Dynamic Chassis, the Chassis Application finds the index and passes it on to the cards.
Parameters:
curIndexesArg[] - The Indeces that have to be passed to the respective cards placed on the Holder Panels.

setAllToDefaultTypes

public void setAllToDefaultTypes()
This API call creates instances for each of the defaultCardNames, set using the setDefaultCardNames and places these objects on the Holder Panels, specified by setPlaceHolders method.

setCurrentType

protected java.lang.Object setCurrentType(ChassisPlaceHolder holderArg,
                                          java.lang.String classNameArg,
                                          java.lang.String indexArg)
Set the passed argument as the current type on the Holder Panels.

WebNMS 5 API Specification