com.novell.admin.common.snapins
Class AdminPageSnapin

java.lang.Object
  |
  +--com.novell.admin.common.snapins.AdminPageSnapin
All Implemented Interfaces:
AttributeHandler, java.util.EventListener, Help, PageSnapin, Snapin, SnapinListener
Direct Known Subclasses:
MODObjectListSnapin

public class AdminPageSnapin
extends java.lang.Object
implements PageSnapin, SnapinListener, AttributeHandler

Base class for all Admin Page snapins. Classes that extend this class MUST define tabName, menuName, snapin_name, snapin_description and thePanel in their initSnapin method. AND, derived initSnapin methods must call this classes initSnapin.


Field Summary
protected  InitSnapinInfo info
           
protected  java.lang.String menuName
           
protected  NSObject nsObj
           
protected  PropertyBook propertyBook
           
protected  Shell shell
           
protected  java.lang.String snapin_description
           
protected  java.lang.String snapin_name
           
protected  java.lang.String tabName
           
protected  AdminPage thePanel
           
 
Constructor Summary
AdminPageSnapin()
           
 
Method Summary
 boolean canSave()
          Interface implementation.
 java.lang.String[] getHandledAttributeNames()
          Definition of interface AttributeHandler.
 java.lang.String getMenuName()
          Interface implementation.
protected  ObjectEntryCollection getObjectEntryCollection()
          Get the ObjectEntryCollection the snapins is working with.
 java.awt.Component getPage()
          Returns the page that this snapin represents.
 java.lang.String getSnapinDescription()
          Interface implementation.
 java.lang.String getSnapinName()
          Interface implementation.
 java.lang.String getTabID()
          Interface implementation.
 java.lang.String getTabName()
          Interface implementation.
 boolean hasHelp()
          Interface implementation to tell whether of not the panel has help.
 boolean initSnapin(InitSnapinInfo snapinInfo)
          Interface implementation.
 boolean isMOD()
          Tells if snapin running under MOD.
 boolean killActive()
          Called just before the page loses the focus.
 boolean saveData()
          Interface implementation; Note that this does NOT call thePanel's saveData().
 void setActive(boolean isFirstTimeShown)
          Called just before the page is set as the current page.
protected  void setObjectEntryCollection(ObjectEntryCollection collection)
          Called by derived classes when they want to set the ObjectEntryCollection to another Namespace.
 void showHelp()
          Launches context sensitive help.
 void shutdownSnapin()
          Interface implementation, called when snapin shutsdown.
 void snapinListener(SnapinEvent e)
          When this SnapinEvent is received, it gets the new ObjectEntryCollection from the MODSnapinEvent and resets oeCollection to these entries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tabName

protected java.lang.String tabName

menuName

protected java.lang.String menuName

snapin_name

protected java.lang.String snapin_name

snapin_description

protected java.lang.String snapin_description

info

protected InitSnapinInfo info

propertyBook

protected PropertyBook propertyBook

shell

protected Shell shell

thePanel

protected AdminPage thePanel

nsObj

protected NSObject nsObj
Constructor Detail

AdminPageSnapin

public AdminPageSnapin()
Method Detail

initSnapin

public boolean initSnapin(InitSnapinInfo snapinInfo)
Interface implementation.
Returns:
true if snapin is initialized, false otherwise.

getPage

public java.awt.Component getPage()
Returns the page that this snapin represents.
Specified by:
getPage in interface PageSnapin
Returns:
The AdminPage object

getTabName

public java.lang.String getTabName()
Interface implementation.
Specified by:
getTabName in interface PageSnapin
Returns:
The tab to place on the tabbed dialog for this panel.

getTabID

public java.lang.String getTabID()
Interface implementation.
Specified by:
getTabID in interface PageSnapin
Returns:
The tab ID.

getMenuName

public java.lang.String getMenuName()
Interface implementation.
Specified by:
getMenuName in interface PageSnapin
Returns:
The unique menu name in case more than one page has the name Partition

getSnapinName

public java.lang.String getSnapinName()
Interface implementation.
Returns:
The Snapin Name

getSnapinDescription

public java.lang.String getSnapinDescription()
Interface implementation.
Returns:
The description of the snapin

setActive

public void setActive(boolean isFirstTimeShown)
Called just before the page is set as the current page.
Specified by:
setActive in interface PageSnapin
Parameters:
I-isFirstTimeShown - true, if first time page is shown, false otherwise.

killActive

public boolean killActive()
Called just before the page loses the focus.
Specified by:
killActive in interface PageSnapin
Returns:
true, if ok to leave this page, false otherwise.

showHelp

public void showHelp()
Launches context sensitive help. Derived classes should override this method to show the help file but are not forced to do so.
Specified by:
showHelp in interface PageSnapin

hasHelp

public boolean hasHelp()
Interface implementation to tell whether of not the panel has help.
Specified by:
hasHelp in interface PageSnapin
Returns:
True if has help, false otherwise.

canSave

public boolean canSave()
Interface implementation.
Specified by:
canSave in interface PageSnapin
Returns:
true if ok to save, false otherwise.

saveData

public boolean saveData()
Interface implementation; Note that this does NOT call thePanel's saveData(). This is because saveData() for the panel was called in killActive() routine of the panel.
Specified by:
saveData in interface PageSnapin
Returns:
true always

getHandledAttributeNames

public java.lang.String[] getHandledAttributeNames()
Definition of interface AttributeHandler. Returns all attributes that this PageSnapin is going to handle.
Specified by:
getHandledAttributeNames in interface AttributeHandler
Returns:
The String[] of the handled attribute names
See Also:
AttributeHandler

isMOD

public boolean isMOD()
Tells if snapin running under MOD.
Returns:
true if MOD, false otherwise.

shutdownSnapin

public void shutdownSnapin()
Interface implementation, called when snapin shutsdown.

snapinListener

public void snapinListener(SnapinEvent e)
When this SnapinEvent is received, it gets the new ObjectEntryCollection from the MODSnapinEvent and resets oeCollection to these entries.
Specified by:
snapinListener in interface SnapinListener
Parameters:
e - The SnapinEvent. Since we are only registered for MODSnapinEvent.EVENT_NAME we are guaranteed that that is the type event we will receive.

setObjectEntryCollection

protected void setObjectEntryCollection(ObjectEntryCollection collection)
Called by derived classes when they want to set the ObjectEntryCollection to another Namespace. For example, the FileSystem "Volume" object pages are registered against the NDSNamespace "Volume" object, thus their pages will get an ObjectEntryCollection that has NDS Volumes, they will then call shell.mapObjectEntryToNamespace() in their initSnapin methods, then with the re-mapped ObjectEntryCollection call this method, then super.initSnapin. InitSnapin has a check to see if a derived class has already set the ObjectEntryCollection and if so, it doesnt read it from the initSnapinContext.
Parameters:
entries - The re-mapped ObjectEntryCollection

getObjectEntryCollection

protected ObjectEntryCollection getObjectEntryCollection()
Get the ObjectEntryCollection the snapins is working with.
Returns:
The ObjectEntryCollection that snapin working with.


API Documentation Copyright © 1998-2003 Novell, Inc. All rights reserved.
ConsoleOne is a registered trademark of Novell Inc.
Generated December 9 2003 1727.