[xwiki-devs] [Proposal] Depricate WysiwygService::officeToXHTML(pageName, cleaningParams) method
Hi Devs, Currently the method signature looks like: public String officeToXHTML(String pageName, Map<String, String> cleaningParams) throws XWikiGWTException The contract is that this method will import whatever the "latest" attachment to the given document into xhtml. This is bit unsafe and we have a better option of using com.xpn.xwiki.wysiwyg.client.util.Attachment instead. So the new method that would be introduced is: public String officeToXHTML(Attachment attachment, Map<String, String> cleaningParams) throws XWikiGWTException; This is more clean, expressive and safe. WDYT? - Asiri
On 10/07/2009 12:52 PM, Asiri Rathnayake wrote:
Hi Devs,
Currently the method signature looks like:
public String officeToXHTML(String pageName, Map<String, String> cleaningParams) throws XWikiGWTException
The contract is that this method will import whatever the "latest" attachment to the given document into xhtml. This is bit unsafe and we have a better option of using com.xpn.xwiki.wysiwyg.client.util.Attachment instead.
And a workaround to get the correct name of the uploaded file (since it's not the same as the file on disk, because of cleanup). +1 Happy hacking, Anca
So the new method that would be introduced is:
public String officeToXHTML(Attachment attachment, Map<String, String> cleaningParams) throws XWikiGWTException;
This is more clean, expressive and safe.
WDYT?
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi Anca, On Wed, Oct 7, 2009 at 3:41 PM, Anca Paula Luca <[email protected]>wrote:
On 10/07/2009 12:52 PM, Asiri Rathnayake wrote:
Hi Devs,
Currently the method signature looks like:
public String officeToXHTML(String pageName, Map<String, String> cleaningParams) throws XWikiGWTException
The contract is that this method will import whatever the "latest" attachment to the given document into xhtml. This is bit unsafe and we have a better option of using com.xpn.xwiki.wysiwyg.client.util.Attachment instead.
And a workaround to get the correct name of the uploaded file (since it's not the same as the file on disk, because of cleanup).
Yes, I plan to use AbstractFileUploadWizardStep which internally uses WysiwygService::getAttachment(String wikiName, String spaceName, String pageName, String attachmentName):Attachment; method which you have added ;) Thanks. - Asiri
+1
Happy hacking, Anca
So the new method that would be introduced is:
public String officeToXHTML(Attachment attachment, Map<String, String> cleaningParams) throws XWikiGWTException;
This is more clean, expressive and safe.
WDYT?
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Asiri Rathnayake wrote:
Hi Devs,
Currently the method signature looks like:
public String officeToXHTML(String pageName, Map<String, String> cleaningParams) throws XWikiGWTException
The contract is that this method will import whatever the "latest" attachment to the given document into xhtml. This is bit unsafe and we have a better option of using com.xpn.xwiki.wysiwyg.client.util.Attachment instead.
So the new method that would be introduced is:
public String officeToXHTML(Attachment attachment, Map<String, String> cleaningParams) throws XWikiGWTException;
This is more clean, expressive and safe.
+1 -- Sergiu Dumitriu http://purl.org/net/sergiu/
+1 Asiri Rathnayake wrote:
Hi Devs,
Currently the method signature looks like:
public String officeToXHTML(String pageName, Map<String, String> cleaningParams) throws XWikiGWTException
The contract is that this method will import whatever the "latest" attachment to the given document into xhtml. This is bit unsafe and we have a better option of using com.xpn.xwiki.wysiwyg.client.util.Attachment instead.
So the new method that would be introduced is:
public String officeToXHTML(Attachment attachment, Map<String, String> cleaningParams) throws XWikiGWTException;
This is more clean, expressive and safe.
WDYT?
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
+0 On Wed, Oct 7, 2009 at 11:52, Asiri Rathnayake <[email protected]> wrote:
Hi Devs,
Currently the method signature looks like:
public String officeToXHTML(String pageName, Map<String, String> cleaningParams) throws XWikiGWTException
The contract is that this method will import whatever the "latest" attachment to the given document into xhtml. This is bit unsafe and we have a better option of using com.xpn.xwiki.wysiwyg.client.util.Attachment instead.
So the new method that would be introduced is:
public String officeToXHTML(Attachment attachment, Map<String, String> cleaningParams) throws XWikiGWTException;
This is more clean, expressive and safe.
WDYT?
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (5)
-
Anca Paula Luca -
Asiri Rathnayake -
Marius Dumitru Florea -
Sergiu Dumitriu -
Thomas Mortagne