[ 
http://jira.dspace.org/jira/browse/DS-217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10617#action_10617
 ] 

Andrea Bollini commented on DS-217:
-----------------------------------

I have used the Formatter API to take advantage of the Formattable Interface... 
this solution is more flexible than what we can provide using the MessageFormat 
because all the arguments in MessageFormat's text are treated as String (on the 
object it calls toString()) instead, with the Formatter API, you can customize 
the rendering of the item/collection/eperson argument without the need to alter 
the toString method or change the arguments supplied to the 
MessageFormat.format call.
I.e with this solution you are able to include for example in the license all 
the informations that you want about the item (metadata values, bitstream, 
etc.) without "hack" the codebase. You will need only to implement the 
LicenseArgumentFormatter and configure it in dspace.cfg.

Anyway, we can also include a pre-processing step that will trasform all the 
{\d*} in %?$s but I'm not sure if this will really help or make the things more 
confusing...
Larry or somebody else, can you fastly develop the preview function for the 
XMLUI if I supplied the same for JSPUI in the next few days?

> Hardcoded String in the license bitstream
> -----------------------------------------
>
>                 Key: DS-217
>                 URL: http://jira.dspace.org/jira/browse/DS-217
>             Project: DSpace 1.x
>          Issue Type: Bug
>          Components: DSpace API
>    Affects Versions: 1.5.0, 1.5.1, 1.5.2
>            Reporter: Andrea Bollini
>            Assignee: Andrea Bollini
>            Priority: Minor
>         Attachments: d, DS-217-substitution-variable-license.patch
>
>
> The Item's licenseGranted method hardcoded the string:
> "License granted by " + eperson.getFullName() + " (" + eperson.getEmail() + 
> ") on "+ DCDate.getCurrent().toString() + " (GMT):\n\n"
> at the start of the license bitstream. This is not desiderable for some user 
> that like to have this text translated and/or in a different position.
> Moreover, could be appropriate move this method in the LicenseStep processing 
> class? should we allow the license text itself to contain parameter that will 
> be replaced at runtime with current user data and date so that the license 
> showed to the user will be exactly the same that will be stored?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to