Hi
I'm trying to delete an attachment using Groovy script. I've used
com.xpn.xwiki.doc.XWikiDocument.deleteAttachment(att, context);
but get error indicating a type mismatch. According to
http://www.docjar.com/docs/api/com/xpn/xwiki/doc/XWikiDocument.html
<http://www.docjar.com/docs/api/com/xpn/xwiki/doc/XWikiDocument.html>
arguments should be XWikiAttachment
<http://www.docjar.com/docs/api/com/xpn/xwiki/doc/XWikiAttachment.html>
, com.xpn.xwiki.XWikiContext
<http://www.docjar.com/docs/api/com/xpn/xwiki/XWikiContext.html> which
I think I'm using (see error msg below).
Can anyone point my error? Is this v1.8 method?
Wrapped Exception: No signature of method
com.xpn.xwiki.doc.XWikiDocument.deleteAttachment() is applicable for
argument types: (com.xpn.xwiki.doc.XWikiAttachment,
com.xpn.xwiki.XWikiContext) values:
{com.xpn.xwiki.doc.XWikiAttachment@3c550b,
["msg":com.xpn.xwiki.web.XWikiMessageTool@401ab1,
"stats_newcookie":false,
"stats_cookie":javax.servlet.http.Cookie@986d0e,
"tdoc":Patterns.UseMyStuff,
"org.xwiki.component.manager.ComponentManager":org.xwiki.plexus.manager.
PlexusComponentManager@457b62, "ajax":false, "locale":en,
"doc":Patterns.UseMyStuff, "mainxwiki":"xwiki",
"vcontext":org.apache.velocity.VelocityContext@11fe9d5]}
Ajdin
--------------------------------------------------------
NOTICE
This message and any files transmitted with it is intended for the addressee only and may
contain information that is confidential or privileged. Unauthorised use is strictly
prohibited. If you are not the addressee, you should not read, copy, disclose or otherwise
use this message, except for the purpose of delivery to the addressee.
Any views or opinions expressed within this e-mail are those of the author and do not
necessarily represent those of Coventry University.