diff --git a/dspace-api/src/main/java/org/dspace/license/CCLookup.java b/dspace-api/src/main/java/org/dspace/license/CCLookup.java index 55e58f5717..2f90ed2f6c 100644 --- a/dspace-api/src/main/java/org/dspace/license/CCLookup.java +++ b/dspace-api/src/main/java/org/dspace/license/CCLookup.java @@ -22,7 +22,10 @@ import java.util.Map; import java.util.NoSuchElementException; import org.apache.log4j.Logger; - +import org.dspace.license.factory.LicenseServiceFactory; +import org.dspace.license.service.CreativeCommonsService; +import org.dspace.services.ConfigurationService; +import org.dspace.services.factory.DSpaceServicesFactory; import org.jaxen.JaxenException; import org.jaxen.jdom.JDOMXPath; import org.jdom.Attribute; @@ -30,10 +33,6 @@ import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; -import org.jdom.output.XMLOutputter; - -import org.dspace.services.ConfigurationService; -import org.dspace.services.factory.DSpaceServicesFactory; /** @@ -58,7 +57,9 @@ public class CCLookup { private SAXBuilder parser = new SAXBuilder(); private List licenses = new ArrayList(); private List licenseFields = new ArrayList(); - + + protected CreativeCommonsService creativeCommonsService = LicenseServiceFactory.getInstance().getCreativeCommonsService(); + /** * Constructs a new instance with the default web services root. * @@ -406,26 +407,14 @@ public class CCLookup { public String getRdf() throws IOException { - String myString = null; - java.io.ByteArrayOutputStream outputstream = new java.io.ByteArrayOutputStream(); + String result = ""; try { - outputstream.write("\n".getBytes()); - JDOMXPath xpathRdf = new JDOMXPath("//result/rdf"); - JDOMXPath xpathLicenseRdf = new JDOMXPath("//result/licenserdf"); - XMLOutputter xmloutputter = new XMLOutputter(); - Element rdfParent = ((Element)xpathRdf.selectSingleNode(this.license_doc)); - xmloutputter.output(rdfParent, outputstream); - Element licenseRdfParent = ((Element)xpathLicenseRdf.selectSingleNode(this.license_doc)); - outputstream.write("\n".getBytes()); - xmloutputter.output(licenseRdfParent, outputstream); - outputstream.write("\n\n".getBytes()); + result = creativeCommonsService.fetchLicenseRDF(license_doc); } catch (Exception e) { log.warn("An error occurred getting the rdf . . ." + e.getMessage() ); setSuccess(false); - } finally { - outputstream.close(); - return outputstream.toString(); - } + } + return result; } public boolean isSuccess() { diff --git a/dspace-api/src/main/java/org/dspace/license/CreativeCommonsServiceImpl.java b/dspace-api/src/main/java/org/dspace/license/CreativeCommonsServiceImpl.java index 849f9906cf..7f0c13a889 100644 --- a/dspace-api/src/main/java/org/dspace/license/CreativeCommonsServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/license/CreativeCommonsServiceImpl.java @@ -7,9 +7,11 @@ */ package org.dspace.license; -import java.io.*; -import java.net.URL; -import java.net.URLConnection; +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringWriter; import java.sql.SQLException; import java.util.List; @@ -35,6 +37,10 @@ import org.dspace.core.ConfigurationManager; import org.dspace.core.Context; import org.dspace.core.Utils; import org.dspace.license.service.CreativeCommonsService; +import org.dspace.services.ConfigurationService; +import org.dspace.services.factory.DSpaceServicesFactory; +import org.jdom.Document; +import org.jdom.transform.JDOMSource; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; @@ -52,8 +58,10 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi /** * Some BitStream Names (BSN) */ + @Deprecated protected static final String BSN_LICENSE_URL = "license_url"; + @Deprecated protected static final String BSN_LICENSE_TEXT = "license_text"; protected static final String BSN_LICENSE_RDF = "license_rdf"; @@ -68,10 +76,12 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi protected BundleService bundleService; @Autowired(required = true) protected ItemService itemService; - + + protected ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService(); + protected CreativeCommonsServiceImpl() { - + } @Override @@ -79,8 +89,8 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi { // if defined, set a proxy server for http requests to Creative // Commons site - String proxyHost = ConfigurationManager.getProperty("http.proxy.host"); - String proxyPort = ConfigurationManager.getProperty("http.proxy.port"); + String proxyHost = configurationService.getProperty("http.proxy.host"); + String proxyPort = configurationService.getProperty("http.proxy.port"); if (StringUtils.isNotBlank(proxyHost) && StringUtils.isNotBlank(proxyPort)) { @@ -134,37 +144,6 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi setBitstreamFromBytes(context, item, bundle, BSN_LICENSE_RDF, bs_rdf_format, licenseRdf.getBytes()); } - @Override - public void setLicense(Context context, Item item, - String cc_license_url) throws SQLException, IOException, - AuthorizeException - { - Bundle bundle = getCcBundle(context, item); - - // get some more information - String license_text = fetchLicenseText(cc_license_url); - String license_rdf = fetchLicenseRDF(cc_license_url); - - // set the formats - BitstreamFormat bs_url_format = bitstreamFormatService.findByShortDescription( - context, "License"); - BitstreamFormat bs_text_format = bitstreamFormatService.findByShortDescription( - context, "CC License"); - BitstreamFormat bs_rdf_format = bitstreamFormatService.findByShortDescription( - context, "RDF XML"); - - // set the URL bitstream - setBitstreamFromBytes(context, item, bundle, BSN_LICENSE_URL, bs_url_format, - cc_license_url.getBytes()); - - // set the license text bitstream - setBitstreamFromBytes(context, item, bundle, BSN_LICENSE_TEXT, bs_text_format, - license_text.getBytes()); - - // set the RDF bitstream - setBitstreamFromBytes(context, item, bundle, BSN_LICENSE_RDF, bs_rdf_format, - license_rdf.getBytes()); - } @Override public void setLicense(Context context, Item item, @@ -223,8 +202,7 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi // verify it has correct contents try { - if ((getLicenseURL(context, item) == null) || (getLicenseText(context, item) == null) - || (getLicenseRDF(context, item) == null)) + if ((getLicenseURL(context, item) == null)) { return false; } @@ -237,20 +215,6 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi return true; } - @Override - public String getLicenseURL(Context context, Item item) throws SQLException, - IOException, AuthorizeException - { - return getStringFromBitstream(context, item, BSN_LICENSE_URL); - } - - @Override - public String getLicenseText(Context context, Item item) throws SQLException, - IOException, AuthorizeException - { - return getStringFromBitstream(context, item, BSN_LICENSE_TEXT); - } - @Override public String getLicenseRDF(Context context, Item item) throws SQLException, IOException, AuthorizeException @@ -265,6 +229,7 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi return getBitstream(item, BSN_LICENSE_RDF); } + @Deprecated @Override public Bitstream getLicenseTextBitstream(Item item) throws SQLException, IOException, AuthorizeException @@ -273,39 +238,25 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi } @Override - public String fetchLicenseRdf(String ccResult) { - StringWriter result = new StringWriter(); - try { - InputStream inputstream = new ByteArrayInputStream(ccResult.getBytes("UTF-8")); - templates.newTransformer().transform(new StreamSource(inputstream), new StreamResult(result)); - } catch (TransformerException te) { - throw new RuntimeException("Transformer exception " + te.getMessage(), te); - } catch (IOException ioe) { - throw new RuntimeException("IOexception " + ioe.getCause().toString(), ioe); - } finally { - return result.getBuffer().toString(); - } - } - + public String getLicenseURL(Context context, Item item) throws SQLException, IOException, AuthorizeException { + String licenseUri = getCCField("uri").ccItemValue(item); + if (StringUtils.isNotBlank(licenseUri)) { + return licenseUri; + } + + //backward compatibility + return getStringFromBitstream(context, item, BSN_LICENSE_URL); + } @Override - public String fetchLicenseText(String license_url) - { - String text_url = license_url; - byte[] urlBytes = fetchURL(text_url); - - return (urlBytes != null) ? new String(urlBytes) : ""; - } - - @Override - public String fetchLicenseRDF(String license_url) + public String fetchLicenseRDF(Document license) { StringWriter result = new StringWriter(); try { templates.newTransformer().transform( - new StreamSource(license_url + "rdf"), + new JDOMSource(license), new StreamResult(result) ); } @@ -408,40 +359,32 @@ public class CreativeCommonsServiceImpl implements CreativeCommonsService, Initi return baos.toByteArray(); } - /** - * Fetch the contents of a URL - */ - protected byte[] fetchURL(String url_string) - { - try - { - String line = ""; - URL url = new URL(url_string); - URLConnection connection = url.openConnection(); - InputStream inputStream = connection.getInputStream(); - BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); - StringBuilder sb = new StringBuilder(); - - while ((line = reader.readLine()) != null) - { - sb.append(line); - } - - return sb.toString().getBytes(); - } - catch (Exception exc) - { - log.error(exc.getMessage()); - return null; - } - } /** * Returns a metadata field handle for given field Id */ @Override public LicenseMetadataValue getCCField(String fieldId) { - return new LicenseMetadataValue(ConfigurationManager.getProperty("cc.license." + fieldId)); + return new LicenseMetadataValue(configurationService.getProperty("cc.license." + fieldId)); } + @Override + public void removeLicense(Context context, LicenseMetadataValue uriField, + LicenseMetadataValue nameField, Item item) throws AuthorizeException, IOException, SQLException { + // only remove any previous licenses + String licenseUri = uriField.ccItemValue(item); + if (licenseUri != null) { + uriField.removeItemValue(context, item, licenseUri); + if (configurationService.getBooleanProperty("cc.submit.setname")) + { + String licenseName = nameField.keyedItemValue(item, licenseUri); + nameField.removeItemValue(context, item, licenseName); + } + if (configurationService.getBooleanProperty("cc.submit.addbitstream")) + { + removeLicense(context, item); + } + } + } + } diff --git a/dspace-api/src/main/java/org/dspace/license/service/CreativeCommonsService.java b/dspace-api/src/main/java/org/dspace/license/service/CreativeCommonsService.java index e7d7058c88..3eb361f235 100644 --- a/dspace-api/src/main/java/org/dspace/license/service/CreativeCommonsService.java +++ b/dspace-api/src/main/java/org/dspace/license/service/CreativeCommonsService.java @@ -12,6 +12,7 @@ import org.dspace.content.Bitstream; import org.dspace.content.Item; import org.dspace.core.Context; import org.dspace.license.LicenseMetadataValue; +import org.jdom.Document; import java.io.IOException; import java.io.InputStream; @@ -39,12 +40,6 @@ public interface CreativeCommonsService { */ public void setLicenseRDF(Context context, Item item, String licenseRdf) throws SQLException, IOException, AuthorizeException; - /** - * This is a bit of the "do-the-right-thing" method for CC stuff in an item - */ - public void setLicense(Context context, Item item, - String cc_license_url) throws SQLException, IOException, - AuthorizeException; /** * Used by DSpaceMetsIngester @@ -72,9 +67,6 @@ public interface CreativeCommonsService { public String getLicenseURL(Context context, Item item) throws SQLException, IOException, AuthorizeException; - public String getLicenseText(Context context, Item item) throws SQLException, - IOException, AuthorizeException; - public String getLicenseRDF(Context context, Item item) throws SQLException, IOException, AuthorizeException; @@ -87,27 +79,20 @@ public interface CreativeCommonsService { /** * Get Creative Commons license Text, returning Bitstream object. + * @Deprecated * @return bitstream or null. */ public Bitstream getLicenseTextBitstream(Item item) throws SQLException, IOException, AuthorizeException; - public String fetchLicenseRdf(String ccResult); - - /** - * - * The next two methods are old CC. - * Remains until prev. usages are eliminated. - * @Deprecated - * - */ /** * Get a few license-specific properties. We expect these to be cached at * least per server run. */ - public String fetchLicenseText(String license_url); - - public String fetchLicenseRDF(String license_url); public LicenseMetadataValue getCCField(String fieldId); + + public String fetchLicenseRDF(Document license); + public void removeLicense(Context context, LicenseMetadataValue uriField, + LicenseMetadataValue nameField, Item item) throws AuthorizeException, IOException, SQLException; } \ No newline at end of file diff --git a/dspace-api/src/main/java/org/dspace/submit/step/CCLicenseStep.java b/dspace-api/src/main/java/org/dspace/submit/step/CCLicenseStep.java index 714de1a9f1..74130742ad 100644 --- a/dspace-api/src/main/java/org/dspace/submit/step/CCLicenseStep.java +++ b/dspace-api/src/main/java/org/dspace/submit/step/CCLicenseStep.java @@ -14,7 +14,6 @@ import org.apache.commons.lang3.*; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; - import org.dspace.app.util.SubmissionInfo; import org.dspace.app.util.Util; import org.dspace.authorize.AuthorizeException; @@ -102,11 +101,6 @@ public class CCLicenseStep extends AbstractProcessingStep session.setAttribute("inProgress", "TRUE"); // check what submit button was pressed in User Interface String buttonPressed = Util.getSubmitButton(request, NEXT_BUTTON); - if ("submit_grant".equalsIgnoreCase(buttonPressed) - || "submit_no_cc".equalsIgnoreCase(buttonPressed)) - { - return processCC(context, request, response, subInfo); - } String choiceButton = Util.getSubmitButton(request, SELECT_CHANGE); Enumeration e = request.getParameterNames(); String isFieldRequired = "FALSE"; @@ -124,27 +118,10 @@ public class CCLicenseStep extends AbstractProcessingStep { Item item = subInfo.getSubmissionItem().getItem(); LicenseMetadataValue uriField = creativeCommonsService.getCCField("uri"); - LicenseMetadataValue nameField = creativeCommonsService.getCCField("name"); String licenseUri = uriField.ccItemValue(item); if (licenseUri != null) - //if (CreativeCommons.hasLicense(item, "dc", "rights", "uri", Item.ANY) - // && !CreativeCommons.getRightsURI(item, "dc", "rights", "uri", Item.ANY).equals("")) { - //CreativeCommons.setItemMetadata(item, licenseURI, "dc", "rights", "uri", ConfigurationManager.getProperty("default.locale")); - uriField.removeItemValue(context, item, licenseUri); - if (configurationService.getBooleanProperty("cc.submit.setname")) - { - String licenseName = nameField.keyedItemValue(item, licenseUri); - nameField.removeItemValue(context, item, licenseName); - //CreativeCommons.setItemMetadata(item, CreativeCommons.getRightsName(item, "dc", "rights", null, Item.ANY), "dc", "rights", null, configurationService.getProperty("default.locale")); - } - if (configurationService.getBooleanProperty("cc.submit.addBitstream")) - { - creativeCommonsService.removeLicense(context, item); - } removeRequiredAttributes(session); - itemService.update(context, item); - context.dispatchEvents(); } return STATUS_COMPLETE; } @@ -154,7 +131,7 @@ public class CCLicenseStep extends AbstractProcessingStep } if (buttonPressed.equals(NEXT_BUTTON) || buttonPressed.equals(CANCEL_BUTTON) ) { - return processCCWS(context, request, response, subInfo); + return processCC(context, request, response, subInfo); } else { @@ -164,54 +141,6 @@ public class CCLicenseStep extends AbstractProcessingStep } } - /** - * Process the input from the CC license page - * - * @param context - * current DSpace context - * @param request - * current servlet request object - * @param response - * current servlet response object - * @param subInfo - * submission info object - * - * @return Status or error flag which will be processed by - * doPostProcessing() below! (if STATUS_COMPLETE or 0 is returned, - * no errors occurred!) - */ - protected int processCC(Context context, HttpServletRequest request, - HttpServletResponse response, SubmissionInfo subInfo) - throws ServletException, IOException, SQLException, - AuthorizeException - { - String buttonPressed = Util.getSubmitButton(request, NEXT_BUTTON); - - // RLR hack - need to distinguish between progress bar real submission - // (if cc_license_url exists, then users has accepted the CC License) - String ccLicenseUrl = request.getParameter("cc_license_url"); - - if (buttonPressed.equals("submit_no_cc")) - { - // Skipping the CC license - remove any existing license selection - creativeCommonsService.removeLicense(context, subInfo.getSubmissionItem() - .getItem()); - } - else if ((ccLicenseUrl != null) && (ccLicenseUrl.length() > 0)) - { - Item item = subInfo.getSubmissionItem().getItem(); - - // save the CC license - creativeCommonsService.setLicense(context, item, ccLicenseUrl); - } - - // commit changes - context.dispatchEvents(); - - // completed without errors - return STATUS_COMPLETE; - } - /** * Process the input from the CC license page using CC Web service @@ -230,7 +159,7 @@ public class CCLicenseStep extends AbstractProcessingStep * doPostProcessing() below! (if STATUS_COMPLETE or 0 is returned, * no errors occurred!) */ - protected int processCCWS(Context context, HttpServletRequest request, + protected int processCC(Context context, HttpServletRequest request, HttpServletResponse response, SubmissionInfo subInfo) throws ServletException, IOException, SQLException, AuthorizeException { @@ -251,34 +180,25 @@ public class CCLicenseStep extends AbstractProcessingStep LicenseMetadataValue nameField = creativeCommonsService.getCCField("name"); ccLookup.issue(licenseclass, map, configurationService.getProperty("cc.license.locale")); Item item = subInfo.getSubmissionItem().getItem(); - if (licenseclass.equals("xmlui.Submission.submit.CCLicenseStep.no_license")) + if (licenseclass.equals("webui.Submission.submit.CCLicenseStep.no_license")) { - // only remove any previous licenses - String licenseUri = uriField.ccItemValue(item); - if (licenseUri != null) { - uriField.removeItemValue(context, item, licenseUri); - if (configurationService.getBooleanProperty("cc.submit.setname")) - { - String licenseName = nameField.keyedItemValue(item, licenseUri); - nameField.removeItemValue(context, item, licenseName); - } - if (configurationService.getBooleanProperty("cc.submit.addBitstream")) - { - creativeCommonsService.removeLicense(context, item); - } - itemService.update(context, item); - context.dispatchEvents(); - removeRequiredAttributes(session); - } + creativeCommonsService.removeLicense(context, uriField, nameField, item); + + itemService.update(context, item); + context.dispatchEvents(); + removeRequiredAttributes(session); + return STATUS_COMPLETE; } - else if (StringUtils.isBlank(licenseclass) || licenseclass.equals("xmlui.Submission.submit.CCLicenseStep.select_change")) + else if (StringUtils.isBlank(licenseclass) || licenseclass.equals("webui.Submission.submit.CCLicenseStep.select_change")) { removeRequiredAttributes(session); return STATUS_COMPLETE; } else if (ccLookup.isSuccess()) { + creativeCommonsService.removeLicense(context, uriField, nameField, item); + uriField.addItemValue(context, item, ccLookup.getLicenseUrl()); if (configurationService.getBooleanProperty("cc.submit.addbitstream")) { creativeCommonsService.setLicenseRDF(context, item, ccLookup.getRdf()); @@ -286,7 +206,8 @@ public class CCLicenseStep extends AbstractProcessingStep if (configurationService.getBooleanProperty("cc.submit.setname")) { nameField.addItemValue(context, item, ccLookup.getLicenseName()); } - itemService.update(context, item); + + itemService.update(context, item); context.dispatchEvents(); removeRequiredAttributes(session); session.removeAttribute("inProgress"); @@ -303,7 +224,8 @@ public class CCLicenseStep extends AbstractProcessingStep } return STATUS_COMPLETE; } - + + private void removeRequiredAttributes(HttpSession session) { session.removeAttribute("ccError"); session.removeAttribute("isFieldRequired"); diff --git a/dspace-api/src/main/resources/Messages.properties b/dspace-api/src/main/resources/Messages.properties index e7e00aa313..26d8dd5701 100644 --- a/dspace-api/src/main/resources/Messages.properties +++ b/dspace-api/src/main/resources/Messages.properties @@ -1006,15 +1006,15 @@ jsp.submit.complete.info = Your submissio jsp.submit.complete.again = Submit another item to the same collection jsp.submit.complete.link = Go to My DSpace jsp.submit.complete.title = Submission Complete! -jsp.submit.creative-commons.choice1 = Press the 'Next' button below to keep the license previously chosen. -jsp.submit.creative-commons.choice2 = Press the 'Skip Creative Commons' button below to remove the current choice, and forego a Creative Commons license. -jsp.submit.creative-commons.choice3 = Complete the selection process below to replace the current choice. jsp.submit.creative-commons.heading = Submit: Use a Creative Commons License -jsp.submit.creative-commons.info1 = You have already chosen a Creative Commons license and added it to this item. You may: -jsp.submit.creative-commons.info2 = To license your Item under Creative Commons, follow the instructions below. You will be given an opportunity to review your selection. Follow the 'proceed' link to add the license. If you wish to omit a Creative Commons license, press the 'Skip Creative Commons' button. -jsp.submit.creative-commons.info3 = Your browser must support IFrames to use this feature -jsp.submit.creative-commons.skip.button = Skip Creative Commons > +jsp.submit.creative-commons.info1 = If you wish, you may add a Creative Commons License to your item. Creative Commons licenses govern what people who read your work may then do with it. jsp.submit.creative-commons.title = Use a Creative Commons License + +jsp.submit.creative-commons.license = License Type +jsp.submit.creative-commons.select_change = Select or modify your license ... +jsp.submit.creative-commons.no_license = No Creative Commons License +jsp.submit.creative-commons.license.current = Current license + jsp.submit.edit-bitstream-access.title = Edit Bitstream Access jsp.submit.edit-bitstream-access.heading = Edit Bitstream Access jsp.submit.edit-bitstream-access.save.button = Save diff --git a/dspace-api/src/main/resources/org/dspace/license/CreativeCommons.xsl b/dspace-api/src/main/resources/org/dspace/license/CreativeCommons.xsl index 53b7ebd066..f32942a302 100644 --- a/dspace-api/src/main/resources/org/dspace/license/CreativeCommons.xsl +++ b/dspace-api/src/main/resources/org/dspace/license/CreativeCommons.xsl @@ -9,40 +9,42 @@ --> + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cc="http://creativecommons.org/ns#" + xmlns:old-cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + exclude-result-prefixes="old-cc"> - - - - - - - - - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dspace-jspui/src/main/java/org/dspace/app/webui/json/CreativeCommonsJSONRequest.java b/dspace-jspui/src/main/java/org/dspace/app/webui/json/CreativeCommonsJSONRequest.java new file mode 100644 index 0000000000..90fc1f239c --- /dev/null +++ b/dspace-jspui/src/main/java/org/dspace/app/webui/json/CreativeCommonsJSONRequest.java @@ -0,0 +1,77 @@ +/** + * The contents of this file are subject to the license and copyright + * detailed in the LICENSE and NOTICE files at the root of the source + * tree and available online at + * + * http://www.dspace.org/license/ + */ +package org.dspace.app.webui.json; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.dspace.authorize.AuthorizeException; +import org.dspace.core.ConfigurationManager; +import org.dspace.core.Context; +import org.dspace.license.CCLicenseField; +import org.dspace.license.CCLookup; +import org.dspace.services.ConfigurationService; +import org.dspace.services.factory.DSpaceServicesFactory; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; + +/** + * @author Luigi Andrea Pascarelli + */ +public class CreativeCommonsJSONRequest extends JSONRequest { + + private static Logger log = Logger.getLogger(CreativeCommonsJSONRequest.class); + protected ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService(); + + @Override + public void doJSONRequest(Context context, HttpServletRequest req, HttpServletResponse resp) + throws AuthorizeException, IOException { + Gson json = new Gson(); + String selectedLicense = req.getParameter("license"); + + List dto = new ArrayList(); + + if (StringUtils.isNotBlank(selectedLicense)) { + CCLookup cclookup = new CCLookup(); + + String ccLocale = configurationService.getProperty("cc.license.locale"); + /** Default locale to 'en' */ + ccLocale = (StringUtils.isNotBlank(ccLocale)) ? ccLocale : "en"; + + // output the license fields chooser for the license class type + if (cclookup.getLicenseFields(selectedLicense, ccLocale) == null) { + // do nothing + } else { + Collection outerIterator = cclookup.getLicenseFields(selectedLicense, ccLocale); + for(CCLicenseField cclicensefield : outerIterator) { + if (cclicensefield.getId().equals("jurisdiction")) + continue; + dto.add(cclicensefield); + } + } + } + + JsonElement tree = json.toJsonTree(dto); + JsonObject jo = new JsonObject(); + jo.add("result", tree); + resp.getWriter().write(jo.toString()); + } + +} diff --git a/dspace-jspui/src/main/java/org/dspace/app/webui/servlet/admin/EditItemServlet.java b/dspace-jspui/src/main/java/org/dspace/app/webui/servlet/admin/EditItemServlet.java index 74e78fb996..085cb43266 100644 --- a/dspace-jspui/src/main/java/org/dspace/app/webui/servlet/admin/EditItemServlet.java +++ b/dspace-jspui/src/main/java/org/dspace/app/webui/servlet/admin/EditItemServlet.java @@ -7,7 +7,28 @@ */ package org.dspace.app.webui.servlet.admin; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; +import java.util.UUID; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + import org.apache.commons.fileupload.FileUploadBase.FileSizeLimitExceededException; +import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; import org.dspace.app.util.AuthorizeUtil; import org.dspace.app.util.Util; @@ -16,25 +37,35 @@ import org.dspace.app.webui.util.FileUploadRequest; import org.dspace.app.webui.util.JSPManager; import org.dspace.app.webui.util.UIUtil; import org.dspace.authorize.AuthorizeException; -import org.dspace.content.*; +import org.dspace.content.Bitstream; +import org.dspace.content.BitstreamFormat; +import org.dspace.content.Bundle; import org.dspace.content.Collection; +import org.dspace.content.DSpaceObject; +import org.dspace.content.Item; +import org.dspace.content.MetadataField; +import org.dspace.content.MetadataSchema; import org.dspace.content.authority.Choices; import org.dspace.content.factory.ContentServiceFactory; -import org.dspace.content.service.*; +import org.dspace.content.service.BitstreamFormatService; +import org.dspace.content.service.BitstreamService; +import org.dspace.content.service.BundleService; +import org.dspace.content.service.CollectionService; +import org.dspace.content.service.ItemService; +import org.dspace.content.service.MetadataFieldService; +import org.dspace.content.service.MetadataSchemaService; import org.dspace.core.Constants; import org.dspace.core.Context; import org.dspace.core.LogManager; import org.dspace.handle.factory.HandleServiceFactory; import org.dspace.handle.service.HandleService; +import org.dspace.license.CCLicense; +import org.dspace.license.CCLookup; +import org.dspace.license.LicenseMetadataValue; import org.dspace.license.factory.LicenseServiceFactory; import org.dspace.license.service.CreativeCommonsService; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.*; -import java.sql.SQLException; -import java.util.*; +import org.dspace.services.ConfigurationService; +import org.dspace.services.factory.DSpaceServicesFactory; /** * Servlet for editing and deleting (expunging) items @@ -76,6 +107,9 @@ public class EditItemServlet extends DSpaceServlet /** User confirms withdrawal of item */ public static final int PUBLICIZE = 11; + + /** User updates Creative Commons License */ + public static final int UPDATE_CC = 12; /** JSP to upload bitstream */ protected static final String UPLOAD_BITSTREAM_JSP = "/tools/upload-bitstream.jsp"; @@ -110,6 +144,8 @@ public class EditItemServlet extends DSpaceServlet private final transient CreativeCommonsService creativeCommonsService = LicenseServiceFactory.getInstance().getCreativeCommonsService(); + protected ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService(); + @Override protected void doDSGet(Context context, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, @@ -207,6 +243,13 @@ public class EditItemServlet extends DSpaceServlet Item item = itemService.find(context, UIUtil.getUUIDParameter(request, "item_id")); + if (request.getParameter("submit_cancel_cc") != null) + { + showEditForm(context, request, response, item); + + return; + } + String handle = handleService.findHandle(context, item); // now check to see if person can edit item @@ -357,6 +400,54 @@ public class EditItemServlet extends DSpaceServlet break; + case UPDATE_CC: + + Map map = new HashMap(); + String licenseclass = (request.getParameter("licenseclass_chooser") != null) ? request.getParameter("licenseclass_chooser") : ""; + String jurisdiction = (configurationService.getProperty("cc.license.jurisdiction") != null) ? configurationService.getProperty("cc.license.jurisdiction") : ""; + if (licenseclass.equals("standard")) { + map.put("commercial", request.getParameter("commercial_chooser")); + map.put("derivatives", request.getParameter("derivatives_chooser")); + } else if (licenseclass.equals("recombo")) { + map.put("sampling", request.getParameter("sampling_chooser")); + } + map.put("jurisdiction", jurisdiction); + CCLookup ccLookup = new CCLookup(); + LicenseMetadataValue uriField = creativeCommonsService.getCCField("uri"); + LicenseMetadataValue nameField = creativeCommonsService.getCCField("name"); + ccLookup.issue(licenseclass, map, configurationService.getProperty("cc.license.locale")); + if (licenseclass.equals("webui.Submission.submit.CCLicenseStep.no_license")) + { + creativeCommonsService.removeLicense(context, uriField, nameField, item); + + itemService.update(context, item); + context.dispatchEvents(); + + } + else if (licenseclass.equals("webui.Submission.submit.CCLicenseStep.select_change")) { + //none + } + else if (ccLookup.isSuccess()) + { + creativeCommonsService.removeLicense(context, uriField, nameField, item); + + uriField.addItemValue(context, item, ccLookup.getLicenseUrl()); + if (configurationService.getBooleanProperty("cc.submit.addbitstream")) { + creativeCommonsService.setLicenseRDF(context, item, ccLookup.getRdf()); + } + if (configurationService.getBooleanProperty("cc.submit.setname")) { + nameField.addItemValue(context, item, ccLookup.getLicenseName()); + } + + itemService.update(context, item); + context.dispatchEvents(); + + } + showEditForm(context, request, response, item); + context.complete(); + + break; + default: // Erm... weird action value received. @@ -407,19 +498,6 @@ public class EditItemServlet extends DSpaceServlet HttpServletResponse response, Item item) throws ServletException, IOException, SQLException, AuthorizeException { - if ( request.getParameter("cc_license_url") != null ) - { - // check authorization - AuthorizeUtil.authorizeManageCCLicense(context, item); - - // turn off auth system to allow replace also to user that can't - // remove/add bitstream to the item - context.turnOffAuthorisationSystem(); - // set or replace existing CC license - creativeCommonsService.setLicense(context, item, - request.getParameter("cc_license_url")); - context.restoreAuthSystemState(); - } // Get the handle, if any String handle = handleService.findHandle(context, item); @@ -553,6 +631,9 @@ public class EditItemServlet extends DSpaceServlet request.setAttribute("dc.types", types); request.setAttribute("metadataFields", metadataFields); + if(response.isCommitted()) { + return; + } JSPManager.showJSP(request, response, "/tools/edit-item-form.jsp"); } @@ -791,6 +872,19 @@ public class EditItemServlet extends DSpaceServlet { // Show cc-edit page request.setAttribute("item", item); + + boolean exists = creativeCommonsService.hasLicense(context, item); + request.setAttribute("cclicense.exists", Boolean.valueOf(exists)); + + String ccLocale = configurationService.getProperty("cc.license.locale"); + /** Default locale to 'en' */ + ccLocale = (StringUtils.isNotBlank(ccLocale)) ? ccLocale : "en"; + request.setAttribute("cclicense.locale", ccLocale); + + CCLookup cclookup = new CCLookup(); + java.util.Collection collectionLicenses = cclookup.getLicenses(ccLocale); + request.setAttribute("cclicense.licenses", collectionLicenses); + JSPManager .showJSP(request, response, "/tools/creative-commons-edit.jsp"); } diff --git a/dspace-jspui/src/main/java/org/dspace/app/webui/submit/step/JSPCCLicenseStep.java b/dspace-jspui/src/main/java/org/dspace/app/webui/submit/step/JSPCCLicenseStep.java index 133c7d6d9c..69dbab9f9b 100644 --- a/dspace-jspui/src/main/java/org/dspace/app/webui/submit/step/JSPCCLicenseStep.java +++ b/dspace-jspui/src/main/java/org/dspace/app/webui/submit/step/JSPCCLicenseStep.java @@ -9,11 +9,13 @@ package org.dspace.app.webui.submit.step; import java.io.IOException; import java.sql.SQLException; +import java.util.Collection; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; import org.dspace.app.util.SubmissionInfo; import org.dspace.app.util.Util; @@ -28,8 +30,12 @@ import org.dspace.content.factory.ContentServiceFactory; import org.dspace.content.service.WorkspaceItemService; import org.dspace.core.Context; import org.dspace.core.LogManager; +import org.dspace.license.CCLicense; +import org.dspace.license.CCLookup; import org.dspace.license.factory.LicenseServiceFactory; import org.dspace.license.service.CreativeCommonsService; +import org.dspace.services.ConfigurationService; +import org.dspace.services.factory.DSpaceServicesFactory; import org.dspace.submit.step.LicenseStep; /** @@ -78,6 +84,8 @@ public class JSPCCLicenseStep extends JSPStep private CreativeCommonsService creativeCommonsService; + protected ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService(); + public JSPCCLicenseStep() { workspaceItemService = ContentServiceFactory.getInstance().getWorkspaceItemService(); creativeCommonsService = LicenseServiceFactory.getInstance().getCreativeCommonsService(); @@ -116,6 +124,15 @@ public class JSPCCLicenseStep extends JSPStep boolean exists = creativeCommonsService.hasLicense(context, item); request.setAttribute("cclicense.exists", Boolean.valueOf(exists)); + String ccLocale = configurationService.getProperty("cc.license.locale"); + /** Default locale to 'en' */ + ccLocale = (StringUtils.isNotBlank(ccLocale)) ? ccLocale : "en"; + request.setAttribute("cclicense.locale", ccLocale); + + CCLookup cclookup = new CCLookup(); + Collection collectionLicenses = cclookup.getLicenses(ccLocale); + request.setAttribute("cclicense.licenses", collectionLicenses); + JSPStepManager.showJSP(request, response, subInfo, CC_LICENSE_JSP); } diff --git a/dspace-jspui/src/main/webapp/submit/cc-license.jsp b/dspace-jspui/src/main/webapp/submit/cc-license.jsp deleted file mode 100644 index a549caa13b..0000000000 --- a/dspace-jspui/src/main/webapp/submit/cc-license.jsp +++ /dev/null @@ -1,29 +0,0 @@ -<%-- - - The contents of this file are subject to the license and copyright - detailed in the LICENSE and NOTICE files at the root of the source - tree and available online at - - http://www.dspace.org/license/ - ---%> -<%-- - - - - Attributes to pass in: - - license_url - the CC license URL - --%> - -<%@ page contentType="text/html;charset=UTF-8" %> - -<%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> - -<% - request.setAttribute("LanguageSwitch", "hide"); - - String cc_license_url = (String) request.getParameter("license_url"); -%> - diff --git a/dspace-jspui/src/main/webapp/submit/creative-commons.css b/dspace-jspui/src/main/webapp/submit/creative-commons.css deleted file mode 100644 index 7933fac8b5..0000000000 --- a/dspace-jspui/src/main/webapp/submit/creative-commons.css +++ /dev/null @@ -1,64 +0,0 @@ -/** - * The contents of this file are subject to the license and copyright - * detailed in the LICENSE and NOTICE files at the root of the source - * tree and available online at - * - * http://www.dspace.org/license/ - */ - body { - margin:0px; - background:white; - margin-top:5px; - margin-bottom:5px; - font-family:verdana; - color:#333; - } - - #main { - border-left:1px solid #D0D0D0; - border-right:1px solid #D0D0D0; - border-bottom:1px solid #D0D0D0; - border-top:1px solid #D0D0D0; - background:#fff; - margin-left:50px; - margin-right:50px; - } - -/* Looks like you have to specify the width of #menu -or IE5 Mac stretches it all the way across the div, and -Opera streches it halfway. */ - - #main #menu { - border-left:1px dotted #ccc; -/* border-bottom:1px solid #000;*/ - float:right; - width:230px; - background:white; - margin:0px 0px 10px 10px; - } - - td, h3, p,h1,pre { - margin:0px 20px 20px 20px; - font-size:11px; - line-height:140%; - } - - .header { - padding-left: 10px; - padding-top:30px; - } - - .nav { - padding-left:10px; - padding-bottom:10px; - font-size:11px; - margin-bottom:16px; - } - - #menu p { - font-size:11px; - } - - .dent { - margin-left:64px; - } diff --git a/dspace-jspui/src/main/webapp/submit/creative-commons.jsp b/dspace-jspui/src/main/webapp/submit/creative-commons.jsp index 430bcbd35f..f2905d0372 100644 --- a/dspace-jspui/src/main/webapp/submit/creative-commons.jsp +++ b/dspace-jspui/src/main/webapp/submit/creative-commons.jsp @@ -27,6 +27,8 @@ <%@ page import="org.dspace.license.CreativeCommonsServiceImpl" %> <%@ page import="org.dspace.core.ConfigurationManager" %> <%@ page import="org.dspace.license.factory.LicenseServiceFactory" %> +<%@ page import="org.dspace.license.CCLicense"%> +<%@ page import="java.util.Collection"%> <%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> @@ -39,28 +41,15 @@ //get submission information object SubmissionInfo subInfo = SubmissionController.getSubmissionInfo(context, request); - String reqURL = request.getRequestURL().toString(); - int firstIndex = reqURL.indexOf("://") + 3; - int secondIndex = reqURL.indexOf("/", firstIndex); - String baseURL = reqURL.substring(0, secondIndex) + request.getContextPath(); - String ssURL = baseURL + "/submit/creative-commons.css"; - String exitURL = baseURL + "/submit/cc-license.jsp?license_url=[license_url]"; Boolean lExists = (Boolean)request.getAttribute("cclicense.exists"); boolean licenseExists = (lExists == null ? false : lExists.booleanValue()); - String jurisdiction = ConfigurationManager.getProperty("cc.license.jurisdiction"); - if ((jurisdiction != null) && (!"".equals(jurisdiction))) - { - jurisdiction = "&jurisdiction=" + jurisdiction.trim(); - } - else - { - jurisdiction = ""; - } - + Collection cclicenses = (Collection)request.getAttribute("cclicense.licenses"); + String licenseURL = ""; if(licenseExists) licenseURL = LicenseServiceFactory.getInstance().getCreativeCommonsService().getLicenseURL(context, subInfo.getSubmissionItem().getItem()); + %> Submit: Use a Creative Commons License --%>

-<% - if (licenseExists) - { -%> - <%--

You have already chosen a Creative Commons license and added it to this item. - You may:

--%>

- <%--
    -
  • Press the 'Next' button below to keep the license previously chosen.
  • -
  • Press the 'Skip Creative Commons' button below to remove the current choice, and forego a Creative Commons license.
  • -
  • Complete the selection process below to replace the current choice.
  • -
--%> -
    -
  • -
  • -
  • -
-<% - } - else - { -%> - <%--

To license your Item under Creative Commons, follow the instructions below. You will be given an opportunity to review your selection. - Follow the 'proceed' link to add the license. If you wish to omit a Creative Commons license, press the 'Skip Creative Commons' button.

--%> -

-<% - } -%> - <%-- --%> - - - <%-- Hidden fields needed for SubmissionController servlet to know which step is next--%> +
+ + + + +
+ <% if(licenseExists) { %> +
+ + + <%=licenseURL %> + +
+ <% } %> + +
+ <%-- Hidden fields needed for SubmissionController servlet to know which step is next--%> <%= SubmissionController.getSubmissionParameters(context, request) %> @@ -127,15 +112,41 @@ <% } %> "/> - "/> -<% - if (licenseExists) - { -%> " /> -<% - } -%> +
diff --git a/dspace-jspui/src/main/webapp/tools/creative-commons-edit.jsp b/dspace-jspui/src/main/webapp/tools/creative-commons-edit.jsp index d8c3477ecd..3c7e6de006 100644 --- a/dspace-jspui/src/main/webapp/tools/creative-commons-edit.jsp +++ b/dspace-jspui/src/main/webapp/tools/creative-commons-edit.jsp @@ -18,32 +18,28 @@ <%@ page contentType="text/html;charset=UTF-8" %> -<%@ page import="org.dspace.app.util.SubmissionInfo" %> +<%@page import="org.dspace.app.webui.servlet.admin.EditItemServlet"%> +<%@ page import="org.dspace.content.Item" %> +<%@ page import="org.dspace.license.CreativeCommonsServiceImpl" %> <%@ page import="org.dspace.core.ConfigurationManager" %> +<%@ page import="org.dspace.license.factory.LicenseServiceFactory" %> +<%@ page import="org.dspace.license.CCLicense"%> +<%@ page import="java.util.Collection"%> <%@ taglib uri="http://www.dspace.org/dspace-tags.tld" prefix="dspace" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> <% - + Item item = (Item) request.getAttribute("item"); - String reqURL = request.getRequestURL().toString(); - int firstIndex = reqURL.indexOf("://") + 3; - int secondIndex = reqURL.indexOf("/", firstIndex); - String baseURL = reqURL.substring(0, secondIndex) + request.getContextPath(); - String ssURL = baseURL + "/submit/creative-commons.css"; - // Use the submit process' cc-license component - String exitURL = baseURL + "/submit/cc-license.jsp?license_url=[license_url]"; + Boolean lExists = (Boolean) request.getAttribute("cclicense.exists"); + boolean licenseExists = (lExists == null ? false : lExists.booleanValue()); - String jurisdiction = ConfigurationManager.getProperty("webui.submit.cc-jurisdiction"); - if ((jurisdiction != null) && (!"".equals(jurisdiction))) - { - jurisdiction = "&jurisdiction=" + jurisdiction.trim(); - } - else - { - jurisdiction = ""; - } + Collection cclicenses = (Collection) request.getAttribute("cclicense.licenses"); + + String licenseURL = ""; + if (licenseExists) + licenseURL = LicenseServiceFactory.getInstance().getCreativeCommonsService().getLicenseURL(context, subInfo.getSubmissionItem().getItem()); %>

-
- + - - -
- + +
+ + +
+ <% + if (licenseExists) { + %> + + <% + } + %> + +
+ + + + + " /> + " /> + + + +
diff --git a/dspace-jspui/src/main/webapp/tools/edit-item-form.jsp b/dspace-jspui/src/main/webapp/tools/edit-item-form.jsp index 2b9f1cac5f..2689819002 100644 --- a/dspace-jspui/src/main/webapp/tools/edit-item-form.jsp +++ b/dspace-jspui/src/main/webapp/tools/edit-item-form.jsp @@ -697,7 +697,7 @@ List ccBundle = ContentServiceFactory.getInstance().getItemService().getBundles(item, "CC-LICENSE"); s = ccBundle.size() > 0 ? LocaleSupport.getLocalizedMessage(pageContext, "jsp.tools.edit-item-form.replacecc.button") : LocaleSupport.getLocalizedMessage(pageContext, "jsp.tools.edit-item-form.addcc.button"); %> - + "/> diff --git a/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/submission/submit/CCLicenseStep.java b/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/submission/submit/CCLicenseStep.java index 08a5c7e61f..fa2186c90d 100644 --- a/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/submission/submit/CCLicenseStep.java +++ b/dspace-xmlui/src/main/java/org/dspace/app/xmlui/aspect/submission/submit/CCLicenseStep.java @@ -71,8 +71,8 @@ public class CCLicenseStep extends AbstractSubmissionStep protected static final Message T_license = message("xmlui.Submission.submit.CCLicenseStep.license"); protected static final Message T_submit_remove = message("xmlui.Submission.submit.CCLicenseStep.submit_remove"); - protected static final Message T_no_license = message("xmlui.Submission.submit.CCLicenseStep.no_license"); - protected static final Message T_select_change = message("xmlui.Submission.submit.CCLicenseStep.select_change"); + protected static final Message T_no_license = message("webui.Submission.submit.CCLicenseStep.no_license","xmlui.Submission.submit.CCLicenseStep.no_license"); + protected static final Message T_select_change = message("webui.Submission.submit.CCLicenseStep.select_change","xmlui.Submission.submit.CCLicenseStep.select_change"); protected static final Message T_save_changes = message("xmlui.Submission.submit.CCLicenseStep.save_changes"); protected static final Message T_ccws_error = message("xmlui.Submission.submit.CCLicenseStep.ccws_error"); diff --git a/dspace/config/dspace.cfg b/dspace/config/dspace.cfg index 0e2f69c183..48cbf50d97 100644 --- a/dspace/config/dspace.cfg +++ b/dspace/config/dspace.cfg @@ -815,12 +815,12 @@ webui.submit.blocktheses = false cc.api.rooturl = http://api.creativecommons.org/rest/1.5 # Metadata field to hold CC license URI of selected license -# NB: XMLUI presentation code expects 'dc.rights.uri' to hold CC data. If you change -# this to another field, please consult documentation on how to update UI configuration +# NB: DSpace (both JSPUI and XMLUI) presentation code expects 'dc.rights.uri' to hold CC data. If you change +# this to another field, please consult documentation on how to update UI configuration cc.license.uri = dc.rights.uri # Metadata field to hold CC license name of selected license (if defined) -# NB: XMLUI presentation code expects 'dc.rights' to hold CC data. If you change +# NB: DSpace (both JSPUI and XMLUI) presentation code expects 'dc.rights' to hold CC data. If you change # this to another field, please consult documentation on how to update UI configuration cc.license.name = dc.rights @@ -830,6 +830,9 @@ cc.submit.setname = true # Store license bitstream (RDF license text) during web submission cc.submit.addbitstream = true +# ONLY JSPUI, enable Creative Commons admin +webui.submit.enable-cc = false + # A list of license classes that should be excluded from selection process # class names - comma-separated list - must exactly match what service returns. # At time of implementation, these are: @@ -1222,7 +1225,8 @@ plugin.named.org.dspace.app.webui.json.JSONRequest = \ org.dspace.app.webui.discovery.DiscoveryJSONRequest = discovery,\ org.dspace.app.webui.json.SubmissionLookupJSONRequest = submissionLookup,\ org.dspace.app.webui.json.UploadProgressJSON = uploadProgress,\ - org.dspace.app.webui.handle.HandleJSONResolver = hdlresolver + org.dspace.app.webui.handle.HandleJSONResolver = hdlresolver,\ + org.dspace.app.webui.json.CreativeCommonsJSONRequest = creativecommons ### i18n - Locales / Language #### # Default Locale