org.efaps.ui.webdav
Class WebDAVImpl

java.lang.Object
  extended by org.efaps.ui.webdav.WebDAVImpl
All Implemented Interfaces:
WebDAVInterface

public class WebDAVImpl
extends java.lang.Object
implements WebDAVInterface

The class is used as gateway to all WebDAV integrations. Each implementation of a WebDAV integration is cached as #RootCollectionResource object in #cache.

Version:
$Id: WebDAVImpl.java 3447 2009-11-29 22:46:39Z tim.moxter $
Author:
tmo

Constructor Summary
WebDAVImpl()
           
 
Method Summary
 boolean checkinSource(SourceResource _source, java.io.InputStream _inputStream)
          Because no files exists within the WebDAV integration itself, a checkin to a source is not working.
 boolean checkoutSource(SourceResource _source, java.io.OutputStream _outputStream)
          Because no files exists within the WebDAV integration itself, a checkout of a source is not working.
 boolean copyCollection(CollectionResource _collection, CollectionResource _newParent, java.lang.String _newName)
          A copy of a WebDAV integration is never allowed.
 boolean copySource(SourceResource _source, CollectionResource _newParent, java.lang.String _newName)
          Because no files exists within the WebDAV integration itself, a copy of a source is not working.
 boolean createCollection(CollectionResource _collection, java.lang.String _name)
          New WebDAV integrations are never allowed to create within the WebDAV integration itself.
 boolean createSource(CollectionResource _collection, java.lang.String _name)
          New files are not allowed to create within the WebDAV integration itself.
 boolean deleteCollection(CollectionResource _collection)
          WebDAV integrations are not allowed to delete within the WebDAV integration itself.
 boolean deleteSource(SourceResource _source)
          Because no files exists within the WebDAV integration itself, a delete of a source is not working.
 CollectionResource getCollection(CollectionResource _col, java.lang.String _name)
          First, it is tested, if all WebDAV integrations are loaded into the cache.
 SourceResource getSource(CollectionResource _collection, java.lang.String _name)
          Because no files exists within the WebDAV integration itself, a source could not be found.
 java.util.List<AbstractResource> getSubs(CollectionResource _col)
          First, it is tested, if all WebDAV integrations are loaded into the cache.
 boolean moveCollection(CollectionResource _collection, CollectionResource _newParent, java.lang.String _newName)
          A rename / move of a WebDAV integration is never allowed.
 boolean moveSource(SourceResource _source, CollectionResource _newParent, java.lang.String _newName)
          Because no files exists within the WebDAV integration itself, a move of a source is not working.
 int priority()
          Return the priority (order number) in which this cache reload implementation must be reloaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDAVImpl

public WebDAVImpl()
Method Detail

priority

public int priority()
Return the priority (order number) in which this cache reload implementation must be reloaded. Because the WebDAV has very low priority, the highest number is returned.

Returns:
always Integer.MAX_VALUE

getSubs

public java.util.List<AbstractResource> getSubs(CollectionResource _col)
First, it is tested, if all WebDAV integrations are loaded into the cache. If not, method #reloadCache is used to initialise the cache. Then all cached WebDAV integration are returned as list.

Specified by:
getSubs in interface WebDAVInterface
Parameters:
_col - collection resource for which the sub collections are searched, here ignored (because this WebDAV integration is the root!)
Returns:
all WebDAV integration
See Also:
#cache, #reloadCache, #RootCollectionResourceCache.getResources

getCollection

public CollectionResource getCollection(CollectionResource _col,
                                        java.lang.String _name)
First, it is tested, if all WebDAV integrations are loaded into the cache. If not, method #reloadCache is used to initialise the cache. Then the cache is used to found the root collection resource with the given name.

Specified by:
getCollection in interface WebDAVInterface
Parameters:
_col - collection resource for which the collections is searched, here ignored (because this WebDAV integration is the root!)
_name - name of the searched collection resource
Returns:
found collection resource for given instance or null if not found.
See Also:
#cache, #reloadCache

createCollection

public boolean createCollection(CollectionResource _collection,
                                java.lang.String _name)
New WebDAV integrations are never allowed to create within the WebDAV integration itself.

Specified by:
createCollection in interface WebDAVInterface
Returns:
always false

moveCollection

public boolean moveCollection(CollectionResource _collection,
                              CollectionResource _newParent,
                              java.lang.String _newName)
A rename / move of a WebDAV integration is never allowed.

Specified by:
moveCollection in interface WebDAVInterface
Parameters:
_collection - collection to move
_newParent - new parent collection
_newName - new name of the collection to move in the new parent collection
Returns:
always false

copyCollection

public boolean copyCollection(CollectionResource _collection,
                              CollectionResource _newParent,
                              java.lang.String _newName)
A copy of a WebDAV integration is never allowed.

Specified by:
copyCollection in interface WebDAVInterface
Parameters:
_collection - collection to copy
_newParent - new parent collection
_newName - new name of the collection to copy in the new parent collection
Returns:
always false

deleteCollection

public boolean deleteCollection(CollectionResource _collection)
WebDAV integrations are not allowed to delete within the WebDAV integration itself.

Specified by:
deleteCollection in interface WebDAVInterface
Returns:
always false

getSource

public SourceResource getSource(CollectionResource _collection,
                                java.lang.String _name)
Because no files exists within the WebDAV integration itself, a source could not be found.

Specified by:
getSource in interface WebDAVInterface
Parameters:
_collection - collection resource representing the folder (if null, means root folder)
_name - name of the searched source resource
Returns:
always null

createSource

public boolean createSource(CollectionResource _collection,
                            java.lang.String _name)
New files are not allowed to create within the WebDAV integration itself.

Specified by:
createSource in interface WebDAVInterface
Returns:
always false

moveSource

public boolean moveSource(SourceResource _source,
                          CollectionResource _newParent,
                          java.lang.String _newName)
Because no files exists within the WebDAV integration itself, a move of a source is not working.

Specified by:
moveSource in interface WebDAVInterface
Parameters:
_source - source to move
_newParent - new parent collection
Returns:
always false

copySource

public boolean copySource(SourceResource _source,
                          CollectionResource _newParent,
                          java.lang.String _newName)
Because no files exists within the WebDAV integration itself, a copy of a source is not working.

Specified by:
copySource in interface WebDAVInterface
Parameters:
_source - source to copy
_newParent - new parent collection
Returns:
always false

deleteSource

public boolean deleteSource(SourceResource _source)
Because no files exists within the WebDAV integration itself, a delete of a source is not working.

Specified by:
deleteSource in interface WebDAVInterface
Returns:
always false

checkinSource

public boolean checkinSource(SourceResource _source,
                             java.io.InputStream _inputStream)
Because no files exists within the WebDAV integration itself, a checkin to a source is not working.

Specified by:
checkinSource in interface WebDAVInterface
Returns:
always false

checkoutSource

public boolean checkoutSource(SourceResource _source,
                              java.io.OutputStream _outputStream)
Because no files exists within the WebDAV integration itself, a checkout of a source is not working.

Specified by:
checkoutSource in interface WebDAVInterface
Returns:
always false


Copyright © 2003-2010 The eFaps Team. All Rights Reserved.