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 Jason Harrop <jh...@bigpond.net.au> on 2001/02/21 01:36:55 UTC

Default properties for file types

Hi all

I would like to be able have a default property that applies to a 
certain type of file.  An example would be that there would be a 
property which specifies the default transformation to apply to an XML file.

I was wondering whether i could do this with the new default properties 
code.

It seems to me that to do so, the files would have to have some 
classname other than the usual SubjectNode.  Then the question becomes, 
when a user PUTs a file using the Slide Webdav servlet, how to create 
the file with the correct role, without hacking the webdav servlet to 
get it right?

Thanks

Jason


Re: Default properties for file types

Posted by Remy Maucherat <re...@apache.org>.
> Remy said:
>
> > Conditional processing is an important feature, but to be really
flexible it
> > has to use the same kind of semantics that approvals and notifications
will
> > use (read : be a user defined process).
> >
> > In the meantime, it would probably be a good idea to define a simple
> > specialized filter API for the WebDAV servlet (probably a set of
interfaces
> > would do). What do you think ?
>
> Remy, could you please explain in general terms what the filter API
> might be able to do? thanks .. Jason

I would put in methods like :

    void filterContent(SlideToken token, Namespace namespace,
                       NamespaceConfig namespaceConfig,
                       NodeRevisionDescriptors revisionDescriptors,
                       NodeRevisionDescriptor revisionDescriptor,
                       NodeRevisionContent revisionContent);

That method will be called (for all registered filters) just before storing
(or creating) content in the Store. Filters will be declared in Domain.xml.

I'm waiting for feedback on this, and in particular what kind of additional
methods would be needed.

Remy

Note : Since the filter would get the namespace as a parameter, it has to be
trusted code. The namespace is given as a parameter so that the filter can
access other objects as needed. I don't know if that functionality is really
needed.


Re: Default properties for file types

Posted by Jason Harrop <jh...@bigpond.net.au>.
Remy said:

> Conditional processing is an important feature, but to be really flexible it
> has to use the same kind of semantics that approvals and notifications will
> use (read : be a user defined process).
> 
> In the meantime, it would probably be a good idea to define a simple
> specialized filter API for the WebDAV servlet (probably a set of interfaces
> would do). What do you think ?

Remy, could you please explain in general terms what the filter API 
might be able to do? thanks .. Jason


Re: Default properties for file types

Posted by Remy Maucherat <re...@apache.org>.
> Hi all
>
> I would like to be able have a default property that applies to a
> certain type of file.  An example would be that there would be a
> property which specifies the default transformation to apply to an XML
file.
>
> I was wondering whether i could do this with the new default properties
> code.
>
> It seems to me that to do so, the files would have to have some
> classname other than the usual SubjectNode.  Then the question becomes,
> when a user PUTs a file using the Slide Webdav servlet, how to create
> the file with the correct role, without hacking the webdav servlet to
> get it right?

If you need that right here right now, I would suggest to hack the WebDAV
servlet (since it should be easy to do).

Conditional processing is an important feature, but to be really flexible it
has to use the same kind of semantics that approvals and notifications will
use (read : be a user defined process).

In the meantime, it would probably be a good idea to define a simple
specialized filter API for the WebDAV servlet (probably a set of interfaces
would do). What do you think ?

Remy