|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcms.webdav.cat.CatWebdavUtil
public class CatWebdavUtil
Field Summary | |
---|---|
static String |
REVISION
|
Constructor Summary | |
---|---|
CatWebdavUtil()
|
Method Summary | |
---|---|
static String |
encodeWebDavUrl(String s)
Convenient method to encode a WebDav URL using webdav encoding. |
static String |
getCustomProtocolScheme()
Retrieve the custom protocol scheme (default is "jcmsoffice"). |
static String |
getDataName(Data data,
boolean urlEncode)
Retrieve the name of the Data as it should be used in WebDav. |
static int |
getMaxWebFolderLength()
Retrieve the maximum length of webfolder URL as defined by property "channel.webdav.max-web-folder-length". |
static String |
getParentPath(FileDocument doc,
boolean urlEncode)
Retrieve the WebDav path of the first valid parent folder of the specified FileDocument. |
static String |
getPath(Category cat,
Workspace ws,
boolean urlEncode)
Retrieve the WebDav path of the specified category in the specified workspace. |
static String |
getPath(FileDocument doc,
boolean urlEncode)
Retrieve the WebDav path of the specified FileDocument. |
static String |
getPath(Workspace ws,
boolean urlEncode)
Retrieve the WebDav path of the specified Workspace. |
static String |
getPathShort(Category cat,
Workspace ws,
boolean urlEncode)
Retrieve the WebDav path of the specified category in the specified workspace use a short notation for IE compatibility. |
static Category |
getRootCategory()
Retrieve the global root category to be used for webdav |
static boolean |
isCustomProtocolEnabled()
Check if the use of the custom protocol for WebDav edition link is enabled |
static boolean |
isWebdavEditable(FileDocument doc)
Check if the specified document can be edited through WebDAV. |
static boolean |
isWebdavEditable(FileDocument doc,
Member mbr)
Check if the specified document can be edited through WebDAV by the specified member. |
static boolean |
useDigestAuthentication()
Check if HTTP Digest authentification should be used in WebDav. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
Constructor Detail |
---|
public CatWebdavUtil()
Method Detail |
---|
public static boolean isCustomProtocolEnabled()
public static String getCustomProtocolScheme()
public static boolean isWebdavEditable(FileDocument doc)
doc
- the FileDocument to check
public static boolean isWebdavEditable(FileDocument doc, Member mbr)
doc
- the FileDocument to check.mbr
- the Member to check
public static boolean useDigestAuthentication()
public static String getDataName(Data data, boolean urlEncode)
data
- the Data for which url should be retrieved, must be a Workspace, Category or FileDocument (otherwise null is returned)urlEncode
- true to return the computed data name encoded for use in URL, false to retrieve the name as is.
public static String getPath(Workspace ws, boolean urlEncode)
ws
- the Workspace for which the path is retrieved, must not be null.urlEncode
- true to return a path with each part encoded correctly for use in URL, false to retrieve the path which it part as is.
public static String getPath(Category cat, Workspace ws, boolean urlEncode)
Return null if the category cannot be displayed using WebDAV in this workspace.
cat
- the category for which the path is retrieved, must not be null.ws
- the workspace in which the category is to be displayed.urlEncode
- true to return a path with each part encoded correctly for use in URL, false to retrieve the path which it part as is.
public static String getPath(FileDocument doc, boolean urlEncode)
doc
- the FileDocument for which the path is retrieved, must not be null.urlEncode
- true to return a path with each part encoded correctly for use in URL, false to retrieve the path which it part as is.
public static String getParentPath(FileDocument doc, boolean urlEncode)
doc
- the FileDocument for which the path is retrieved, must not be null.urlEncode
- true to return a path with each part encoded correctly for use in URL, false to retrieve the path which it part as is.
public static Category getRootCategory()
public static int getMaxWebFolderLength()
- With IE 6 the maxwebfolder length was 90 !
- After patch http://support.microsoft.com/kb/325355/ it is 260 (==MAX_PATH)
- After patch http://support.microsoft.com/kb/329919 is is 2083 (==INTERNET_MAX_URL_LENGTH)
- With IE 7 and 8 it is probably also 2083
public static String getPathShort(Category cat, Workspace ws, boolean urlEncode)
Return null if the category cannot be displayed using WebDAV in this workspace.
cat
- the category for which the path is retrieved, must not be null.ws
- the workspace in which the category is to be displayed.urlEncode
- true to return a path with each part encoded correctly for use in URL, false to retrieve the path which it part as is.
public static String encodeWebDavUrl(String s)
URLEncoder.encode(String, String)
,
but space is encoded with %20 and '/' is not encoded.
s
- String
to be translated.
String
.Util.encodeUrl(String, String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |