com.novell.application.console.snapin.scope
Class NamespaceScope

java.lang.Object
  |
  +--com.novell.application.console.snapin.scope.NamespaceScope
All Implemented Interfaces:
Scope, java.io.Serializable

public class NamespaceScope
extends java.lang.Object
implements Scope

Defines a scope that is restricted to the namespace specified at registration.

Snap-ins of all types except Namespace and Service snap-ins may be registered with the NamespaceScope scope. When registered, the functionality provided by these snap-ins becomes active when the namespace specified at registration is selected (activated) by the user.

The following code snippet is an example of registering a view snap-in with to specified namespace with the NamespaceScope scope.


      public RegistrationItem[] getRegistration()
      {
          NamespaceScope scope;
          scope = new NamespaceScope(Shell.SNAPIN_VIEW, "Namespace UniqueID");
          return new RegistrationItem[]
          {
              new RegistrationItem(scope, getClass().getName())
          };
      }
 

See Also:
Scope

Constructor Summary
NamespaceScope(java.lang.Object snapinType, java.lang.String namespace)
          Builds a NamespaceScope for the specified snapinType, but restricted to the namespace specified at registration.
 
Method Summary
 java.lang.String getNamespaceUniqueID()
          Returns the namespace unique ID for this scope instance.
 java.lang.Object getSnapinType()
          Returns the snap-in type object that was passed in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceScope

public NamespaceScope(java.lang.Object snapinType,
                      java.lang.String namespace)
Builds a NamespaceScope for the specified snapinType, but restricted to the namespace specified at registration.

The snap-in types that can be used for the NamespaceScope scope include all snap-in types except Namespace and Service, which are:

Parameters:
snapinType - The type of the snap-in as defined above.
namespace - The uniqueID string for which the namespace applies.
Method Detail

getSnapinType

public java.lang.Object getSnapinType()
Returns the snap-in type object that was passed in the constructor.
Specified by:
getSnapinType in interface Scope
Returns:
The snap-in type object.
See Also:
Scope

getNamespaceUniqueID

public java.lang.String getNamespaceUniqueID()
Returns the namespace unique ID for this scope instance.
Returns:
The unique ID of the specified namespace.


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