[oXygen-sdk] FW: Find/Replace in Files: Is there an event triggered before Oxygen tries to replace a string in a file?

Oxygen XML Editor Support (Radu Coravu) support at oxygenxml.com
Fri Jun 17 07:06:46 CDT 2016


Hi Pascal,

I'm assuming that you already use our Custom protocol plugin extension:

https://www.oxygenxml.com/doc/versions/18.0/ug-editor/concepts/custom-protocol-plugin.html

in order to provide your own Java URLStreamHandler implementation for 
the plugin.
Your custom "URLConnection" implementation will be called on the 
"getOutputStream()" method by Oxygen when it wants to save a resource to 
the CMS.

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 6/17/2016 11:57 AM, Pascal Beutels wrote:
> Hi,
>
>
>
> You stated in your response that:
>
>
>
> /But in your custom URL handler implementation Oxygen will request at
> some point an output stream and then start writing to it./
>
> / /
>
> Where does this request for the output stream happen (which event or …)
> and how can we override it?
>
>
>
> Can we know that this resulted from a Replace action?
>
>
>
>
>
> Kind regards,
>
>
>
> Pascal
>
>
>
> *From: *Pascal Beutels <mailto:pbeutels at sdl.com>
> *Sent: *Wednesday, June 8, 2016 11:02 AM
> *To: *oxygen-sdk-request at oxygenxml.com
> <mailto:oxygen-sdk-request at oxygenxml.com>
> *Subject: *RE: [oXygen-sdk] Find/Replace in Files: Is there an event
> triggered before Oxygen tries to replace a string in a file?
>
>
>
> Hi,
>
>
>
> We would only need a callbacks before the Replace is done(as far as I
> see for now).
>
>
>
> Where does this request for the output stream happen (which event or …)
> and how can we override it? Can we know that this resulted from a
> Replace action?
>
>
>
> -Pascal
>
>
>
> *From: *oxygen-sdk-request at oxygenxml.com
> <mailto:oxygen-sdk-request at oxygenxml.com>
> *Sent: *Tuesday, June 7, 2016 7:00 PM
> *To: *oxygen-sdk at oxygenxml.com <mailto:oxygen-sdk at oxygenxml.com>
> *Subject: *oXygen-sdk Digest, Vol 39, Issue 1
>
>
>
> Send oXygen-sdk mailing list submissions to
>         oxygen-sdk at oxygenxml.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
> or, via email, send a message with subject or body 'help' to
>         oxygen-sdk-request at oxygenxml.com
>
> You can reach the person managing the list at
>         oxygen-sdk-owner at oxygenxml.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of oXygen-sdk digest..."
>
>
> Today's Topics:
>
>    1. Find/Replace in Files: Is there an event triggered before
>       Oxygen tries to replace a string in a file? (Pascal Beutels)
>    2. Re: Find/Replace in Files: Is there an event triggered before
>       Oxygen tries to replace a string in a file? (Radu Coravu)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 7 Jun 2016 10:04:35 +0000
> From: Pascal Beutels <pbeutels at sdl.com>
> To: "'oxygen-sdk at oxygenxml.com'" <oxygen-sdk at oxygenxml.com>
> Subject: [oXygen-sdk] Find/Replace in Files: Is there an event
>         triggered before Oxygen tries to replace a string in a file?
> Message-ID:
>
> <AMSPR06MB101B294A0AE52871075E6B7C25D0 at AMSPR06MB101.eurprd06.prod.outlook.com>
>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> With our integration some (most) of the files are read-only and need to
> be ‘Checked out’ from our repository before changes can be made to these
> files.
>
> As stated in the subject, when doing a Find/Replace, is there an event
> triggered before Oxygen tries to replace a string in a file, so we can
> automatically checkout the file before Oxygen tries to change the file?
>
> Most of these files are not open in the Editor, but they can be.
>
>
>
> Kind regards,
>
>
> Pascal Beutels
>
>
>
>
>  [http://dr0muzwhcp26z.cloudfront.net/static/corporate/SDL-logo-2014.png] <www.sdl.com/
> <http://www.sdl.com/>>
> www.sdl.com <http://www.sdl.com>
>
>
> SDL PLC confidential, all rights reserved. If you are not the intended
> recipient of this mail SDL requests and requires that you delete it
> without acting upon or copying any of its contents, and we further
> request that you advise us.
>
> SDL PLC is a public limited company registered in England and Wales.
> Registered number: 02675207.
> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire
> SL6 7DY, UK.
>
>
>
> This message has been scanned for malware by Websense. www.websense.com
> <http://www.websense.com>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20160607/d79e7d77/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 7 Jun 2016 13:25:05 +0300
> From: Radu Coravu <support at oxygenxml.com>
> To: oxygen-sdk at oxygenxml.com
> Subject: Re: [oXygen-sdk] Find/Replace in Files: Is there an event
>         triggered before Oxygen tries to replace a string in a file?
> Message-ID: <5756A101.6070500 at oxygenxml.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hello Pascal,
>
> We do not yet have such specific API. If this API was available, how
> would you see it look like? Would you like it to give you a separate
> call back for each URL or more like two callbacks, one before the
> Replace All is done  and one after?
>
> But in your custom URL handler implementation Oxygen will request at
> some point an output stream and then start writing to it. Maybe you can
> give Oxygen an output stream implementation which caches content to an
> array and then when Oxygen closes the output stream you could check to
> see if the URL is checked out or not, and if not, ask the end user if he
> wants to check it out. Also using our API you can check if the URL is
> opened or not in the editor.
> But this would probably mean that you would ask the end user for each of
> these files... Or somehow remember the user's choice persistently so
> that on the next save that Oxygen attempts at the URL you could check
> out the file automatically without showing the dialog.
>
> Regards,
> Radu
>
> On 6/7/16 1:04 PM, Pascal Beutels wrote:
>>
>> Hi,
>>
>> With our integration some (most) of the files are read-only and need
>> to be ‘Checked out’ from our repository before changes can be made to
>> these files.
>>
>> As stated in the subject, when doing a Find/Replace, is there an event
>> triggered before Oxygen tries to replace a string in a file, so we can
>> automatically checkout the file before Oxygen tries to change the file?
>>
>> Most of these files are not open in the Editor, but they can be.
>>
>> Kind regards,
>>
>> Pascal Beutels
>>
>>
>> <www.sdl.com/ <http://www.sdl.com/>>
>> www.sdl.com <http://www.sdl.com>
>>
>>
>> SDL PLC confidential, all rights reserved. If you are not the intended
>> recipient of this mail SDL requests and requires that you delete it
>> without acting upon or copying any of its contents, and we further
>> request that you advise us.
>>
>> SDL PLC is a public limited company registered in England and Wales.
>> Registered number: 02675207.
>> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire
>> SL6 7DY, UK.
>>
>>
>>
>>
>> This message has been scanned for malware by Websense.
>> www.websense.com <http://www.websense.com> <http://www.websense.com/>
>>
>>
>>
>>
>
>  <www.sdl.com/>
> www.sdl.com
>
>
> SDL PLC confidential, all rights reserved. If you are not the intended
> recipient of this mail SDL requests and requires that you delete it
> without acting upon or copying any of its contents, and we further
> request that you advise us.
>
> SDL PLC is a public limited company registered in England and Wales.
> Registered number: 02675207.
> Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire
> SL6 7DY, UK.
>
>
> _______________________________________________
>> oXygen-sdk mailing list
>> oXygen-sdk at oxygenxml.com
>> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://www.oxygenxml.com/pipermail/oxygen-sdk/attachments/20160607/4427c4f0/attachment-0001.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> oXygen-sdk mailing list
> oXygen-sdk at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>
>
> ------------------------------
>
> End of oXygen-sdk Digest, Vol 39, Issue 1
> *****************************************
>
>
> _______________________________________________
> oXygen-sdk mailing list
> oXygen-sdk at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>



More information about the oXygen-sdk mailing list