Interface PathManager
-
- All Known Implementing Classes:
PathManagerService
public interface PathManager
The client interface for thePathManagerService
- Author:
- Kabir Khan
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
PathManager.Callback
A callback, seeregisterCallback(String, Callback, Event...)
static class
PathManager.Event
An event triggered when changes are made to a path entrystatic interface
PathManager.PathEventContext
static class
PathManager.ReloadServerCallback
Factory for aPathManager.Callback
that always callsPathManager.PathEventContext.reloadRequired()
from itsPathManager.Callback.pathModelEvent(PathEventContext, String)
method.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PathEntry
getPathEntry(String name)
Gets a path entryPathManager.Callback.Handle
registerCallback(String name, PathManager.Callback callback, PathManager.Event... events)
Registers a callback for when a path is added/changed/removedString
resolveRelativePathEntry(String path, String relativeTo)
Resolves a relative path
-
-
-
Method Detail
-
resolveRelativePathEntry
String resolveRelativePathEntry(String path, String relativeTo)
Resolves a relative path- Parameters:
path
- an absolute path ifrelativeTo
isnull
, the relative path torelativeTo
otherwiserelativeTo
- the name of the path this is relative to, may benull
- Returns:
- the resolved path
- Throws:
IllegalStateException
- if there is no path registered underrelativeTo
-
getPathEntry
PathEntry getPathEntry(String name)
Gets a path entry- Parameters:
name
- the name of the path- Returns:
- the path
- Throws:
IllegalStateException
- if there is no path registered underpath
-
registerCallback
PathManager.Callback.Handle registerCallback(String name, PathManager.Callback callback, PathManager.Event... events)
Registers a callback for when a path is added/changed/removed- Parameters:
name
- the name of the pathcallback
- the callback instance that will be called when one of the events occurevents
- the events we are interested in- Returns:
- a handle to unregister the callback
-
-