jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OCM-30) add ability to pass arguments to instances of field converters
Date Mon, 27 Apr 2009 15:08:30 GMT

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

Jukka Zitting updated OCM-30:
-----------------------------

    Description: 
It would be useful to be able to pass arguments to a custom field converter so related converters
can be reused. For example, a converter that stores images could take arguments which specify
the image type and maximum dimensions. These arguments could be placed in the @Field annotation:

{code}
@Field(converter = BufferedImageConverter.class, converterArgs = { "png", 120, 80 })
private BufferedImage img;
{code}

and provided to the type converter instance via a method defined in AtomicTypeConverter:

{code}
public BufferedImageConverter implements AtomicTypeConverter {
  /**
   * new method in the AtomicTypeConverter interface
   */
  public void setConverterArgs(Object[] args) {
    // ...
  }
}
{code}

     Issue Type: New Feature  (was: Wish)

> add ability to pass arguments to instances of field converters
> --------------------------------------------------------------
>
>                 Key: OCM-30
>                 URL: https://issues.apache.org/jira/browse/OCM-30
>             Project: Jackrabbit OCM
>          Issue Type: New Feature
>            Reporter: Paul Mietz Egli
>            Priority: Minor
>
> It would be useful to be able to pass arguments to a custom field converter so related
converters can be reused. For example, a converter that stores images could take arguments
which specify the image type and maximum dimensions. These arguments could be placed in the
@Field annotation:
> {code}
> @Field(converter = BufferedImageConverter.class, converterArgs = { "png", 120, 80 })
> private BufferedImage img;
> {code}
> and provided to the type converter instance via a method defined in AtomicTypeConverter:
> {code}
> public BufferedImageConverter implements AtomicTypeConverter {
>   /**
>    * new method in the AtomicTypeConverter interface
>    */
>   public void setConverterArgs(Object[] args) {
>     // ...
>   }
> }
> {code}

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


Mime
View raw message