com.guiseframework.platform
Class AbstractDepictContext

java.lang.Object
  extended by com.globalmentor.beans.BoundPropertyObject
      extended by com.guiseframework.platform.AbstractDepictContext
All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, DepictContext
Direct Known Subclasses:
AbstractTextDepictContext

public abstract class AbstractDepictContext
extends com.globalmentor.beans.BoundPropertyObject
implements DepictContext

Abstract encapsulation of information related to the current depiction.

Author:
Garret Wilson

Field Summary
 
Fields inherited from class com.globalmentor.beans.BoundPropertyObject
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS
 
Constructor Summary
AbstractDepictContext(GuiseSession session, Destination destination)
          Guise session constructor.
 
Method Summary
 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.
 Destination getDestination()
           
 Platform getPlatform()
           
 GuiseSession getSession()
           
 java.lang.Iterable<java.net.URI> getStyles()
          Retrieves styles for this context.
 
Methods inherited from class com.globalmentor.beans.BoundPropertyObject
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPostponedPropertyChangeEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getForwardPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getRepeatPropertyChangeListener, getRepeatVetoableChangeListener, getVetoableChangeListeners, getVetoableChangeListeners, getVetoableChangeSupport, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.guiseframework.platform.DepictContext
getDepictionURI
 
Methods inherited from interface com.globalmentor.beans.PropertyBindable
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

AbstractDepictContext

public AbstractDepictContext(GuiseSession session,
                             Destination destination)
                      throws java.io.IOException
Guise session constructor.

Parameters:
session - The Guise user session of which this context is a part.
destination - The destination with which this context is associated.
Throws:
java.lang.NullPointerException - if the given session and/or destination is null.
java.io.IOException - If there was an I/O error loading a needed resource.
Method Detail

getSession

public GuiseSession getSession()
Specified by:
getSession in interface DepictContext
Returns:
The Guise user session of which this context is a part.

getPlatform

public Platform getPlatform()
Specified by:
getPlatform in interface DepictContext
Returns:
The platform on which Guise objects are depicted.

getDestination

public Destination getDestination()
Specified by:
getDestination in interface DepictContext
Returns:
The destination with which this context is associated.

getStyles

public java.lang.Iterable<java.net.URI> getStyles()
Retrieves styles for this context. Styles appear in the following order:
  1. theme styles (from most distant parent to current theme)
  2. application style
  3. destination style

Specified by:
getStyles in interface DepictContext
Returns:
The URIs of the styles for this context, in order.

getDepictionURI

public 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. The path will first be dereferenced for the current session and then resolved to the application. This method is equivalent to calling GuiseSession.getDepictionURI(URIPath, String...).

Specified by:
getDepictionURI in interface DepictContext
Parameters:
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.
Returns:
A URI suitable for depiction, deferenced and resolved to the application.
See Also:
GuiseSession.getDepictionURI(URIPath, String...)

getDepictionURI

public java.net.URI getDepictionURI(java.net.URI navigationURI,
                                    java.lang.String... suffixes)
Determines the URI to use for depiction based upon a navigation URI. The URI will first be dereferenced for the current session and then resolved to the application. This method is equivalent to calling GuiseSession.getDepictionURI(URI, String...).

Specified by:
getDepictionURI in interface DepictContext
Parameters:
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.
Returns:
A URI suitable for depiction, deferenced and resolved to the application.
See Also:
GuiseSession.getDepictionURI(URI, String...)


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.