com.ibm.mmconsole.extension.er
Class ConsoleConfigurationImpl

java.lang.Object
  extended by com.ibm.mmconsole.extension.er.BaseExtensionPointImpl
      extended by com.ibm.mmconsole.extension.er.ConsoleConfigurationImpl
All Implemented Interfaces:
IBaseExtensionPoint, IConsoleConfiguration, com.ibm.mmconsole.util.ContextListener

public class ConsoleConfigurationImpl
extends BaseExtensionPointImpl
implements com.ibm.mmconsole.util.ContextListener, IConsoleConfiguration

This is the console configuration extension point for Express Runtime. IConsoleConfiguration.


Constructor Summary
ConsoleConfigurationImpl()
          Default constructor
ConsoleConfigurationImpl(java.util.Locale userLocale)
          A constructor that takes a Locale object.
 
Method Summary
 void contextChanged()
          This rebuilds the business applications list
 void deleteCustomCredentials(java.lang.String customUnqiueId)
          This method is used to delete custom credentials that are no longer needed.
 void destroy()
          Clean up objects
 java.util.ArrayList getBusinessApplications()
          Return the list of business applications configured in the console.
 ConsoleCredential getCustomCredentials(javax.portlet.PortletRequest request, java.lang.String customUnqiueId)
          This method is used to retrieve any custom credentials.
 ConsoleCredential getLocalOsCredentials(javax.portlet.PortletRequest request, Resource resource)
          This method retrieves the Local OS credential information for the specified Resource.
 ConsoleCredential getResourceCredentials(javax.portlet.PortletRequest request, Resource resource)
          This method retrieves the credential information for the specified Resource.
 void refreshConfiguration()
          This method will refresh the console configuration from Preferences.
 void storeCustomCredentials(javax.portlet.PortletRequest request, ConsoleCredential creds, java.lang.String customUnqiueId)
          This method will store any custom credentials in the console configuration.
 
Methods inherited from class com.ibm.mmconsole.extension.er.BaseExtensionPointImpl
getUserLocale, setUserLocale
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibm.mmconsole.extension.IBaseExtensionPoint
getUserLocale, setUserLocale
 

Constructor Detail

ConsoleConfigurationImpl

public ConsoleConfigurationImpl()
Default constructor


ConsoleConfigurationImpl

public ConsoleConfigurationImpl(java.util.Locale userLocale)
A constructor that takes a Locale object.

Parameters:
userLocale - - - The Locale object representing the user's locale (which is also known as the browser's locale).
Method Detail

destroy

public void destroy()
Clean up objects

Specified by:
destroy in interface IBaseExtensionPoint
Overrides:
destroy in class BaseExtensionPointImpl

contextChanged

public void contextChanged()
This rebuilds the business applications list

Specified by:
contextChanged in interface com.ibm.mmconsole.util.ContextListener

getBusinessApplications

public java.util.ArrayList getBusinessApplications()
Return the list of business applications configured in the console.

Specified by:
getBusinessApplications in interface IConsoleConfiguration
Returns:
An Arraylist containing all the BusinessApplication(s) in the console.

refreshConfiguration

public void refreshConfiguration()
This method will refresh the console configuration from Preferences. This method should be called if you feel that data could have changed while your application is running.

Specified by:
refreshConfiguration in interface IConsoleConfiguration

storeCustomCredentials

public void storeCustomCredentials(javax.portlet.PortletRequest request,
                                   ConsoleCredential creds,
                                   java.lang.String customUnqiueId)
This method will store any custom credentials in the console configuration. A set of credentials are stored per user beased upon the console login. An unique id must be provided to store the credentials. The same unique must be used to retrieve the credentials.

Specified by:
storeCustomCredentials in interface IConsoleConfiguration
Parameters:
request - - A PortletRequest object.
creds - - A ConsoleCredential object representing the credentials to store.
customUnqiueId - - An unique id to store the credentials under.

getCustomCredentials

public ConsoleCredential getCustomCredentials(javax.portlet.PortletRequest request,
                                              java.lang.String customUnqiueId)
This method is used to retrieve any custom credentials. You must prodive the unique id given when storing the credentials.

Specified by:
getCustomCredentials in interface IConsoleConfiguration
Parameters:
request - - A PortletRequest object.
customUnqiueId - - The unique id of the credentials to retrieve.
Returns:
ConsoleCredential - The custom credential information.

deleteCustomCredentials

public void deleteCustomCredentials(java.lang.String customUnqiueId)
This method is used to delete custom credentials that are no longer needed.

Specified by:
deleteCustomCredentials in interface IConsoleConfiguration
Parameters:
customUnqiueId - - The unique id of the credentials to delete.

getResourceCredentials

public ConsoleCredential getResourceCredentials(javax.portlet.PortletRequest request,
                                                Resource resource)
This method retrieves the credential information for the specified Resource.

Specified by:
getResourceCredentials in interface IConsoleConfiguration
Parameters:
request - - A PortletRequest object.
resource - - A Resource representing a resource configured in the console.
Returns:
ConsoleCredential - The reource's credential information.

getLocalOsCredentials

public ConsoleCredential getLocalOsCredentials(javax.portlet.PortletRequest request,
                                               Resource resource)
This method retrieves the Local OS credential information for the specified Resource.

Specified by:
getLocalOsCredentials in interface IConsoleConfiguration
Parameters:
request - - A PortletRequest object.
resource - - A Resource representing a resource configured in the console.
Returns:
ConsoleCredential - The resource's Local OS credential information.