|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ccs.cpc.VFileUrl
public class VFileUrl
In various places, it's common to want to express a VFile (as well as a certain amount of other red tape) as a URL. This first kicked in for the browser interface, and has now spread to the XSPF support (which is itself going to be used in several different places). This class encapsulates the translation, which is non-trivial. A VFileUrl is immutable. The complete format is:
<authority>/<deviceID>/<viewerID>/<actionID>/<filepath>
Constructor Summary | |
---|---|
VFileUrl(java.lang.String urlpath,
java.lang.String query,
CpCmdr cpc,
java.util.Set<java.lang.String> loseFolders,
java.util.List<java.lang.String> loseFiles)
Construct and resolve a VFile from a URL. |
|
VFileUrl(VDevice vd,
java.lang.String viewerID,
java.lang.String actionID,
java.lang.String filepath)
Construct a URL for something other than a vfile, eg. a ControlHandler call. |
|
VFileUrl(VFile vf,
java.lang.String viewerID)
Construct a URL path from a VFile. |
Method Summary | |
---|---|
java.lang.String |
getActionID()
The "action ID" embedded in the URL. |
VDevice |
getDevice()
|
java.lang.String |
getDeviceID()
Return the device ID. |
VFile |
getFile()
|
java.lang.String |
getFilepath()
|
java.lang.String |
getViewerID()
The "viewer ID" embedded in the URL. |
java.lang.String |
toUrlPath()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VFileUrl(java.lang.String urlpath, java.lang.String query, CpCmdr cpc, java.util.Set<java.lang.String> loseFolders, java.util.List<java.lang.String> loseFiles) throws java.io.IOException
urlpath
- The path component of the URL. If there's a query,
shove that on as well.query
- The query string, if any. Null is OK.cpc
- The CPC instance (used to resolve VDevices).loseFolders
- Optional. If a folder could not be resolved, an
indicative string is added to this list. For user reporting.
This is queried to avoid duplicate reports, so the implementation should
provide fast lookups.loseFiles
- Optional. If a file could not be resolved, an
indicative string is added to this list. For user reporting.
java.io.IOException
public VFileUrl(VFile vf, java.lang.String viewerID)
vf
- The VFile to encode.viewerID
- The viewer ID, if relevant. If not, null.public VFileUrl(VDevice vd, java.lang.String viewerID, java.lang.String actionID, java.lang.String filepath)
Method Detail |
---|
public java.lang.String getDeviceID()
public java.lang.String getViewerID()
public java.lang.String getActionID()
public java.lang.String getFilepath()
public VDevice getDevice()
public VFile getFile()
getDevice
is null.public java.lang.String toUrlPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |