com.novell.application.console.snapin
Class RegistrationItem

java.lang.Object
  |
  +--com.novell.application.console.snapin.RegistrationItem
All Implemented Interfaces:
java.io.Serializable

public final class RegistrationItem
extends java.lang.Object
implements java.io.Serializable

Specifies to ConsoleOne the conditions under which snap-ins are loaded.

The specified conditions are based on the snap-in's Scope. The Scope narrows down the circumstances under which the snap-in will appear. The class name is the name of the snap-in. The instance data is optional and may be used to instantiate multiple instances of the same snap-in, making each instance of the snap-in appear to be different (see the Template interface for further details).

See Also:
Template, Registration

Constructor Summary
RegistrationItem(Scope theScope, java.lang.String className)
          Builds a RegistrationItem based on the scope and the snap-in full class name.
RegistrationItem(Scope theScope, java.lang.String className, java.lang.Object instanceData)
          Builds a RegistrationItem based on the scope, the snap-in full class name, and instance data.
 
Method Summary
 java.lang.String getClassName()
          Returns the name of the participating snap-in class.
 java.lang.Object getInstanceData()
          Returns the instance data as an Object.
 java.lang.String getRegistrarName()
          Gets the name of the registrar for this registration item.
 Scope getScope()
          Returns the scope of the participating snap-in.
 void setRegistrarName(java.lang.String registrarName)
          Sets the name of the registrar for this registration item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrationItem

public RegistrationItem(Scope theScope,
                        java.lang.String className)
Builds a RegistrationItem based on the scope and the snap-in full class name.

The resulting RegistrationItem array contains information identifying what kind of snap-in each object is, where to find it, and when ConsoleOne will load the snap-in.

Parameters:
theScope - Identifies the conditions under which the snap-in will appear in ConsoleOne.
className - A string containing the full name of the snap-in class that is to be registered to ConsoleOne.
See Also:
Scope

RegistrationItem

public RegistrationItem(Scope theScope,
                        java.lang.String className,
                        java.lang.Object instanceData)
Builds a RegistrationItem based on the scope, the snap-in full class name, and instance data.

The resulting RegistrationItem contains information identifying what kind of snap-in each object is, where to find it, and when ConsoleOne will load the snap-in.

This constructor has an additional parameter, instanceData. The instanceData parameter may contain any Java object that will be passed to the snap-in through the Snapin.setInstanceData(Object instanceData) method, which is defined in the Template interface.

Note: Any time you use the instanceData parameter in RegistrationItem, you must implement the Template interface in the snap-in you create in order to retrieve the instanceData object.

Parameters:
theScope - Identifies the conditions under which the snap-in will appear in ConsoleOne.
className - A string containing the full name of the snap-in class that is to be registered to ConsoleOne.
instanceData - May contain any Java object.
See Also:
Scope, Template.setInstanceData(java.lang.Object)
Method Detail

getScope

public Scope getScope()
Returns the scope of the participating snap-in.
Returns:
The scope of where the snap-in applies.

getClassName

public java.lang.String getClassName()
Returns the name of the participating snap-in class.
Returns:
The name of the snap-in class as a String.

setRegistrarName

public void setRegistrarName(java.lang.String registrarName)
Sets the name of the registrar for this registration item.
Parameters:
The - name of the registrar for this registration item.

getRegistrarName

public java.lang.String getRegistrarName()
Gets the name of the registrar for this registration item.
Returns:
The name of the registrar for this registration item.

getInstanceData

public java.lang.Object getInstanceData()
Returns the instance data as an Object.

The getInstanceData() method returns the instance data object as defined and set by the setInstanceData() method in the Template interface.

Returns:
The instance data as an Object, or null if the constructor does not build a RegistrationItem array that includes the instanceData parameter.
See Also:
Template.setInstanceData(java.lang.Object)


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