com.ibm.as400.registry
Class AS400Registry

java.lang.Object
  |
  +--com.ibm.as400.registry.Registry
        |
        +--com.ibm.as400.registry.AS400Registry

public class AS400Registry
extends Registry

The Registry implementation that stores data in the form of binary files in the local file system. This is the default implementation returned by Registry.getInstance. Use of this registry type is preferred over WindowsRegistry, which is not available on all platforms.

Applications should call the method setApplicationName to specify a unique name which will be used to name the files in the backing store. If no name is supplied the name "MyApplication" will be used. In production, taking the default is not recommended since multiple applications could share the same backing store, causing unpredictable behavior resulting from naming collisions in the node hierarchy.

The files which comprise the backing store are created in a config subdirectory under the platform-defined current directory. Applications should ensure that the current directory is set correctly on startup.

Since:
v5r1m0
See Also:
Registry

Field Summary
static java.lang.String OPNAV_APPLICATION
          The pathname of the Operations Navigator registry node in the application namespace that contains configuration data for installed components.
static java.lang.String OPNAV_PLATFORM
          The pathname of the Operations Navigator registry node in the platform namespace that contains configuration data common to all users.
static java.lang.String OPNAV_SERVERS
          The pathname of the Operations Navigator registry node in the servers namespace that contains configuration data for each data server.
static java.lang.String OPNAV_USER
          The pathname of the Operations Navigator registry node in the user namespace that contains configuration data specific to the current user.
 
Fields inherited from class com.ibm.as400.registry.Registry
APPLICATION_REGISTRY, APPLICATION_ROOT, AS400_REGISTRY, LDAP_REGISTRY, PLATFORM_ROOT, REGISTRY_VERSION, SERVERS_ROOT, SESSION_ROOT, USER_ROOT, WINDOWS_REGISTRY
 
Method Summary
 java.lang.String getApplicationName()
          Returns the name of the application associated with this registry.
 java.lang.String getAS400Name()
           
 java.lang.String getIFSLocation()
           
 RegistryNode getRoot(java.lang.String namespace)
          Returns the root of a registry namespace.
 void setApplicationName(java.lang.String name)
          Sets the name of the application associated with this registry.
 void setAS400Name(java.lang.String name)
           
 void setIFSLocation(java.lang.String name)
           
 
Methods inherited from class com.ibm.as400.registry.Registry
getInstance, getInstance, getVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPNAV_PLATFORM

public static java.lang.String OPNAV_PLATFORM
The pathname of the Operations Navigator registry node in the platform namespace that contains configuration data common to all users.

OPNAV_APPLICATION

public static java.lang.String OPNAV_APPLICATION
The pathname of the Operations Navigator registry node in the application namespace that contains configuration data for installed components. (Not currently used.)

OPNAV_USER

public static java.lang.String OPNAV_USER
The pathname of the Operations Navigator registry node in the user namespace that contains configuration data specific to the current user.

OPNAV_SERVERS

public static java.lang.String OPNAV_SERVERS
The pathname of the Operations Navigator registry node in the servers namespace that contains configuration data for each data server. (Not currently used.)
Method Detail

getApplicationName

public java.lang.String getApplicationName()
Returns the name of the application associated with this registry.
Returns:
The programmatic name of the application.
Since:
v5r1m0
See Also:
setApplicationName(java.lang.String)

setApplicationName

public void setApplicationName(java.lang.String name)
                        throws RegistryException
Sets the name of the application associated with this registry. An application name cannot contain any of the characters / \ : * ? " < > |.

Application names are scoped to the current process. Once the application name has been set for a process it cannot be changed.

Parameters:
name - The programmatic name of the application.
Throws:
java.lang.IllegalArgumentException - If the application name contains invalid characters.
RegistryException - If the application name has already been set to a different value.
Since:
v5r1m0
See Also:
getApplicationName()

setAS400Name

public void setAS400Name(java.lang.String name)
                  throws RegistryException

getAS400Name

public java.lang.String getAS400Name()

setIFSLocation

public void setIFSLocation(java.lang.String name)
                    throws RegistryException

getIFSLocation

public java.lang.String getIFSLocation()

getRoot

public RegistryNode getRoot(java.lang.String namespace)
                     throws RegistryException
Returns the root of a registry namespace.
Overrides:
getRoot in class Registry
Parameters:
namespace - A constant that identifies the desired namespace root.
Returns:
The root of the specified namespace.
Throws:
RegistryException - If the specified root cannot be accessed.
Since:
v5r1m0
See Also:
Registry, RegistryNode