You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Sandro Martini (JIRA)" <ji...@apache.org> on 2012/12/29 19:22:12 UTC

[jira] [Commented] (PIVOT-886) Make BXMLSerializer more extendable

    [ https://issues.apache.org/jira/browse/PIVOT-886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13540952#comment-13540952 ] 

Sandro Martini commented on PIVOT-886:
--------------------------------------

assigned to me just to not forget.

I agree that we should provide something to let users extend in a simpler way some critical parts of Pivot, but many parts have been made using a lot of static things (to save memory etc), so yes I think we can look if there is something simple to make this available, if not in the existing class (BXMLSerializer is one of the core classes in Pivot) maybe in another (new) one, extending it ... we have to look at this better.
Thanks for now.

                
> Make BXMLSerializer more extendable
> -----------------------------------
>
>                 Key: PIVOT-886
>                 URL: https://issues.apache.org/jira/browse/PIVOT-886
>             Project: Pivot
>          Issue Type: Improvement
>            Reporter: Karel Hübl
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.1
>
>
> If I want to extend BXMLSerializer, I need also to change static MimeTypes map on BXMLSerializer:
> For example:
> public class InjectingSerializer extends BXMLSerializer {
> 	static {
> 		BXMLSerializer.getMimeTypes().put(MIME_TYPE, InjectingSerializer.class);
> 	}
> ...
> May be the MimeTypes map should be instance variable and implicit mapping of MIME_TYPE should be this.getClass(), so one does not need to change mapping of MimeTypes when extending BXMLSerializer.
> May be implementation of AbstractFactory pattern for Pivot serializer should be considered.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira