|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface GuiseSession
Represents a session with a user. A Swing-based client application may have only one session, while a web server application will likely have multiple sessions.
| Field Summary | |
|---|---|
static java.lang.String |
INPUT_STRATEGY_PROPERTY
The input strategy bound property. |
static java.lang.String |
LOCALE_PROPERTY
The locale bound property. |
static java.lang.String |
ORIENTATION_PROPERTY
The orientation bound property. |
static java.lang.String |
PRINCIPAL_PROPERTY
The principal (e.g. |
static java.lang.String |
THEME_URI_PROPERTY
The theme URI bound property. |
static java.lang.String |
TIME_ZONE_PROPERTY
The time zone bound property. |
| Method Summary | ||
|---|---|---|
void |
beginModalNavigation(ModalNavigationPanel<?> modalNavigationPanel,
ModalNavigation modalNavigation)
Begins modal interaction for a particular modal panel. |
|
void |
clearRequestedNavigation()
Removes any requests for navigation. |
|
Component |
createBusyComponent()
Creates a component to indicate Guise busy status. |
|
com.globalmentor.net.URIPath |
createTempPublicResource(java.lang.String baseName,
java.lang.String extension)
Creates a temporary resource available at a public application navigation path but with access restricted to this session. |
|
java.lang.String |
dereferenceString(java.lang.String string)
Dereferences a string by replacing any string references with a string from the resources. |
|
java.net.URI |
dereferenceURI(java.net.URI uri,
java.lang.String... suffixes)
Dereferences a URI by looking up any references from the resources if necessary. |
|
void |
destroy()
Called when the session is destroyed. |
|
boolean |
endModalNavigation(ModalNavigationPanel<?> modalNavigationPanel)
Ends modal interaction for a particular modal panel. |
|
void |
fireNavigated(java.net.URI referrerURI)
Fires a NavigationEvent to all NavigationListeners in the session application frame hierarchy. |
|
ActionPrototype |
getAboutApplicationActionPrototype()
|
|
GuiseApplication |
getApplication()
|
|
ApplicationFrame |
getApplicationFrame()
|
|
Bookmark |
getBookmark()
Reports the current bookmark relative to the current navigation path. |
|
java.lang.Boolean |
getBooleanResource(java.lang.String resourceKey)
Retrieves a Boolean resource from the resource bundle. |
|
java.lang.Boolean |
getBooleanResource(java.lang.String resourceKey,
java.lang.Boolean defaultValue)
Retrieves a Boolean resource from the resource bundle, using a specified default if no such resource is available. |
|
Breadcrumb |
getBreadcrumb(com.globalmentor.net.URIPath navigationPath)
Retrieves a breadcrumb for a particular navigation path. |
|
java.util.List<Breadcrumb> |
getBreadcrumbs(com.globalmentor.net.URIPath navigationPath)
Retrieves breadcrumbs for all the segments of a particular navigation path. |
|
java.text.Collator |
getCollatorInstance()
Retrieves an instance of a collator appropriate for the current locale. |
|
Color |
getColorResource(java.lang.String resourceKey)
Retrieves a Color resource from the resource bundle. |
|
Color |
getColorResource(java.lang.String resourceKey,
Color defaultValue)
Retrieves a Color resource from the resource bundle, using a specified default if no such resource is available. |
|
java.net.URI |
getDepictionRootURI()
Reports the current depiction root URI of the session. |
|
java.net.URI |
getDepictionURI(com.globalmentor.net.URIPath navigationPath,
java.lang.String... suffixes)
Determines the URI to use for depiction based upon a navigation path. |
|
java.net.URI |
getDepictionURI(java.net.URI navigationURI,
java.lang.String... suffixes)
Determines the URI to use for depiction based upon a navigation URI. |
|
Component |
getDestinationComponent(ComponentDestination destination)
Retrieves the component bound to the given destination. |
|
InputStrategy |
getInputStrategy()
|
|
java.lang.Integer |
getIntegerResource(java.lang.String resourceKey)
Retrieves an Integer resource from the resource bundle. |
|
java.lang.Integer |
getIntegerResource(java.lang.String resourceKey,
java.lang.Integer defaultValue)
Retrieves an Integer resource from the resource bundle, using a specified default if no such resource is available. |
|
java.util.Locale |
getLocale()
|
|
java.io.Writer |
getLogWriter()
|
|
ModalNavigation |
getModalNavigation()
|
|
Component |
getNavigationComponent(com.globalmentor.net.URIPath path)
Retrieves the component bound to the given application context-relative path. |
|
com.globalmentor.net.URIPath |
getNavigationPath()
Reports the navigation path relative to the application context path. |
|
Orientation |
getOrientation()
|
|
Platform |
getPlatform()
|
|
com.globalmentor.urf.URFResource |
getPreferences(java.lang.Class<?> objectClass)
Retrieves the saved preference properties for a given class. |
|
java.security.Principal |
getPrincipal()
|
|
Navigation |
getRequestedNavigation()
|
|
|
getResource(java.lang.String resourceKey)
Retrieves an object resource from the resource bundle. |
|
|
getResource(java.lang.String resourceKey,
T defaultValue)
Retrieves an object resource from the resource bundle, using a specified default if no such resource is available. |
|
java.util.ResourceBundle |
getResourceBundle()
Retrieves a resource bundle to be used by this session. |
|
java.lang.String |
getStringResource(java.lang.String resourceKey)
Retrieves a string resource from the resource bundle. |
|
java.lang.String |
getStringResource(java.lang.String resourceKey,
java.lang.String defaultValue)
Retrieves a string resource from the resource bundle, using a specified default if no such resource is available. |
|
Theme |
getTheme()
Returns the current session theme. |
|
java.net.URI |
getThemeURI()
|
|
java.util.TimeZone |
getTimeZone()
|
|
java.net.URI |
getURIResource(java.lang.String resourceKey)
Retrieves a URI resource from the resource bundle. |
|
java.net.URI |
getURIResource(java.lang.String resourceKey,
java.net.URI defaultValue)
Retrieves a URI resource from the resource bundle, using a specified default if no such resource is available. |
|
java.util.UUID |
getUUID()
|
|
void |
initialize()
Called when the session is initialized. |
|
void |
initializeComponent(Component component)
Initializes a component, optionally with a description in a TURF resource file. |
|
void |
initializeComponent(Component component,
java.io.InputStream descriptionInputStream)
Initializes a component from the contents of an URF description input stream. |
|
void |
initializeComponentFromResource(Component component,
java.lang.String resourceKey)
Initializes a component with a description in a TURF resource file. |
|
boolean |
input(Input input)
Processes input such as a keystroke, a mouse click, or a command. |
|
boolean |
isModalNavigation()
|
|
void |
log(InformationLevel level,
java.lang.String subject,
java.lang.String predicate,
java.lang.String object,
java.util.Map<?,?> parameters,
java.lang.CharSequence comment)
Logs the given session-related information. |
|
void |
log(java.lang.String subject,
java.lang.String predicate,
java.lang.String object,
java.util.Map<?,?> parameters,
java.lang.CharSequence comment)
Logs the given session-related information with a default log level of InformationLevel.LOG. |
|
void |
navigate(java.net.URI uri)
Requests navigation to the specified URI. |
|
void |
navigate(com.globalmentor.net.URIPath path)
Requests navigation to the specified path. |
|
void |
navigate(com.globalmentor.net.URIPath path,
Bookmark bookmark)
Requests navigation to the specified path and bookmark. |
|
void |
navigate(com.globalmentor.net.URIPath path,
Bookmark bookmark,
java.lang.String viewportID)
Requests navigation to the specified path and bookmark in an identified viewport. |
|
void |
navigate(com.globalmentor.net.URIPath path,
java.lang.String viewportID)
Requests navigation to the specified path in an identified viewport. |
|
void |
navigate(java.net.URI uri,
java.lang.String viewportID)
Requests navigation to the specified URI in an identified viewport. |
|
void |
navigateModal(java.net.URI uri,
ModalNavigationListener modalListener)
Requests modal navigation to the specified URI. |
|
void |
navigateModal(com.globalmentor.net.URIPath path,
Bookmark bookmark,
ModalNavigationListener modalListener)
Requests modal navigation to the specified path and bookmark. |
|
void |
navigateModal(com.globalmentor.net.URIPath path,
ModalNavigationListener modalListener)
Requests modal navigation to the specified path. |
|
void |
notify(Notification... notifications)
Notifies the user of one or more notifications to be presented in sequence. |
|
void |
notify(java.lang.Runnable afterNotify,
Notification... notifications)
Notifies the user of one or more notifications to be presented in sequence, with optional logic to be executed after all notifications have taken place. |
|
void |
notify(java.lang.Runnable afterNotify,
java.lang.Throwable... errors)
Notifies the user of the given error in sequence, with optional logic to be executed after notification takes place. |
|
void |
notify(java.lang.Throwable... errors)
Notifies the user of the given errors in sequence. |
|
Component |
releaseDestinationComponent(ComponentDestination destination)
Releases the component bound to the given destination. |
|
java.util.Locale |
requestLocale(java.util.List<java.util.Locale> requestedLocales)
Requests that the locale be changed to one of the given locales. |
|
java.net.URI |
resolveURI(java.net.URI uri,
java.lang.String... suffixes)
Resolves a URI against the application base path, looking up the URI from the resources if necessary. |
|
void |
setBookmark(Bookmark bookmark)
Changes the bookmark of the current navigation path. |
|
void |
setDepictionRootURI(java.net.URI depictionRootURI)
Sets the depiction root URI of the session. |
|
void |
setInputStrategy(InputStrategy newInputStrategy)
Sets the strategy for processing input. |
|
void |
setLocale(java.util.Locale newLocale)
Sets the current session locale. |
|
void |
setLogWriter(java.io.Writer logWriter)
Sets the log writer. |
|
void |
setNavigation(com.globalmentor.net.URIPath navigationPath,
Bookmark bookmark,
java.net.URI referrerURI)
Sets the new navigation path and bookmark, firing a navigation event if appropriate. |
|
void |
setNavigationPath(com.globalmentor.net.URIPath navigationPath)
Changes the navigation path of the session. |
|
void |
setOrientation(Orientation newOrientation)
Sets the default orientation. |
|
void |
setPreferences(java.lang.Class<?> objectClass,
com.globalmentor.urf.URFResource preferences)
Saves preference properties for a given class. |
|
void |
setPrincipal(java.security.Principal newPrincipal)
Sets the current principal (e.g. |
|
void |
setThemeURI(java.net.URI newThemeURI)
Sets the URI of the session theme. |
|
void |
setTimeZone(java.util.TimeZone newTimeZone)
Sets the current session time zone. |
|
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.globalmentor.config.ConfigurationManaged |
|---|
getConfiguration |
| Field Detail |
|---|
static final java.lang.String INPUT_STRATEGY_PROPERTY
static final java.lang.String LOCALE_PROPERTY
static final java.lang.String ORIENTATION_PROPERTY
static final java.lang.String PRINCIPAL_PROPERTY
static final java.lang.String THEME_URI_PROPERTY
static final java.lang.String TIME_ZONE_PROPERTY
| Method Detail |
|---|
java.util.UUID getUUID()
GuiseApplication getApplication()
java.io.Writer getLogWriter()
void setLogWriter(java.io.Writer logWriter)
logWriter - The writer for writing to the log file, which may not be thread-safe.
java.lang.NullPointerException - if the given log writer is null.
com.globalmentor.urf.URFResource getPreferences(java.lang.Class<?> objectClass)
throws java.io.IOException
objectClass - The class for which preference properties should be returned.
java.lang.NullPointerException - if the given class is null.
java.io.IOException - if there was an error retrieving preferences.
void setPreferences(java.lang.Class<?> objectClass,
com.globalmentor.urf.URFResource preferences)
throws java.io.IOException
objectClass - The class for which preference properties should be saved.preferences - The preferences to save for the given class.
java.lang.NullPointerException - if the given class and/or preferences is null.
java.io.IOException - if there was an error storing preferences.java.net.URI getDepictionRootURI()
void setDepictionRootURI(java.net.URI depictionRootURI)
depictionRootURI - The new depiction root URI of the session.
java.lang.NullPointerException - if the given depiction root URI is null.
java.lang.IllegalArgumentException - if the provided URI specifies a query and/or fragment.
java.lang.IllegalArgumentException - if the provided URI is not absolute.
java.lang.IllegalArgumentException - if the provided URI is not a root URI.
java.net.URI getDepictionURI(com.globalmentor.net.URIPath navigationPath,
java.lang.String... suffixes)
navigationPath - The navigation path, which may be absolute or relative to the application.suffixes - The suffixes, if any, to append to a resource key in a URI reference.
dereferenceURI(URI, String...),
getDepictionRootURI(),
GuiseApplication.getDepictionURI(URI, URIPath)
java.net.URI getDepictionURI(java.net.URI navigationURI,
java.lang.String... suffixes)
navigationURI - The navigation URI, which may be absolute or have an absolute path or a path relative to the application.suffixes - The suffixes, if any, to append to a resource key in a URI reference.
dereferenceURI(URI, String...),
getDepictionRootURI(),
GuiseApplication.getDepictionURI(URI, URI)ApplicationFrame getApplicationFrame()
Platform getPlatform()
InputStrategy getInputStrategy()
void setInputStrategy(InputStrategy newInputStrategy)
InputEvent and dispatch it via the application frame;
if the event is not consumed, it should be passed to the parent input strategy.
This is a bound property.
newInputStrategy - The new strategy for processing input.
java.lang.NullPointerException - if the given input strategy is null.INPUT_STRATEGY_PROPERTY,
getApplicationFrame(),
Component.dispatchInputEvent(InputEvent)java.util.TimeZone getTimeZone()
void setTimeZone(java.util.TimeZone newTimeZone)
newTimeZone - The new session time zone.
java.lang.NullPointerException - if the given time zone is null.TIME_ZONE_PROPERTYjava.util.Locale getLocale()
void setLocale(java.util.Locale newLocale)
newLocale - The new session locale.
java.lang.NullPointerException - if the given locale is null.LOCALE_PROPERTY,
setOrientation(Orientation)java.util.Locale requestLocale(java.util.List<java.util.Locale> requestedLocales)
en-US is accepted if en is supported.)
requestedLocales - The locales requested, in order of preference.
null if none of the given locales are supported by the application.GuiseApplication#getSupportedLocales(),
setLocale(Locale)Orientation getOrientation()
void setOrientation(Orientation newOrientation)
newOrientation - The new default internationalization orientation of components for this session.
java.lang.NullPointerException - if the given orientation is null.ORIENTATION_PROPERTYvoid initializeComponent(Component component)
.turf extension.
That is, for the class MyComponent.class this method first tries to load MyComponent.turf from the same directory.
If this is successful, the component is initialized from this URF description.
This implementation calls initializeComponent(Component, InputStream).
The component's Component.initialize() is called whether there is an URF description.
This method synchronizes on #getDocumentBuilder().
component - The component to initialize.
java.util.MissingResourceException - if no resource could be found associated with the given key.
java.lang.IllegalArgumentException - if the URF description does not provide a resource description of the same type as the specified component.
java.lang.IllegalStateException - if the given component has already been initialized, or there was some other problem initializing the component.Component.initialize(),
PLOOP
void initializeComponentFromResource(Component component,
java.lang.String resourceKey)
throws com.globalmentor.util.DataException,
java.lang.reflect.InvocationTargetException
Component.initialize() after initializing the component from the description.
This implementation calls initializeComponent(Component, InputStream).
This method synchronizes on #getDocumentBuilder().
component - The component to initialize.resourceKey - The key to a TURF description resource file.
java.util.MissingResourceException - if no resource could be found associated with the given key.
java.lang.IllegalArgumentException - if the URF description does not provide a resource description of the same type as the specified component.
java.lang.IllegalStateException - if the given component has already been initialized.
com.globalmentor.util.DataException - if the data was incorrect for component initialization.
java.lang.reflect.InvocationTargetException - if a given resource indicates a Java class the constructor of which throws an exception.Component.initialize()
void initializeComponent(Component component,
java.io.InputStream descriptionInputStream)
throws java.io.IOException,
com.globalmentor.util.DataException,
java.lang.reflect.InvocationTargetException
Component.initialize() after initializing the component from the description.
This method synchronizes on #getDocumentBuilder().
component - The component to initialize.descriptionInputStream - The input stream containing an URF description.
java.lang.IllegalArgumentException - if the URF description does not provide a resource description of the same type as the specified component.
java.lang.IllegalStateException - if the given component has already been initialized.
java.io.IOException - if there is an error reading from the input stream.
com.globalmentor.util.DataException - if the data was incorrect for component initialization.
java.lang.reflect.InvocationTargetException - if a given resource indicates a Java class the constructor of which throws an exception.Component.initialize()
java.util.ResourceBundle getResourceBundle()
throws java.util.MissingResourceException
getXXXResource() should be used in preference to using this method directly.
If this session does not yet have a resource bundle, one will be created based upon the current theme and locale.
The returned resource bundle should only be used temporarily and should not be saved,
as the resource bundle may change if the session locale or the application resource bundle base name changes.
The resource bundle retrieved will allow hierarchical resolution in the following priority:
java.util.MissingResourceException - if no resource bundle for the application's specified base name can be found or there was an error loading a resource bundle.GuiseApplication.loadResourceBundle(Theme, Locale),
getTheme(),
getLocale(),
getStringResource(String),
getStringResource(String, String),
getBooleanResource(String),
getBooleanResource(String, Boolean),
getIntegerResource(String),
getIntegerResource(String, Integer),
getURIResource(String),
getURIResource(String, URI)
<T> T getResource(java.lang.String resourceKey)
throws java.util.MissingResourceException
resourceKey - The key of the resource to retrieve.
java.lang.NullPointerException - if the provided resource key is null.
java.util.MissingResourceException - if no resource could be found associated with the given key.getResourceBundle(),
getResource(String, Object)
<T> T getResource(java.lang.String resourceKey,
T defaultValue)
throws java.util.MissingResourceException
resourceKey - The key of the resource to retrieve.defaultValue - The default value to use if there is no resource associated with the given key.
java.lang.NullPointerException - if the provided resource key is null.
java.util.MissingResourceExceptiongetResourceBundle(),
getResource(String)
java.lang.String getStringResource(java.lang.String resourceKey)
throws java.util.MissingResourceException
resourceKey - The key of the resource to retrieve, or a relative path to the resource in the application's resource area.
java.lang.NullPointerException - if the provided resource key is null.
java.util.MissingResourceException - if no resource could be found associated with the given key.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String.getResourceBundle(),
getStringResource(String, String)
java.lang.String getStringResource(java.lang.String resourceKey,
java.lang.String defaultValue)
throws java.util.MissingResourceException
resourceKey - The key of the resource to retrieve, or a relative path to the resource in the application's resource area.defaultValue - The default value to use if there is no resource associated with the given key.
java.lang.NullPointerException - if the provided resource key is null.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String.
java.util.MissingResourceExceptiongetResourceBundle(),
getStringResource(String)
java.lang.Boolean getBooleanResource(java.lang.String resourceKey)
throws java.util.MissingResourceException
Boolean resource from the resource bundle.
If the given resource is a string, it will be interpreted according to the Boolean.valueOf(java.lang.String) rules.
This is a preferred convenience method for accessing the resources in the session's resource bundle.
resourceKey - The key of the resource to retrieve.
java.lang.NullPointerException - if the provided resource key is null.
java.util.MissingResourceException - if no resource could be found associated with the given key.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String or Boolean object.getResourceBundle(),
getBooleanResource(String, Boolean)
java.lang.Boolean getBooleanResource(java.lang.String resourceKey,
java.lang.Boolean defaultValue)
throws java.util.MissingResourceException
Boolean resource from the resource bundle, using a specified default if no such resource is available.
If the given resource is a string, it will be interpreted according to the Boolean.valueOf(java.lang.String) rules.
This is a preferred convenience method for accessing the resources in the session's resource bundle.
resourceKey - The key of the resource to retrieve.defaultValue - The default value to use if there is no resource associated with the given key.
java.lang.NullPointerException - if the provided resource key is null.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String or Boolean object.
java.util.MissingResourceExceptiongetResourceBundle(),
getBooleanResource(String)
Color getColorResource(java.lang.String resourceKey)
throws java.util.MissingResourceException
Color resource from the resource bundle.
If the given resource is a string, it will be resolved and converted to a color using AbstractModeledColor.valueOf(CharSequence).
This is a preferred convenience method for accessing the resources in the session's resource bundle.
resourceKey - The key of the resource to retrieve.
java.lang.NullPointerException - if the provided resource key is null.
java.util.MissingResourceException - if no resource could be found associated with the given key.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String or Color.
java.lang.IllegalArgumentException - if a string is provided that is not a valid color.getResourceBundle(),
getColorResource(String, Color),
AbstractModeledColor.valueOf(CharSequence)
Color getColorResource(java.lang.String resourceKey,
Color defaultValue)
throws java.util.MissingResourceException
Color resource from the resource bundle, using a specified default if no such resource is available.
If the given resource is a string, it will be resolved and converted to a color using AbstractModeledColor.valueOf(CharSequence).
This is a preferred convenience method for accessing the resources in the session's resource bundle.
resourceKey - The key of the resource to retrieve.defaultValue - The default value to use if there is no resource associated with the given key.
java.lang.NullPointerException - if the provided resource key is null.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String or Color.
java.util.MissingResourceExceptiongetResourceBundle(),
getColorResource(String),
AbstractModeledColor.valueOf(CharSequence)
java.lang.Integer getIntegerResource(java.lang.String resourceKey)
throws java.util.MissingResourceException
Integer resource from the resource bundle.
If the given resource is a string, it will be interpreted according to the Integer.valueOf(java.lang.String) rules.
This is a preferred convenience method for accessing the resources in the session's resource bundle.
resourceKey - The key of the resource to retrieve.
java.lang.NullPointerException - if the provided resource key is null.
java.util.MissingResourceException - if no resource could be found associated with the given key.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String or Integer.
java.lang.NumberFormatException - if the resource key identifies a string that is not a valid integer.getResourceBundle(),
getIntegerResource(String, Integer)
java.lang.Integer getIntegerResource(java.lang.String resourceKey,
java.lang.Integer defaultValue)
throws java.util.MissingResourceException
Integer resource from the resource bundle, using a specified default if no such resource is available.
If the given resource is a string, it will be interpreted according to the Integer.valueOf(java.lang.String) rules.
This is a preferred convenience method for accessing the resources in the session's resource bundle.
resourceKey - The key of the resource to retrieve.defaultValue - The default value to use if there is no resource associated with the given key.
java.lang.NullPointerException - if the provided resource key is null.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String or Integer.
java.util.MissingResourceExceptiongetResourceBundle(),
getIntegerResource(String)
java.net.URI getURIResource(java.lang.String resourceKey)
throws java.util.MissingResourceException
URI resource from the resource bundle.
If the given resource is a string, it will be converted to a URI.
This is a preferred convenience method for accessing the resources in the session's resource bundle.
resourceKey - The key of the resource to retrieve.
java.lang.NullPointerException - if the provided resource key is null.
java.util.MissingResourceException - if no resource could be found associated with the given key.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String or URI object.
java.lang.IllegalArgumentException - if a string is provided that is not a valid URI.getResourceBundle(),
getURIResource(String, URI)
java.net.URI getURIResource(java.lang.String resourceKey,
java.net.URI defaultValue)
throws java.util.MissingResourceException
URI resource from the resource bundle, using a specified default if no such resource is available.
If the given resource is a string, it will be converted to a URI.
This is a preferred convenience method for accessing the resources in the session's resource bundle.
resourceKey - The key of the resource to retrieve.defaultValue - The default value to use if there is no resource associated with the given key.
java.lang.NullPointerException - if the provided resource key is null.
java.lang.ClassCastException - if the resource associated with the given key is not an instance of String or URI object.
java.util.MissingResourceExceptiongetResourceBundle(),
getURIResource(String)java.text.Collator getCollatorInstance()
getCollatorInstance in interface com.globalmentor.text.CollatorFactorygetLocale()java.security.Principal getPrincipal()
null if there is no principal authenticated for this session.void setPrincipal(java.security.Principal newPrincipal)
newPrincipal - The new principal, or null if there should be no associated principal (e.g. the user should be logged off).PRINCIPAL_PROPERTY
Theme getTheme()
throws java.io.IOException
java.io.IOException - if there is an error loading the theme.getThemeURI()java.net.URI getThemeURI()
void setThemeURI(java.net.URI newThemeURI)
getTheme() is called.
This is a bound property.
newThemeURI - The URI of the new session theme.
java.lang.NullPointerException - if the given theme URI is null.THEME_URI_PROPERTY,
getTheme()ActionPrototype getAboutApplicationActionPrototype()
Component getDestinationComponent(ComponentDestination destination)
destination - The destination for which a component should be returned.
java.lang.NullPointerException - if the destination is null.
java.lang.IllegalStateException - if the component class bound to the destination does not provide appropriate constructors, is an interface, is abstract, or throws an exception during instantiation.Component releaseDestinationComponent(ComponentDestination destination)
destination - The destination for which any bound component should be released.
null if no component was bound to the given destination.
java.lang.NullPointerException - if the destination is null.Component getNavigationComponent(com.globalmentor.net.URIPath path)
GuiseApplication#getDestination(String).
This method calls getDestinationComponent(ComponentDestination).
path - The application context-relative path within the Guise container context.
java.lang.NullPointerException - if the path is null.
java.lang.IllegalArgumentException - if the provided path is absolute.
java.lang.IllegalArgumentException - if no component is appropriate to associated the given navigation path (i.e. the given navigation path is not associated with a component destination).
java.lang.IllegalStateException - if the component class bound to the path does not provide appropriate constructors, is an interface, is abstract, or throws an exception during instantiation.ComponentDestinationboolean isModalNavigation()
ModalNavigation getModalNavigation()
null if there are no modal navigations.
void beginModalNavigation(ModalNavigationPanel<?> modalNavigationPanel,
ModalNavigation modalNavigation)
modalNavigationPanel - The panel for which modal navigation state should begin.modalNavigation - The state of modal navigation.boolean endModalNavigation(ModalNavigationPanel<?> modalNavigationPanel)
modalNavigationPanel - The panel for which modal navigation state should be ended.
Frame#getReferrerURI(),
#releaseDestinationComponent(String)com.globalmentor.net.URIPath getNavigationPath()
java.lang.IllegalStateException - if this message has been called before the navigation path has been initialized.void setNavigationPath(com.globalmentor.net.URIPath navigationPath)
navigationPath - The navigation path relative to the application context path.
java.lang.NullPointerException - if the given navigation path is null.
java.lang.IllegalArgumentException - if the provided path is absolute.
java.lang.IllegalArgumentException - if the navigation path is not recognized (e.g. there is no destination associated with the navigation path).navigate(URIPath),
navigate(URI),
navigateModal(URIPath, ModalNavigationListener),
navigateModal(URI, ModalNavigationListener)Bookmark getBookmark()
null if there is no bookmark specified.void setBookmark(Bookmark bookmark)
bookmark - The bookmark relative to the current navigation path, or null if there should be no bookmark.
void setNavigation(com.globalmentor.net.URIPath navigationPath,
Bookmark bookmark,
java.net.URI referrerURI)
NavigationListeners in the component hierarchy, with the session as the source of the NavigationEvent.
This method calls setNavigationPath(URIPath) and setBookmark(Bookmark).
navigationPath - The navigation path relative to the application context path.bookmark - The bookmark for which navigation should occur at this navigation path, or null if there is no bookmark involved in navigation.referrerURI - The URI of the referring navigation panel or other entity with no query or fragment, or null if no referring URI is known.
java.lang.NullPointerException - if the given navigation path is null.setNavigationPath(URIPath),
setBookmark(Bookmark),
getApplicationFrame()void fireNavigated(java.net.URI referrerURI)
NavigationEvent to all NavigationListeners in the session application frame hierarchy.
referrerURI - The URI of the referring navigation panel or other entity with no query or fragment, or null if no referring URI is known.getNavigationPath(),
getBookmark(),
getApplicationFrame(),
NavigationListener,
NavigationEventNavigation getRequestedNavigation()
null if no navigation has been requested.void clearRequestedNavigation()
void navigate(com.globalmentor.net.URIPath path)
path - A path that is either relative to the application context path or is absolute.
java.lang.NullPointerException - if the given path is null.navigate(URI)
void navigate(com.globalmentor.net.URIPath path,
java.lang.String viewportID)
path - A path that is either relative to the application context path or is absolute.viewportID - The ID of the viewport in which navigation should occur, or null if navigation should occur in the current viewport.
java.lang.NullPointerException - if the given path is null.navigate(URI, String)
void navigate(com.globalmentor.net.URIPath path,
Bookmark bookmark)
path - A path that is either relative to the application context path or is absolute.bookmark - The bookmark at the given path, or null if no bookmark should be included in the navigation.
java.lang.NullPointerException - if the given path is null.navigate(URI)
void navigate(com.globalmentor.net.URIPath path,
Bookmark bookmark,
java.lang.String viewportID)
path - A path that is either relative to the application context path or is absolute.bookmark - The bookmark at the given path, or null if no bookmark should be included in the navigation.viewportID - The ID of the viewport in which navigation should occur, or null if navigation should occur in the current viewport.
java.lang.NullPointerException - if the given path is null.navigate(URI, String)void navigate(java.net.URI uri)
uri - Either a relative or absolute path, or an absolute URI.
java.lang.NullPointerException - if the given URI is null.
void navigate(java.net.URI uri,
java.lang.String viewportID)
uri - Either a relative or absolute path, or an absolute URI.viewportID - The ID of the viewport in which navigation should occur, or null if navigation should occur in the current viewport.
java.lang.NullPointerException - if the given URI is null.
void navigateModal(com.globalmentor.net.URIPath path,
ModalNavigationListener modalListener)
path - A path that is either relative to the application context path or is absolute.modalListener - The listener to respond to the end of modal interaction.
java.lang.NullPointerException - if the given path is null.navigateModal(URI, ModalNavigationListener)
void navigateModal(com.globalmentor.net.URIPath path,
Bookmark bookmark,
ModalNavigationListener modalListener)
path - A path that is either relative to the application context path or is absolute.bookmark - The bookmark at the given path, or null if no bookmark should be included in the navigation.modalListener - The listener to respond to the end of modal interaction.
java.lang.NullPointerException - if the given path is null.navigateModal(URI, ModalNavigationListener)
void navigateModal(java.net.URI uri,
ModalNavigationListener modalListener)
uri - Either a relative or absolute path, or an absolute URI.modalListener - The listener to respond to the end of modal interaction.
java.lang.NullPointerException - if the given URI is null.Breadcrumb getBreadcrumb(com.globalmentor.net.URIPath navigationPath)
navigationPath - The navigation path which a breadcrumb should be returned.
java.lang.NullPointerException - if the given navigation path is null.java.util.List<Breadcrumb> getBreadcrumbs(com.globalmentor.net.URIPath navigationPath)
getBreadcrumb(URIPath) to create each segment breadcrumb.
navigationPath - The navigation path which breadcrumbs should be returned.
java.lang.NullPointerException - if the given navigation path is null.void initialize()
java.lang.IllegalStateException - if the session is already initialized.destroy()void destroy()
java.lang.IllegalStateException - if the session has not yet been initialized or has already been destroyed.initialize()
com.globalmentor.net.URIPath createTempPublicResource(java.lang.String baseName,
java.lang.String extension)
throws java.io.IOException
GuiseApplication.createTempAsset(String, String, GuiseSession).
baseName - The base filename to be used in generating the filename.extension - The extension to use for the temporary file.
java.lang.NullPointerException - if the given base name and/or extension is null.
java.lang.IllegalArgumentException - if the base name is the empty string.
java.io.IOException - if there is a problem creating the public resource.GuiseApplication.createTempAsset(String, String, GuiseSession),
GuiseApplication.getTempDirectory()Component createBusyComponent()
Theme.GLYPH_BUSYboolean input(Input input)
InputEvent will be created and dispatched via the application frame.
If an input event is still not consumed after dispatching, its input is processed by the installed input strategy, if any.
input - The input to process.
true if the input was consumed and should not be processed further.
java.lang.NullPointerException - if the given input is null.
java.lang.IllegalArgumentException - if input was given that this session does not know how to process.getApplicationFrame(),
Component.dispatchInputEvent(InputEvent),
getInputStrategy(),
InputStrategy.input(Input),
InputEvent.isConsumed()
void log(java.lang.String subject,
java.lang.String predicate,
java.lang.String object,
java.util.Map<?,?> parameters,
java.lang.CharSequence comment)
InformationLevel.LOG.
This is a convenience method that delegates to log(InformationLevel, String, String, String, Map, CharSequence).
subject - The log subject identification, or null if there is no related subject.predicate - The log predicate identification, or null if there is no related predicate.object - The log object identification, or null if there is no related object.parameters - The map of log parameters, or null if there are no parameters.comment - The log comment, or null if there is no log comment.
java.lang.NullPointerException - if the given log level is null.
void log(InformationLevel level,
java.lang.String subject,
java.lang.String predicate,
java.lang.String object,
java.util.Map<?,?> parameters,
java.lang.CharSequence comment)
level - The log information level.subject - The log subject identification, or null if there is no related subject.predicate - The log predicate identification, or null if there is no related predicate.object - The log object identification, or null if there is no related object.parameters - The map of log parameters, or null if there are no parameters.comment - The log comment, or null if there is no log comment.
java.lang.NullPointerException - if the given log level is null.void notify(Notification... notifications)
notify(Runnable, Notification...).
notifications - One or more notification informations to relay.
java.lang.NullPointerException - if the given notifications is null.
java.lang.IllegalArgumentException - if no notifications are given.
void notify(java.lang.Runnable afterNotify,
Notification... notifications)
notifications - One or more notification informations to relay.afterNotify - The code that executes after notification has taken place, or null if no action should be taken after notification.
java.lang.NullPointerException - if the given notifications is null.
java.lang.IllegalArgumentException - if no notifications are given.void notify(java.lang.Throwable... errors)
notify(Runnable, Throwable...).
errors - The errors with which to notify the user.
java.lang.NullPointerException - if the given errors is null.
java.lang.IllegalArgumentException - if no errors are given.
void notify(java.lang.Runnable afterNotify,
java.lang.Throwable... errors)
notify(Runnable, Notification...).
error - The error with which to notify the user.afterNotify - The code that executes after notification has taken place, or null if no action should be taken after notification.
java.lang.NullPointerException - if the given errors is null.
java.lang.IllegalArgumentException - if no errors are given.
java.lang.String dereferenceString(java.lang.String string)
throws java.util.MissingResourceException
SOS) control character (U+0098) and ends with a String Terminator (ST) control character (U+009C).
The string between these delimiters will be used to look up a string resource using getStringResource(String).
Strings retrieved from resources will be recursively dereferenced.
String references appearing between an SOS/ST pair that that begin with the character
will be considered string values and, after they are recursively dereferenced, will be applied as formatting arguments to the remaining dereferenced text using MessageFormat.format(String, Object...).
string - The string to be dereferenced.
java.lang.NullPointerException - if the given string is null.
java.lang.IllegalArgumentException - if a string reference has no ending String Terminator control character (U+009C).
java.util.MissingResourceException - if no resource could be found associated with a string reference.
java.lang.ClassCastException - if the resource associated with a string reference is not an instance of String.Resources.createStringResourceReference(String),
Resources.createStringValueReference(String),
getStringResource(String)
java.net.URI dereferenceURI(java.net.URI uri,
java.lang.String... suffixes)
throws java.util.MissingResourceException
getURIResource(String).
If suffixes are given, they will be appended to the resource key in order, separated by '.'.
If no resource is associated with that resource key, a resource will be retrieved using the unadorned resource key.
URIs retrieved from resources will be recursively dereferenced without suffixes.
uri - The URI to be dereferenced.suffixes - The suffixes, if any, to append to a resource key in a URI reference.
java.lang.NullPointerException - if the given URI is null.
java.util.MissingResourceException - if no resource could be found associated with a string reference.Resources.createURIResourceReference(String),
getURIResource(String)
java.net.URI resolveURI(java.net.URI uri,
java.lang.String... suffixes)
throws java.util.MissingResourceException
uri - The URI to be resolved.suffixes - The suffixes, if any, to append to a resource key in a URI reference.
java.lang.NullPointerException - if the given URI is null.
java.util.MissingResourceException - if no resource could be found associated with a string reference.dereferenceURI(URI, String...),
GuiseApplication.resolveURI(URI)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||