|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.trackstudio.app.webdav.TSStorage
public class TSStorage
Reference Implementation of IWebdavStorage
| Field Summary | |
|---|---|
static java.lang.String |
DAV_ROOT
|
static java.lang.String |
DAV_ROOT_TASK
|
static java.lang.String |
DAV_ROOT_USER
|
static java.lang.String |
DAV_ZIP_FOLDER
|
static java.lang.String |
DELIM1
|
static java.lang.String |
SESSION_ID
|
| Constructor Summary | |
|---|---|
TSStorage()
|
|
| Method Summary | |
|---|---|
void |
begin(java.security.Principal principal,
java.util.Hashtable parameters,
SessionContext sc)
Indicates that a new request or transaction with this store involved has been started. |
void |
checkAuthentication(SessionContext sc)
Checks if authentication information passed in IWebdavStorage.begin(Principal, Hashtable, SessionContext)
is valid. |
void |
commit()
Indicates that all changes done inside this request shall be made permanent and any transactions, connections and other temporary resources shall be terminated. |
void |
createFolder(java.lang.String uri,
SessionContext sc)
Creates a folder at the position specified by folderUri. |
void |
createResource(java.lang.String uri,
SessionContext sc)
Creates a content resource at the position specified by resourceUri. |
java.lang.String |
getAttachmentName(java.lang.String uri,
SessionContext sc)
|
java.lang.String[] |
getChildrenNames(java.lang.String uri,
SessionContext sc)
Gets the names of the children of the folder specified by folderUri. |
java.util.Date |
getCreationDate(java.lang.String uri,
SessionContext sc)
Gets the date of the creation of the object specified by uri. |
java.util.Date |
getLastModified(java.lang.String uri,
SessionContext sc)
Gets the date of the last modiciation of the object specified by uri. |
java.io.InputStream |
getResourceContent(java.lang.String uri,
SessionContext sc)
Gets the content of the resource specified by resourceUri. |
long |
getResourceLength(java.lang.String uri,
SessionContext sc)
Gets the length of the content resource specified by resourceUri. |
boolean |
isFolder(java.lang.String uri,
SessionContext sc)
Checks if there is an object at the position specified by uri and if so if it is a folder. |
boolean |
isResource(java.lang.String uri,
SessionContext sc)
Checks if there is an object at the position specified by uri and if so if it is a content resource. |
boolean |
objectExists(java.lang.String uri,
SessionContext sc)
Checks if there is an object at the position specified by uri. |
static java.lang.String |
removeLocaleCharacters(java.lang.String str)
Remove national characters from sting except zipped file names |
void |
removeObject(java.lang.String uri,
SessionContext sc)
Removes the object specified by uri. |
void |
rollback()
Indicates that all changes done inside this request shall be undone and any transactions, connections and other temporary resources shall be terminated. |
void |
setResourceContent(java.lang.String uri,
java.io.InputStream is,
java.lang.String contentType,
java.lang.String characterEncoding,
SessionContext sc)
tries to save the given InputStream to the file at path "uri". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DAV_ROOT
public static final java.lang.String DAV_ROOT_TASK
public static final java.lang.String DAV_ROOT_USER
public static final java.lang.String DAV_ZIP_FOLDER
public static final java.lang.String SESSION_ID
public static final java.lang.String DELIM1
| Constructor Detail |
|---|
public TSStorage()
| Method Detail |
|---|
public void begin(java.security.Principal principal,
java.util.Hashtable parameters,
SessionContext sc)
throws java.lang.Exception
IWebdavStorageIWebdavStorage.commit()
or IWebdavStorage.rollback(). If only non-read methods have been called, the
request will be terminated by a IWebdavStorage.commit(). This method will be
called by (@link WebdavStoreAdapter} at the beginning of each request.
begin in interface IWebdavStorageprincipal - the principal that started this request or null
if there is non availableparameters - Hashtable containing the parameters' names and associated
values configured in the java.lang.Exception
public void checkAuthentication(SessionContext sc)
throws java.lang.SecurityException
IWebdavStorageIWebdavStorage.begin(Principal, Hashtable, SessionContext)
is valid. If not throws an exception.
checkAuthentication in interface IWebdavStoragejava.lang.SecurityException - if authentication is not valid
public void commit()
throws java.io.IOException
IWebdavStorage
commit in interface IWebdavStoragejava.io.IOException - if something goes wrong on the store level
public void rollback()
throws java.io.IOException
IWebdavStorage
rollback in interface IWebdavStoragejava.io.IOException - if something goes wrong on the store level
public boolean objectExists(java.lang.String uri,
SessionContext sc)
throws java.io.IOException
IWebdavStorageuri.
objectExists in interface IWebdavStorageuri - URI of the object to check
true if the object at uri exists
java.io.IOException - if something goes wrong on the store level
public boolean isFolder(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStorageuri and if so if it is a folder.
isFolder in interface IWebdavStorageuri - URI of the object to check
true if the object at uri exists
and is a folder
java.io.IOException - if something goes wrong on the store level
GranException
public boolean isResource(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStorageuri and if so if it is a content resource.
isResource in interface IWebdavStorageuri - URI of the object to check
true if the object at uri exists
and is a content resource
java.io.IOException - if something goes wrong on the store level
GranException
public void createFolder(java.lang.String uri,
SessionContext sc)
throws java.io.IOException
IWebdavStoragefolderUri.
createFolder in interface IWebdavStorageuri - URI of the folder
java.io.IOException - if the folder cannot be created
public void createResource(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStorageresourceUri.
createResource in interface IWebdavStorageuri - URI of the content resource
java.io.IOException - if the resource cannot be created
GranException
public java.util.Date getLastModified(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStorageuri.
getLastModified in interface IWebdavStorageuri - URI of the object, i.e. content resource or folder
java.io.IOException - if something goes wrong on the store level
GranException
public java.util.Date getCreationDate(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStorageuri.
getCreationDate in interface IWebdavStorageuri - URI of the object, i.e. content resource or folder
java.io.IOException - if something goes wrong on the store level
GranExceptionpublic static java.lang.String removeLocaleCharacters(java.lang.String str)
str -
public java.lang.String[] getChildrenNames(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStoragefolderUri.
getChildrenNames in interface IWebdavStorageuri - URI of the folder
null if
the uri points to a file
java.io.IOException - if something goes wrong on the store level
GranException
public java.io.InputStream getResourceContent(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStorageresourceUri.
getResourceContent in interface IWebdavStorageuri - URI of the content resource
java.io.IOException - if something goes wrong on the store level
GranException
public java.lang.String getAttachmentName(java.lang.String uri,
SessionContext sc)
throws GranException
GranException
public void setResourceContent(java.lang.String uri,
java.io.InputStream is,
java.lang.String contentType,
java.lang.String characterEncoding,
SessionContext sc)
throws java.io.IOException,
GranException
setResourceContent in interface IWebdavStorageuri - URI of the resource where the content will be storedis - input stream from which the content will be read fromcontentType - content type of the resource or null if unknowncharacterEncoding - character encoding of the resource or null if
unknown or not applicable
java.io.IOException - if something goes wrong on the store level
GranException
public long getResourceLength(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStorageresourceUri.
getResourceLength in interface IWebdavStorageuri - URI of the content resource
java.io.IOException - if something goes wrong on the store level
GranException
public void removeObject(java.lang.String uri,
SessionContext sc)
throws java.io.IOException,
GranException
IWebdavStorageuri.
removeObject in interface IWebdavStorageuri - URI of the object, i.e. content resource or folder
java.io.IOException - if the deletion failed
GranException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||