Java Doc for ResourceImpl.java in  » Content-Management-System » harmonise » com » ibm » webdav » impl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » harmonise » com.ibm.webdav.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.webdav.impl.ResourceImpl

All known Subclasses:   com.ibm.webdav.impl.CollectionImpl,
ResourceImpl
public class ResourceImpl implements IRResource(Code)
Implements the Resource interface and all the WebDAV semantics. ResourceImpl delegates certain low-level repository operations to managers provided for a particular repository implementation. There are three repository managers factoring the repository-specific behavior: NamesapceManager, PropertiesManager, and LockManager. ResourceImplFactory constructs the appropriate managers for this resource based on its URL. Mapping information from URL to repository manager is configured in the dav4j.properties file.

ResourceImpl is generally used by a server to implement the WebDAV protocol. However, it may also be used directly on the client if the resource URL is the localhost and in that case, there are no remote procedure calls, and no need for a server to run.
author:
   Jim Amsden <jamsden@us.ibm.com>
See Also:   ResourceImplCollection
See Also:   ResourceHTTPSkel



Field Summary
protected static  UserAuthenticatorauthenticator
    
protected  ResourceContextcontext
    
public static  booleandebug
     Setting debug to true causes debug information to be printed to System.err for each method.
protected  StringfileName
    
protected  LockManagerlockManager
    
protected  NamespaceManagernamespaceManager
    
protected  PropertiesManagerpropertiesManager
    
protected static  SearchManagersearchManager
    
protected  URLurl
    
public static  java.util.PropertieswebdavProperties
    

Constructor Summary
public  ResourceImpl()
    
public  ResourceImpl(URL url, String localName)
     Construct a ResourceImpl for the given URL.
public  ResourceImpl(URL url, String localName, TargetSelector targetSelector)
     Construct a ResourceImpl for the given URL.

Method Summary
public  MultiStatusatomicMove(ResourceContext context, String destinationURL, boolean overwrite)
     Copy this resource to the destination URL. Partial results are possible, check the returned status for details.
Parameters:
  destinationURL - the destination
Parameters:
  overwrite - true implies overrite the destination if it exists
Parameters:
  propertiesToCopy - a collection of properties that must be copied orthe method will fail.
public  booleanauthenticateUser(String user, String pwd)
    
public  voidcheckin()
    
public  voidcheckout()
    
public  voidcloseContentsOutputStream(ResourceContext context)
     This method must be called after the client has completed writing to the contents output stream that was obtained from getContentsOutputStream().
public  voidcloseContentsOutputStream(ResourceContext context, String sContentType)
    
public  MultiStatuscopy(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToCopy)
     Copy this resource to the destination URL. Partial results are possible, check the returned status for details.
Parameters:
  destinationURL - the destination
Parameters:
  overwrite - true implies overrite the destination if it exists
Parameters:
  propertiesToCopy - a collection of properties that must be copied orthe method will fail.
protected  MultiStatuscopyProperties(Resource destination, Vector propertiesToCopy)
     Copy the properties of this resource to the destination resource.
public static  ResourceImplcreate(URL url, String localName)
     Create a instance of a ResourceImpl with the given URL and localName.
public  MultiStatuscreateBinding(ResourceContext context, String bindName, String resourceURI)
    
public  MultiStatuscreatePropPatchMultiStatus(WebDAVException exc, Document updates)
     Build a multistatus property response that returns the error specified by the given exception.
public  MultiStatusdelete(ResourceContext context)
     Delete this resouce from the server.
protected  MultiStatusdoUnlock(String lockToken)
     Unlock the lock identified by the lockToken on this resource.
public  MultiStatusexecuteSearch(ResourceContext context, SearchRequest searchReq)
    
public  booleanexists()
     See if the contents of this resource exists.
protected  ActiveLockgetActiveLockFor(String scope, String type, int timeout, Element owner)
     Get the active lock on this resource owned by the given principal if any. NOTE: this method cannot be reliably implemented based on version 10 of the WebDAV spec as an activelock element in a lockdiscovery does not contain the authorization credentials of the owner of the lock.
