You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Ben Switzer <be...@site85.com> on 2003/10/23 00:15:06 UTC

Intercepts

Good day.

I'm trying to create an intercept that will change the name of the file
that is being 'PUT' into my slide repository.

I have implemented the intercept fine.  The problem arises when I try to
list the contents of the directory it's placed in.

I'm changing the name in revisiondescriptor and also changing the uri to
reflect the new name in revisiondescriptors with the precontentstore
method in my intercept.

The error that is reported when I'm attempting to list the contents of
the directory is a 'Conflict' error.

Also, all references in the DB that have to do with uri or childuri
reflect the old file name.

Any ideas?

Best,
Ben



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: Intercepts

Posted by Ben Switzer <be...@site85.com>.
Hmm... that makes sense.

I'll give it a try and let you know.

Thanks,
Ben

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Martin Holz
Sent: Thursday, October 23, 2003 3:50 AM
To: slide-user@jakarta.apache.org
Subject: Re: Intercepts


Hello Ben,

"Ben Switzer" <be...@site85.com> writes:

> Good day.
> 
> I'm trying to create an intercept that will change the name of the 
> file that is being 'PUT' into my slide repository.
> 
> I have implemented the intercept fine.  The problem arises when I try 
> to list the contents of the directory it's placed in.
> 
> I'm changing the name in revisiondescriptor and also changing the uri 
> to reflect the new name in revisiondescriptors with the 
> precontentstore method in my intercept.

I think, you can't do this, since Slide doing a lot of  work with the
original uri before it calls the ContentInterceptor.Look into  
org.apache.slide.content.ContentImpl.java. You are pushing the concept
of a 
ContentInterceptor beyond its limits.Its about content, not about
structure.

You may also have problems with the client. He will be surprised not to
find the new resource, where he put it. It might be possible to address
your problem at a different place. Extend WebdavServlet, so that it
sends a redirect to the new url. I never tried 
HTTP redirects with PUT, but it might work.

--
Martin Holz     <ho...@fiz-chemie.de>

Softwareentwicklung / Vernetztes Studium - Chemie
FIZ CHEMIE Berlin
Franklinstrasse 11
D-10587 Berlin     
  


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Intercepts

Posted by Martin Holz <ho...@fiz-chemie.de>.
Hello Ben,

"Ben Switzer" <be...@site85.com> writes:

> Good day.
> 
> I'm trying to create an intercept that will change the name of the file
> that is being 'PUT' into my slide repository.
> 
> I have implemented the intercept fine.  The problem arises when I try to
> list the contents of the directory it's placed in.
> 
> I'm changing the name in revisiondescriptor and also changing the uri to
> reflect the new name in revisiondescriptors with the precontentstore
> method in my intercept.

I think, you can't do this, since Slide doing a lot of  work with
the original uri before it calls the ContentInterceptor.Look into  
org.apache.slide.content.ContentImpl.java. You are pushing the concept of a 
ContentInterceptor beyond its limits.Its about content, not about structure.

You may also have problems with the client. He will be surprised not to find the new resource,
where he put it. It might be possible to address your problem at a different place.
Extend WebdavServlet, so that it sends a redirect to the new url. I never tried 
HTTP redirects with PUT, but it might work.

--
Martin Holz     <ho...@fiz-chemie.de>

Softwareentwicklung / Vernetztes Studium - Chemie
FIZ CHEMIE Berlin
Franklinstrasse 11
D-10587 Berlin     
  


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org