juergen     02/03/20 06:21:42

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        PropertyHelper.java
  Log:
  Fixed bug in method computeVersionHistory().
  Methods compute..Property() and getProperty() now throws JDOMException.
  (ralf)
  
  Revision  Changes    Path
  1.8       +20 -12    
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java
  
  Index: PropertyHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PropertyHelper.java       13 Mar 2002 09:16:50 -0000      1.7
  +++ PropertyHelper.java       20 Mar 2002 14:21:41 -0000      1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
 1.7 2002/03/13 09:16:50 juergen Exp $
  - * $Revision: 1.7 $
  - * $Date: 2002/03/13 09:16:50 $
  + * $Header: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
 1.8 2002/03/20 14:21:41 juergen Exp $
  + * $Revision: 1.8 $
  + * $Date: 2002/03/20 14:21:41 $
    *
    * ====================================================================
    *
  @@ -384,8 +384,9 @@
        * @throws   LinkedObjectNotFoundException
        * @throws   AccessDeniedException
        * @throws   ObjectNotFoundException
  +     * @throws   JDOMException
        */
  -    public NodeProperty getProperty(String propertyName, String resourcePath) 
throws ObjectLockedException, RevisionDescriptorNotFoundException, 
ServiceAccessException, LinkedObjectNotFoundException, AccessDeniedException, 
ObjectNotFoundException {
  +    public NodeProperty getProperty(String propertyName, String resourcePath) 
throws ObjectLockedException, RevisionDescriptorNotFoundException, 
ServiceAccessException, LinkedObjectNotFoundException, AccessDeniedException, 
ObjectNotFoundException, JDOMException {
           return getProperty(propertyName, resourcePath, null, null);
       }
       
  @@ -408,8 +409,9 @@
        * @throws   LinkedObjectNotFoundException
        * @throws   AccessDeniedException
        * @throws   ObjectNotFoundException
  +     * @throws   JDOMException
        */
  -    public NodeProperty getProperty(String propertyName, String resourcePath, 
String contextPath, String serverURL) throws ObjectLockedException, 
RevisionDescriptorNotFoundException, ServiceAccessException, 
LinkedObjectNotFoundException, AccessDeniedException, ObjectNotFoundException {
  +    public NodeProperty getProperty(String propertyName, String resourcePath, 
String contextPath, String serverURL) throws ObjectLockedException, 
RevisionDescriptorNotFoundException, ServiceAccessException, 
LinkedObjectNotFoundException, AccessDeniedException, ObjectNotFoundException, 
JDOMException {
           
           UriHandler uriHandler = UriHandler.getUriHandler(nsaToken, resourcePath);
           String uri = null;
  @@ -453,8 +455,9 @@
        * @throws   LinkedObjectNotFoundException
        * @throws   AccessDeniedException
        * @throws   ObjectNotFoundException
  +     * @throws   JDOMException
        */
  -    public NodeProperty getProperty(String propertyName, NodeRevisionDescriptors 
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor) throws 
ObjectLockedException, RevisionDescriptorNotFoundException, ServiceAccessException, 
LinkedObjectNotFoundException, AccessDeniedException, ObjectNotFoundException {
  +    public NodeProperty getProperty(String propertyName, NodeRevisionDescriptors 
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor) throws 
ObjectLockedException, RevisionDescriptorNotFoundException, ServiceAccessException, 
LinkedObjectNotFoundException, AccessDeniedException, ObjectNotFoundException, 
JDOMException {
           return getProperty(propertyName, revisionDescriptors, revisionDescriptor, 
null, null);
       }
       
  @@ -479,8 +482,9 @@
        * @throws   LinkedObjectNotFoundException
        * @throws   AccessDeniedException
        * @throws   ObjectNotFoundException
  +     * @throws   JDOMException
        */
  -    public NodeProperty getProperty(String propertyName, NodeRevisionDescriptors 
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String contextPath, 
String serverURL) throws ObjectLockedException, RevisionDescriptorNotFoundException, 
ServiceAccessException, LinkedObjectNotFoundException, AccessDeniedException, 
ObjectNotFoundException {
  +    public NodeProperty getProperty(String propertyName, NodeRevisionDescriptors 
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String contextPath, 
String serverURL) throws ObjectLockedException, RevisionDescriptorNotFoundException, 
ServiceAccessException, LinkedObjectNotFoundException, AccessDeniedException, 
ObjectNotFoundException, JDOMException {
           
           NodeProperty property = null;
           ResourceKind resourceKind = 
AbstractResourceKind.determineResourceKind(revisionDescriptor);
  @@ -513,8 +517,9 @@
        * @throws   LinkedObjectNotFoundException
        * @throws   AccessDeniedException
        * @throws   ObjectNotFoundException
  +     * @throws   JDOMException
        */
  -    public NodeProperty computeProperty(String propertyName, 
NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor 
revisionDescriptor, String contextPath, String serverURL) throws 
ObjectLockedException, RevisionDescriptorNotFoundException, ServiceAccessException, 
LinkedObjectNotFoundException, AccessDeniedException, ObjectNotFoundException {
  +    public NodeProperty computeProperty(String propertyName, 
NodeRevisionDescriptors revisionDescriptors, NodeRevisionDescriptor 
revisionDescriptor, String contextPath, String serverURL) throws 
ObjectLockedException, RevisionDescriptorNotFoundException, ServiceAccessException, 
LinkedObjectNotFoundException, AccessDeniedException, ObjectNotFoundException, 
JDOMException {
           
           NodeProperty property = null;
           if (P_SUCCESSOR_SET.equals(propertyName)) {
  @@ -605,8 +610,9 @@
        * @throws   LinkedObjectNotFoundException
        * @throws   AccessDeniedException
        * @throws   ObjectNotFoundException
  +     * @throws   JDOMException
        */
  -    public XMLValue computeVersionHistory(NodeRevisionDescriptors 
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String contextPath, 
String serverURL) throws ObjectLockedException, RevisionDescriptorNotFoundException, 
ServiceAccessException, LinkedObjectNotFoundException, AccessDeniedException, 
ObjectNotFoundException {
  +    public XMLValue computeVersionHistory(NodeRevisionDescriptors 
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String contextPath, 
String serverURL) throws ObjectLockedException, RevisionDescriptorNotFoundException, 
ServiceAccessException, LinkedObjectNotFoundException, AccessDeniedException, 
ObjectNotFoundException, JDOMException {
           
           XMLValue xmlValue = new XMLValue();
           ResourceKind resourceKind = 
AbstractResourceKind.determineResourceKind(revisionDescriptor);
  @@ -617,15 +623,17 @@
           }
           else if (resourceKind instanceof CheckedInVersionControlled) {
               Element element = new Element(E_HREF, defNamespace);
  -            String checkedInUri = 
revisionDescriptor.getProperty(P_CHECKED_IN).getValue().toString();
  +            String checkedInHref = 
revisionDescriptor.getProperty(P_CHECKED_IN).getValue().toString();
  +            String checkedInUri = ((Element)new 
XMLValue(checkedInHref).iterator().next()).getText();
               UriHandler uriHandler = UriHandler.getUriHandler(nsaToken, 
checkedInUri);
               element.setText(getAbsoluteURL(serverURL, contextPath, 
uriHandler.getAssociatedHistoryUri()));
               xmlValue.add(element);
           }
           else if (resourceKind instanceof CheckedOutVersionControlled) {
               Element element = new Element(E_HREF, defNamespace);
  -            String checkedInUri = 
revisionDescriptor.getProperty(P_CHECKED_OUT).getValue().toString();
  -            UriHandler uriHandler = UriHandler.getUriHandler(nsaToken, 
checkedInUri);
  +            String checkedOutHref = 
revisionDescriptor.getProperty(P_CHECKED_OUT).getValue().toString();
  +            String checkedOutUri = ((Element)new 
XMLValue(checkedOutHref).iterator().next()).getText();
  +            UriHandler uriHandler = UriHandler.getUriHandler(nsaToken, 
checkedOutUri);
               element.setText(getAbsoluteURL(serverURL, contextPath, 
uriHandler.getAssociatedHistoryUri()));
               xmlValue.add(element);
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to