|
Eclipse Platform Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Location
A Location represents a URL which may have a default value, may be read only, may or may not have a current value and may be cascaded on to a parent location.
This interface is not intended to be implemented by clients.
Field Summary | |
---|---|
static String |
CONFIGURATION_FILTER
Constant which defines the filter string for acquiring the service which specifies the configuration location. |
static String |
INSTALL_FILTER
Constant which defines the filter string for acquiring the service which specifies the install location. |
static String |
INSTANCE_FILTER
Constant which defines the filter string for acquiring the service which specifies the instance location. |
static String |
USER_FILTER
Constant which defines the filter string for acquiring the service which specifies the user location. |
Method Summary | |
---|---|
boolean |
allowsDefault()
Returns true if this location allows a default value to be assigned
and false otherwise. |
URL |
getDefault()
Returns the default value of this location if any. |
Location |
getParentLocation()
Returns the parent of this location or null if none is available. |
URL |
getURL()
Returns the actual URL of this location. |
boolean |
isReadOnly()
Returns true if this location represents a read only location and
false otherwise. |
boolean |
isSet()
Returns true if this location has a value and false
otherwise. |
boolean |
lock()
Attempts to lock this location with a canonical locking mechanism and return true if the lock could be acquired. |
void |
release()
Releases the lock on this location. |
boolean |
setURL(URL value,
boolean lock)
Sets and optionally locks the location's value to the given URL . |
Field Detail |
---|
static final String INSTANCE_FILTER
static final String INSTALL_FILTER
static final String CONFIGURATION_FILTER
static final String USER_FILTER
Method Detail |
---|
boolean allowsDefault()
true
if this location allows a default value to be assigned
and false
otherwise.
URL getDefault()
null
is returned. Note that even locations which allow defaults may still
return null
.
null
Location getParentLocation()
null
if none is available.
null
URL getURL()
URL
of this location. If the location's value has been set,
that value is returned. If the value is not set and the location allows defaults,
the value is set to the default and returned. In all other cases null
is returned.
null
if noneboolean isSet()
true
if this location has a value and false
otherwise.
boolean isReadOnly()
true
if this location represents a read only location and
false
otherwise. The read only character
of a location is not in enforced in any way but rather expresses the intention of the
location's creator.
boolean setURL(URL value, boolean lock) throws IllegalStateException
URL
. If the location
already has a value an exception is thrown. If locking is requested and fails, false
is returned and the URL
of this location is not set.
value
- the value of this locationlock
- whether or not to lock this location
IllegalStateException
- if the location's value is already setboolean lock() throws IOException
true
if the lock could be acquired. Not all locations can be
locked.
Locking a location is advisory only. That is, it does not prevent other applications from modifying the same location
IOException
- if there was an unexpected problem while acquiring the lockvoid release()
|
Eclipse Platform Release 3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.