[ 
https://issues.apache.org/jira/browse/TUSCANY-1317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amita Vadhavkar updated TUSCANY-1317:
-------------------------------------

    Attachment: JIRA1317Design.txt
                1317.patch

Question: When extensibleNamespaces is not supplied by caller, what should be 
the default? true/false

**********************************************************************************************
1. The patch seems to allow the users to specify load/save options at the 
HelperProvider level. I don't think we want to go that far. Setting options at 
the HelperContext level should be sufficient in my opinion. This means all the 
changes like the one below in HelperProvider implementation should not be 
needed. 

HelperProviderImpl.createDefaultHelpers(Map options) is not needed. 

Answer:
-------
Yes, this sounds proper. For this the changes over the code from 
1317.patch(dated June 27)
are in -
<1>HelperProviderBase-remove-
public abstract void createDefaultHelpers(Map options);
public HelperProviderBase(Map options);

<2>HelperProviderImpl-remove-
public void createDefaultHelpers(Map options)

<3>XMLOptionsTestCase - remove-
testXMLOptionsSchema1() 
//as we are removing PATH 
HelperProviderBase->HelperProviderImpl->HelperContextImpl->XMLHelperImpl
**********************************************************************************************
2. I think in order for XMLHelper and XMLStreamHelper to access options in the 
HelperContext, we should change the relationship between HelperContext and 
helper implementations first so all the helpers have a way to access the 
options stored in the HelperContext. I know only XMLHelper and XMLStreamHelper 
needs to access the HelperContext's options but I think it's consistent to let 
all helpers have reference to the HelperContext. 

Current relationship: 

HelperContext ---1:1---> TypeHelper ---1:1---> ExtendedMetaData 
                           ---1:1---> XMLHelper ---1:1---> ExtendedMetaData 

XMLStreamHelper ---1:1---> TypeHelper 

Proposed relationship: 

HelperContext ---1:1---> ExtendedMetaData 
                           ---1:1---> Map (:defaultOption) 
                           <---1:1---> TypeHelper 
                           <---1:1---> XMLHelper 
                           <---1:1---> XMLStreamHelper 
                           <---1:1---> XSDHelper 
                           <---1:1---> DataFactory 

- Move ExtendedMetaData var in TypeHelper and XMLHelper to become 
HelperContextImpl's protected var 
- New the instance of XMLStreamHelper in the contructor of HelperContext - this 
will create the association between HelperContext and XMLStreamHelper 
- Change HelperContextImpl constructor to pass HelperContext instance to the 
contructor of TypeHelper, XMLHelper, XMLStreamHelper, XSDHelper, and 
DataFactory so they have reference back to HelperContext for accessing the 
load/save options at the HelperContext level 

Answer: This relationship proposal is clean and avoids extra refernces to 
different instances.
-------
Multiple changes in below, marked with //JIRA-1317 - for time being kept old 
code commented, for ref, as there are many changes.Would like to clean up the 
commented code after final comments for this JIRA

tuscany-sdo-impl:-
--------------------
HelperContextImpl
TypeHelperImpl 
XMLHelperImpl 
XMLStreamHelperImpl 
XSDHelperImpl 
DataFactoryImpl 
ChangeSummaryStreamSerializer
SDOUtil (impl)
SDOHelperImpl
SDODeserializer
SDOXMLResourceImpl

tuscany-sdo-tools:-
-------------------
JavaGenerator
XSD2JavaGenerator
ExtensibleTestCase
**********************************************************************************************

> Provide a way to set default XML load options to be used during Java 
> deserialization
> ------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1317
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1317
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-beta1, Java-SDO-1.0
>            Reporter: Daniel Peter
>             Fix For: Java-SDO-1.0
>
>         Attachments: 1317.patch, 1317.patch, JIRA1317Design.txt, 
> JIRA1317Design.txt, JIRA_1317_June21.txt, JIRA_1317_June25_Amita.txt
>
>
> XML load options can be passed when calling the XMLHelper.load(...) methods. 
> But there is currently no way to pass such load options to be used during 
> Java deserialization.
> Thus a way to set default load options should be provided, e.g. 
> SDOUtil.setDefaultXMLOptions(HelperContext, Object options)
> These default options could then be picked up during Java deserialization, 
> i.e. in the method readDataObject in class HelperProviderImpl.ResolvableImpl.
> Additionally the XMLResource.OPTION_RECORD_UNKNOWN_FEATURE option could be 
> exposed in Tuscany SDO.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to