BEA Systems, Inc.

BEA WebLogic Server 9.1 API Reference


weblogic.security
Class UserConfigFileManager

java.lang.Object
  extended byweblogic.security.UserConfigFileManager
All Implemented Interfaces:
Map

public class UserConfigFileManager
extends Object
implements Map

Copyright © 2005 BEA Systems, Inc. All Rights Reserved.

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Constructor Summary
UserConfigFileManager()
          This uses all default file paths.
UserConfigFileManager(String configFile, String secretFile)
          This overrides all default paths.
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 boolean equals(Object o)
           
 Object get(Object key)
           
 boolean getDebug()
           
static weblogic.security.UsernameAndPassword getUsernameAndPassword(String propertyName)
          This is a utility method that is used to simply get the username and password from one of a series of options.
static weblogic.security.UsernameAndPassword getUsernameAndPassword(String configFile, String secretFile, String propertyName)
          Gets a UsernameAndPassword instance that contains the username and password values from the specified config file; property name is the left side of the property equation.
 int hashCode()
           
 boolean isEmpty()
           
 Set keySet()
           
 void load()
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 void refresh()
          Refresh the in-memory config store if any changes have occurred to the backing store.
 Object remove(Object key)
           
 void setDebug(boolean x)
           
static void setUsernameAndPassword(weblogic.security.UsernameAndPassword values, String propertyName)
           
static void setUsernameAndPassword(weblogic.security.UsernameAndPassword values, String configFile, String secretFile, String propertyName)
           
 int size()
           
 void store()
          Store any changes to the config file.
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
put
 

Constructor Detail

UserConfigFileManager

public UserConfigFileManager()
This uses all default file paths.


UserConfigFileManager

public UserConfigFileManager(String configFile,
                             String secretFile)
This overrides all default paths.

Method Detail

clear

public void clear()
Specified by:
clear in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

equals

public boolean equals(Object o)
Specified by:
equals in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

getDebug

public boolean getDebug()

getUsernameAndPassword

public static weblogic.security.UsernameAndPassword getUsernameAndPassword(String propertyName)
This is a utility method that is used to simply get the username and password from one of a series of options. The algorithm is thus: If both the username and password for the corresponding property are provided, that is used. If just the username is provided, the password is prompted for, without echoing if possible. If neither username nor password is provided, we get it from the default config store. The calling code may also attempt to get the password from the boot.properties, if the operation allows.

The properties that will be used are “.username” and “.password” concatenated with the “propertyName” argument.


getUsernameAndPassword

public static weblogic.security.UsernameAndPassword getUsernameAndPassword(String configFile,
                                                                           String secretFile,
                                                                           String propertyName)
Gets a UsernameAndPassword instance that contains the username and password values from the specified config file; property name is the left side of the property equation.


hashCode

public int hashCode()
Specified by:
hashCode in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

load

public void load()
          throws FileNotFoundException,
                 IOException
Throws:
FileNotFoundException
IOException

put

public Object put(Object key,
                  Object value)

putAll

public void putAll(Map t)
Specified by:
putAll in interface Map

refresh

public void refresh()
             throws IOException
Refresh the in-memory config store if any changes have occurred to the backing store. Note that calling this after having called setEntry() and before having called store() may cause some changes to be lost.

Throws:
IOException

remove

public Object remove(Object key)
Specified by:
remove in interface Map

setDebug

public void setDebug(boolean x)

setUsernameAndPassword

public static void setUsernameAndPassword(weblogic.security.UsernameAndPassword values,
                                          String propertyName)

setUsernameAndPassword

public static void setUsernameAndPassword(weblogic.security.UsernameAndPassword values,
                                          String configFile,
                                          String secretFile,
                                          String propertyName)

size

public int size()
Specified by:
size in interface Map

store

public void store()
           throws FileNotFoundException,
                  IOException
Store any changes to the config file.

Throws:
FileNotFoundException
IOException

values

public Collection values()
Specified by:
values in interface Map

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs91
Copyright 2005 BEA Systems Inc.