Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06

weblogic.security
Class UserConfigFileManager

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

public class UserConfigFileManager
extends Object
implements Map


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
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 String getDefaultConfigFileName()
           
static String getDefaultKeyFileName()
           
static 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 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(UsernameAndPassword values, String propertyName)
           
static void setUsernameAndPassword(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
 

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

setDebug

public void setDebug(boolean x)

getDebug

public boolean getDebug()

getUsernameAndPassword

public static 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.


setUsernameAndPassword

public static void setUsernameAndPassword(UsernameAndPassword values,
                                          String propertyName)

getUsernameAndPassword

public static 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.


setUsernameAndPassword

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

getDefaultConfigFileName

public static String getDefaultConfigFileName()

getDefaultKeyFileName

public static String getDefaultKeyFileName()

load

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

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

store

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

Throws:
FileNotFoundException
IOException

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
Overrides:
equals in class Object

get

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

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object

isEmpty

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

keySet

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

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

putAll

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

remove

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

size

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

values

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

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Oracle WebLogic Server API Reference
11g Release 1 (10.3.6)

Part Number E13941-06