|
||||||||||||
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 |
------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________ Dspace-devel mailing list Dspace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dspace-devel
I changed the code to use Email.java rather than ReqEmail2.java
So ... remove ReqEmai2.java from my previous patch.
These are new files you'll need in config/email
requestItem.dontsend
requestItem.send
requestItem.confirm
I'm including a new
dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/artifactbrowser/FlowRequestItem.java
AND
Changes to dspace-api/src/main/java/org/dspace/core/Email.java
36,42d35
< import java.io.InputStream;
< import javax.activation.DataSource;
<
< import org.apache.commons.io.IOUtils;
< import java.io.FileOutputStream;
< import java.io.IOException;
< import java.io.InputStream;
101c94
< * @version $Revision: 1.1.1.1 $
---
> * @version $Revision$
209,233d201
<
< public void addAttachment2(InputStream inputStream, String name, String contentType){
< //create attachment
< try
< {
<
< int dot = name.lastIndexOf('.');
< String base = (dot == -1) ? name : name.substring(0, dot);
< String extension = (dot == -1) ? "" : name.substring(dot+1);
<
< final File tempFile = File.createTempFile(base, extension);
<
< tempFile.deleteOnExit();
< FileOutputStream out = new FileOutputStream(tempFile);
<
< IOUtils.copy(inputStream, out);
<
<
< attachments.add(new FileAttachment(tempFile, name));
< }
< catch(Exception e){
< System.out.println("Exception in: addAttachment");
< }
< }
<