Thank you very much for the suggesstons, Christopher .
But my doubts remain:, following my observations:

Christopher Lenz wrote:
> Luca Zago wrote:
> 
>>
>> Hi,
>> - has somebody ever created a template to associate to webDav servlet?
>> In my opinion it's a tricky..because it does only a forward....then the
>> only solution for the template is building
>> another servlet..with different html format..inside.
> 
> 
> I don't understand. Could you try to explain why it's a problem that the 
> webdav-servlet forwards to the template? You can forward to a JSP-page 
> that uses the Slide taglib as a template, for example.
---> Sure I can do it, but I wonder in that case what is the utility of 
the webDav servlet. In the sense that all the permissions checking must 
be done by taglib in the page. Instead using the standard servlet these 
cheking is done by the servlet itself..and the result are the files you 
really can access.
I am evaluating the possibility to rewrite this servlet to templatize 
the static HTML code hard coded inside.
> 
>> - And what about creating new roles? when I create a user with a new
>> role I got the error:
>>
>> Sep 2002 19:34:25 - org.apache.slide.common.Domain - WARNING - Service 
>> slidestore.reference.JDBCDescriptorsStore@88df60 access error : 
>> mypackage.acl.slide.roles.SlideEditorImpl
>> org.apache.slide.common.ServiceAccessException: Service 
>> slidestore.reference.JDBCDescriptorsStore@88df60 access error : 
>> mypackage.acl.slide.roles.
>> SlideEditorImpl
> 
> 
> Make sure that class (SlideEditorImpl) is public and not abstract, i.e. 
> it must be instantiatable from outside the mypackage.acl.slide.riles 
> package.
> 
> In addition, it needs to extend ObjectNode, and have a constructor that 
> matches the one in ObjectNode. I.e. it should look like:
> 
> public class SlideEditorImpl extends SubjectNode {
> 
>   public SlideEditorImpl(String uri, Vector children, Vector links) {
>     super(uri, children, links);
>   }
> 
>   [...]
> 
> }

My class is exactly as you wrote :)
then in the Domain.xml I added:

<role name="editor">mypackage.acl.slide.roles.SlideEditorImpl </role>

the code to create the user is:

  ObjectNode object = (ObjectNode)(Class.forName(ROLE_PACKAGE + 
info.getRole())).newInstance();
                       structure.create(slideToken, object, strUri);
                       NodeRevisionDescriptor revision =  new 
NodeRevisionDescriptor(0);
                       revision.setProperty(new 
NodeProperty("resourcetype", "<collection/>",true));
                       revision.setCreationDate(new Date());
                       revision.setLastModified(new Date());
                       revision.setProperty(
         new NodeProperty("getcontentlength", "0", true));
                       revision.setProperty(
                        new NodeProperty("source", "", true));
                       revision.setProperty(
                          new NodeProperty("password",info.getPassword(),
                                          NodeProperty.SLIDE_NAMESPACE));

        content.create(getSlideToken(), strUri, revision,null);


The Errror is thrown by the last method call..at the content creation.
Thank you again,

Luca




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

Reply via email to