public  ListgetAllowedMethods()
    
public  InputStreamgetContentsInputStream(ResourceContext context)
     Get an InputStream for accessing the contents of this resource.
public  OutputStreamgetContentsOutputStream(ResourceContext context)
     Get an OutputStream for setting the contents of this resource.
public  com.ibm.webdav.ResourceContextgetContext()
     Insert the method's description here.
public  LockManagergetLockManager()
    
public  VectorgetLocks()
     Get the locks that exist on this resource.
public  voidgetMetaInformation(ResourceContext context)
     This method can be used for obtaining meta-information about this resource without actually reading the resource contents.
public  StringgetName()
     Return the local name of the resource.
public  IRCollectiongetParentCollection()
     Get the collection containing this resource.
public  URLgetParentURL()
     Get the URL of the collection containing this resource.
public  MultiStatusgetProperties(ResourceContext context)
     Get all the properties of this resource. a MultiStatus of PropertyResponses.
public  MultiStatusgetProperties(ResourceContext context, PropertyName[] names)
     Get the named properties of this resource.
public  PropertyValuegetProperty(PropertyName name)
     Get the value of the given property for this resource.
public  MultiStatusgetPropertyNames(ResourceContext context)
     Get the names of all properties for this resource.
public  HTTPHeadersgetRequestContext()
     Get the request context for this resource.
public  HTTPHeadersgetResponseContext()
     Get the response context for this resource.
public  MultiStatusgetSearchSchema(ResourceContext context, SearchRequest searchReq)
    
public  com.ibm.webdav.WebDAVStatusgetStatusCode()
     Insert the method's description here.
public  URLgetURL()
     Get the name that identifies this resource.
public  UserAuthenticatorgetUserAuthenticator()
    
public  MultiStatusgetVersionTreeReport(ResourceContext context, PropertyName[] names)
     Get the named properties for all versions of this resource.
public  MultiStatusgetVersionTreeReport(ResourceContext context)
     Get the properties for all versions of this resource.
protected  booleanhasLock(String lockToken)
    
public  booleanhasValidURI()
    
protected  voidinheritParentDeepLocks()
     Inherit all deep locks on the parent of this resource.
public  booleanisCollection()
     Returns true if this Resource is a collection.
public  booleanisLocked()
     See if this resource is locked.
public  booleanisLockedByMe()
     Is this resource locked by the current authorized user? That is, does the current user have sufficient locking access to modify this resource.
public  booleanisSameServerAs(URL target)
     See if the target URL has the same host and port (e.g., the same server) as this resource.
public  DocumentloadProperties()
     Load properties from the properties manager and update live properties.
protected  MultiStatuslock(ActiveLock activeLock)
     Lock this resource with the information contained in the given active lock.
public  MultiStatuslock(ResourceContext context, String scope, String type, int timeout, Element owner)
     Lock this resource based on the given parameters.
public static  voidmain(String[] args)
     Startup an RMI server for a ResourceImpl.
public  MultiStatusmove(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToMove)
     Move this resource to the destination URL. Partial results are possible, check the returned status for details
Parameters:
  destinationURL - the destination
Parameters:
  overwrite - true implies overrite the destination if it exists
Parameters:
  propertiesToMove - a collection of properties that must be moved orthe method will fail.
public  booleanparentIsLockedWith(String lockToken)
    
public  byte[]performWith(ResourceContext context, String args)
     This method treats this resource as a method or service, and sends its parameter to this resource where it is handled in a resource-specific way.
public  MultiStatusrefreshLock(ResourceContext context, String lockToken, int timeout)
     Refresh the lock on this resource by resetting the lock timeout. The context must contain the proper authorization for the requesting principal.
Parameters:
  lockToken - the lock token identifying the lock.
Parameters:
  timeout - the new timeout in seconds.
