How to manage odt (writer) password-secured document from own filter (java)?

Here’s the situation that I need:

  1. User have secured (password-protected) document (using standard LO security policy)
  2. While opening this document shows dialog and ask user for his password
  3. Use user password mixed up with private password that is not known for any user
    This mix should be use for decode document
  4. Document is shown to user if password is correct

About filters what i found: http://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Integrating_Import_and_Export_Filters

Filter options: http://wiki.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Properties_of_a_Filter

IMHO I need to use some media descriptors somehow: Service MediaDescriptor, http://wiki.openoffice.org/wiki/API/Samples/Java/Office/DocumentHandling#MediaDescriptor_and_Filters_for_exporting

Is this kind of conversion possible? Where to start?