|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.globalmentor.beans.BoundPropertyObject
com.guiseframework.AbstractDestination
public abstract class AbstractDestination
Abstract implementation of a navigation point, its properties, and its restrictions. Destinations of identical types with identical paths and path patterns are considered equal.
| Field Summary |
|---|
| Fields inherited from class com.globalmentor.beans.BoundPropertyObject |
|---|
NO_PROPERTY_CHANGE_LISTENERS, NO_VETOABLE_CHANGE_LISTENERS |
| Constructor Summary | |
|---|---|
AbstractDestination(java.util.regex.Pattern pathPattern)
Path pattern constructor. |
|
AbstractDestination(com.globalmentor.net.URIPath path)
Path constructor. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object object)
Determines if this destination is equivalent to the given object. |
boolean |
exists(GuiseSession session,
com.globalmentor.net.URIPath navigationPath,
Bookmark bookmark,
java.net.URI referrerURI)
Determines if the given location does indeed exist for this destination. |
java.lang.Iterable<Category> |
getCategories()
The read-only iterable of categories. |
com.globalmentor.net.URIPath |
getPath()
|
com.globalmentor.net.URIPath |
getPath(GuiseSession session,
com.globalmentor.net.URIPath path,
Bookmark bookmark,
java.net.URI referrerURI)
Determines the path to use for the requested path. |
java.util.regex.Pattern |
getPathPattern()
|
int |
hashCode()
|
boolean |
isAuthorized(GuiseSession session,
com.globalmentor.net.URIPath navigationPath,
Bookmark bookmark,
java.net.URI referrerURI)
Determines if access to the given path is authorized for access by the current user, if any. |
void |
setCategories(java.util.List<Category> categories)
Sets the categories. |
| 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, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.globalmentor.beans.PropertyBindable |
|---|
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, hasPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public AbstractDestination(com.globalmentor.net.URIPath path)
path - The application context-relative path within the Guise container context, which does not begin with '/'.
java.lang.NullPointerException - if the path is null.
java.lang.IllegalArgumentException - if the provided path is absolute.public AbstractDestination(java.util.regex.Pattern pathPattern)
pathPattern - The pattern to match an application context-relative path within the Guise container context, which does not begin with '/'.
java.lang.NullPointerException - if the path pattern is null.| Method Detail |
|---|
public java.lang.Iterable<Category> getCategories()
getCategories in interface Destinationpublic void setCategories(java.util.List<Category> categories)
setCategories in interface Destinationcategories - The list of new categories.public com.globalmentor.net.URIPath getPath()
getPath in interface Destinationnull if there is no path specified for this destination.public java.util.regex.Pattern getPathPattern()
getPathPattern in interface Destinationnull if there is no path pattern specified for this destination.
public com.globalmentor.net.URIPath getPath(GuiseSession session,
com.globalmentor.net.URIPath path,
Bookmark bookmark,
java.net.URI referrerURI)
throws com.globalmentor.net.ResourceIOException
getPath in interface Destinationsession - The current Guise session.path - The application-relative path.bookmark - The bookmark for this path, or null if there is no bookmark.referrerURI - The URI of the referring destination or other entity with no query or fragment, or null if no referring URI is known.
java.lang.NullPointerException - if the given session and/or path is null.
com.globalmentor.net.ResourceIOException - if there is an error accessing the resource.
public boolean exists(GuiseSession session,
com.globalmentor.net.URIPath navigationPath,
Bookmark bookmark,
java.net.URI referrerURI)
throws com.globalmentor.net.ResourceIOException
true.
exists in interface Destinationsession - The current Guise session.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.
com.globalmentor.net.ResourceIOException - if there is an error accessing the resource.
public boolean isAuthorized(GuiseSession session,
com.globalmentor.net.URIPath navigationPath,
Bookmark bookmark,
java.net.URI referrerURI)
throws com.globalmentor.net.ResourceIOException
The result of this method for resources that do not exist is undefined; it is assumed that this method will not be called unless
exists(GuiseSession, URIPath, Bookmark, URI) returns true for that resource, although this method must not
produce an error if the resource does not exist.
This method allows the underlying platform to handle unauthorized resources. If this implementation wishes to handle unauthorized
resources, this method should return true and provide a resource that indicates the true resource is unauthorized or
at the appropriate time redirect to an unauthorized indication page.
This implementation authorizes all resources.
isAuthorized in interface Destinationsession - The current Guise session.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.
com.globalmentor.net.ResourceIOException - if there is an error accessing the resource.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The object to compare to this object.
true if the given object is an equivalent destination.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||