public  voidremoveLiveProperties(Document propertiesDocument)
     Remove the live DAV properties from the properties document.
public  voidsaveProperties(Document propertiesDocument)
     Save the properties after removing any live properties that don't need to be saved.
public  voidsetContents(byte[] value)
     Set the contents of this resource.
 voidsetContext(com.ibm.webdav.ResourceContext newContext)
     Insert the method's description here.
public  MultiStatussetProperties(ResourceContext context, Document updates)
     Edit the properties of a resource.
public  voidsetRequestContext(ResourceContext newRequestContext)
     Insert the method's description here.
public  voidsetResponseContext(com.ibm.webdav.ResourceContext newResponseContext)
     Insert the method's description here.
 voidsetStatusCode(int newStatusCode)
     Insert the method's description here.
 voidsetStatusCode(com.ibm.webdav.WebDAVStatus newStatusCode)
     Insert the method's description here.
public  StringtranslatePathRelativeToMe(String target)
     Translate the URI reference relative to this resource in order to obtain the real path name if the URI references a resource on the same machine.
public  voiduncheckout()
    
public  MultiStatusunlock(ResourceContext context, String lockToken)
     Unlock the lock identified by the lockToken on this resource
Parameters:
  lockToken - the lock token obtained from the ActiveLock of a previous lock() or getLocks().
public  voidupdateLiveProperties(Document document)
     Update live properties that are supported by this server.
public  voidversionControl()
    

Field Detail
authenticator
protected static UserAuthenticator authenticator(Code)



context
protected ResourceContext context(Code)



debug
public static boolean debug(Code)
Setting debug to true causes debug information to be printed to System.err for each method. This value can be changed by setting its value in the dav4j.properties file and restarting the server.



fileName
protected String fileName(Code)



lockManager
protected LockManager lockManager(Code)



namespaceManager
protected NamespaceManager namespaceManager(Code)



propertiesManager
protected PropertiesManager propertiesManager(Code)



searchManager
protected static SearchManager searchManager(Code)



url
protected URL url(Code)



webdavProperties
public static java.util.Properties webdavProperties(Code)




Constructor Detail
ResourceImpl
public ResourceImpl()(Code)



ResourceImpl
public ResourceImpl(URL url, String localName) throws WebDAVException(Code)
Construct a ResourceImpl for the given URL.
Parameters:
  url - the URL of the resource
Parameters:
  localName - a translation of the URL (filePortion) intoa name that has local meaning to a server.
exception:
  com.ibm.webdav.WebDAVException -



ResourceImpl
public ResourceImpl(URL url, String localName, TargetSelector targetSelector) throws WebDAVException(Code)
Construct a ResourceImpl for the given URL.
Parameters:
  url - the URL of the resource
Parameters:
  localName - a translation of the URL (filePortion) intoa name that has local meaning to a server.
Parameters:
  targetSelector - the revision target selector for this Collection
exception:
  com.ibm.webdav.WebDAVException -




Method Detail
atomicMove
public MultiStatus atomicMove(ResourceContext context, String destinationURL, boolean overwrite) throws WebDAVException(Code)
Copy this resource to the destination URL. Partial results are possible, check the returned status for details.
Parameters:
  destinationURL - the destination
Parameters:
  overwrite - true implies overrite the destination if it exists
Parameters:
  propertiesToCopy - a collection of properties that must be copied orthe method will fail. propertiesToCopy may have one of the following values:
  • null - ignore properties that cannot be copied
  • empty collection - all properties must be copied or the method will fail
  • a collection of URIs - a list of the properties that must be copiedor the method will fail
the status of the copy operation for each resource copied
exception:
  com.ibm.webdav.WebDAVException -



authenticateUser
public boolean authenticateUser(String user, String pwd) throws WebDAVException(Code)



checkin
public void checkin() throws WebDAVException(Code)
Checks in current resource
throws:
  WebDAVException -



checkout
public void checkout() throws WebDAVException(Code)
Checks out the current resource
throws:
  WebDAVException -



