Refactoring of public API
-------------------------

         Key: JBXB-3
         URL: http://jira.jboss.com/jira/browse/JBXB-3
     Project: JBoss XML Binding (JBossXB)
        Type: Task
    Reporter: Alex Loubyansky
 Assigned to: Alex Loubyansky 


Sorry, I think I should do it earlier than later. I will search for the usages 
and fix them in jboss-head and microkernel.

This is a preliminary plan. If you have any suggestions, please, add a comment. 
Thanks.

* add interface NamespaceResolver { String resolveNamespace(String prefix); }

* interface ContentNavigator
  - rename to UnmarshallingContext or something like this
  - remove resolveQName method (this is TypeBinding.unmarshalQName() which is 
more general)
  - add method 'NamespaceResolver getNamespaceResolver()'
  - add methods to get annotations for the current element

* add interface MarshallingContext (equivalent to UnmarshallingContext) to 
ObjectModelProvider methods to get access to contextual info such as 
element/attribute's type, annotations, etc

* interface GenericObjectModelFactory
  - move completedRoot method to ObjectModelFactory and rename it to 
completeRoot

* interface TypeConverter
  - rename to TypeBinding (?)

* class TypeBinding
  - rename to SimpleTypeBindings
  - change unmarshal(String xsdType, String value) to unmarshal(String xsdType, 
String value, NamespaceResolver nsResolver)
  - change marshal(String xsdType, Object value) to marshal(String xsdType, 
Object value, NamespaceResolver nsResolver)

* class Unmarshaller
  - rename to UnmarshallerImpl (or something) and expose Unmarshaller interface 
(Marshaller is already an interface)
  - add a factory for Unmarshaller instances, e.g. 
UnmarshallerFactory.getUnmarshaller(/*Properties props*/);
  - remove explicit JBossXBParser creation and configuration. Instead add 
get/setParser methods, if not set use parser factory to get default instance 
with default properties.
  - remove Object unmarshal(InputSource is, ObjectModelFactory factory, Object 
root)

* add a factory for Marshaller instances, e.g. 
MarshallerFactory.getMarshaller(/*Properties props*/);


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to