Revision 5439
Added by berkley over 14 years ago
src/edu/ucsb/nceas/metacat/dataone/CrudService.java | ||
---|---|---|
778 | 778 |
public String produce(final OutputStream dataSink) throws Exception { |
779 | 779 |
|
780 | 780 |
try { |
781 |
String username = "public"; |
|
782 |
String[] groups = new String[0]; |
|
783 |
if(sessionData != null) |
|
784 |
{ |
|
785 |
username = sessionData.getUserName(); |
|
786 |
groups = sessionData.getGroupNames(); |
|
787 |
} |
|
788 |
/*System.out.println("metacatUrl: " + metacatUrl + |
|
789 |
" dataSink: " + dataSink + " localId: " + localId + |
|
790 |
" username: " + username + " params: " + params.toString()); |
|
791 |
*/ |
|
781 | 792 |
handler.readFromMetacat(metacatUrl, null, |
782 | 793 |
dataSink, localId, "xml", |
783 |
sessionData.getUserName(),
|
|
784 |
sessionData.getGroupNames(), true, params);
|
|
794 |
username,
|
|
795 |
groups, true, params);
|
|
785 | 796 |
} catch (PropertyNotFoundException e) { |
786 | 797 |
e.printStackTrace(); |
787 | 798 |
throw new ServiceFailure("1030", "Error getting property from metacat: " + e.getMessage()); |
Also available in: Unified diff
hopefully fixed get bug where session was null