closeContentsOutputStream
public void closeContentsOutputStream(ResourceContext context) throws WebDAVException(Code)
This method must be called after the client has completed writing to the contents output stream that was obtained from getContentsOutputStream().
exception:
  com.ibm.webdav.WebDAVException -



closeContentsOutputStream
public void closeContentsOutputStream(ResourceContext context, String sContentType) throws WebDAVException(Code)



copy
public MultiStatus copy(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToCopy) throws WebDAVException(Code)
Copy this resource to the destination URL. Partial results are possible, check the returned status for details.
Parameters:
  destinationURL - the destination
Parameters:
  overwrite - true implies overrite the destination if it exists
Parameters:
  propertiesToCopy - a collection of properties that must be copied orthe method will fail. propertiesToCopy may have one of the following values:
  • null - ignore properties that cannot be copied
  • empty collection - all properties must be copied or the method will fail
  • a collection of URIs - a list of the properties that must be copiedor the method will fail
the status of the copy operation for each resource copied
exception:
  com.ibm.webdav.WebDAVException -



copyProperties
protected MultiStatus copyProperties(Resource destination, Vector propertiesToCopy) throws WebDAVException(Code)
Copy the properties of this resource to the destination resource. Follow any keepalive instructions in the propertiesToCopy vector.
Parameters:
  destination - the destination resource
Parameters:
  propertiesToCopy - properties that must be kept alive at the destination
  • null - ignore properties that cannot be copied
  • empty collection - all properties must be copied or the method will fail
  • a collection of URIs - a list of the properties that must be copiedor the method will fail
a MultiStatus indicating the result of the copy operation
exception:
  com.ibm.webdav.WebDAVException -



create
public static ResourceImpl create(URL url, String localName) throws WebDAVException(Code)
Create a instance of a ResourceImpl with the given URL and localName.
Parameters:
  url - the URL of the resource to create
Parameters:
  localName - the name of the resource on the server machine a ResourceImpl or one of its subclasses.
exception:
  com.ibm.webdav.WebDAVException -



createBinding
public MultiStatus createBinding(ResourceContext context, String bindName, String resourceURI) throws WebDAVException(Code)



createPropPatchMultiStatus
public MultiStatus createPropPatchMultiStatus(WebDAVException exc, Document updates) throws WebDAVException(Code)
Build a multistatus property response that returns the error specified by the given exception. It should return this error for every property provided in the specified document which should represent the XML of a PROPPATCH request.
Parameters:
  exc - an exception that describes the error to be placed in the MultiStatus created.
Parameters:
  updates - an XML Document containing DAV:propertyupdate elementsdescribing the edits that were request orginally requested andapparently generated the given exception. a MultiStatus indicating the status of the updates
exception:
  com.ibm.webdav.WebDAVException -



delete
public MultiStatus delete(ResourceContext context) throws WebDAVException(Code)
Delete this resouce from the server. The actual effect of the delete operation is determined by the underlying repository manager. The visible effect to WebDAV is that the resource is no longer available. a MultiStatus containing the status of the delete method on eacheffected resource.
exception:
  com.ibm.webdav.WebDAVException -



doUnlock
protected MultiStatus doUnlock(String lockToken) throws WebDAVException(Code)
Unlock the lock identified by the lockToken on this resource. This method is used internally to unlock resources copied or moved as well as unlocked.
Parameters:
  lockToken - the lock token obtained from the ActiveLock of a previous lock() or getLocks(). a MultiStatus containing any responses on resources that could notbe unlocked.
exception:
  com.ibm.webdav.WebDAVException -



executeSearch
public MultiStatus executeSearch(ResourceContext context, SearchRequest searchReq) throws WebDAVException(Code)



exists
public boolean exists() throws WebDAVException(Code)
See if the contents of this resource exists. A resource exists if it has contents or state maintained by a server. true if the contents exists, false otherwise
exception:
  com.ibm.webdav.WebDAVException -



