LOCK method - lock type.
Hi there! I've noticed that the LOCK method in Slide 2.1 distinguishes between "write" and "transaction" lock types. WebDAV spec defines just the "write" lock type, afaik, so what's the semantics of the "transaction" lock type? Thanks. Yours sincerely, Andrey. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to retrieve different versions of a resource?
Guys, Can anyone suggest a way to retrieve different versions of a file stored in slide using Webdav client API? (org.apache.webdav.*) I can see a versionControlMethod , but do not know what it does. Any help is greatly appreciated. Thanks, Narinder
Re: sending emails using exchange and slide ?
Mark Breitner wrote: does anyone of you know how to send emails with slide ? Hmm... Slide is a repository kernel and WebDAV client/server library [*], so I think your chances are slim to actually send e-mails with Slide. :-) You probably want to go here: http://java.sun.com/products/javamail/ Regards, Martin [*] For the full "what is Slide?" see homepage http://jakarta.apache.org/slide/, section "Overview". - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where are the acls for the /slide/ object stored
There sould be an section in the metadata xml files like the following: Stefan Michael Oliver wrote: I am using the TxXMLFileDescriptorsStore and I was using the command line line to set an acl when I inadvertently granted read-acl on /slide/ to all. The how is that I was navigating around granting permissions and got distracted and was at /slide/ and didn't realize it. Now when I do acl on anything I see granted to all (not protected) (inherited from '/slide/') DAV:read-acl and denied to all (not protected) (inherited from '/slide/') DAV:read-acl revoke doesn't have any affect Where are the acls stored in xml for /slide/ so I can fix more directly? Michael Oliver CTO Alarius Systems LLC 3325 N. Nellis Blvd, #1 Las Vegas, NV 89115 Phone:(702)643-7425 Fax:(702)974-0341 *Note new email changed from [EMAIL PROTECTED] -Original Message- From: Clive Borrageiro [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 09, 2005 8:35 AM To: 'Slide Users Mailing List' Subject: RE: failed to programatically upload file Hi Zoltan, That is correct! I have found that Slide is not clearly documented; but under the roadmap link on the website; slide documentation, snippets, tutorials etc. is in progress. Hope that will shed some light on slide! The problem I have encountered is large file transfer! (files > 2GB) I have applied the patch from Onion networks but I am still having issues. So if anyone has done large file (> 2GB) uploads & downloads using Jetty & Slide; please throw any suggestions my way! Thanks, Clive -Original Message- From: Zoltan [mailto:[EMAIL PROTECTED] Sent: 09 February 2005 06:23 PM To: 'Slide Users Mailing List' Subject: RE: failed to programatically upload file Hello Clive, I followed your suggestion and it worked! Thanks a lot. So the wdr.putMethod(fileName) will work only if passed the complete URL to the Slide server concatenated with the name of the file to upload? If yes, this is not very clearly documented... Regards, Zoltan Hi, I had the same problem; try doing the following: File fn = new File(fileName); String path = "http://localhost:8080/slide/files/"; + fn.getName(); wdr.putMethod(path, fn); Hope that helps! Clive Hello, I have downloaded and deployed slide.war to my Jboss 4.0.1 deploy folder (under Windows XP SP1). On the client side, I have jakarta-slide-webdavlib-2.1.jar in my build path. I've tried to upload a file using the following snippet of code: try { HttpURL hrl = new HttpURL(url); WebdavResource wdr = new WebdavResource(hrl); File fn = new File(fileName); wdr.putMethod(fn); wdr.close(); } catch(MalformedURLException mue) { String msg = "(UploadFile) execute : wrong fileName passed: " + fileName; log.debug (msg, mue); } catch(HttpException he) { String msg = "(UploadFile) execute : HTTP exception occured "; log.debug (msg, he); } catch(IOException ioe) { String msg = "(UploadFile) execute : IO exception occured "; log.debug (msg, ioe); } At run-time the url passed is : http://localhost:8080/slide/files and the fileName is /DJ/images/16.jpg (the correct location of the file on my local machine). The upload fails and I see the following on the Jboss console: 12:05:31,359 INFO [STDOUT] http-0.0.0.0-8080-Processor24, 08-Feb-2005 12:05:31, unauthenticated, PROPFIND, 207 "Multi-Status", 31 ms, /files 12:05:31,578 INFO [STDOUT] http-0.0.0.0-8080-Processor24, 08-Feb-2005 12:05:31, unauthenticated, PUT, 403 "Forbidden", 0 ms, /files I read some articles about authentication problems with Slide and, as a result, I have modified the domain.xml file like: http://jakarta.apache.org/slide/"; name="password"/> http://jakarta.apache.org/slide/"; name="password"/> http://jakarta.apache.org/slide/"; name="password"/> http://jakarta.apache.org/slide/"; name="password"/> Note: I don't have any problems in uploading the same file using the slide client: [LOCALHOST:/slide/files/] C:\jakarta-slide-webdavclient-bin-2.1\bin $ put /dj/images/16.jpg Could anyone tell me what do I do wrong?
Re: full text search
If you are using the version from cvs head you might try the LuceneContentIndexer. For some details see http://wiki.apache.org/jakarta-slide/DaslConfiguration. Stefan Ethem YUKSEL wrote: hi to all again:)) does anybody know how to perform full text search with slide? thank you very much for your help. kind regards ethem yuksel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Stefan Lützkendorf -- [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
sending emails using exchange and slide ?
Hi, does anyone of you know how to send emails with slide ? I`ve read, I have to look for the Exchange mail submission URI. I think I found it but now i don´t know how to use this URI to send emails. Who can help me out ? bye, Mark B. -- Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
full text search
hi to all again:)) does anybody know how to perform full text search with slide? thank you very much for your help. kind regards ethem yuksel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Sending emails with slide ?
Hi, does anyone of you know how to send emails with slide ? I`ve read, I have to look for the Exchange mail submission URI. I think I found it but now i don´t know how to use this URI to send emails. Who can help me out ? bye, Mark B. -- Sparen beginnt mit GMX DSL: http://www.gmx.net/de/go/dsl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: creating users with a name
Yes, it works I had a 403 forbidden error because my custom jaas login module did not load the role "user" for the newly created user. -Message d'origine- De : Laurent Michenaud [mailto:[EMAIL PROTECTED] Envoyé : vendredi 8 avril 2005 15:10 À : Slide Users Mailing List; [EMAIL PROTECTED] Objet : RE: creating users with a name I have tested. The users is created but i get 403 forbidden error. I think the ACL are not set up correctly. How can I do that ? -Message d'origine- De : Paul Hussein [mailto:[EMAIL PROTECTED] Envoyé : vendredi 8 avril 2005 10:05 À : Slide Users Mailing List Objet : Re: creating users with a name http://jakarta.apache.org/slide/howto-create-users.html http://jakarta.apache.org/slide/howto-acl.html Have a look at the projector code. It shows how to do it. import java.util.List; import java.util.Iterator; import java.util.Vector; import java.util.Enumeration; import java.io.InputStream; import org.apache.commons.httpclient.HttpConnection; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.HttpState; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.protocol.Protocol; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.methods.GetMethod; // import org.apache.commons.i18n.LocalizedError; import org.apache.webdav.lib.Property; import org.apache.webdav.lib.PropertyName; import org.apache.webdav.lib.methods.PropPatchMethod; import org.apache.webdav.lib.methods.PropFindMethod; import org.apache.slide.projector.value.URIValue; import org.apache.slide.projector.value.XMLValue; import org.apache.slide.projector.value.ElementValue; import org.jdom.Element; import org.jdom.output.Format; import org.jdom.input.DOMBuilder; import org.jdom.output.XMLOutputter; import java.io.IOException; import org.apache.webdav.lib.methods.MkcolMethod; /** * @author paulh * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */ public class SlideUser { private Credentials credentials = null; private String host = null; private int port = 0; private static final String domain = "/slide"; private static final String users = "/users/"; private static final String SLIDE_NAMESPACE = "http://jakarta.apache.org/slide/";; private static final String DAV_NAMESPACE = "DAV:"; // Exceptions public class NotFoundException extends Exception { public NotFoundException(String s) { super(s); } } public class AccessDeniedException extends Exception { public AccessDeniedException(String s) { super(s); } } public class WebdavException extends Exception { public WebdavException(String s) { super(s); } } public SlideUser(String username, String password, String host, int port) { this.credentials = new UsernamePasswordCredentials(username, password); this.port = port; this.host = host; } public void createUser(String username, String password) throws Exception { URIValue userUri = new URIValue("/users/" + username); MkcolMethod mkcolMethod = new MkcolMethod("/slide" + userUri); mkcolMethod.setDoAuthentication(true); HttpState httpState = new HttpState(); httpState.setCredentials(null, host, this.credentials); int state; try { state = mkcolMethod.execute(httpState, new HttpConnection(host, port, Protocol.getProtocol("http"))); if (state == HttpStatus.SC_CREATED) { System.out.println("Created"); changePassword(userUri, null, password); } else if (state == HttpStatus.SC_FORBIDDEN) { System.err.println("Forbidden"); } } catch (IOException e) { System.err.println(e.toString()); } } public void changePassword(URIValue uri, String oldPassword, String newPassword) throws Exception { System.out.println("SlideUser.changePassword : " + uri); setProperty(uri, SLIDE_NAMESPACE, "password", newPassword, this.credentials); } public void addRole(URIValue user, URIValue role) throws Exception { XMLValue membersElement = getPropertyAsXMLValue(role, DAV_NAMESPACE, "group-member-set", credentials); // remove member from role to avoid double membership removeRole(membersElement.getRootElement().getChildren(), domain + user); Element newUserElement = new Element("href", "DAV:"); newUserElement.addContent(user.toString()); membersElement.getRootElement().addContent(newUserElement); XMLOutputter xout = new XMLOutputter(Format.getCompactFormat()); Strin
RE: creating users with a name
I have tested. The users is created but i get 403 forbidden error. I think the ACL are not set up correctly. How can I do that ? -Message d'origine- De : Paul Hussein [mailto:[EMAIL PROTECTED] Envoyé : vendredi 8 avril 2005 10:05 À : Slide Users Mailing List Objet : Re: creating users with a name http://jakarta.apache.org/slide/howto-create-users.html http://jakarta.apache.org/slide/howto-acl.html Have a look at the projector code. It shows how to do it. import java.util.List; import java.util.Iterator; import java.util.Vector; import java.util.Enumeration; import java.io.InputStream; import org.apache.commons.httpclient.HttpConnection; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.HttpState; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.protocol.Protocol; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.methods.GetMethod; // import org.apache.commons.i18n.LocalizedError; import org.apache.webdav.lib.Property; import org.apache.webdav.lib.PropertyName; import org.apache.webdav.lib.methods.PropPatchMethod; import org.apache.webdav.lib.methods.PropFindMethod; import org.apache.slide.projector.value.URIValue; import org.apache.slide.projector.value.XMLValue; import org.apache.slide.projector.value.ElementValue; import org.jdom.Element; import org.jdom.output.Format; import org.jdom.input.DOMBuilder; import org.jdom.output.XMLOutputter; import java.io.IOException; import org.apache.webdav.lib.methods.MkcolMethod; /** * @author paulh * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */ public class SlideUser { private Credentials credentials = null; private String host = null; private int port = 0; private static final String domain = "/slide"; private static final String users = "/users/"; private static final String SLIDE_NAMESPACE = "http://jakarta.apache.org/slide/";; private static final String DAV_NAMESPACE = "DAV:"; // Exceptions public class NotFoundException extends Exception { public NotFoundException(String s) { super(s); } } public class AccessDeniedException extends Exception { public AccessDeniedException(String s) { super(s); } } public class WebdavException extends Exception { public WebdavException(String s) { super(s); } } public SlideUser(String username, String password, String host, int port) { this.credentials = new UsernamePasswordCredentials(username, password); this.port = port; this.host = host; } public void createUser(String username, String password) throws Exception { URIValue userUri = new URIValue("/users/" + username); MkcolMethod mkcolMethod = new MkcolMethod("/slide" + userUri); mkcolMethod.setDoAuthentication(true); HttpState httpState = new HttpState(); httpState.setCredentials(null, host, this.credentials); int state; try { state = mkcolMethod.execute(httpState, new HttpConnection(host, port, Protocol.getProtocol("http"))); if (state == HttpStatus.SC_CREATED) { System.out.println("Created"); changePassword(userUri, null, password); } else if (state == HttpStatus.SC_FORBIDDEN) { System.err.println("Forbidden"); } } catch (IOException e) { System.err.println(e.toString()); } } public void changePassword(URIValue uri, String oldPassword, String newPassword) throws Exception { System.out.println("SlideUser.changePassword : " + uri); setProperty(uri, SLIDE_NAMESPACE, "password", newPassword, this.credentials); } public void addRole(URIValue user, URIValue role) throws Exception { XMLValue membersElement = getPropertyAsXMLValue(role, DAV_NAMESPACE, "group-member-set", credentials); // remove member from role to avoid double membership removeRole(membersElement.getRootElement().getChildren(), domain + user); Element newUserElement = new Element("href", "DAV:"); newUserElement.addContent(user.toString()); membersElement.getRootElement().addContent(newUserElement); XMLOutputter xout = new XMLOutputter(Format.getCompactFormat()); String groupMemberSet = xout.outputString(membersElement .getRootElement().getContent()); setProperty(role, DAV_NAMESPACE, "group-member-set", groupMemberSet, this.credentials); } public void removeRole(URIValue user, URIValue role, Credentials credentials) throws Exception { XML
Re: Problems creating Objects
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Kalén schrieb: | Volker Cordes wrote: | |> I want to use slide without the webdav servlet. I wrote a little |> program to test the installation. But when creating new objects I |> only get Exceptions. | | | We ran into similar problems. I don't know if it is a bug or | feature, but we decided to call it Slide evil-bit since it was so | "evil" to find out. ;-) | | Insert "evilBit();" call before this line (and anywhere before | starting TX with nat.begin if the transaction contains a structure | creation call): | |> token.begin(); | | | Function specification: | | private void evilBit() { /* From webdavservlet (mkCol) * "Prevent | dirty reads" */ m_slideToken.setForceStoreEnlistment(true); | | /* JavaDoc for above: * Force store enlistment flag mutator. * If | set to true, that will cause Slide to enlist the store * in the | current transaction for all operations, to be able * to prevent | dirty reads when doing complex updates. * That value should be set | to true only in some very specific * critical sections of the code, | as this would greatly decrease * the ability of Slide to handle | multiple concurrent requests. */ } | | NB: I am not a Slide developer! This is just something a colleague | of mine found out and that worked for us. | | I would be happy if someone else could explain this in detail or | comment if it is the endorsed "Slide kernel-way" of doing things. Hello, that helped, now it works. Thank you, Volker -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCVnhMzMGplDINzKMRAmzNAKCT34ZFcZEigURLSJdjGJ7G2HYDIgCfa9RE JjTxTgbWQ/eZL3YsiXFiWaA= =Wnhn -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems creating Objects
Volker Cordes wrote: I want to use slide without the webdav servlet. I wrote a little program to test the installation. But when creating new objects I only get Exceptions. We ran into similar problems. I don't know if it is a bug or feature, but we decided to call it Slide evil-bit since it was so "evil" to find out. ;-) Insert "evilBit();" call before this line (and anywhere before starting TX with nat.begin if the transaction contains a structure creation call): token.begin(); Function specification: private void evilBit() { /* From webdavservlet (mkCol) * "Prevent dirty reads" */ m_slideToken.setForceStoreEnlistment(true); /* JavaDoc for above: * Force store enlistment flag mutator. * If set to true, that will cause Slide to enlist the store * in the current transaction for all operations, to be able * to prevent dirty reads when doing complex updates. * That value should be set to true only in some very specific * critical sections of the code, as this would greatly decrease * the ability of Slide to handle multiple concurrent requests. */ } NB: I am not a Slide developer! This is just something a colleague of mine found out and that worked for us. I would be happy if someone else could explain this in detail or comment if it is the endorsed "Slide kernel-way" of doing things. Regards, Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: creating users with a name
http://jakarta.apache.org/slide/howto-create-users.html http://jakarta.apache.org/slide/howto-acl.html Have a look at the projector code. It shows how to do it. import java.util.List; import java.util.Iterator; import java.util.Vector; import java.util.Enumeration; import java.io.InputStream; import org.apache.commons.httpclient.HttpConnection; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.HttpState; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.protocol.Protocol; import org.apache.commons.httpclient.Header; import org.apache.commons.httpclient.methods.GetMethod; // import org.apache.commons.i18n.LocalizedError; import org.apache.webdav.lib.Property; import org.apache.webdav.lib.PropertyName; import org.apache.webdav.lib.methods.PropPatchMethod; import org.apache.webdav.lib.methods.PropFindMethod; import org.apache.slide.projector.value.URIValue; import org.apache.slide.projector.value.XMLValue; import org.apache.slide.projector.value.ElementValue; import org.jdom.Element; import org.jdom.output.Format; import org.jdom.input.DOMBuilder; import org.jdom.output.XMLOutputter; import java.io.IOException; import org.apache.webdav.lib.methods.MkcolMethod; /** * @author paulh * * TODO To change the template for this generated type comment go to Window - * Preferences - Java - Code Style - Code Templates */ public class SlideUser { private Credentials credentials = null; private String host = null; private int port = 0; private static final String domain = "/slide"; private static final String users = "/users/"; private static final String SLIDE_NAMESPACE = "http://jakarta.apache.org/slide/";; private static final String DAV_NAMESPACE = "DAV:"; // Exceptions public class NotFoundException extends Exception { public NotFoundException(String s) { super(s); } } public class AccessDeniedException extends Exception { public AccessDeniedException(String s) { super(s); } } public class WebdavException extends Exception { public WebdavException(String s) { super(s); } } public SlideUser(String username, String password, String host, int port) { this.credentials = new UsernamePasswordCredentials(username, password); this.port = port; this.host = host; } public void createUser(String username, String password) throws Exception { URIValue userUri = new URIValue("/users/" + username); MkcolMethod mkcolMethod = new MkcolMethod("/slide" + userUri); mkcolMethod.setDoAuthentication(true); HttpState httpState = new HttpState(); httpState.setCredentials(null, host, this.credentials); int state; try { state = mkcolMethod.execute(httpState, new HttpConnection(host, port, Protocol.getProtocol("http"))); if (state == HttpStatus.SC_CREATED) { System.out.println("Created"); changePassword(userUri, null, password); } else if (state == HttpStatus.SC_FORBIDDEN) { System.err.println("Forbidden"); } } catch (IOException e) { System.err.println(e.toString()); } } public void changePassword(URIValue uri, String oldPassword, String newPassword) throws Exception { System.out.println("SlideUser.changePassword : " + uri); setProperty(uri, SLIDE_NAMESPACE, "password", newPassword, this.credentials); } public void addRole(URIValue user, URIValue role) throws Exception { XMLValue membersElement = getPropertyAsXMLValue(role, DAV_NAMESPACE, "group-member-set", credentials); // remove member from role to avoid double membership removeRole(membersElement.getRootElement().getChildren(), domain + user); Element newUserElement = new Element("href", "DAV:"); newUserElement.addContent(user.toString()); membersElement.getRootElement().addContent(newUserElement); XMLOutputter xout = new XMLOutputter(Format.getCompactFormat()); String groupMemberSet = xout.outputString(membersElement .getRootElement().getContent()); setProperty(role, DAV_NAMESPACE, "group-member-set", groupMemberSet, this.credentials); } public void removeRole(URIValue user, URIValue role, Credentials credentials) throws Exception { XMLValue membersElement = getPropertyAsXMLValue(role, DAV_NAMESPACE, "group-member-set", credentials); removeRole(membersElement.getRootElement().getChildren(), domain + user); XMLOutputter xout = new XMLOutputter(Format.getCompactFormat()); String groupMemberSet = xout.outputString(membersElement .getRootElement().getContent()); setProperty(role, DAV
creating users with a name
Hi to all, do i have a chance to create a user at the run time? i don't want to add the user to Domain.xml. instead when a user logins into my application i want to create a slide user for it. any help will be appreciated. kid regards... ethem yuksel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]