[xwiki-devs] [Proposal] Introduce isOpenOfficeServerAvailable() method to WysiwygService
Hi, I'm not exactly sure if that is the best method name, but we need such a method so that we can disable fileUpload tab (or display a message) in officeimporter wysiwyg plugin if there is no OpenOffice server running. Thanks. - Asiri
Asiri Rathnayake wrote:
Hi,
I'm not exactly sure if that is the best method name, but we need such a method so that we can disable fileUpload tab (or display a message) in officeimporter wysiwyg plugin if there is no OpenOffice server running.
I'm fine with that but I'm wondering if we could use instead a WYSIWYG configuration parameter to disable/hide the Office Importer file upload tab. This parameter would be initialized in velocity (macros.vm#wysiwyg_storeConfig) based on the OpenOffice server availability. The only shortcoming I see is that the user will have to reload the page in order to "refresh" the Office Importer dialog, while in the first case, using a service, he will just have to reopen the dialog (provided the service doesn't have a cache proxy). Thanks, Marius
Thanks.
- Asiri _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi, On Thu, Oct 1, 2009 at 12:49 PM, Marius Dumitru Florea < [email protected]> wrote:
Asiri Rathnayake wrote:
Hi,
I'm not exactly sure if that is the best method name, but we need such a method so that we can disable fileUpload tab (or display a message) in officeimporter wysiwyg plugin if there is no OpenOffice server running.
I'm fine with that but I'm wondering if we could use instead a WYSIWYG configuration parameter to disable/hide the Office Importer file upload tab. This parameter would be initialized in velocity (macros.vm#wysiwyg_storeConfig) based on the OpenOffice server availability.
Will this method work in a dynamic fashion? I mean OpenOffice server can be shut down at any point, will that change be reflected immediately in this configuration parameter? Anyway, I feel having a configuration parameter for querying OpenOffice server status is kind of odd. Thanks. - Asiri
The only shortcoming I see is that the user will have to reload the page in order to "refresh" the Office Importer dialog, while in the first case, using a service, he will just have to reopen the dialog (provided the service doesn't have a cache proxy).
Thanks, Marius
Thanks.
- 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
On 10/01/2009 10:23 AM, Asiri Rathnayake wrote:
Hi,
On Thu, Oct 1, 2009 at 12:49 PM, Marius Dumitru Florea< [email protected]> wrote:
Asiri Rathnayake wrote:
Hi,
I'm not exactly sure if that is the best method name, but we need such a method so that we can disable fileUpload tab (or display a message) in officeimporter wysiwyg plugin if there is no OpenOffice server running.
I'm fine with that but I'm wondering if we could use instead a WYSIWYG configuration parameter to disable/hide the Office Importer file upload tab. This parameter would be initialized in velocity (macros.vm#wysiwyg_storeConfig) based on the OpenOffice server availability.
Will this method work in a dynamic fashion? I mean OpenOffice server can be shut down at any point, will that change be reflected immediately in this configuration parameter?
No, but I guess when importing a file, you also get a response from the import and you could show the user an error if this couldn't happen.
Anyway, I feel having a configuration parameter for querying OpenOffice server status is kind of odd.
What Marius means is that, we need to look at the use-cases, how often the server is started/stopped while one of the users has the editor open, if this is realtime information that a user queries from the server or is a server setting that should ideally be the same all the time. The way I see it is that this is "static" information: it's a configuration of the wiki, has or has not an openoffice server running. Namely, the wysiwyg config param would rather be interpreted as: "with file import" or "without file import" than running or not running. Also, if the server _should be running_ (as in the wiki is configured with an openoffice server, etc) and it's not, it would be better to display an error than to hide the upload, because that's what it is, an error. otherwise +0 Happy coding, Anca
Thanks.
- Asiri
The only shortcoming I see is that the user will have to reload the page in order to "refresh" the Office Importer dialog, while in the first case, using a service, he will just have to reopen the dialog (provided the service doesn't have a cache proxy).
Thanks, Marius
Thanks.
- 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
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi,
Anyway, I feel having a configuration parameter for querying OpenOffice
server status is kind of odd.
What Marius means is that, we need to look at the use-cases, how often the server is started/stopped while one of the users has the editor open, if this is realtime information that a user queries from the server or is a server setting that should ideally be the same all the time.
The way I see it is that this is "static" information: it's a configuration of the wiki, has or has not an openoffice server running. Namely, the wysiwyg config param would rather be interpreted as: "with file import" or "without file import" than running or not running.
I understand your point. However I'm also thinking like "is it this or that"... I mean if you consider the OpenOffice server controlling in wiki, you can start/stop/restart it any time you want. But it's also true that this is not going to happen frequently, most of the time users will have autoStart set to true, in which case OOo server will be running from XE startup until someone stops it / XE is shutdown. An important scenario would be, * I start XE normally (without OOo server) and since OOo server is not running, wysiwyg editor will be configured not to display the officeimporter fileUpload tab. And then an admin starts OOo server, how long will it take for this information to propagate to wysiwyg? As marius says, if it's only a refresh that is required, I think we should go with a configuration parameter rather than cluttering up GWT service API. WDYT?
Also, if the server _should be running_ (as in the wiki is configured with an openoffice server, etc) and it's not, it would be better to display an error than to hide the upload, because that's what it is, an error.
+1. Thanks. - Asiri
otherwise +0
Happy coding, Anca
Thanks.
- Asiri
The only shortcoming I see is that the user will have to reload the page in order to "refresh" the Office Importer dialog, while in the first case, using a service, he will just have to reopen the dialog (provided the service doesn't have a cache proxy).
Thanks, Marius
Thanks.
- 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
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On 10/01/2009 02:58 PM, Asiri Rathnayake wrote:
Hi,
Anyway, I feel having a configuration parameter for querying OpenOffice
server status is kind of odd.
What Marius means is that, we need to look at the use-cases, how often the server is started/stopped while one of the users has the editor open, if this is realtime information that a user queries from the server or is a server setting that should ideally be the same all the time.
The way I see it is that this is "static" information: it's a configuration of the wiki, has or has not an openoffice server running. Namely, the wysiwyg config param would rather be interpreted as: "with file import" or "without file import" than running or not running.
I understand your point. However I'm also thinking like "is it this or that"...
I mean if you consider the OpenOffice server controlling in wiki, you can start/stop/restart it any time you want. But it's also true that this is not going to happen frequently, most of the time users will have autoStart set to true, in which case OOo server will be running from XE startup until someone stops it / XE is shutdown.
An important scenario would be,
* I start XE normally (without OOo server) and since OOo server is not running, wysiwyg editor will be configured not to display the officeimporter fileUpload tab. And then an admin starts OOo server, how long will it take for this information to propagate to wysiwyg?
One refresh to the page. And since the admin's idea is probably to setup the entire wiki and then let users go around edit and everything in it, I'd say that most probably, when the wysiwyg editing would be used, everything is going to be "stable" about this server. Also, this would prevent server calls overhead: most of the times the isServerRunning() function would return the same thing, which you would query in realtime everytime you load the dialog or smth. Happy coding, Anca
As marius says, if it's only a refresh that is required, I think we should go with a configuration parameter rather than cluttering up GWT service API.
WDYT?
Also, if the server _should be running_ (as in the wiki is configured with an openoffice server, etc) and it's not, it would be better to display an error than to hide the upload, because that's what it is, an error.
+1.
Thanks.
- Asiri
otherwise +0
Happy coding, Anca
Thanks.
- Asiri
The only shortcoming I see is that the user will have to reload the page in order to "refresh" the Office Importer dialog, while in the first case, using a service, he will just have to reopen the dialog (provided the service doesn't have a cache proxy).
Thanks, Marius
Thanks.
- 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
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Anca Paula Luca wrote:
On 10/01/2009 02:58 PM, Asiri Rathnayake wrote:
Hi,
Anyway, I feel having a configuration parameter for querying OpenOffice
server status is kind of odd. What Marius means is that, we need to look at the use-cases, how often the server is started/stopped while one of the users has the editor open, if this is realtime information that a user queries from the server or is a server setting that should ideally be the same all the time.
The way I see it is that this is "static" information: it's a configuration of the wiki, has or has not an openoffice server running. Namely, the wysiwyg config param would rather be interpreted as: "with file import" or "without file import" than running or not running.
I understand your point. However I'm also thinking like "is it this or that"...
I mean if you consider the OpenOffice server controlling in wiki, you can start/stop/restart it any time you want. But it's also true that this is not going to happen frequently, most of the time users will have autoStart set to true, in which case OOo server will be running from XE startup until someone stops it / XE is shutdown.
An important scenario would be,
* I start XE normally (without OOo server) and since OOo server is not running, wysiwyg editor will be configured not to display the officeimporter fileUpload tab. And then an admin starts OOo server, how long will it take for this information to propagate to wysiwyg?
One refresh to the page. And since the admin's idea is probably to setup the entire wiki and then let users go around edit and everything in it, I'd say that most probably, when the wysiwyg editing would be used, everything is going to be "stable" about this server.
Also, this would prevent server calls overhead: most of the times the isServerRunning() function would return the same thing, which you would query in realtime everytime you load the dialog or smth.
Exactly. Thanks, Marius
Happy coding, Anca
As marius says, if it's only a refresh that is required, I think we should go with a configuration parameter rather than cluttering up GWT service API.
WDYT?
Also, if the server _should be running_ (as in the wiki is configured with an openoffice server, etc) and it's not, it would be better to display an error than to hide the upload, because that's what it is, an error.
+1.
Thanks.
- Asiri
otherwise +0
Happy coding, Anca
Thanks.
- Asiri
The only shortcoming I see is that the user will have to reload the page in order to "refresh" the Office Importer dialog, while in the first case, using a service, he will just have to reopen the dialog (provided the service doesn't have a cache proxy).
Thanks, Marius
Thanks.
- 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
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Hi,
I mean if you consider the OpenOffice server controlling in wiki, you can start/stop/restart it any time you want. But it's also true that this is not going to happen frequently, most of the time users will have autoStart set to true, in which case OOo server will be running from XE startup until someone stops it / XE is shutdown.
An important scenario would be,
* I start XE normally (without OOo server) and since OOo server is not running, wysiwyg editor will be configured not to display the officeimporter fileUpload tab. And then an admin starts OOo server, how long will it take for this information to propagate to wysiwyg?
One refresh to the page. And since the admin's idea is probably to setup the entire wiki and then let users go around edit and everything in it, I'd say that most probably, when the wysiwyg editing would be used, everything is going to be "stable" about this server.
Also, this would prevent server calls overhead: most of the times the isServerRunning() function would return the same thing, which you would query in realtime everytime you load the dialog or smth.
Yes, so I'll go ahead with the configuration parameter. Thanks. - Asiri
participants (3)
-
Anca Paula Luca -
Asiri Rathnayake -
Marius Dumitru Florea