getActiveLockFor
protected ActiveLock getActiveLockFor(String scope, String type, int timeout, Element owner) throws WebDAVException(Code)
Get the active lock on this resource owned by the given principal if any. NOTE: this method cannot be reliably implemented based on version 10 of the WebDAV spec as an activelock element in a lockdiscovery does not contain the authorization credentials of the owner of the lock. For now, this method relies on an additional principal element in the activelock that contains the required id. This is an IBM EXTENSTION. When WebDAV ACLs are introduced, the principal will likely be added to the activelock element.
Parameters:
  principal - the authorization id of the requesting principal the active lock owned by that principal or null if the resource isnot locked by that principal.
exception:
  com.ibm.webdav.WebDAVException -



getAllowedMethods
public List getAllowedMethods() throws WebDAVException(Code)



getContentsInputStream
public InputStream getContentsInputStream(ResourceContext context) throws WebDAVException(Code)
Get an InputStream for accessing the contents of this resource. This method may provide more efficient access for resources that have large contents. Clients may want to create a Reader to perform appropriate character conversions on this stream. an InputStream on the contents
exception:
  com.ibm.webdav.WebDAVException -



getContentsOutputStream
public OutputStream getContentsOutputStream(ResourceContext context) throws WebDAVException(Code)
Get an OutputStream for setting the contents of this resource. This method may provide more efficient access for resources that have large contents. Remember to call closeContentsOutputStream() when all the data has been written. an OutputStream to set the contents
exception:
  com.ibm.webdav.WebDAVException -



getContext
public com.ibm.webdav.ResourceContext getContext()(Code)
Insert the method's description here. Creation date: (4/14/2000 4:14:55 PM) com.ibm.webdav.ResourceContext



getLockManager
public LockManager getLockManager()(Code)
Return lock manager for this resource



getLocks
public Vector getLocks() throws WebDAVException(Code)
Get the locks that exist on this resource. a Vector of ActiveLock objects
exception:
  com.ibm.webdav.WebDAVException -



getMetaInformation
public void getMetaInformation(ResourceContext context) throws WebDAVException(Code)
This method can be used for obtaining meta-information about this resource without actually reading the resource contents. This meta-information is maintained by the server in addition to the resource properties.

After this call, the resource context has been updated and getStatusCode(), getStatusMessage(), and getResponseContext() as well as all the ResourceContext methods return updated values based on the current state of the resource.

This methods corresponds to the HTTP HEAD method.

Do a getContentsInputStream() to set the response context, then just don't return the stream.
exception:
  com.ibm.webdav.WebDAVException -




getName
public String getName() throws WebDAVException(Code)
Return the local name of the resource. What this name actually is depends on the interpretation of the resource URL by the namespace manager servicing it. Repository implementations are free to translate the URL any way they want for their own purposes. For example, the file system implementation uses the doc.root property to translate the file part of the URL into a full pathname. the repository specific name for this resource
exception:
  com.ibm.webdav.WebDAVException -



getParentCollection
public IRCollection getParentCollection() throws WebDAVException(Code)
Get the collection containing this resource. the parent collection
exception:
  com.ibm.webdav.WebDAVException -



getParentURL
public URL getParentURL() throws WebDAVException(Code)
Get the URL of the collection containing this resource. the parent collection URL, always ending in a separator
exception:
  com.ibm.webdav.WebDAVException -



getProperties
public MultiStatus getProperties(ResourceContext context) throws WebDAVException(Code)
Get all the properties of this resource. a MultiStatus of PropertyResponses. It should contain only oneresponse element.
See Also:   com.ibm.webdav.MultiStatus
See Also:   com.ibm.webdav.PropertyResponse
exception:
  com.ibm.webdav.WebDAVException -



getProperties
public MultiStatus getProperties(ResourceContext context, PropertyName[] names) throws WebDAVException(Code)
Get the named properties of this resource.
Parameters:
  names - an arrary of property names to retrieve a MultiStatus of PropertyResponses
