Package com.globalmentor.net
Interface ResourceSelector<R extends Resource>
-
- Type Parameters:
R
- The type of resource being selected.
- All Superinterfaces:
Preferencesable
,URIAccessible
,URIInputStreamable
,URIOutputStreamable
public interface ResourceSelector<R extends Resource> extends URIAccessible, Preferencesable
An interface to an object that allows resources to be selected for input or output.- Author:
- Garret Wilson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description R
getResource(java.net.URI referenceURI)
Retrieves a description of the resource with the given reference URI.R
selectInputResource(R oldResource)
Selects a resource for input.R
selectOutputResource(R oldResource)
Selects a resource for output.-
Methods inherited from interface com.globalmentor.util.prefs.Preferencesable
getPreferences, setPreferences
-
Methods inherited from interface com.globalmentor.io.URIInputStreamable
getInputStream
-
Methods inherited from interface com.globalmentor.io.URIOutputStreamable
getOutputStream
-
-
-
-
Method Detail
-
getResource
R getResource(java.net.URI referenceURI) throws java.io.IOException
Retrieves a description of the resource with the given reference URI.- Parameters:
referenceURI
- The reference URI of the resource in question.- Returns:
- A description of the identified resource.
- Throws:
java.io.IOException
- Thrown if there is an error retrieving the resource description.
-
selectInputResource
R selectInputResource(R oldResource) throws java.lang.SecurityException, java.io.IOException
Selects a resource for input.- Parameters:
oldResource
- The currently selected resource, if applicable, ornull
if there is no selected resource.- Returns:
- The selected resource, or
null
if selection was canceled. - Throws:
java.lang.SecurityException
- Thrown if selecting an input resource is not allowed.java.io.IOException
- Thrown if there is an error locating a resource.
-
selectOutputResource
R selectOutputResource(R oldResource) throws java.lang.SecurityException, java.io.IOException
Selects a resource for output.- Parameters:
oldResource
- The currently selected resource, if applicable, ornull
if there is no selected resource.- Returns:
- The selected resource, or
null
if selection was canceled. - Throws:
java.lang.SecurityException
- Thrown if selecting an output resource is not allowed.java.io.IOException
- Thrown if there is an error locating a resource.
-
-