Java Doc for Resource.java in  » Content-Management-System » harmonise » com » ibm » webdav » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.ibm.webdav.Resource

All known Subclasses:   com.ibm.webdav.Activity,  com.ibm.webdav.VersionedResource,  com.ibm.webdav.Collection,
Resource
public class Resource implements Serializable(Code)
A Resource implements a client proxy of the Resource interface locally where possible, and by delegating the methods that must be implemented by the server to another proxy stub as specified by the protocol given in the resource URL. This allows WebDAV client applications to communicate with a server through multiple RPC protocols, including no protocol at all for local access.
See Also:   com.ibm.webdav.CollectionP
See Also:   com.ibm.webdav.Precondition.addStateTokenCondition
author:
   Jim Amsden <jamsden@us.ibm.com>


Field Summary
public static  StringDAV4JVersion
    
public static  StringXMLVersion
    
protected  byte[]cachedContents
    
protected  ResourceContextcontext
    
public static  StringdefaultCharEncoding
    
public static  StringdefaultXMLEncoding
    
protected  IRResourceimpl
    
protected  TargetSelectortargetSelector
    
protected  URLurl
    

Constructor Summary
public  Resource()
     The default constructor.
public  Resource(Resource resource)
     A copy constructor.
public  Resource(String url)
     Construct a Resource with the given URL.
public  Resource(String url, TargetSelector targetSelector)
     Construct a Resource with the given URL.
public  Resource(String protocol, String host, int port, String file)
     Create a Resource from the given URL components.
Parameters:
  protocol - the protocol to use, http:, rmi:, or iiop:
Parameters:
  host - the name or IP addres of the server host.
public  Resource(String protocol, String host, String file)
     Create a Resource from the given URL components.
public  Resource(URL url)
     Construct a Resource with the given URL.
public  Resource(URL url, TargetSelector targetSelector)
     Construct a Resource with the given URL.
public  Resource(URL context, String spec)
     Construct a Resource with the given URL specification in the given context.

Method Summary
public  voidaddLabel(String label)
     Add a label to this revision of a versioned resource.
public  MultiStatusaddProperties(PropertyName[] names, Element[] values)
     Add properties to a resource.
public  voidaddProperty(PropertyName name, Element value)
    
public  voidcancelCheckOut()
     Cancel the checkout of this working resource, delete the working resource, and remove any predecessor/successor relationships created by checkout or merge.
public  TargetSelectorcheckOut()
     Check out a resource in order to create a new working resource. A resource is checked out in the context of the workspace, and can only be checked out once in a given activity.
public  TargetSelectorcheckOut(Workspace workspace)
     Check out a resource in order to create a new working resource. A resource is checked out in the context of the workspace, and can only be checked out once in a given activity.
public  voidcheckPoint(boolean makeCurrentTarget, boolean overwrite)
     Create a new revision of this resource, but keep it checked out.
public  voidcheckin()
     Checkin a resource creating a new immutable revision and releasing the revision so other user agents may subsequently check it out.
public  voidcheckin(Activity activity, boolean makeCurrentTarget, boolean overwrite)
     Checkin a resource releasing it so other user agents may check it out.
public  voidcheckin(boolean makeCurrentTarget, boolean overwrite)
     Checkin a resource releasing it so other user agents may check it out.
public  voidcloseContentsOutputStream()
     This method must be called after the client has completed writing to the contents output stream that was obtained from getContentsOutputStream().
public  voidcloseContentsOutputStream(String sContentType)
    
public  MultiStatuscopy(String destinationURL)
     Copy this resource to the destination URL.