exception:
  com.ibm.webdav.WebDAVException -
See Also:   com.ibm.webdav.PropertyResponse



getProperty
public PropertyValue getProperty(PropertyName name) throws WebDAVException(Code)
Get the value of the given property for this resource.
Parameters:
  name - the name of the property to retrieve PropertyValue or null if the resource does not have the requested property
exception:
  com.ibm.webdav.WebDAVException -



getPropertyNames
public MultiStatus getPropertyNames(ResourceContext context) throws WebDAVException(Code)
Get the names of all properties for this resource. The result is similar to getProperties(), but the properties have no values. a MultiStatus of PropertyResponses(PropertyValue.value is always null, PropertyValue.status contains the status)
exception:
  com.ibm.webdav.WebDAVException -
See Also:   com.ibm.webdav.PropertyResponse



getRequestContext
public HTTPHeaders getRequestContext() throws WebDAVException(Code)
Get the request context for this resource. The context contains information used by methods on a resource when the method is called. the HTTPHeaders providing information that controlsmethod execution.
exception:
  com.ibm.webdav.WebDAVException -



getResponseContext
public HTTPHeaders getResponseContext() throws WebDAVException(Code)
Get the response context for this resource. The context contains information returned from invocations of methods on a resource. the HTTPHeaders providing information thatis returned by method execution.
exception:
  com.ibm.webdav.WebDAVException -



getSearchSchema
public MultiStatus getSearchSchema(ResourceContext context, SearchRequest searchReq) throws WebDAVException(Code)



getStatusCode
public com.ibm.webdav.WebDAVStatus getStatusCode()(Code)
Insert the method's description here. Creation date: (4/13/2000 8:53:11 PM) com.ibm.webdav.WebDAVStatus



getURL
public URL getURL() throws WebDAVException(Code)
Get the name that identifies this resource. the URL for this resource
exception:
  com.ibm.webdav.WebDAVException -



getUserAuthenticator
public UserAuthenticator getUserAuthenticator()(Code)
Return authenticator for this resource



getVersionTreeReport
public MultiStatus getVersionTreeReport(ResourceContext context, PropertyName[] names) throws WebDAVException(Code)
Get the named properties for all versions of this resource.
Parameters:
  context -
Parameters:
  names - an array of PropertyNames to retrieve.
throws:
  WebDAVException -



getVersionTreeReport
public MultiStatus getVersionTreeReport(ResourceContext context) throws WebDAVException(Code)
Get the properties for all versions of this resource.
Parameters:
  context -
throws:
  WebDAVException -



hasLock
protected boolean hasLock(String lockToken) throws WebDAVException(Code)
Is this resource locked with the given lock token?
Parameters:
  lockToken - the lock token to check for
exception:
  com.ibm.webdav.WebDAVException -



hasValidURI
public boolean hasValidURI() throws WebDAVException(Code)
Check for a valid URI true if this resource has a valid URI
exception:
  com.ibm.webdav.WebDAVException -



inheritParentDeepLocks
protected void inheritParentDeepLocks() throws WebDAVException(Code)
Inherit all deep locks on the parent of this resource.
exception:
  com.ibm.webdav.WebDAVException -



isCollection
public boolean isCollection() throws WebDAVException(Code)
Returns true if this Resource is a collection. Returns false otherwise. true if this Resource is a collection.
exception:
  com.ibm.webdav.WebDAVException -



isLocked
public boolean isLocked() throws WebDAVException(Code)
See if this resource is locked. true if this resource is locked, false otherwise.
exception:
  com.ibm.webdav.WebDAVException -



isLockedByMe
public boolean isLockedByMe() throws WebDAVException(Code)
Is this resource locked by the current authorized user? That is, does the current user have sufficient locking access to modify this resource. The method, like all methods that do modify the resource, must have a precondition set in the context containing the lock token of the resource owned by this user. The user is set in the request context using the authorization method. true if this resource is locked by the principal in the contextsufficient to modify the resource.
exception:
  com.ibm.webdav.WebDAVException -
