| java.lang.Object com.ibm.webdav.ResourceFactory
ResourceFactory | public class ResourceFactory (Code) | | A ResourceFactory is used to construct Resources or their subclasses
based on the desired communication protocol, http:, rmi:, or iiop: as
specified in the resource URL.
author: Jim Amsden <jamsden@us.ibm.com> See Also: com.ibm.webdav.impl.ResourceHTTPStub See Also: com.ibm.webdav.impl.ResourceImpl |
properties | public static Properties properties(Code) | | All WebDAV properties from the dav4j.properties file located somewhere
in the classpath. See the dav4j.properties file for details.
|
create | public static Resource create(String url) throws java.io.IOException(Code) | | Create a Resource identified by the given URL. The URL
specifies the protocol to use for remote communication, and
the host name. If the host name is "localhost", the communication
is local (typical fat client).
This method does attempt to determine
if the url is for a collection or a normal resource. At the
moment it does this by asking the server. If it can not
determine what type the resource is by asking the server
(often because the resource doesn't yet exist at the server),
then an exception is thrown.
The caller should be aware that just because we've
asked the server if this URL is a collection/resouce, that doesn't
insure that it wasn't deleted a moment or replaced a moment later
by something different. Locking is required to do that and this
method doesn't lock.
Parameters: url - the identifier of the resource a Resource, ResourceCollection, or one of its subclasses. exception: java.io.IOException - |
create | public static Resource create(String url, TargetSelector targetSelector) throws java.io.IOException(Code) | | Create a Resource identified by the given URL. The URL
specifies the protocol to use for remote communication, and
the host name. If the host name is "localhost", the communication
is local (typical fat client).
This method does attempt to determine
if the url is for a collection or a normal resource. At the
moment it does this by asking the server. If it can not
determine what type the resource is by asking the server
(often because the resource doesn't yet exist at the server),
then an exception is thrown.
The caller should be aware that just because we've
asked the server if this URL is a collection/resouce, that doesn't
insure that it wasn't deleted a moment or replaced a moment later
by something different. Locking is required to do that and this
method doesn't lock.
Parameters: resourceURL - the identifier of the resource a Resource, ResourceCollection, or one of its subclasses. exception: java.io.IOException - |
createCollection | public static IRCollection createCollection(URL url, TargetSelector targetSelector) throws WebDAVException(Code) | | Create a Collection identified by the given URL. The URL
specifies the protocol to use for remote communication, and
the host name. If the host name is "localhost", the communication
is local (typical fat client).
Parameters: resourceURL - the identifier of the resource a Collection exception: com.ibm.WebDAVException - |
createResource | public static IRResource createResource(URL url, TargetSelector targetSelector) throws WebDAVException(Code) | | Create a Resource identified by the given URL. The URL
specifies the protocol to use for remote communication, and
the host name. If the host name is "localhost", the communication
is local (typical fat client).
Parameters: resourceURL - the identifier of the resource a Resource exception: com.ibm.webdav.WebDAVException - |
getRealPath | public static String getRealPath(URL url)(Code) | | Translate a URL into a local path name using the doc.root property
from the webdav properties. The doc.root property in the dav4j.properties
file is used for local access without a server.
Parameters: url - the URL of the resource the translated pathname |
isLocalHost | public static boolean isLocalHost(URL url) throws WebDAVException(Code) | | Does the given URL refer to the local host? Used to determine if there doesn't
need to be any RPC at all.
true if the host in the URL is the local host, and a port was not specified exception: UnknownHostException - |
|
|