public  MultiStatuscopy(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.
public  MultiStatusdelete()
     Delete this resouce from the server.
public  DocumentdifferencesWith(Resource resource)
     Return an XML document describing the differences between two revisions, both contents and properties.
public  booleanequals(Resource resource)
     Two Resources are equal if they have the same URL.
public  booleanexists()
     See if the contents of this resource exists.
public  voidflushCaches()
     Flush any caches so that subsequent methods obtain fresh data from the server.
public  ActiveLockgetActiveLockFor(String principal)
     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  ActivitygetActivity()
     Get the activity this revision was created in.
public  byte[]getContents()
     Get the contents of this resource.
public  InputStreamgetContentsInputStream()
     Get an InputStream for accessing the contents of this resource.
public  OutputStreamgetContentsOutputStream()
     Get an OutputStream for setting the contents of this resource.
public  ResourceContextgetContext()
    
public  EnumerationgetLabels()
     Return all the labels on this revision, not including its revision id.
public  VectorgetLocks()
     Get the locks that exist on this resource.
public  EnumerationgetMergeCandidates()
     Return a list of activities on different lines of descent for this revision that are candidates for merging.
public  EnumerationgetMergePredecessors()
     Get the predecessors of this revision that were established by merging changes from another activity.
public  voidgetMetaInformation()
     This method can be used for obtaining meta-information about this resource without actually reading the resource contents.
public  EnumerationgetMutableProperties()
     A resource may have a number of mutable properties.
public  ElementgetOptions()
     Get the options for this resource.
public  CollectiongetParentCollection()
     Get the collection containing this resource.
public  ResourcegetPredecessor()
     Get the predecessor of this revision.
public  MultiStatusgetProperties()
     Get all the properties of this resource. a MultiStatus of PropertyResponses.
public  MultiStatusgetProperties(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()
     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  DocumentgetRevisionHistory()
     Get the revision history for a versioned resource.
public  StringgetRevisionId()
     Get the system-assigned revision id for this revision.
public  intgetStatusCode()
     Get the status code corresponding to the last method execution.
public  StringgetStatusMessage()
     Get the status message corresponding to the last method execution.
public  EnumerationgetSuccessors()
     Get the immediate successors of this revision.
public  TargetSelectorgetTargetSelector()
     Get the TargetSelector that identifies this resource revision.
public  URLgetURL()
     Get the name that identifies this resource.
public  StringgetWorkingResourceId()
     Get the system-assigned working resource id for this revision. Returns NULL if the resource is not versioned or is not checked out.

The working resource id must be unique for all working resources of this revision.

public  EnumerationgetWorkingResources()
     Get the current working resources of this revision.
protected  voidinitialize(URL url, TargetSelector targetSelector)
     Initialize this collection instance.
public  booleanisAutomaticallyVersioned()
     A resource can be automatically versioned on each method that updates its state (content or properties).
public  booleanisCheckedOut(Activity activity)
     Return true if this revision is checked out in the given activity.
public  booleanisCollection()
     Returns true if this Resource is a collection.
public  booleanisLabeledWith(String label)
    
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  booleanisMutable()
     Return true if this revision is mutable.
 booleanisVersioned()
     Return true if this resource is a versioned resource.
public  MultiStatuslock(Document document)
     Exclusively write Lock this resource for all time. detailed information about the lock status of this resource.
public  MultiStatuslock(String scope, String type, int timeout, Element owner)
     Lock this resource based on the given parameters.
public  MultiStatusmove(String destinationURL)
     Move this resource to the destination URL.
public  MultiStatusmove(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  byte[]performWith(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(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  voidremoveLabel(String label)
     Remove a label from a revision.
public  MultiStatusremoveProperties(PropertyName[] names)
     Remove properties from a resource.
public  voidremoveProperty(PropertyName name)
     Remove a property from a resource.
public  voidsetContents(byte[] value)
     Set the contents of this resource.
public  voidsetContents(byte[] value, String mimetype)
     Set the contents of this resource.
public  MultiStatussetProperties(PropertyName[] names, Element[] values)
     Set properties of a resource.
public  MultiStatussetProperties(Document updates)
     Edit the properties of a resource.
public  voidsetProperty(PropertyName name, Element value)
     Set a property of a resource to a value.
public  voidsetRequestContext(HTTPHeaders value)
     Set the request context for this resource.
public  voidsetResponseContext(HTTPHeaders value)
     Set the response context for this resource.
public  voidsetStatusCode(int value)
     Set the status code corresponding to the last method execution.
public  StringtoString()
     Get a String representation of this resource.
public  MultiStatusunlock(String lockToken)
     Unlock the lock identified by the lockToken on this resource.

Field Detail
DAV4JVersion
public static String DAV4JVersion(Code)



XMLVersion
public static String XMLVersion(Code)
The version of XML used by WebDAV



cachedContents
protected byte[] cachedContents(Code)



context
protected ResourceContext context(Code)



defaultCharEncoding
public static String defaultCharEncoding(Code)



defaultXMLEncoding
public static String defaultXMLEncoding(Code)
The default charset encoding for XML documents and for storing text/* MIME types on the server



impl
protected IRResource impl(Code)



targetSelector
protected TargetSelector targetSelector(Code)



url
protected URL url(Code)




Constructor Detail
Resource
public Resource()(Code)
The default constructor. Should be rarely used.



Resource
public Resource(Resource resource) throws WebDAVException(Code)
A copy constructor. This copies by reference so the resources share the same URL and contexts. TODO: probably should clone.
Parameters:
  resource - the resource to copy
exception:
  com.ibm.webdav.WebDAVException -



Resource
public Resource(String url) throws WebDAVException(Code)
Construct a Resource with the given URL. This is the constructor most clients will use to construct and access Resources using WebDAV. The resource having the url may not exist as this constructor does not access the resource from the server. Use exists() or attmept to get the contents of the resource to see if it exists. Other constructors are provided using parameters for the various parts of the URL. See java.net.URLConnection for details. A ResourceFactory may also be used to construct instances of a Resource.
Parameters:
  url - the URL of the resource.
exception:
  com.ibm.webdav.WebDAVException -
See Also:   URLConnection
See Also:   com.ibm.webdav.ResourceFactory



Resource
public Resource(String url, TargetSelector targetSelector) throws WebDAVException(Code)
Construct a Resource with the given URL. The resource having the url may not exist as this constructor does not access the resource from the server. Use exists() or attmept to get the contents of the resource to see if it exists. Other constructors are provided using parameters for the various parts of the URL. See java.net.URLConnection for details. A ResourceFactory may also be used to construct instances of a Resource.
Parameters:
  url - the URL of the resource.
Parameters:
  targetSelector - the revision target selector for this Collection
exception:
  java.io.IOException -
See Also:   URLConnection
See Also:   com.ibm.webdav.ResourceFactory



Resource
public Resource(String protocol, String host, int port, String file) throws WebDAVException(Code)
Create a Resource from the given URL components.
Parameters:
  protocol - the protocol to use, http:, rmi:, or iiop:
Parameters:
  host - the name or IP addres of the server host. Using the client host name,or 'localhost' without a port uses local access with no RPC or server required.
Parameters:
  port - the TCP port to use. HTTP uses 80 by default.
Parameters:
  file - the resource URL relative to the server including any query string, etc.
exception:
  WebDAVException -
See Also:   URLConnection
See Also:   com.ibm.webdav.ResourceFactory



Resource
public Resource(String protocol, String host, String file) throws WebDAVException(Code)
Create a Resource from the given URL components. This constructor uses the default HTTP port.
Parameters:
  protocol - the protocol to use, http:, rmi:, or iiop:
Parameters:
  host - the name or IP addres of the server host. Using the client host name,or 'localhost' without a port uses local access with no RPC or server required.
Parameters:
  file - the resource URL relative to the server including any query string, etc.
exception:
  com.ibm.webdav.WebDAVException -
See Also:   URLConnection
See Also:   com.ibm.webdav.ResourceFactory



Resource
public Resource(URL url) throws WebDAVException(Code)
Construct a Resource with the given URL. The resource having the url may not exist as this constructor does not access the resource from the server. Use exists() or attmept to get the contents of the resource to see if it exists. Other constructors are provided using parameters for the various parts of the URL. See java.net.URLConnection for details. A ResourceFactory may also be used to construct instances of a Resource.
Parameters:
  url - the URL of the resource.
exception:
  java.io.IOException -
See Also:   URLConnection
See Also:   com.ibm.webdav.ResourceFactory



Resource
public Resource(URL url, TargetSelector targetSelector) throws WebDAVException(Code)
Construct a Resource with the given URL. The resource having the url may not exist as this constructor does not access the resource from the server. Use exists() or attmept to get the contents of the resource to see if it exists. Other constructors are provided using parameters for the various parts of the URL. See java.net.URLConnection for details. A ResourceFactory may also be used to construct instances of a Resource.
Parameters:
  url - the URL of the resource.
Parameters:
  targetSelector - the revision target selector for this Collection
exception:
  java.io.IOException -
See Also:   URLConnection
See Also:   com.ibm.webdav.ResourceFactory



Resource
public Resource(URL context, String spec) throws WebDAVException(Code)
Construct a Resource with the given URL specification in the given context. The resource having the url may not exist as this constructor does not access the resource from the server. Use exists() or attmept to get the contents of the resource to see if it exists. Other constructors are provided using parameters for the various parts of the URL. See java.net.URLConnection for details. A ResourceFactory may also be used to construct instances of a Resource.
Parameters:
  context - a URL giving the context in which the spec is evaluated
Parameters:
  spec - a URL whose missing parts are provided by the context
exception:
  com.ibm.webdav.WebDAVException -
See Also:   URLConnection
See Also:   com.ibm.webdav.ResourceFactory




Method Detail
addLabel
public void addLabel(String label) throws WebDAVException(Code)
Add a label to this revision of a versioned resource. The versioned resource must not already have the label on any revision, and the label cannot be the same as any revision id. The label must be removed from one revision before it can be added to a different revision. The operation will fail if the resource is not a versioned resource.

Labels are used to provide meaningful names that distinguish revisions of versioned resources. They can be used in the revision selection rule of the workspace to specify what revision should be used in that workspace. A specific label may be used to override the workspace to access revisions.

A revision does not need to be checked out to add a label.
Parameters:
  label - the label to add to the labels used to identifythis revision
exception:
  com.ibm.webdav.WebDAVException -




addProperties
public MultiStatus addProperties(PropertyName[] names, Element[] values) throws WebDAVException(Code)
Add properties to a resource.
Parameters:
  names - an array of property names
Parameters:
  value - an array of property values
exception:
  com.ibm.webdav.WebDAVException -



addProperty
public void addProperty(PropertyName name, Element value) throws WebDAVException(Code)
Add a property to a resource
Parameters:
  name - the property name
Parameters:
  value - the property value
exception:
  com.ibm.webdav.WebDAVException -



cancelCheckOut
public void cancelCheckOut() throws WebDAVException(Code)
Cancel the checkout of this working resource, delete the working resource, and remove any predecessor/successor relationships created by checkout or merge. An exception is raised if the resource is not currently checked out.
exception:
  com.ibm.webdav.WebDAVException -



checkOut
public TargetSelector checkOut() throws WebDAVException(Code)
Check out a resource in order to create a new working resource. A resource is checked out in the context of the workspace, and can only be checked out once in a given activity. The workspace to use can be set in the request context. Checkout control on versioned may be managed by locking the versioned resource or a revision before checking out a revision.

CheckOut fails is the resource is not a versioned resource, is currently checked out in the current activity, or the versioned

resource or revision is locked by another user. CheckOut also fails if the current activity or workspace is locked. If the versioned resource or revision is locked, the request context must include a precondition containing the lock token.

If workspace is null, the server will return a workspace that can be subsequently used to access the checked out working resource. the TargetSelector for this working resource
exception:
  com.ibm.webdav.WebDAVException -




checkOut
public TargetSelector checkOut(Workspace workspace) throws WebDAVException(Code)
Check out a resource in order to create a new working resource. A resource is checked out in the context of the workspace, and can only be checked out once in a given activity. The workspace to use can be set in the request context. Checkout control on versioned may be managed by locking the versioned resource or a revision before checking out a revision.

CheckOut fails is the resource is not a versioned resource, is currently checked out in the current activity, or the versioned

resource or revision is locked by another user. CheckOut also fails if the current activity or workspace is locked. If the versioned resource or revision is locked, the request context must include a precondition containing the lock token.

If workspace is null, the server will return a workspace that can be subsequently used to access the checked out working resource.
Parameters:
  workspace - the Workspace in which the revision is checked out. the TargetSelector for this working resource
exception:
  com.ibm.webdav.WebDAVException -




checkPoint
public void checkPoint(boolean makeCurrentTarget, boolean overwrite) throws WebDAVException(Code)
Create a new revision of this resource, but keep it checked out. If overwrite is false, create a new revision and set the predecessor and successor relationships. If overwrite is true, the revision is updated in place and the previous contents are lost. Effectively, no new revision is created, and the revision id now refers to the updated revision. Overwrite will fail if the revision being overwritten is not mutable.

If makeCurrentTarget is true, this revision becomes the default target for the versioned resource. Otherwise the current target is unchanged.
Parameters:
  makeCurrentTarget - true means the new revision becomes thetarget for the versioned resource. Otherwise the target is unchanged.
Parameters:
  overwrite - ture means overwrite the existing revision,false means create a new revision.
exception:
  com.ibm.webdav.WebDAVException -




checkin
public void checkin() throws WebDAVException(Code)
Checkin a resource creating a new immutable revision and releasing the revision so other user agents may subsequently check it out.
exception:
  com.ibm.webdav.WebDAVException -



checkin
public void checkin(Activity activity, boolean makeCurrentTarget, boolean overwrite) throws WebDAVException(Code)
Checkin a resource releasing it so other user agents may check it out. If overwrite is false, create a new revision and set the predecessor and successor relationships. If overwrite is true, the revision is updated in place and the previous contents are lost. Effectively, no new revision is created, and the revision id now refers to the updated revision. Overwrite will fail if the revision being overwritten is not mutable.

If makeCurrentTarget is true, this revision becomes the default target for the versioned resource. Otherwise the current target is unchanged.
Parameters:
  activity - the activity associted with the changes made in this revision
Parameters:
  makeCurrentTarget - true means the new revision becomes thetarget for the versioned resource. Otherwise the target is unchanged.
Parameters:
  overwrite - ture means overwrite the existing revision,false means create a new revision.
exception:
  com.ibm.webdav.WebDAVException -




checkin
public void checkin(boolean makeCurrentTarget, boolean overwrite) throws WebDAVException(Code)
Checkin a resource releasing it so other user agents may check it out. If overwrite is false, create a new revision and set the predecessor and successor relationships. If overwrite is true, the revision is updated in place and the previous contents are lost. Effectively, no new revision is created, and the revision id now refers to the updated revision. Overwrite will fail if the revision being overwritten is not mutable.

If makeCurrentTarget is true, this revision becomes the default target for the versioned resource. Otherwise the current target is unchanged.
Parameters:
  makeCurrentTarget - true means the new revision becomes thetarget for the versioned resource. Otherwise the target is unchanged.
Parameters:
  overwrite - ture means overwrite the existing revision,false means create a new revision.
exception:
  com.ibm.webdav.WebDAVException -




closeContentsOutputStream
public void closeContentsOutputStream() 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(String sContentType) throws WebDAVException(Code)

Parameters:
  sContentType -



copy
public MultiStatus copy(String destinationURL) throws WebDAVException(Code)
Copy this resource to the destination URL. The destination resource must not already exist. Partial results are possible, check the returned status for details.
Parameters:
  destinationURL - the destination the status of the copy operation for each resource copied
exception:
  com.ibm.webdav.WebDAVException -



copy
public MultiStatus copy(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 -



delete
public MultiStatus delete() 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 -



differencesWith
public Document differencesWith(Resource resource) throws WebDAVException(Code)
Return an XML document describing the differences between two revisions, both contents and properties. an XML document describing the differences betweenthe given resource and this resource
exception:
  com.ibm.webdav.WebDAVException -



equals
public boolean equals(Resource resource) throws WebDAVException(Code)
Two Resources are equal if they have the same URL. In this case, port number -1 and port number 80 are considered the same port for equality purposes. true if the resources have URLs indicating the same server resource.
exception:
  com.ibm.webdav.WebDAVException -



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 -



flushCaches
public void flushCaches() throws WebDAVException(Code)
Flush any caches so that subsequent methods obtain fresh data from the server.
exception:
  com.ibm.webdav.WebDAVException -



getActiveLockFor
public ActiveLock getActiveLockFor(String principal) 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 -



getActivity
public Activity getActivity() throws WebDAVException(Code)
Get the activity this revision was created in. Returns null for un-versioned resources or revisions that weren't updated in an activity. the Activity used to create this revision if any
exception:
  com.ibm.webdav.WebDAVException -



getContents
public byte[] getContents() throws WebDAVException(Code)
Get the contents of this resource. This method does not decode text contents. The caller should convert the result to a String using a character set based on the contentType. the contents as a byte array
exception:
  com.ibm.webdav.WebDAVException -



getContentsInputStream
public InputStream getContentsInputStream() 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() 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 ResourceContext getContext()(Code)



getLabels
public Enumeration getLabels() throws WebDAVException(Code)
Return all the labels on this revision, not including its revision id. an Enumeration of revision labels that identify this revision
exception:
  com.ibm.webdav.WebDAVException -



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 -



getMergeCandidates
public Enumeration getMergeCandidates() throws WebDAVException(Code)
Return a list of activities on different lines of descent for this revision that are candidates for merging. Returns null if the resource is not a versioned resource. an Enumeration of Activities that specify revisionson different lines of descent.
exception:
  com.ibm.webdav.WebDAVException -



getMergePredecessors
public Enumeration getMergePredecessors() throws WebDAVException(Code)
Get the predecessors of this revision that were established by merging changes from another activity. The list may be empty. an Enumeration of Resources that are the mergepredecessors of this revision.
exception:
  com.ibm.webdav.WebDAVException -



getMetaInformation
public void getMetaInformation() 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.


exception:
  com.ibm.webdav.WebDAVException -



getMutableProperties
public Enumeration getMutableProperties() throws WebDAVException(Code)
A resource may have a number of mutable properties. These are properties that may change even when the resource is checked in. Changes to these properties does not require a new revision. an Enumeration of the mutable properties of this resource
exception:
  com.ibm.webdav.WebDAVException -



getOptions
public Element getOptions() throws WebDAVException(Code)
Get the options for this resource. Versioning options are established by the server and include:
  • Mutable/immutable revisions
  • Supports multiple activities
  • Is automatically versioned
an XML Element containing the options forthis resource
exception:
  com.ibm.webdav.WebDAVException -



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



getPredecessor
public Resource getPredecessor() throws WebDAVException(Code)
Get the predecessor of this revision. That is, get the revision from which this revision was checked out. Returns null if the Resource has no predecessor. the predecessor of this revision or null if the revisionhas no successor.
exception:
  com.ibm.webdav.WebDAVException -



getProperties
public MultiStatus getProperties() 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(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() 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 ResourceContext 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 ResourceContext providing information thatis returned by method execution.
exception:
  com.ibm.webdav.WebDAVException -



getRevisionHistory
public Document getRevisionHistory() throws WebDAVException(Code)
Get the revision history for a versioned resource. The revision history lists the revisions of a resource and their predecessors and successors. The format of the document is given in section Revision History. The document will not contain any revisions if the resource is not versioned. an XML document containing the revision history of theassociated versioned resource.
exception:
  com.ibm.webdav.WebDAVException -



getRevisionId
public String getRevisionId() throws WebDAVException(Code)
Get the system-assigned revision id for this revision. This revision name cannot be changed, and cannot be reused if this revision is deleted. Returns NULL if the resource is not versioned.

The revision id must be unique for the revision across all time. Servers may choose to use an opaque identifier consisting of a time stamp similar to UUIDs for lock tokens. the revision id of this revision of a versioned resource
exception:
  com.ibm.webdav.WebDAVException -




getStatusCode
public int getStatusCode() throws WebDAVException(Code)
Get the status code corresponding to the last method execution. the status code as defined by HTTP/1.1 and the WebDAV extensions.
exception:
  com.ibm.webdav.WebDAVException -



getStatusMessage
public String getStatusMessage() throws WebDAVException(Code)
Get the status message corresponding to the last method execution. the status message as defined by HTTP/1.1 and the WebDAV extensions.
exception:
  com.ibm.webdav.WebDAVException -



getSuccessors
public Enumeration getSuccessors() throws WebDAVException(Code)
Get the immediate successors of this revision. That is, get the revisions that were created by checking out this revision. The list may be empty. an Enumeration of Resources that aresuccessors of this revision.
exception:
  com.ibm.webdav.WebDAVException -



getTargetSelector
public TargetSelector getTargetSelector() throws WebDAVException(Code)
Get the TargetSelector that identifies this resource revision. the TargetSelector for this revision
exception:
  com.ibm.webdav.WebDAVException -



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



getWorkingResourceId
public String getWorkingResourceId() throws WebDAVException(Code)
Get the system-assigned working resource id for this revision. Returns NULL if the resource is not versioned or is not checked out.

The working resource id must be unique for all working resources of this revision. Servers may choose to use an opaque identifier consisting of a time stamp similar to UUIDs for lock tokens. the working resource id of this working resource of a revision ofa versioned resource
exception:
  com.ibm.webdav.WebDAVException -




getWorkingResources
public Enumeration getWorkingResources() throws WebDAVException(Code)
Get the current working resources of this revision. Returns an empty Enumeration if this revision has no current working resources. Returns null if this resource is not a revision. An Enumeration of current working resources of this VersionedResource
exception:
  com.ibm.webdav.WebDAVException -



initialize
protected void initialize(URL url, TargetSelector targetSelector) throws WebDAVException(Code)
Initialize this collection instance. Make sure the URL ends in a '/'.



isAutomaticallyVersioned
public boolean isAutomaticallyVersioned() throws WebDAVException(Code)
A resource can be automatically versioned on each method that updates its state (content or properties). Non-versioning aware clients use automatic versioning to support updates. If a resource is not automatically versioned, attempts to update the revision without explicitly checking it out first will fail. true if this resource is automatically versioned,false if not.
exception:
  com.ibm.webdav.WebDAVException -



isCheckedOut
public boolean isCheckedOut(Activity activity) throws WebDAVException(Code)
Return true if this revision is checked out in the given activity. The activity may be null to see if the revision was checked out without using an activity.
Parameters:
  activity - the Activity to check for boolean return true if this revision is checked out in thegiven activity
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 -



isLabeledWith
public boolean isLabeledWith(String label) throws WebDAVException(Code)
Return true if any revision of this versioned resource is labeled with the given label
Parameters:
  label - the label to check true if this revision is labeled with the given label
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



isMutable
public boolean isMutable() throws WebDAVException(Code)
Return true if this revision is mutable. That is, it was checked in as a mutable revision. Mutable revisions may be checked in overwriting the contents of the revision with the contents of the checked out working resource. This allows users to make pdates that do not require a new revision.

An immutable revision can never be made mutable, but a new revision can be. A mutable revision can be made immutable by checking it out in place and checking it back is as immutable. an XML document describing the differences betweenthe given resource and this resource
exception:
  com.ibm.webdav.WebDAVException -




isVersioned
boolean isVersioned() throws WebDAVException(Code)
Return true if this resource is a versioned resource. A versioned resource has multiple revisions and a revision history. true if this resource is a versioned resource, false otherwise
exception:
  com.ibm.webdav.WebDAVException -



lock
public MultiStatus lock(Document document) throws WebDAVException(Code)
Exclusively write Lock this resource for all time. detailed information about the lock status of this resource. A MultiStatuscontaining lockdiscovery properties.An ActiveLock may be constructed by accessing the lockdiscovery element(s) of thereturned MultiStatus in order to obtain information about the lock. a MultiStatus containing a lockdiscovery property indicatingthe results of the lock operation.
exception:
  com.ibm.webdav.WebDAVException -



lock
public MultiStatus lock(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 -



move
public MultiStatus move(String destinationURL) throws WebDAVException(Code)
Move this resource to the destination URL. The destination resource must not already exist. Partial results are possible, check the returned status for details
Parameters:
  destinationURL - the destination the status of the move operation for each resource moved
exception:
  com.ibm.webdav.WebDAVException -



move
public MultiStatus move(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 -



performWith
public byte[] performWith(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(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 -



removeLabel
public void removeLabel(String label) throws WebDAVException(Code)
Remove a label from a revision. An exception is raised if the revision does not have this label.

A revision does not need to be checked out to add a label.
Parameters:
  label - the label to add to the labels used to identifythis revision
exception:
  com.ibm.webdav.WebDAVException -




removeProperties
public MultiStatus removeProperties(PropertyName[] names) throws WebDAVException(Code)
Remove properties from a resource.
Parameters:
  names - an array of property names
exception:
  com.ibm.webdav.WebDAVException -



removeProperty
public void removeProperty(PropertyName name) throws WebDAVException(Code)
Remove a property from a resource.
Parameters:
  name - the property name
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.

deprecated: Use the setContents method that takes content type as a parameter.
Parameters:
  value - the new contents for the resource
exception:
  com.ibm.webdav.WebDAVException -




setContents
public void setContents(byte[] value, String mimetype) 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
Parameters:
  mimetype - the mimetype of the new contents
exception:
  com.ibm.webdav.WebDAVException -



setProperties
public MultiStatus setProperties(PropertyName[] names, Element[] values) throws WebDAVException(Code)
Set properties of a resource.
Parameters:
  names - an array of property names
Parameters:
  values - an array of property value a MultiStatus indicating the result of the update
exception:
  com.ibm.webdav.WebDAVException -



setProperties
public MultiStatus setProperties(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 -



setProperty
public void setProperty(PropertyName name, Element value) throws WebDAVException(Code)
Set a property of a resource to a value.
Parameters:
  name - the property name
Parameters:
  value - the property value
exception:
  com.ibm.webdav.WebDAVException -



setRequestContext
public void setRequestContext(HTTPHeaders value) throws WebDAVException(Code)
Set the request context for this resource. The context contains information used by methods on a resource. This method is provided for implementation reasons and would generally not be used by client applications.
exception:
  com.ibm.webdav.WebDAVException -



setResponseContext
public void setResponseContext(HTTPHeaders value) throws WebDAVException(Code)
Set the response context for this resource. The context contains information returned from methods on a resource. This method is provided for implementation reasons and would generally not be used by client applications.
exception:
  com.ibm.webdav.WebDAVException -



setStatusCode
public void setStatusCode(int value) throws WebDAVException(Code)
Set the status code corresponding to the last method execution.
exception:
  com.ibm.webdav.WebDAVException -



toString
public String toString()(Code)
Get a String representation of this resource. the URL of this Resource



unlock
public MultiStatus unlock(String lockToken) throws WebDAVException(Code)
Unlock the lock identified by the lockToken on this resource. The request context must contain the proper authorization.
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 -



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.