See Also:   com.ibm.webdav.ResourceContext.authorization



isSameServerAs
public boolean isSameServerAs(URL target)(Code)
See if the target URL has the same host and port (e.g., the same server) as this resource. Matches on the host name, not its Internet address. true if the target is supported by the same server



loadProperties
public Document loadProperties() throws WebDAVException(Code)
Load properties from the properties manager and update live properties. an XML document containing a properties element.
exception:
  com.ibm.webdav.WebDAVException -



lock
protected MultiStatus lock(ActiveLock activeLock) throws WebDAVException(Code)
Lock this resource with the information contained in the given active lock.
Parameters:
  activeLock - information about the lock a MultiStatus containing a lockdiscovery property indicating
exception:
  com.ibm.webdav.WebDAVException -



lock
public MultiStatus lock(ResourceContext context, String scope, String type, int timeout, Element owner) throws WebDAVException(Code)
Lock this resource based on the given parameters. This allows control of the lock scope (exclusive or shared) the lock type (write), owner information, etc.
Parameters:
  scope - the scope of the lock, exclusive or shared
Parameters:
  type - the type of the lock, currently only write
Parameters:
  timeout - the number of seconds before the lock times out or-1 for infinite timeout.
Parameters:
  owner - an XML element containing useful information that can beused to identify the owner of the lock. An href to a home page, anemail address, phone number, etc. Can be null if no owner informationis provided. a MultiStatus containing a lockdiscovery property indicatingthe results of the lock operation.
exception:
  com.ibm.webdav.WebDAVException -



main
public static void main(String[] args)(Code)
Startup an RMI server for a ResourceImpl. The URL would most likely be for some root WebDAV collection corresponding to the doc.root of a typical web server. The resource identified by the URL must exist.
Parameters:
  args - root URL, its local file pathname



move
public MultiStatus move(ResourceContext context, String destinationURL, boolean overwrite, Vector propertiesToMove) throws WebDAVException(Code)
Move this resource to the destination URL. Partial results are possible, check the returned status for details
Parameters:
  destinationURL - the destination
Parameters:
  overwrite - true implies overrite the destination if it exists
Parameters:
  propertiesToMove - a collection of properties that must be moved orthe method will fail. propertiesToMove may have one of the following values:
  • null - ignore properties that cannot be moved
  • empty collection - all properties must be moved or the method will fail
  • a collection of URIs - a list of the properties that must be movedor the method will fail
the status of the move operation for each resource moved
exception:
  com.ibm.webdav.WebDAVException -



parentIsLockedWith
public boolean parentIsLockedWith(String lockToken) throws WebDAVException(Code)
Is the parent of this resource depth locked with the given lock token?
Parameters:
  lockToken - the lock token to check true if the parant of this resource is locked with the lock token
exception:
  com.ibm.webdav.WebDAVException -



performWith
public byte[] performWith(ResourceContext context, String args) throws WebDAVException(Code)
This method treats this resource as a method or service, and sends its parameter to this resource where it is handled in a resource-specific way. For example, sending data from an HTML form to a URL representing a Servlet or CGI script that processes the form data to produce some result.
Parameters:
  args - a string representing the arguments to the method represented by this URL. Thearguments are in the form ?parameterName1=value1&parameterName2=value2... as specifiedfor URL queries. the results of sending the arguments to the URL
exception:
  com.ibm.webdav.WebDAVException -



refreshLock
public MultiStatus refreshLock(ResourceContext context, String lockToken, int timeout) throws WebDAVException(Code)
Refresh the lock on this resource by resetting the lock timeout. The context must contain the proper authorization for the requesting principal.
Parameters:
  lockToken - the lock token identifying the lock.
Parameters:
  timeout - the new timeout in seconds. -1 means infinite timeout. updated information about the lock status of this resource
exception:
  com.ibm.webdav.WebDAVException -



