Skip to content

Commit

Permalink
SAK-30228 Citation with a link to a file in Resources will be of type
Browse files Browse the repository at this point in the history
'Electronic'.

when a citation is added using 'Sakai Resource Picker' it will always have a url
therefore setting it's media type as 'electronic' instead of 'unknown'.
  • Loading branch information
ouit0408 committed Jan 21, 2016
1 parent 940ad33 commit 767054c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3956,7 +3956,8 @@ public void doImportCitationFromResourceUrl( RunData data )
ContentResource resource = contentService.getResource(resourceId);
ResourceProperties props = resource.getProperties();
String displayName = props.getProperty(ResourceProperties.PROP_DISPLAY_NAME);
Citation citation = citationService.addCitation("unknown");
//As this citation will always have resource url so it should be of type 'electronic' not 'unknown'
Citation citation = citationService.addCitation("electronic");
citation.setDisplayName(displayName);
citation.setCitationProperty("resourceId", resourceId);
//User user = UserDirectoryService.getUser(props.getProperty(ResourceProperties.PROP_CREATOR));
Expand Down

0 comments on commit 767054c

Please sign in to comment.