removeLiveProperties
public void removeLiveProperties(Document propertiesDocument)(Code)
Remove the live DAV properties from the properties document. There is no reason to save them as they are recalculated each time the properties are loaded.
Parameters:
  propertiesDocument - an XML document containing the current resource properties



saveProperties
public void saveProperties(Document propertiesDocument) throws WebDAVException(Code)
Save the properties after removing any live properties that don't need to be saved.
Parameters:
  propertiesDocument - an XML document containing the resource's properties
exception:
  com.ibm.webdav.WebDAVException -



setContents
public void setContents(byte[] value) throws WebDAVException(Code)
Set the contents of this resource. This may create a new resource on the server, or update the contents of an existing resource. Sufficient authorization is required and administered by the target web server. For text/* MIME types, the caller should be sure to convert Strings to byte codes using an acceptable charset, and to set that charset in the request context so the server knows how to decode the byte stream.
Parameters:
  value - the new contents for the resource
exception:
  com.ibm.webdav.WebDAVException -



setContext
void setContext(com.ibm.webdav.ResourceContext newContext)(Code)
Insert the method's description here. Creation date: (4/14/2000 4:14:55 PM)
Parameters:
  newContext - com.ibm.webdav.ResourceContext



setProperties
public MultiStatus setProperties(ResourceContext context, Document updates) throws WebDAVException(Code)
Edit the properties of a resource. The updates must refer to a Document containing a WebDAV DAV:propertyupdates element as the document root.
Parameters:
  updates - an XML Document containing DAV:propertyupdate elementsdescribing the edits to be made a MultiStatus indicating the status of the updates
exception:
  com.ibm.webdav.WebDAVException -



setRequestContext
public void setRequestContext(ResourceContext newRequestContext)(Code)
Insert the method's description here. Creation date: (4/13/2000 8:48:11 PM)
Parameters:
  newRequestContext - com.ibm.webdav.ResourceContext



setResponseContext
public void setResponseContext(com.ibm.webdav.ResourceContext newResponseContext)(Code)
Insert the method's description here. Creation date: (4/13/2000 8:48:11 PM)
Parameters:
  newResponseContext - com.ibm.webdav.ResourceContext



setStatusCode
void setStatusCode(int newStatusCode)(Code)
Insert the method's description here. Creation date: (4/13/2000 8:53:11 PM)
Parameters:
  newStatusCode - com.ibm.webdav.WebDAVStatus



setStatusCode
void setStatusCode(com.ibm.webdav.WebDAVStatus newStatusCode)(Code)
Insert the method's description here. Creation date: (4/13/2000 8:53:11 PM)
Parameters:
  newStatusCode - com.ibm.webdav.WebDAVStatus



translatePathRelativeToMe
public String translatePathRelativeToMe(String target) throws WebDAVException(Code)
Translate the URI reference relative to this resource in order to obtain the real path name if the URI references a resource on the same machine.
Parameters:
  target - the URL of the path to translate the pathname to the file on this machine, or the URL if the fileis not on this machine
exception:
  com.ibm.webdav.WebDAVException -



uncheckout
public void uncheckout() throws WebDAVException(Code)



unlock
public MultiStatus unlock(ResourceContext context, String lockToken) throws WebDAVException(Code)
Unlock the lock identified by the lockToken on this resource
Parameters:
  lockToken - the lock token obtained from the ActiveLock of a previous lock() or getLocks(). a MultiStatus containing any responses on resources that could notbe unlocked.
exception:
  com.ibm.webdav.WebDAVException -



updateLiveProperties
public void updateLiveProperties(Document document) throws WebDAVException(Code)
Update live properties that are supported by this server. This method updates those that are not unique to any repository implementation. This is mostly the live DAV properties as defined in the WebDAV spec.
Parameters:
  document - an XML document containing the resource properties
exception:
  com.ibm.webdav.WebDAVException -



versionControl
public void versionControl() throws WebDAVException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.