diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/BrandedPreviewJPEGFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/BrandedPreviewJPEGFilter.java index cb3f90f66f..fc0b8c9e26 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/BrandedPreviewJPEGFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/BrandedPreviewJPEGFilter.java @@ -62,10 +62,13 @@ public class BrandedPreviewJPEGFilter extends MediaFilter /** + * @param currentItem item * @param source * source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ @Override public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/ExcelFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/ExcelFilter.java index 0ed7e79f08..05b9049aa1 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/ExcelFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/ExcelFilter.java @@ -73,11 +73,14 @@ public class ExcelFilter extends MediaFilter } /** - * @param source - * source input stream + * @param item item + * @param source source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ + @Override public InputStream getDestinationStream(Item item, InputStream source, boolean verbose) throws Exception { diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/FormatFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/FormatFilter.java index c892acbda6..702f65a8a6 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/FormatFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/FormatFilter.java @@ -70,12 +70,10 @@ public interface FormatFilter * for any reason. * * - * @param c - * context - * @param item - * item containing bitstream to process - * @param source - * source bitstream to be processed + * @param c context + * @param item item containing bitstream to process + * @param source source bitstream to be processed + * @param verbose verbose mode * * @return true if bitstream processing should continue, * false if this bitstream should be skipped diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/HTMLFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/HTMLFilter.java index 576d520f3a..0a1c016a2c 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/HTMLFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/HTMLFilter.java @@ -59,10 +59,12 @@ public class HTMLFilter extends MediaFilter } /** - * @param source - * source input stream + * @param currentItem item + * @param source source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ @Override public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/ImageMagickImageThumbnailFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/ImageMagickImageThumbnailFilter.java index 6698dbbe68..8959058acb 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/ImageMagickImageThumbnailFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/ImageMagickImageThumbnailFilter.java @@ -24,10 +24,12 @@ public class ImageMagickImageThumbnailFilter extends ImageMagickThumbnailFilter { /** - * @param source - * source input stream + * @param currentItem item + * @param source source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ @Override public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/JPEGFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/JPEGFilter.java index a44d905828..b4e409c261 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/JPEGFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/JPEGFilter.java @@ -66,10 +66,12 @@ public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats } /** - * @param source - * source input stream + * @param currentItem item + * @param source source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ @Override public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose) @@ -239,6 +241,8 @@ public class JPEGFilter extends MediaFilter implements SelfRegisterInputFormats * Convenience method that returns a blurred instance of the * provided {@code BufferedImage}. * + * @param buf buffered image + * @return updated BufferedImage */ public BufferedImage getBlurredInstance(BufferedImage buf) { diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilter.java index 24281a3f20..8e60a68155 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/MediaFilter.java @@ -29,15 +29,14 @@ public abstract class MediaFilter implements FormatFilter * for any reason. * * - * @param c - * context - * @param item - * item containing bitstream to process - * @param source - * source bitstream to be processed + * @param c context + * @param item item containing bitstream to process + * @param source source bitstream to be processed + * @param verbose verbose mode * * @return true if bitstream processing should continue, * false if this bitstream should be skipped + * @throws Exception if error */ @Override public boolean preProcessBitstream(Context c, Item item, Bitstream source, boolean verbose) @@ -62,6 +61,7 @@ public abstract class MediaFilter implements FormatFilter * @param generatedBitstream * the bitstream which was generated by * this filter. + * @throws java.lang.Exception */ @Override public void postProcessBitstream(Context c, Item item, Bitstream generatedBitstream) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/PDFBoxThumbnail.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/PDFBoxThumbnail.java index e27ad8754d..f482914a58 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/PDFBoxThumbnail.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/PDFBoxThumbnail.java @@ -66,10 +66,12 @@ public class PDFBoxThumbnail extends MediaFilter implements SelfRegisterInputFor } /** - * @param source - * source input stream + * @param currentItem item + * @param source source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ @Override public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/PDFFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/PDFFilter.java index a2c8f686a6..b68d488813 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/PDFFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/PDFFilter.java @@ -68,10 +68,12 @@ public class PDFFilter extends MediaFilter } /** - * @param source - * source input stream + * @param currentItem item + * @param source source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ @Override public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/PowerPointFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/PowerPointFilter.java index c44f9b5d7b..dc21e9ee00 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/PowerPointFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/PowerPointFilter.java @@ -64,10 +64,12 @@ public class PowerPointFilter extends MediaFilter } /** - * @param source - * source input stream + * @param currentItem item + * @param source source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ @Override public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/WordFilter.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/WordFilter.java index 9ca52fb211..8a1452941e 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/WordFilter.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/WordFilter.java @@ -63,10 +63,12 @@ public class WordFilter extends MediaFilter } /** - * @param source - * source input stream + * @param currentItem item + * @param source source input stream + * @param verbose verbose mode * * @return InputStream the resulting input stream + * @throws Exception if error */ @Override public InputStream getDestinationStream(Item currentItem, InputStream source, boolean verbose) diff --git a/dspace-api/src/main/java/org/dspace/app/mediafilter/service/MediaFilterService.java b/dspace-api/src/main/java/org/dspace/app/mediafilter/service/MediaFilterService.java index b191b062e4..d88a22bce7 100644 --- a/dspace-api/src/main/java/org/dspace/app/mediafilter/service/MediaFilterService.java +++ b/dspace-api/src/main/java/org/dspace/app/mediafilter/service/MediaFilterService.java @@ -48,8 +48,11 @@ public interface MediaFilterService { * Iterate through the item's bitstreams in the ORIGINAL bundle, applying * filters if possible. * + * @param context context + * @param myItem item * @return true if any bitstreams processed, * false if none + * @throws Exception if error */ public boolean filterItem(Context context, Item myItem) throws Exception; @@ -60,8 +63,12 @@ public interface MediaFilterService { * instantiated. Exceptions from filtering will be logged to STDOUT and * swallowed. * + * @param c context + * @param myItem item + * @param myBitstream bitstream * @return true if bitstream processed, * false if no applicable filter or already processed + * @throws Exception if error */ public boolean filterBitstream(Context c, Item myItem, Bitstream myBitstream) throws Exception; diff --git a/dspace-api/src/main/java/org/dspace/app/requestitem/RequestItemHelpdeskStrategy.java b/dspace-api/src/main/java/org/dspace/app/requestitem/RequestItemHelpdeskStrategy.java index cfe2f8cacb..ddd6d50ba5 100644 --- a/dspace-api/src/main/java/org/dspace/app/requestitem/RequestItemHelpdeskStrategy.java +++ b/dspace-api/src/main/java/org/dspace/app/requestitem/RequestItemHelpdeskStrategy.java @@ -9,7 +9,6 @@ package org.dspace.app.requestitem; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; -import org.dspace.authorize.AuthorizeException; import org.dspace.content.Item; import org.dspace.core.ConfigurationManager; import org.dspace.core.Context; @@ -55,9 +54,10 @@ public class RequestItemHelpdeskStrategy extends RequestItemSubmitterStrategy { * Return a RequestItemAuthor object for the specified helpdesk email address. * It makes an attempt to find if there is a matching eperson for the helpdesk address, to use the name, * Otherwise it falls back to a helpdeskname key in the Messages.props. - * @param context - * @param helpDeskEmail - * @return + * @param context context + * @param helpDeskEmail email + * @return RequestItemAuthor + * @throws SQLException if database error */ public RequestItemAuthor getHelpDeskPerson(Context context, String helpDeskEmail) throws SQLException{ EPerson helpdeskEPerson = null; diff --git a/dspace-api/src/main/java/org/dspace/app/requestitem/service/RequestItemService.java b/dspace-api/src/main/java/org/dspace/app/requestitem/service/RequestItemService.java index e8000f3f5b..b3ac1b5004 100644 --- a/dspace-api/src/main/java/org/dspace/app/requestitem/service/RequestItemService.java +++ b/dspace-api/src/main/java/org/dspace/app/requestitem/service/RequestItemService.java @@ -24,7 +24,13 @@ public interface RequestItemService { /** * Generate a request item representing the request and put it into the DB - * @param context + * @param context context + * @param bitstream bitstream + * @param item item + * @param reqMessage message + * @param allFiles all files flag + * @param reqEmail email + * @param reqName name * @return the token of the request item * @throws SQLException if database error */ @@ -36,6 +42,7 @@ public interface RequestItemService { /** * Save updates to the record. Only accept_request, and decision_date are set-able. * @param context + * @param requestItem */ public void update(Context context, RequestItem requestItem); diff --git a/dspace-api/src/main/java/org/dspace/app/sfx/service/SFXFileReaderService.java b/dspace-api/src/main/java/org/dspace/app/sfx/service/SFXFileReaderService.java index 44d4abeab6..820abe4a97 100644 --- a/dspace-api/src/main/java/org/dspace/app/sfx/service/SFXFileReaderService.java +++ b/dspace-api/src/main/java/org/dspace/app/sfx/service/SFXFileReaderService.java @@ -67,17 +67,24 @@ public interface SFXFileReaderService { /** * Is Empty text Node * + * @param nd node + * @return true or false */ public boolean isEmptyTextNode(Node nd); /** * Returns the value of the node's attribute named {@code } + * @param e node + * @param name name + * @return value */ public String getAttribute(Node e, String name); /** * Returns the value found in the Text node (if any) in the * node list that's passed in. + * @param node node + * @return value */ public String getValue(Node node); } \ No newline at end of file diff --git a/dspace-api/src/main/java/org/dspace/app/statistics/LogAnalyser.java b/dspace-api/src/main/java/org/dspace/app/statistics/LogAnalyser.java index 56ab0256d9..b484f12273 100644 --- a/dspace-api/src/main/java/org/dspace/app/statistics/LogAnalyser.java +++ b/dspace-api/src/main/java/org/dspace/app/statistics/LogAnalyser.java @@ -9,7 +9,6 @@ package org.dspace.app.statistics; import org.apache.commons.lang3.StringUtils; import org.dspace.core.ConfigurationManager; -import org.dspace.core.Constants; import org.dspace.core.Context; import org.dspace.core.LogManager; import org.dspace.discovery.DiscoverQuery; @@ -213,6 +212,9 @@ public class LogAnalyser /** * main method to be run from command line. See usage information for * details as to how to use the command line flags (-help) + * @param argv arguments + * @throws Exception if error + * @throws SQLException if database error */ public static void main(String [] argv) throws Exception, SQLException @@ -294,6 +296,10 @@ public class LogAnalyser * @param myStartDate the desired start of the analysis. Starts from the beginning otherwise * @param myEndDate the desired end of the analysis. Goes to the end otherwise * @param myLookUp force a lookup of the database + * @return aggregate output + * @throws IOException if IO error + * @throws SQLException if database error + * @throws SearchServiceException if search error */ public static String processLogs(Context context, String myLogDir, String myFileTemplate, String myConfigFile, @@ -587,6 +593,7 @@ public class LogAnalyser /** * generate the analyser's output to the specified out file + * @return output */ public static String createOutput() { @@ -866,6 +873,7 @@ public class LogAnalyser /** * Read in the current config file and populate the class globals. + * @throws IOException if IO error */ public static void readConfig() throws IOException { @@ -876,6 +884,7 @@ public class LogAnalyser * Read in the given config file and populate the class globals. * * @param configFile the config file to read in + * @throws IOException if IO error */ public static void readConfig(String configFile) throws IOException { @@ -1166,6 +1175,8 @@ public class LogAnalyser * @param type value for DC field 'type' (unqualified) * * @return an integer containing the relevant count + * @throws SQLException if database error + * @throws SearchServiceException if search error */ public static Integer getNumItems(Context context, String type) throws SQLException, SearchServiceException { @@ -1216,6 +1227,8 @@ public class LogAnalyser * * @return an Integer containing the number of items in the * archive + * @throws SQLException if database error + * @throws SearchServiceException if search error */ public static Integer getNumItems(Context context) throws SQLException, SearchServiceException { diff --git a/dspace-api/src/main/java/org/dspace/app/statistics/ReportGenerator.java b/dspace-api/src/main/java/org/dspace/app/statistics/ReportGenerator.java index 3b6ec4b5cb..039b516497 100644 --- a/dspace-api/src/main/java/org/dspace/app/statistics/ReportGenerator.java +++ b/dspace-api/src/main/java/org/dspace/app/statistics/ReportGenerator.java @@ -152,6 +152,9 @@ public class ReportGenerator /** * main method to be run from command line. See usage information for * details as to how to use the command line flags + * @param argv + * @throws java.lang.Exception + * @throws java.sql.SQLException */ public static void main(String [] argv) throws Exception, SQLException @@ -206,10 +209,13 @@ public class ReportGenerator * this method is retained for backwards compatibility, but delegates the actual * wprk to a new method * - * @param context the DSpace context in which this action is performed - * @param myFormat the desired output format (currently on HTML supported) - * @param myInput the aggregation file to be turned into a report - * @param myOutput the file into which to write the report + * @param context the DSpace context in which this action is performed + * @param myFormat the desired output format (currently on HTML supported) + * @param myInput the aggregation file to be turned into a report + * @param myOutput the file into which to write the report + * @param myMap the map + * @throws Exception if error + * @throws SQLException if database error */ public static void processReport(Context context, String myFormat, String myInput, String myOutput, @@ -242,6 +248,11 @@ public class ReportGenerator * using the pre-configuration information passed here, read in the * aggregation data and output a file containing the report in the * requested format + * @param context context + * @param report report + * @param myInput input + * @throws Exception if error + * @throws SQLException if database error */ public static void processReport(Context context, Report report, String myInput) @@ -527,6 +538,7 @@ public class ReportGenerator * actions which are more understandable to humans * * @param map the map file + * @throws IOException if IO error */ public static void readMap(String map) throws IOException @@ -612,6 +624,8 @@ public class ReportGenerator * The values that come from this file form the basis of the analysis report * * @param input the aggregator file + * @throws IOException if IO error + * @throws ParseException if parse error */ public static void readInput(String input) throws IOException, ParseException @@ -783,6 +797,7 @@ public class ReportGenerator * * @return a string containing a reference (almost citation) to the * article + * @throws SQLException if database error */ public static String getItemInfo(Context context, String handle) throws SQLException diff --git a/dspace-api/src/main/java/org/dspace/app/statistics/StatisticsLoader.java b/dspace-api/src/main/java/org/dspace/app/statistics/StatisticsLoader.java index c08cfc03ab..a46c39295a 100644 --- a/dspace-api/src/main/java/org/dspace/app/statistics/StatisticsLoader.java +++ b/dspace-api/src/main/java/org/dspace/app/statistics/StatisticsLoader.java @@ -66,6 +66,7 @@ public class StatisticsLoader /** * Get an array of the dates of the report files. + * @return array of dates */ public static Date[] getMonthlyReportDates() { @@ -74,6 +75,7 @@ public class StatisticsLoader /** * Get an array of the dates of the analysis files. + * @return array of dates */ public static Date[] getMonthlyAnalysisDates() { @@ -82,7 +84,8 @@ public class StatisticsLoader /** * Convert the formatted dates that are the keys of the map into a date array. - * @param monthlyMap + * @param monthlyMap map + * @return array of dates */ protected static Date[] getDatesFromMap(Map monthlyMap) { @@ -107,7 +110,7 @@ public class StatisticsLoader /** * Sort the date array in descending (reverse chronological) order. - * @param dates + * @param dates array of dates * @return sorted dates. */ protected static Date[] sortDatesDescending(Date[] dates) @@ -145,7 +148,8 @@ public class StatisticsLoader /** * Get the analysis file for a given date. - * @param date + * @param date date + * @return File */ public static File getAnalysisFor(String date) { @@ -156,7 +160,8 @@ public class StatisticsLoader /** * Get the report file for a given date. - * @param date + * @param date date + * @return File */ public static File getReportFor(String date) { @@ -167,6 +172,7 @@ public class StatisticsLoader /** * Get the current general analysis file. + * @return File */ public static File getGeneralAnalysis() { @@ -176,6 +182,7 @@ public class StatisticsLoader /** * Get the current general report file. + * @return File */ public static File getGeneralReport() { @@ -213,7 +220,7 @@ public class StatisticsLoader /** * Generate the cached file list from the array of files - * @param fileList + * @param fileList array of files */ private static synchronized void loadFileList(File[] fileList) { @@ -305,9 +312,10 @@ public class StatisticsLoader * formatters are used to identify the file as a particular type, * and extract the relevant information. If the file is not identified * by the formatter provided, then we return null. - * @param thisFile - * @param thisPattern - * @param sdf + * @param thisFile file + * @param thisPattern patter + * @param sdf date format + * @return StatsFile */ private static StatsFile makeStatsFile(File thisFile, Pattern thisPattern, DateFormat sdf) { @@ -336,6 +344,7 @@ public class StatisticsLoader /** * Get an array of all the analysis and report files. + * @return array of files */ private static File[] getAnalysisAndReportFileList() { diff --git a/dspace-api/src/main/java/org/dspace/app/util/CollectionDropDown.java b/dspace-api/src/main/java/org/dspace/app/util/CollectionDropDown.java index 0f8056a3ed..823f9390be 100644 --- a/dspace-api/src/main/java/org/dspace/app/util/CollectionDropDown.java +++ b/dspace-api/src/main/java/org/dspace/app/util/CollectionDropDown.java @@ -27,6 +27,7 @@ public class CollectionDropDown { * @param col * Get full path for this collection * @return Full path to the collection + * @throws SQLException if database error */ public static String collectionPath(Collection col) throws SQLException { @@ -42,6 +43,7 @@ public class CollectionDropDown { * @param maxchars * Truncate the full path to maxchar characters. 0 means do not truncate. * @return Full path to the collection (truncated) + * @throws SQLException if database error */ public static String collectionPath(Collection col, int maxchars) throws SQLException { diff --git a/dspace-api/src/main/java/org/dspace/app/util/DCInputSet.java b/dspace-api/src/main/java/org/dspace/app/util/DCInputSet.java index 38caadee9a..752fcb1cfe 100644 --- a/dspace-api/src/main/java/org/dspace/app/util/DCInputSet.java +++ b/dspace-api/src/main/java/org/dspace/app/util/DCInputSet.java @@ -25,7 +25,11 @@ public class DCInputSet /** the inputs ordered by page and row position */ private DCInput[][] inputPages = null; - /** constructor */ + /** constructor + * @param formName form name + * @param pages pages + * @param listMap map + */ public DCInputSet(String formName, List>> pages, Map> listMap) { this.formName = formName; @@ -116,6 +120,7 @@ public class DCInputSet * Does the current input set define the named field? * Scan through every field in every page of the input set * + * @param fieldName * @return true if the current set has the named field */ public boolean isFieldPresent(String fieldName) @@ -141,6 +146,8 @@ public class DCInputSet * and is valid for the specified document type * Scan through every field in every page of the input set * + * @param fieldName field name + * @param documentType doc type * @return true if the current set has the named field */ public boolean isFieldPresent(String fieldName, String documentType) diff --git a/dspace-api/src/main/java/org/dspace/app/util/DCInputsReader.java b/dspace-api/src/main/java/org/dspace/app/util/DCInputsReader.java index 44c8602338..a9135f43d4 100644 --- a/dspace-api/src/main/java/org/dspace/app/util/DCInputsReader.java +++ b/dspace-api/src/main/java/org/dspace/app/util/DCInputsReader.java @@ -82,6 +82,7 @@ public class DCInputsReader * level structures: a map between collections and forms, the definition for * each page of each form, and lists of pairs of values that populate * selection boxes. + * @throws DCInputsReaderException if input reader error */ public DCInputsReader() diff --git a/dspace-api/src/main/java/org/dspace/app/util/DSpaceWebappMXBean.java b/dspace-api/src/main/java/org/dspace/app/util/DSpaceWebappMXBean.java index 46c50b5744..05edc7b54c 100644 --- a/dspace-api/src/main/java/org/dspace/app/util/DSpaceWebappMXBean.java +++ b/dspace-api/src/main/java/org/dspace/app/util/DSpaceWebappMXBean.java @@ -15,15 +15,27 @@ package org.dspace.app.util; */ public interface DSpaceWebappMXBean { - /** Is this webapp a user interface? False if machine interface such as SWORD. */ + /** + * Is this webapp a user interface? False if machine interface such as SWORD. + * @return true/false + */ public boolean isUI(); - /** What kind of webapp? XMLUI, OAI, etc. */ + /** + * What kind of webapp? XMLUI, OAI, etc. + * @return kind of webapp + */ public String getKind(); - /** What is the base URL of this application? */ + /** + * What is the base URL of this application? + * @return base url + */ public String getURL(); - /** When did this application start? */ + /** + * When did this application start? + * @return start time + */ public String getStarted(); } diff --git a/dspace-api/src/main/java/org/dspace/app/util/GoogleMetadata.java b/dspace-api/src/main/java/org/dspace/app/util/GoogleMetadata.java index a1c7b9404b..0a05620f4c 100644 --- a/dspace-api/src/main/java/org/dspace/app/util/GoogleMetadata.java +++ b/dspace-api/src/main/java/org/dspace/app/util/GoogleMetadata.java @@ -210,8 +210,9 @@ public class GoogleMetadata * Wrap the item, parse all configured fields and generate metadata field * values. * - * @param item - * - The item being viewed to extract metadata from + * @param context context + * @param item The item being viewed to extract metadata from + * @throws SQLException if database error */ public GoogleMetadata(Context context, Item item) throws SQLException { @@ -779,6 +780,7 @@ public class GoogleMetadata /** * Produce meta elements that can easily be put into the head. + * @return List of elements */ public List disseminateList() { diff --git a/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java b/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java index bb13604cff..e2956b00a7 100644 --- a/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java +++ b/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java @@ -88,6 +88,7 @@ public class SubmissionConfigReader /** * Load Submission Configuration from the * item-submission.xml configuration file + * @throws ServletException if servlet error */ public SubmissionConfigReader() throws ServletException { diff --git a/dspace-api/src/main/java/org/dspace/app/util/SyndicationFeed.java b/dspace-api/src/main/java/org/dspace/app/util/SyndicationFeed.java index 83b61a61f6..281c231c63 100644 --- a/dspace-api/src/main/java/org/dspace/app/util/SyndicationFeed.java +++ b/dspace-api/src/main/java/org/dspace/app/util/SyndicationFeed.java @@ -165,6 +165,11 @@ public class SyndicationFeed /** * Fills in the feed and entry-level metadata from DSpace objects. + * @param request request + * @param context context + * @param dso DSpaceObject + * @param items array of objects + * @param labels label map */ public void populate(HttpServletRequest request, Context context, DSpaceObject dso, DSpaceObject items[], Map labels) @@ -450,6 +455,7 @@ public class SyndicationFeed * Sets the feed type for XML delivery, e.g. "rss_1.0", "atom_1.0" * Must match one of ROME's configured generators, see rome.properties * (currently rss_1.0, rss_2.0, atom_1.0, atom_0.3) + * @param feedType feed type */ public void setType(String feedType) { @@ -463,6 +469,7 @@ public class SyndicationFeed /** * @return the feed we built as DOM Document + * @throws FeedException if feed error */ public Document outputW3CDom() throws FeedException @@ -481,6 +488,7 @@ public class SyndicationFeed /** * @return the feed we built as serialized XML string + * @throws FeedException if feed error */ public String outputString() throws FeedException @@ -491,6 +499,9 @@ public class SyndicationFeed /** * send the output to designated Writer + * @param writer Writer + * @throws FeedException if feed error + * @throws IOException if IO error */ public void output(java.io.Writer writer) throws FeedException, IOException @@ -501,6 +512,7 @@ public class SyndicationFeed /** * Add a ROME plugin module (e.g. for OpenSearch) at the feed level. + * @param m module */ public void addModule(Module m) { @@ -532,7 +544,7 @@ public class SyndicationFeed * * @param request current servlet request * @param dso The object to reference, null if to the repository. - * @return + * @return URL */ protected String resolveURL(HttpServletRequest request, DSpaceObject dso) { diff --git a/dspace-api/src/main/java/org/dspace/app/util/Util.java b/dspace-api/src/main/java/org/dspace/app/util/Util.java index 81ce8d9f17..b355e9df93 100644 --- a/dspace-api/src/main/java/org/dspace/app/util/Util.java +++ b/dspace-api/src/main/java/org/dspace/app/util/Util.java @@ -89,6 +89,7 @@ public class Util { * @param encoding * character encoding, e.g. UTF-8 * @return the encoded string + * @throws java.io.UnsupportedEncodingException if encoding error */ public static String encodeBitstreamName(String stringIn, String encoding) throws java.io.UnsupportedEncodingException { // FIXME: This should be moved elsewhere, as it is used outside the UI @@ -164,6 +165,7 @@ public class Util { * @param stringIn * input string to encode * @return the encoded string + * @throws java.io.UnsupportedEncodingException if encoding error */ public static String encodeBitstreamName(String stringIn) throws java.io.UnsupportedEncodingException { return encodeBitstreamName(stringIn, Constants.DEFAULT_ENCODING); @@ -455,7 +457,10 @@ public class Util { * A String with the element name of the metadata field * @param qualifier * A String with the qualifier name of the metadata field + * @param locale locale * @return A list of the respective "displayed-values" + * @throws SQLException if database error + * @throws DCInputsReaderException if reader error */ public static List getControlledVocabulariesDisplayValueLocalized( diff --git a/dspace-api/src/main/java/org/dspace/authenticate/AuthenticationMethod.java b/dspace-api/src/main/java/org/dspace/authenticate/AuthenticationMethod.java index 8efeb4871d..7424a11fe7 100644 --- a/dspace-api/src/main/java/org/dspace/authenticate/AuthenticationMethod.java +++ b/dspace-api/src/main/java/org/dspace/authenticate/AuthenticationMethod.java @@ -74,6 +74,7 @@ public interface AuthenticationMethod { * @param username * Username, if available. May be null. * @return true if new ePerson should be created. + * @throws SQLException if database error */ public boolean canSelfRegister(Context context, HttpServletRequest request, @@ -92,6 +93,7 @@ public interface AuthenticationMethod { * @param eperson * newly created EPerson record - email + information from the * registration form will have been filled out. + * @throws SQLException if database error */ public void initEPerson(Context context, HttpServletRequest request, @@ -111,6 +113,7 @@ public interface AuthenticationMethod { * @param username * Username, if available. May be null. * @return true if this method allows user to change ePerson password. + * @throws SQLException if database error */ public boolean allowSetPassword(Context context, HttpServletRequest request, @@ -149,6 +152,7 @@ public interface AuthenticationMethod { * * @return array of EPerson-group IDs, possibly 0-length, but never * null. + * @throws SQLException if database error */ public List getSpecialGroups(Context context, HttpServletRequest request) throws SQLException; @@ -185,6 +189,7 @@ public interface AuthenticationMethod { *
CERT_REQUIRED - not allowed to login this way without X.509 cert. *
NO_SUCH_USER - user not found using this method. *
BAD_ARGS - user/pw not appropriate for this method + * @throws SQLException if database error */ public int authenticate(Context context, diff --git a/dspace-api/src/main/java/org/dspace/authenticate/LDAPAuthentication.java b/dspace-api/src/main/java/org/dspace/authenticate/LDAPAuthentication.java index 9057fdb416..984904d35b 100644 --- a/dspace-api/src/main/java/org/dspace/authenticate/LDAPAuthentication.java +++ b/dspace-api/src/main/java/org/dspace/authenticate/LDAPAuthentication.java @@ -69,6 +69,7 @@ public class LDAPAuthentication /** * Let a real auth method return true if it wants. + * @throws SQLException if database error */ @Override public boolean canSelfRegister(Context context, @@ -81,7 +82,8 @@ public class LDAPAuthentication } /** - * Nothing here, initialization is done when auto-registering. + * Nothing here, initialization is done when auto-registering. + * @throws SQLException if database error */ @Override public void initEPerson(Context context, HttpServletRequest request, @@ -94,6 +96,7 @@ public class LDAPAuthentication /** * Cannot change LDAP password through dspace, right? + * @throws SQLException if database error */ @Override public boolean allowSetPassword(Context context, diff --git a/dspace-api/src/main/java/org/dspace/authenticate/PasswordAuthentication.java b/dspace-api/src/main/java/org/dspace/authenticate/PasswordAuthentication.java index cf0214abb3..c2050f1844 100644 --- a/dspace-api/src/main/java/org/dspace/authenticate/PasswordAuthentication.java +++ b/dspace-api/src/main/java/org/dspace/authenticate/PasswordAuthentication.java @@ -59,6 +59,8 @@ public class PasswordAuthentication *

* Example - aber.ac.uk domain : @aber.ac.uk * Example - MIT domain and all .ac.uk domains: @mit.edu, .ac.uk + * @param email email + * @throws SQLException if database error */ @Override public boolean canSelfRegister(Context context, @@ -95,6 +97,7 @@ public class PasswordAuthentication /** * Nothing extra to initialize. + * @throws SQLException if database error */ @Override public void initEPerson(Context context, HttpServletRequest request, @@ -105,6 +108,7 @@ public class PasswordAuthentication /** * We always allow the user to change their password. + * @throws SQLException if database error */ @Override public boolean allowSetPassword(Context context, @@ -196,6 +200,7 @@ public class PasswordAuthentication *
CERT_REQUIRED - not allowed to login this way without X.509 cert. *
NO_SUCH_USER - no EPerson with matching email address. *
BAD_ARGS - missing username, or user matched but cannot login. + * @throws SQLException if database error */ @Override public int authenticate(Context context, diff --git a/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java b/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java index 155fced8ef..d23c934f3a 100644 --- a/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java +++ b/dspace-api/src/main/java/org/dspace/authenticate/ShibAuthentication.java @@ -159,6 +159,7 @@ public class ShibAuthentication implements AuthenticationMethod *
* NO_SUCH_USER - user not found using this method.
* BAD_ARGS - user/pw not appropriate for this method + * @throws SQLException if database error */ @Override public int authenticate(Context context, String username, String password, @@ -400,6 +401,7 @@ public class ShibAuthentication implements AuthenticationMethod * HTTP request, in case anything in that is used to decide * @param email * e-mail address of user attempting to register + * @throws SQLException if database error * */ @Override @@ -434,6 +436,7 @@ public class ShibAuthentication implements AuthenticationMethod * HTTP request, in case anything in that is used to decide * @param username * e-mail address of user attempting to register + * @throws SQLException if database error * */ @Override @@ -456,6 +459,7 @@ public class ShibAuthentication implements AuthenticationMethod * @param eperson * newly created EPerson record - email + information from the * registration form will have been filled out. + * @throws SQLException if database error * */ @Override @@ -578,6 +582,8 @@ public class ShibAuthentication implements AuthenticationMethod * @param context The DSpace database context * @param request The current HTTP Request * @return The EPerson identified or null. + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ protected EPerson findEPerson(Context context, HttpServletRequest request) throws SQLException, AuthorizeException { @@ -676,6 +682,8 @@ public class ShibAuthentication implements AuthenticationMethod * @param context The current DSpace database context * @param request The current HTTP Request * @return A new eperson object or null if unable to create a new eperson. + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ protected EPerson registerNewEPerson(Context context, HttpServletRequest request) throws SQLException, AuthorizeException { @@ -765,6 +773,8 @@ public class ShibAuthentication implements AuthenticationMethod * @param context The current DSpace database context * @param request The current HTTP Request * @param eperson The eperson object to update. + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ protected void updateEPerson(Context context, HttpServletRequest request, EPerson eperson) throws SQLException, AuthorizeException { @@ -855,6 +865,7 @@ public class ShibAuthentication implements AuthenticationMethod * @param password The password * @param request The HTTP Request * @return A valid DSpace Authentication Method status code. + * @throws SQLException if database error */ protected int swordCompatibility(Context context, String username, String password, HttpServletRequest request) throws SQLException { @@ -902,7 +913,8 @@ public class ShibAuthentication implements AuthenticationMethod * the field will be automatically created. * * It is safe to call this methods multiple times. - * @param context + * @param context context + * @throws SQLException if database error */ protected synchronized void initialize(Context context) throws SQLException { @@ -964,8 +976,9 @@ public class ShibAuthentication implements AuthenticationMethod * Check if a MetadataField for an eperson is available. * * @param metadataName The name of the metadata field. - * @param context + * @param context context * @return True if a valid metadata field, otherwise false. + * @throws SQLException if database error */ protected synchronized boolean checkIfEpersonMetadataFieldExists(Context context, String metadataName) throws SQLException { @@ -984,10 +997,12 @@ public class ShibAuthentication implements AuthenticationMethod protected final String COLUMN_NAME_REGEX = "^[_A-Za-z0-9]+$"; /** - * Automattically create a new metadataField for an eperson + * Automatically create a new metadataField for an eperson * + * @param context context * @param metadataName The name of the new metadata field. * @return True if successful, otherwise false. + * @throws SQLException if database error */ protected synchronized boolean autoCreateEpersonMetadataField(Context context, String metadataName) throws SQLException { diff --git a/dspace-api/src/main/java/org/dspace/authenticate/X509Authentication.java b/dspace-api/src/main/java/org/dspace/authenticate/X509Authentication.java index 2a99fc8047..dae6f3db71 100644 --- a/dspace-api/src/main/java/org/dspace/authenticate/X509Authentication.java +++ b/dspace-api/src/main/java/org/dspace/authenticate/X509Authentication.java @@ -387,6 +387,7 @@ public class X509Authentication implements AuthenticationMethod * configuration value. You'll probably want this to be true to take * advantage of a Web certificate infrastructure with many more users than * are already known by DSpace. + * @throws SQLException if database error */ @Override public boolean canSelfRegister(Context context, HttpServletRequest request, @@ -398,6 +399,7 @@ public class X509Authentication implements AuthenticationMethod /** * Nothing extra to initialize. + * @throws SQLException if database error */ @Override public void initEPerson(Context context, HttpServletRequest request, @@ -407,6 +409,7 @@ public class X509Authentication implements AuthenticationMethod /** * We don't use EPerson password so there is no reason to change it. + * @throws SQLException if database error */ @Override public boolean allowSetPassword(Context context, @@ -486,11 +489,12 @@ public class X509Authentication implements AuthenticationMethod * Return special groups configured in dspace.cfg for X509 certificate * authentication. * - * @param context + * @param context context * @param request * object potentially containing the cert * * @return An int array of group IDs + * @throws SQLException if database error * */ @Override @@ -558,6 +562,7 @@ public class X509Authentication implements AuthenticationMethod * * * @return One of: SUCCESS, BAD_CREDENTIALS, NO_SUCH_USER, BAD_ARGS + * @throws SQLException if database error */ @Override public int authenticate(Context context, String username, String password, diff --git a/dspace-api/src/main/java/org/dspace/authenticate/service/AuthenticationService.java b/dspace-api/src/main/java/org/dspace/authenticate/service/AuthenticationService.java index db4113af90..a402fb26d6 100644 --- a/dspace-api/src/main/java/org/dspace/authenticate/service/AuthenticationService.java +++ b/dspace-api/src/main/java/org/dspace/authenticate/service/AuthenticationService.java @@ -128,13 +128,11 @@ public interface AuthenticationService { * Invokes canSelfRegister() of every authentication * method in the stack, and returns true if any of them is true. * - * @param context - * DSpace context - * @param request - * HTTP request, in case it's needed. Can be null. - * @param username - * Username, if available. Can be null. + * @param context DSpace context + * @param request HTTP request, in case it's needed. Can be null. + * @param username Username, if available. Can be null. * @return true if new ePerson should be created. + * @throws SQLException if database error */ public boolean canSelfRegister(Context context, HttpServletRequest request, @@ -145,13 +143,11 @@ public interface AuthenticationService { * Returns true if the allowSetPassword() method of any * member of the stack returns true. * - * @param context - * DSpace context - * @param request - * HTTP request, in case it's needed. Can be null. - * @param username - * Username, if available. Can be null. + * @param context DSpace context + * @param request HTTP request, in case it's needed. Can be null. + * @param username Username, if available. Can be null. * @return true if this method allows user to change ePerson password. + * @throws SQLException if database error */ public boolean allowSetPassword(Context context, HttpServletRequest request, @@ -168,15 +164,14 @@ public interface AuthenticationService { * Returns accumulation of groups of all the getSpecialGroups() * methods in the stack. * - * @param context - * A valid DSpace context. + * @param context A valid DSpace context. * - * @param request - * The request that started this operation, or null if not applicable. + * @param request The request that started this operation, or null if not applicable. * * @return Returns IDs of any groups the user authenticated by this * request is in implicitly -- checks for e.g. network-address dependent * groups. + * @throws SQLException if database error */ public List getSpecialGroups(Context context, HttpServletRequest request) throws SQLException; diff --git a/dspace-api/src/main/java/org/dspace/authority/AuthoritySolrServiceImpl.java b/dspace-api/src/main/java/org/dspace/authority/AuthoritySolrServiceImpl.java index 33b68d7ed3..84a553ffb1 100644 --- a/dspace-api/src/main/java/org/dspace/authority/AuthoritySolrServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/authority/AuthoritySolrServiceImpl.java @@ -131,6 +131,7 @@ public class AuthoritySolrServiceImpl implements AuthorityIndexingService, Autho /** * Retrieves all the metadata fields which are indexed in the authority control * @return a list of metadata fields + * @throws Exception if error */ @Override public List getAllIndexedMetadataFields() throws Exception { diff --git a/dspace-api/src/main/java/org/dspace/authority/AuthorityValue.java b/dspace-api/src/main/java/org/dspace/authority/AuthorityValue.java index 0a085de0c0..5791fab9d4 100644 --- a/dspace-api/src/main/java/org/dspace/authority/AuthorityValue.java +++ b/dspace-api/src/main/java/org/dspace/authority/AuthorityValue.java @@ -148,6 +148,7 @@ public class AuthorityValue { /** * Generate a solr record from this instance + * @return SolrInputDocument */ public SolrInputDocument getSolrInputDocument() { @@ -164,6 +165,7 @@ public class AuthorityValue { /** * Initialize this instance based on a solr record + * @param document SolrDocument */ public void setValues(SolrDocument document) { this.id = String.valueOf(document.getFieldValue("id")); @@ -176,6 +178,11 @@ public class AuthorityValue { /** * Replace an item's DCValue with this authority + * @param context context + * @param value metadata value + * @param currentItem item + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void updateItem(Context context, Item currentItem, MetadataValue value) throws SQLException, AuthorizeException { value.setValue(getValue()); @@ -185,6 +192,7 @@ public class AuthorityValue { /** * Information that can be used the choice ui + * @return map */ public Map choiceSelectMap() { return new HashMap(); @@ -242,6 +250,7 @@ public class AuthorityValue { /** * Provides a string that will be allow a this AuthorityType to be recognized and provides information to create a new instance to be created using public AuthorityValue newInstance(String info). * See the implementation of com.atmire.org.dspace.authority.AuthorityValueGenerator#generateRaw(java.lang.String, java.lang.String) for more precisions. + * @return */ public String generateString() { return AuthorityValueServiceImpl.GENERATE; @@ -249,6 +258,8 @@ public class AuthorityValue { /** * Makes an instance of the AuthorityValue with the given information. + * @param info string info + * @return AuthorityValue */ public AuthorityValue newInstance(String info) { return new AuthorityValue(); @@ -262,6 +273,8 @@ public class AuthorityValue { * The regular equals() only checks if both AuthorityValues describe the same authority. * This method checks if the AuthorityValues have different information * E.g. it is used to decide when lastModified should be updated. + * @param o object + * @return true or false */ public boolean hasTheSameInformationAs(Object o) { if (this == o) { diff --git a/dspace-api/src/main/java/org/dspace/authority/AuthorityValueServiceImpl.java b/dspace-api/src/main/java/org/dspace/authority/AuthorityValueServiceImpl.java index 7a820ec01d..875c3da4b8 100644 --- a/dspace-api/src/main/java/org/dspace/authority/AuthorityValueServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/authority/AuthorityValueServiceImpl.java @@ -113,6 +113,9 @@ public class AuthorityValueServiceImpl implements AuthorityValueService{ /** * Item.ANY does not work here. + * @param context Context + * @param authorityID authority id + * @return AuthorityValue */ @Override public AuthorityValue findByUID(Context context, String authorityID) { diff --git a/dspace-api/src/main/java/org/dspace/authority/indexer/DSpaceAuthorityIndexer.java b/dspace-api/src/main/java/org/dspace/authority/indexer/DSpaceAuthorityIndexer.java index 4e53545c05..df8b23654c 100644 --- a/dspace-api/src/main/java/org/dspace/authority/indexer/DSpaceAuthorityIndexer.java +++ b/dspace-api/src/main/java/org/dspace/authority/indexer/DSpaceAuthorityIndexer.java @@ -169,6 +169,8 @@ public class DSpaceAuthorityIndexer implements AuthorityIndexerInterface, Initia * * @param metadataField Is one of the fields defined in dspace.cfg to be indexed. * @param value Is one of the values of the given metadataField in one of the items being indexed. + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ protected void prepareNextValue(String metadataField, MetadataValue value) throws SQLException, AuthorizeException { diff --git a/dspace-api/src/main/java/org/dspace/authority/orcid/OrcidAuthorityValue.java b/dspace-api/src/main/java/org/dspace/authority/orcid/OrcidAuthorityValue.java index 245aec34e3..a36f4f5152 100644 --- a/dspace-api/src/main/java/org/dspace/authority/orcid/OrcidAuthorityValue.java +++ b/dspace-api/src/main/java/org/dspace/authority/orcid/OrcidAuthorityValue.java @@ -119,6 +119,8 @@ public class OrcidAuthorityValue extends PersonAuthorityValue { /** * Create an authority based on a given orcid bio + * @param bio Bio + * @return OrcidAuthorityValue */ public static OrcidAuthorityValue create(Bio bio) { OrcidAuthorityValue authority = OrcidAuthorityValue.create(); diff --git a/dspace-api/src/main/java/org/dspace/authority/orcid/xml/Converter.java b/dspace-api/src/main/java/org/dspace/authority/orcid/xml/Converter.java index b445013bc4..248720d95f 100644 --- a/dspace-api/src/main/java/org/dspace/authority/orcid/xml/Converter.java +++ b/dspace-api/src/main/java/org/dspace/authority/orcid/xml/Converter.java @@ -16,6 +16,7 @@ import org.w3c.dom.Document; * @author Kevin Van de Velde (kevin at atmire dot com) * @author Ben Bosman (ben at atmire dot com) * @author Mark Diggory (markd at atmire dot com) + * @param type */ public abstract class Converter { diff --git a/dspace-api/src/main/java/org/dspace/authority/util/XMLUtils.java b/dspace-api/src/main/java/org/dspace/authority/util/XMLUtils.java index 252d90584e..9a2861293d 100644 --- a/dspace-api/src/main/java/org/dspace/authority/util/XMLUtils.java +++ b/dspace-api/src/main/java/org/dspace/authority/util/XMLUtils.java @@ -41,8 +41,10 @@ public class XMLUtils { /** * @param xml The starting context (a Node or a Document, for example). + * @param singleNodeXPath xpath * @return node.getTextContent() on the node that matches singleNodeXPath * null if nothing matches the NodeListXPath + * @throws XPathExpressionException if xpath error */ public static String getTextContent(Node xml, String singleNodeXPath) throws XPathExpressionException { String text = null; @@ -56,8 +58,10 @@ public class XMLUtils { /** * @param xml The starting context (a Node or a Document, for example). + * @param NodeListXPath xpath * @return A Node matches the NodeListXPath * null if nothing matches the NodeListXPath + * @throws XPathExpressionException if xpath error */ public static Node getNode(Node xml, String NodeListXPath) throws XPathExpressionException { Node result = null; @@ -71,8 +75,10 @@ public class XMLUtils { /** * @param xml The starting context (a Node or a Document, for example). + * @param NodeListXPath xpath * @return A NodeList containing the nodes that match the NodeListXPath * null if nothing matches the NodeListXPath + * @throws XPathExpressionException if xpath error */ public static NodeList getNodeList(Node xml, String NodeListXPath) throws XPathExpressionException { NodeList nodeList = null; @@ -93,6 +99,8 @@ public class XMLUtils { * that are element nodes: * node.getNodeType() == Node.ELEMENT_NODE * node instanceof Element + * @param nodeList NodeList + * @return iterator over nodes */ public static Iterator getNodeListIterator(final NodeList nodeList) { return new Iterator() { diff --git a/dspace-api/src/main/java/org/dspace/authorize/AuthorizeConfiguration.java b/dspace-api/src/main/java/org/dspace/authorize/AuthorizeConfiguration.java index a879388236..6282a97c9d 100644 --- a/dspace-api/src/main/java/org/dspace/authorize/AuthorizeConfiguration.java +++ b/dspace-api/src/main/java/org/dspace/authorize/AuthorizeConfiguration.java @@ -174,6 +174,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to create new, not strictly community * related, group? + * @return true/false */ public static boolean canCommunityAdminPerformGroupCreation() { @@ -182,6 +183,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to create collections or subcommunities? + * @return true/false */ public static boolean canCommunityAdminPerformSubelementCreation() { @@ -190,6 +192,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to remove collections or subcommunities? + * @return true/false */ public static boolean canCommunityAdminPerformSubelementDeletion() { @@ -199,6 +202,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to manage the community's and * subcommunities' policies? + * @return true/false */ public static boolean canCommunityAdminManagePolicies() { @@ -208,6 +212,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to create/edit them community's and * subcommunities' admin groups? + * @return true/false */ public static boolean canCommunityAdminManageAdminGroup() { @@ -217,6 +222,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to create/edit the community's and * subcommunities' admin group? + * @return true/false */ public static boolean canCommunityAdminManageCollectionPolicies() { @@ -226,6 +232,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to manage the item template of them * collections? + * @return true/false */ public static boolean canCommunityAdminManageCollectionTemplateItem() { @@ -235,6 +242,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to manage (create/edit/remove) the * submitters group of them collections? + * @return true/false */ public static boolean canCommunityAdminManageCollectionSubmitters() { @@ -244,6 +252,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to manage (create/edit/remove) the workflows * group of them collections? + * @return true/false */ public static boolean canCommunityAdminManageCollectionWorkflows() { @@ -253,6 +262,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to manage (create/edit/remove) the admin * group of them collections? + * @return true/false */ public static boolean canCommunityAdminManageCollectionAdminGroup() { @@ -261,6 +271,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to remove an item from them collections? + * @return true/false */ public static boolean canCommunityAdminPerformItemDeletion() { @@ -269,6 +280,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to withdrawn an item from them collections? + * @return true/false */ public static boolean canCommunityAdminPerformItemWithdrawn() { @@ -278,6 +290,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to reinstate an item from them * collections? + * @return true/false */ public static boolean canCommunityAdminPerformItemReinstatiate() { @@ -287,6 +300,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to manage the policies of an item owned by * one of them collections? + * @return true/false */ public static boolean canCommunityAdminManageItemPolicies() { @@ -296,6 +310,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to add a bitstream to an item owned by one * of them collections? + * @return true/false */ public static boolean canCommunityAdminPerformBitstreamCreation() { @@ -305,6 +320,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to remove a bitstream from an item owned by * one of them collections? + * @return true/false */ public static boolean canCommunityAdminPerformBitstreamDeletion() { @@ -314,6 +330,7 @@ public class AuthorizeConfiguration /** * Are community admins allowed to perform CC License replace or addition to * an item owned by one of them collections? + * @return true/false */ public static boolean canCommunityAdminManageCCLicense() { @@ -322,6 +339,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to manage the collection's policies? + * @return true/false */ public static boolean canCollectionAdminManagePolicies() { @@ -331,6 +349,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to manage (create/edit/delete) the * collection's item template? + * @return true/false */ public static boolean canCollectionAdminManageTemplateItem() { @@ -340,6 +359,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to manage (create/edit/delete) the * collection's submitters group? + * @return true/false */ public static boolean canCollectionAdminManageSubmitters() { @@ -349,6 +369,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to manage (create/edit/delete) the * collection's workflows group? + * @return true/false */ public static boolean canCollectionAdminManageWorkflows() { @@ -358,6 +379,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to manage (create/edit) the collection's * admins group? + * @return true/false */ public static boolean canCollectionAdminManageAdminGroup() { @@ -366,6 +388,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to remove an item from the collection? + * @return true/false */ public static boolean canCollectionAdminPerformItemDeletion() { @@ -374,6 +397,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to withdrawn an item from the collection? + * @return true/false */ public static boolean canCollectionAdminPerformItemWithdrawn() { @@ -383,6 +407,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to reinstate an item from the * collection? + * @return true/false */ public static boolean canCollectionAdminPerformItemReinstatiate() { @@ -392,6 +417,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to manage the policies of item owned by the * collection? + * @return true/false */ public static boolean canCollectionAdminManageItemPolicies() { @@ -401,6 +427,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to add a bitstream to an item owned by the * collections? + * @return true/false */ public static boolean canCollectionAdminPerformBitstreamCreation() { @@ -410,6 +437,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to remove a bitstream from an item owned by * the collections? + * @return true/false */ public static boolean canCollectionAdminPerformBitstreamDeletion() { @@ -419,6 +447,7 @@ public class AuthorizeConfiguration /** * Are collection admins allowed to replace or adding a CC License to an * item owned by the collections? + * @return true/false */ public static boolean canCollectionAdminManageCCLicense() { @@ -427,6 +456,7 @@ public class AuthorizeConfiguration /** * Are item admins allowed to manage the item's policies? + * @return true/false */ public static boolean canItemAdminManagePolicies() { @@ -435,6 +465,7 @@ public class AuthorizeConfiguration /** * Are item admins allowed to add bitstreams to the item? + * @return true/false */ public static boolean canItemAdminPerformBitstreamCreation() { @@ -443,6 +474,7 @@ public class AuthorizeConfiguration /** * Are item admins allowed to remove bitstreams from the item? + * @return true/false */ public static boolean canItemAdminPerformBitstreamDeletion() { @@ -451,6 +483,7 @@ public class AuthorizeConfiguration /** * Are item admins allowed to replace or adding CC License to the item? + * @return true/false */ public static boolean canItemAdminManageCCLicense() { diff --git a/dspace-api/src/main/java/org/dspace/authorize/AuthorizeException.java b/dspace-api/src/main/java/org/dspace/authorize/AuthorizeException.java index c6179d41d7..6aec1199df 100644 --- a/dspace-api/src/main/java/org/dspace/authorize/AuthorizeException.java +++ b/dspace-api/src/main/java/org/dspace/authorize/AuthorizeException.java @@ -59,6 +59,8 @@ public class AuthorizeException extends Exception * * @param message * the message + * @param o object + * @param a actionID */ public AuthorizeException(String message, DSpaceObject o, int a) { diff --git a/dspace-api/src/main/java/org/dspace/authorize/FixDefaultPolicies.java b/dspace-api/src/main/java/org/dspace/authorize/FixDefaultPolicies.java index 5dd1232676..3862727c50 100644 --- a/dspace-api/src/main/java/org/dspace/authorize/FixDefaultPolicies.java +++ b/dspace-api/src/main/java/org/dspace/authorize/FixDefaultPolicies.java @@ -34,6 +34,8 @@ public class FixDefaultPolicies { /** * Command line interface to setPolicies - run to see arguments + * @param argv arguments + * @throws Exception if error */ public static void main(String[] argv) throws Exception { diff --git a/dspace-api/src/main/java/org/dspace/authorize/PolicySet.java b/dspace-api/src/main/java/org/dspace/authorize/PolicySet.java index 7af6394ebf..6dbdcbeba4 100644 --- a/dspace-api/src/main/java/org/dspace/authorize/PolicySet.java +++ b/dspace-api/src/main/java/org/dspace/authorize/PolicySet.java @@ -43,6 +43,8 @@ public class PolicySet /** * Command line interface to setPolicies - run to see arguments + * @param argv arguments + * @throws Exception if error */ public static void main(String[] argv) throws Exception { diff --git a/dspace-api/src/main/java/org/dspace/authorize/ResourcePolicy.java b/dspace-api/src/main/java/org/dspace/authorize/ResourcePolicy.java index eb6d8f8809..18092cb880 100644 --- a/dspace-api/src/main/java/org/dspace/authorize/ResourcePolicy.java +++ b/dspace-api/src/main/java/org/dspace/authorize/ResourcePolicy.java @@ -203,6 +203,7 @@ public class ResourcePolicy{ /** * assign an EPerson to this policy + * @param eperson Eperson */ public void setEPerson(EPerson eperson) { @@ -221,6 +222,7 @@ public class ResourcePolicy{ /** * sets ID for Group referred to by this policy + * @param epersonGroup Group */ public void setGroup(Group epersonGroup) { diff --git a/dspace-api/src/main/java/org/dspace/authorize/ResourcePolicyServiceImpl.java b/dspace-api/src/main/java/org/dspace/authorize/ResourcePolicyServiceImpl.java index 8c9feafa00..46fe5f13cb 100644 --- a/dspace-api/src/main/java/org/dspace/authorize/ResourcePolicyServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/authorize/ResourcePolicyServiceImpl.java @@ -55,6 +55,7 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService * ID of the ResourcePolicy * * @return the ResourcePolicy format, or null if the ID is invalid. + * @throws SQLException if database error */ @Override public ResourcePolicy find(Context context, int id) throws SQLException @@ -67,6 +68,8 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService * * @param context * DSpace context object + * @return ResourcePolicy + * @throws SQLException if database error */ @Override public ResourcePolicy create(Context context) throws SQLException @@ -109,6 +112,10 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService /** * Delete an ResourcePolicy * + * @param context context + * @param resourcePolicy resource policy + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void delete(Context context, ResourcePolicy resourcePolicy) throws SQLException, AuthorizeException { @@ -125,6 +132,7 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService /** + * @param resourcePolicy resource policy * @return action text or 'null' if action row empty */ @Override @@ -144,6 +152,7 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService /** * figures out if the date is valid for the policy * + * @param resourcePolicy resource policy * @return true if policy has begun and hasn't expired yet (or no dates are * set) */ @@ -253,6 +262,10 @@ public class ResourcePolicyServiceImpl implements ResourcePolicyService /** * Update the ResourcePolicy + * @param context context + * @param resourcePolicy resource policy + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void update(Context context, ResourcePolicy resourcePolicy) throws SQLException, AuthorizeException { diff --git a/dspace-api/src/main/java/org/dspace/authorize/service/AuthorizeService.java b/dspace-api/src/main/java/org/dspace/authorize/service/AuthorizeService.java index 654faeb5cd..016637422f 100644 --- a/dspace-api/src/main/java/org/dspace/authorize/service/AuthorizeService.java +++ b/dspace-api/src/main/java/org/dspace/authorize/service/AuthorizeService.java @@ -41,16 +41,13 @@ public interface AuthorizeService { * perform all of the specified actions on the given object. An * AuthorizeException if all the authorizations fail. * - * @param c - * context with the current user - * @param o - * DSpace object user is attempting to perform action on - * @param actions - * array of action IDs from + * @param c context with the current user + * @param o DSpace object user is attempting to perform action on + * @param actions array of action IDs from * org.dspace.core.Constants - * @throws AuthorizeException if authorization error - * if any one of the specified actions cannot be performed by - * the current user on the given object. + * @throws AuthorizeException if any one of the specified actions cannot be + * performed by the current user on the given object. + * @throws SQLException if database error */ public void authorizeAnyOf(Context c, DSpaceObject o, int[] actions) throws AuthorizeException, SQLException; @@ -59,14 +56,11 @@ public interface AuthorizeService { * the given object. Throws an exception if the user is not authorized, * otherwise the method call does nothing. * - * @param c - * context - * @param o - * a DSpaceObject - * @param action - * action to perform from org.dspace.core.Constants - * @throws AuthorizeException if authorization error - * if the user is denied + * @param c context + * @param o a DSpaceObject + * @param action action to perform from org.dspace.core.Constants + * @throws AuthorizeException if the user is denied + * @throws SQLException if database error */ public void authorizeAction(Context c, DSpaceObject o, int action) throws AuthorizeException, SQLException; @@ -75,17 +69,14 @@ public interface AuthorizeService { * the given object. Throws an exception if the user is not authorized, * otherwise the method call does nothing. * - * @param c - * context - * @param o - * a DSpaceObject + * @param c context + * @param o a DSpaceObject * @param useInheritance * flag to say if ADMIN action on the current object or parent * object can be used - * @param action - * action to perform from org.dspace.core.Constants - * @throws AuthorizeException if authorization error - * if the user is denied + * @param action action to perform from org.dspace.core.Constants + * @throws AuthorizeException if the user is denied + * @throws SQLException if database error */ public void authorizeAction(Context c, DSpaceObject o, int action, boolean useInheritance) throws AuthorizeException, SQLException; @@ -95,19 +86,15 @@ public interface AuthorizeService { * the given object. Throws an exception if the user is not authorized, * otherwise the method call does nothing. * - * @param c - * context - * @param e - * the eperson to use for the authorization check - * @param o - * a DSpaceObject + * @param c context + * @param e the eperson to use for the authorization check + * @param o a DSpaceObject * @param useInheritance * flag to say if ADMIN action on the current object or parent * object can be used - * @param action - * action to perform from org.dspace.core.Constants - * @throws AuthorizeException if authorization error - * if the user is denied + * @param action action to perform from org.dspace.core.Constants + * @throws AuthorizeException if the user is denied + * @throws SQLException if database error */ public void authorizeAction(Context c, EPerson e, DSpaceObject o, int action, boolean useInheritance) throws AuthorizeException, SQLException; @@ -116,15 +103,13 @@ public interface AuthorizeService { * same authorize, returns boolean for those who don't want to deal with * catching exceptions. * - * @param c - * DSpace context, containing current user - * @param o - * DSpaceObject - * @param a - * action being attempted, from + * @param c DSpace context, containing current user + * @param o DSpaceObject + * @param a action being attempted, from * org.dspace.core.Constants * @return true if the current user in the context is * authorized to perform the given action on the given object + * @throws SQLException if database error */ public boolean authorizeActionBoolean(Context c, DSpaceObject o, int a) throws SQLException; @@ -132,18 +117,16 @@ public interface AuthorizeService { * same authorize, returns boolean for those who don't want to deal with * catching exceptions. * - * @param c - * DSpace context, containing current user - * @param o - * DSpaceObject - * @param a - * action being attempted, from + * @param c DSpace context, containing current user + * @param o DSpaceObject + * @param a action being attempted, from * org.dspace.core.Constants * @param useInheritance * flag to say if ADMIN action on the current object or parent * object can be used * @return true if the current user in the context is * authorized to perform the given action on the given object + * @throws SQLException if database error */ public boolean authorizeActionBoolean(Context c, DSpaceObject o, int a, boolean useInheritance) throws SQLException; @@ -151,20 +134,17 @@ public interface AuthorizeService { * same authorize with a specif eperson (not the current user), returns boolean for those who don't want to deal with * catching exceptions. * - * @param c - * DSpace context - * @param e - * EPerson to use in the check - * @param o - * DSpaceObject - * @param a - * action being attempted, from + * @param c DSpace context + * @param e EPerson to use in the check + * @param o DSpaceObject + * @param a action being attempted, from * org.dspace.core.Constants * @param useInheritance * flag to say if ADMIN action on the current object or parent * object can be used * @return true if the requested user is * authorized to perform the given action on the given object + * @throws SQLException if database error */ public boolean authorizeActionBoolean(Context c, EPerson e, DSpaceObject o, int a, boolean useInheritance) throws SQLException; @@ -177,14 +157,13 @@ public interface AuthorizeService { * within DSpace. Always return true if the user is a System * Admin * - * @param c - * current context - * @param o - * current DSpace Object, if null the call will be + * @param c current context + * @param o current DSpace Object, if null the call will be * equivalent to a call to the isAdmin(Context c) * method * @return true if user has administrative privileges on the * given DSpace object + * @throws SQLException if database error */ public boolean isAdmin(Context c, DSpaceObject o) throws SQLException; @@ -194,10 +173,10 @@ public interface AuthorizeService { * true if c.ignoreAuthorization is set. Anonymous users * can't be Admins (EPerson set to NULL) * - * @param c - * current context + * @param c current context * @return true if user is an admin or ignore authorization * flag set + * @throws SQLException if database error */ public boolean isAdmin(Context c) throws SQLException; @@ -208,16 +187,12 @@ public interface AuthorizeService { /** * Add a policy for an individual eperson * - * @param c - * context. Current user irrelevant - * @param o - * DSpaceObject to add policy to - * @param actionID - * ID of action from org.dspace.core.Constants - * @param e - * eperson who can perform the action - * @throws AuthorizeException if authorization error - * if current user in context is not authorized to add policies + * @param c context. Current user irrelevant + * @param o DSpaceObject to add policy to + * @param actionID ID of action from org.dspace.core.Constants + * @param e eperson who can perform the action + * @throws SQLException if database error + * @throws AuthorizeException if current user in context is not authorized to add policies */ public void addPolicy(Context c, DSpaceObject o, int actionID, EPerson e) throws SQLException, AuthorizeException; @@ -225,147 +200,112 @@ public interface AuthorizeService { /** * Add a policy for an individual eperson * - * @param c - * context. Current user irrelevant - * @param o - * DSpaceObject to add policy to - * @param actionID - * ID of action from org.dspace.core.Constants - * @param e - * eperson who can perform the action - * @param type - * policy type, deafult types are declared in the ResourcePolicy class - * @throws AuthorizeException if authorization error - * if current user in context is not authorized to add policies + * @param c context. Current user irrelevant + * @param o DSpaceObject to add policy to + * @param actionID ID of action from org.dspace.core.Constants + * @param e eperson who can perform the action + * @param type policy type, deafult types are declared in the ResourcePolicy class + * @throws SQLException if database error + * @throws AuthorizeException if current user in context is not authorized to add policies */ public void addPolicy(Context c, DSpaceObject o, int actionID, EPerson e, String type) throws SQLException, AuthorizeException; /** * Add a policy for a group * - * @param c - * current context - * @param o - * object to add policy for - * @param actionID - * ID of action from org.dspace.core.Constants - * @param g - * group to add policy for - * @throws SQLException if database error - * if there's a database problem - * @throws AuthorizeException if authorization error - * if the current user is not authorized to add this policy + * @param c current context + * @param o object to add policy for + * @param actionID ID of action from org.dspace.core.Constants + * @param g group to add policy for + * @throws SQLException if there's a database problem + * @throws AuthorizeException if the current user is not authorized to add this policy */ public void addPolicy(Context c, DSpaceObject o, int actionID, Group g) throws SQLException, AuthorizeException; /** * Add a policy for a group * - * @param c - * current context - * @param o - * object to add policy for - * @param actionID - * ID of action from org.dspace.core.Constants - * @param g - * group to add policy for - * @param type - * policy type, deafult types are declared in the ResourcePolicy class - * @throws SQLException if database error - * if there's a database problem - * @throws AuthorizeException if authorization error - * if the current user is not authorized to add this policy + * @param c current context + * @param o object to add policy for + * @param actionID ID of action from org.dspace.core.Constants + * @param g group to add policy for + * @param type policy type, deafult types are declared in the ResourcePolicy class + * @throws SQLException if there's a database problem + * @throws AuthorizeException if the current user is not authorized to add this policy */ public void addPolicy(Context c, DSpaceObject o, int actionID, Group g, String type) throws SQLException, AuthorizeException; /** * Return a List of the policies for an object * - * @param c - * current context - * @param o - * object to retrieve policies for + * @param c current context + * @param o object to retrieve policies for * @return List of ResourcePolicy objects + * @throws SQLException if database error */ public List getPolicies(Context c, DSpaceObject o) throws SQLException; /** * Return a List of the policies for an object * - * @param c - * current context - * @param o - * object to retrieve policies for + * @param c current context + * @param o object to retrieve policies for + * @param type type * @return List of ResourcePolicy objects + * @throws SQLException if database error */ public List findPoliciesByDSOAndType(Context c, DSpaceObject o, String type) throws SQLException; /** * Return a List of the policies for a group * - * @param c - * current context - * @param g - * group to retrieve policies for + * @param c current context + * @param g group to retrieve policies for * @return List of ResourcePolicy objects + * @@throws SQLException if database error */ public List getPoliciesForGroup(Context c, Group g) throws SQLException; /** * Return a list of policies for an object that match the action * - * @param c - * context - * @param o - * DSpaceObject policies relate to - * @param actionID - * action (defined in class Constants) - * @throws SQLException if database error - * if there's a database problem + * @param c context + * @param o DSpaceObject policies relate to + * @param actionID action (defined in class Constants) + * @return list of resource policies + * @throws SQLException if there's a database problem */ public List getPoliciesActionFilter(Context c, DSpaceObject o, int actionID) throws SQLException; /** * Add policies to an object to match those from a previous object * - * @param c - * context - * @param src - * source of policies - * @param dest - * destination of inherited policies - * @throws SQLException if database error - * if there's a database problem - * @throws AuthorizeException if authorization error - * if the current user is not authorized to add these policies + * @param c context + * @param src source of policies + * @param dest destination of inherited policies + * @throws SQLException if there's a database problem + * @throws AuthorizeException if the current user is not authorized to add these policies */ public void inheritPolicies(Context c, DSpaceObject src, DSpaceObject dest) throws SQLException, AuthorizeException; /** * Copies policies from a list of resource policies to a given DSpaceObject * - * @param c - * DSpace context - * @param policies - * List of ResourcePolicy objects - * @param dest - * object to have policies added - * @throws SQLException if database error - * if there's a database problem - * @throws AuthorizeException if authorization error - * if the current user is not authorized to add these policies + * @param c DSpace context + * @param policies List of ResourcePolicy objects + * @param dest object to have policies added + * @throws SQLException if there's a database problem + * @throws AuthorizeException if the current user is not authorized to add these policies */ public void addPolicies(Context c, List policies, DSpaceObject dest) throws SQLException, AuthorizeException; /** * removes ALL policies for an object. FIXME doesn't check authorization * - * @param c - * DSpace context - * @param o - * object to remove policies for - * @throws SQLException if database error - * if there's a database problem + * @param c DSpace context + * @param o object to remove policies for + * @throws SQLException if there's a database problem + * @throws AuthorizeException if authorization error */ public void removeAllPolicies(Context c, DSpaceObject o) throws SQLException, AuthorizeException; @@ -374,26 +314,22 @@ public interface AuthorizeService { /** * removes ALL policies for an object that are not of the input type. * - * @param c - * DSpace context - * @param o - * object to remove policies for - * @throws SQLException if database error - * if there's a database problem + * @param c DSpace context + * @param o object to remove policies for + * @param type type + * @throws SQLException if there's a database problem + * @throws AuthorizeException if authorization error */ public void removeAllPoliciesByDSOAndTypeNotEqualsTo(Context c, DSpaceObject o, String type) throws SQLException, AuthorizeException; /** * removes policies * - * @param c - * DSpace context - * @param o - * object to remove policies for - * @param type - * policy type - * @throws SQLException if database error - * if there's a database problem + * @param c DSpace context + * @param o object to remove policies for + * @param type policy type + * @throws SQLException if there's a database problem + * @throws AuthorizeException if authorization error */ public void removeAllPoliciesByDSOAndType(Context c, DSpaceObject o, String type) throws SQLException, AuthorizeException; @@ -401,15 +337,12 @@ public interface AuthorizeService { * Remove all policies from an object that match a given action. FIXME * doesn't check authorization * - * @param context - * current context - * @param dso - * object to remove policies from - * @param actionID - * ID of action to match from + * @param context current context + * @param dso object to remove policies from + * @param actionID ID of action to match from * org.dspace.core.Constants, or -1=all - * @throws SQLException if database error - * if there's a database problem + * @throws SQLException if there's a database problem + * @throws AuthorizeException if authorization error */ public void removePoliciesActionFilter(Context context, DSpaceObject dso, int actionID) throws SQLException, AuthorizeException; @@ -417,12 +350,9 @@ public interface AuthorizeService { * Removes all policies relating to a particular group. FIXME doesn't check * authorization * - * @param c - * current context - * @param group - * the group - * @throws SQLException if database error - * if there's a database problem + * @param c current context + * @param group the group + * @throws SQLException if there's a database problem */ public void removeGroupPolicies(Context c, Group group) throws SQLException; @@ -430,14 +360,11 @@ public interface AuthorizeService { * Removes all policies from a group for a particular object that belong to * a Group. FIXME doesn't check authorization * - * @param c - * current context - * @param o - * the object - * @param g - * the group - * @throws SQLException if database error - * if there's a database problem + * @param c current context + * @param o the object + * @param g the group + * @throws SQLException if there's a database problem + * @throws AuthorizeException if authorization error */ public void removeGroupPolicies(Context c, DSpaceObject o, Group g) throws SQLException, AuthorizeException; @@ -445,14 +372,11 @@ public interface AuthorizeService { * Removes all policies from an eperson for a particular object that belong to * an EPerson. FIXME doesn't check authorization * - * @param c - * current context - * @param o - * the object - * @param e - * the eperson - * @throws SQLException if database error - * if there's a database problem + * @param c current context + * @param o the object + * @param e the eperson + * @throws SQLException if there's a database problem + * @throws AuthorizeException if authorization error */ public void removeEPersonPolicies(Context c, DSpaceObject o, EPerson e) throws SQLException, AuthorizeException; @@ -460,16 +384,12 @@ public interface AuthorizeService { * Returns all groups authorized to perform an action on an object. Returns * empty array if no matches. * - * @param c - * current context - * @param o - * object - * @param actionID - * ID of action from org.dspace.core.Constants + * @param c current context + * @param o object + * @param actionID ID of action from org.dspace.core.Constants * @return array of Groups that can perform the specified * action on the specified object - * @throws SQLException if database error - * if there's a database problem + * @throws SQLException if there's a database problem */ public List getAuthorizedGroups(Context c, DSpaceObject o, int actionID) throws java.sql.SQLException; @@ -479,17 +399,13 @@ public interface AuthorizeService { /** * Is a policy with the specified parameters already in place? * - * @param c - * current context - * @param o - * object - * @param actionID - * ID of action from org.dspace.core.Constants - * @param policyID - * ID of an existing policy. If -1 is specified, this parameter will be ignored + * @param c current context + * @param o object + * @param group group + * @param actionID ID of action from org.dspace.core.Constants + * @param policyID ID of an existing policy. If -1 is specified, this parameter will be ignored * @return true if such a policy exists, false otherwise - * @throws SQLException if database error - * if there's a database problem + * @throws SQLException if there's a database problem */ public boolean isAnIdenticalPolicyAlreadyInPlace(Context c, DSpaceObject o, Group group, int actionID, int policyID) throws SQLException; @@ -501,10 +417,10 @@ public interface AuthorizeService { * have right on the collection. E.g., if the anonymous can access the collection policies are assigned to anonymous. * * @param context current context - * @param embargoDate - * @param reason - * @param dso - * @param owningCollection + * @param embargoDate date + * @param reason reason + * @param dso DSpaceObject + * @param owningCollection collection * @throws SQLException if database error * @throws AuthorizeException if authorization error */ diff --git a/dspace-api/src/main/java/org/dspace/browse/BrowseInfo.java b/dspace-api/src/main/java/org/dspace/browse/BrowseInfo.java index 0173409cba..4d5f32948c 100644 --- a/dspace-api/src/main/java/org/dspace/browse/BrowseInfo.java +++ b/dspace-api/src/main/java/org/dspace/browse/BrowseInfo.java @@ -575,6 +575,7 @@ public class BrowseInfo /** * True if this browse was cached. + * @return true/false */ public boolean wasCached() { @@ -684,6 +685,7 @@ public class BrowseInfo /** * Utility method for obtaining a string representation of the browse. This is * useful only for debug + * @return String representation */ public String toString() { diff --git a/dspace-api/src/main/java/org/dspace/browse/BrowserScope.java b/dspace-api/src/main/java/org/dspace/browse/BrowserScope.java index fe8d98616f..3f7606cfde 100644 --- a/dspace-api/src/main/java/org/dspace/browse/BrowserScope.java +++ b/dspace-api/src/main/java/org/dspace/browse/BrowserScope.java @@ -184,6 +184,7 @@ public class BrowserScope /** * @param browseIndex The browseIndex to set. + * @throws BrowseException if error */ public void setBrowseIndex(BrowseIndex browseIndex) throws BrowseException @@ -370,6 +371,7 @@ public class BrowserScope /** * @param sortBy The sortBy to set. + * @throws BrowseException if error */ public void setSortBy(int sortBy) throws BrowseException diff --git a/dspace-api/src/main/java/org/dspace/browse/CrossLinks.java b/dspace-api/src/main/java/org/dspace/browse/CrossLinks.java index 37921aa9b8..1694d0324c 100644 --- a/dspace-api/src/main/java/org/dspace/browse/CrossLinks.java +++ b/dspace-api/src/main/java/org/dspace/browse/CrossLinks.java @@ -57,6 +57,7 @@ public class CrossLinks * Is there a link for the given canonical form of metadata (i.e. schema.element.qualifier)? * * @param metadata the metadata to check for a link on + * @return true/false */ public boolean hasLink(String metadata) { @@ -67,6 +68,7 @@ public class CrossLinks * Get the type of link that the bit of metadata has. * * @param metadata the metadata to get the link type for + * @return type */ public String getLinkType(String metadata) { diff --git a/dspace-api/src/main/java/org/dspace/browse/ItemCountDAO.java b/dspace-api/src/main/java/org/dspace/browse/ItemCountDAO.java index d5d341955e..ef3b329540 100644 --- a/dspace-api/src/main/java/org/dspace/browse/ItemCountDAO.java +++ b/dspace-api/src/main/java/org/dspace/browse/ItemCountDAO.java @@ -33,6 +33,7 @@ public interface ItemCountDAO * Collection. Otherwise it will throw an exception. * * @param dso Dspace Object + * @return count * @throws ItemCountException if count error */ public int getCount(DSpaceObject dso) throws ItemCountException; diff --git a/dspace-api/src/main/java/org/dspace/browse/ItemCountDAOFactory.java b/dspace-api/src/main/java/org/dspace/browse/ItemCountDAOFactory.java index 9af7965092..5da1649802 100644 --- a/dspace-api/src/main/java/org/dspace/browse/ItemCountDAOFactory.java +++ b/dspace-api/src/main/java/org/dspace/browse/ItemCountDAOFactory.java @@ -25,6 +25,7 @@ public class ItemCountDAOFactory * for the specific DSpace instance. * * @param context DSpace Context + * @return DAO * @throws ItemCountException if count error */ public static ItemCountDAO getInstance(Context context) diff --git a/dspace-api/src/main/java/org/dspace/browse/ItemCountDAOSolr.java b/dspace-api/src/main/java/org/dspace/browse/ItemCountDAOSolr.java index 097b2ae1e9..e71e7e779a 100644 --- a/dspace-api/src/main/java/org/dspace/browse/ItemCountDAOSolr.java +++ b/dspace-api/src/main/java/org/dspace/browse/ItemCountDAOSolr.java @@ -72,6 +72,7 @@ public class ItemCountDAOSolr implements ItemCountDAO * Get the count of the items in the given container. * * @param dso Dspace Context + * @return count * @throws ItemCountException if count error */ @Override diff --git a/dspace-api/src/main/java/org/dspace/browse/ItemCounter.java b/dspace-api/src/main/java/org/dspace/browse/ItemCounter.java index 3a098847ce..e40a814e41 100644 --- a/dspace-api/src/main/java/org/dspace/browse/ItemCounter.java +++ b/dspace-api/src/main/java/org/dspace/browse/ItemCounter.java @@ -71,6 +71,7 @@ public class ItemCounter * the number of items in the container in real time. * * @param dso DSpaceObject + * @return count * @throws ItemCountException when error occurs */ public int getCount(DSpaceObject dso) diff --git a/dspace-api/src/main/java/org/dspace/browse/ItemListConfig.java b/dspace-api/src/main/java/org/dspace/browse/ItemListConfig.java index f0176cb86e..7ad053f203 100644 --- a/dspace-api/src/main/java/org/dspace/browse/ItemListConfig.java +++ b/dspace-api/src/main/java/org/dspace/browse/ItemListConfig.java @@ -98,6 +98,7 @@ public class ItemListConfig * What metadata is to go in the given column number? * * @param col column + * @return array of metadata */ public String[] getMetadata(int col) { diff --git a/dspace-api/src/main/java/org/dspace/browse/LocaleOrderingFilter.java b/dspace-api/src/main/java/org/dspace/browse/LocaleOrderingFilter.java index 0f8788f4de..8024f3071b 100644 --- a/dspace-api/src/main/java/org/dspace/browse/LocaleOrderingFilter.java +++ b/dspace-api/src/main/java/org/dspace/browse/LocaleOrderingFilter.java @@ -72,6 +72,9 @@ public class LocaleOrderingFilter implements TextFilter /** * We don't need to use the language parameter, so map this to * the standard sort string filter + * @param str string + * @param lang language + * @return string */ @Override public String filter(String str, String lang) diff --git a/dspace-api/src/main/java/org/dspace/checker/BitstreamDispatcher.java b/dspace-api/src/main/java/org/dspace/checker/BitstreamDispatcher.java index 77dd31a02e..721ce04bfb 100644 --- a/dspace-api/src/main/java/org/dspace/checker/BitstreamDispatcher.java +++ b/dspace-api/src/main/java/org/dspace/checker/BitstreamDispatcher.java @@ -50,6 +50,7 @@ public interface BitstreamDispatcher * * @return the next bitstream id, or BitstreamDispatcher.SENTINEL if there * isn't another value + * @throws SQLException if database error * */ public Bitstream next() throws SQLException; diff --git a/dspace-api/src/main/java/org/dspace/checker/CheckerCommand.java b/dspace-api/src/main/java/org/dspace/checker/CheckerCommand.java index 9649e0127f..3309acab61 100644 --- a/dspace-api/src/main/java/org/dspace/checker/CheckerCommand.java +++ b/dspace-api/src/main/java/org/dspace/checker/CheckerCommand.java @@ -73,6 +73,7 @@ public final class CheckerCommand /** * Default constructor uses DSpace plugin manager to construct dependencies. + * @param context Context */ public CheckerCommand(Context context) { @@ -94,6 +95,7 @@ public final class CheckerCommand * N.B. a valid BitstreamDispatcher must be provided using * setBitstreamDispatcher before calling this method *

+ * @throws SQLException if database error */ public void process() throws SQLException { LOG.debug("Begin Checker Processing"); @@ -136,6 +138,7 @@ public final class CheckerCommand * the bitstream * * @return the information about the bitstream and its checksum data + * @throws SQLException if database error */ protected MostRecentChecksum checkBitstream(final Bitstream bitstream) throws SQLException { // get bitstream info from bitstream table @@ -181,6 +184,7 @@ public final class CheckerCommand * the second checksum * * @return a result code (constants defined in Util) + * @throws SQLException if database error */ protected ChecksumResult compareChecksums(String checksumA, String checksumB) throws SQLException { ChecksumResult result = getChecksumResultByCode(ChecksumResultCode.CHECKSUM_NO_MATCH); @@ -205,6 +209,7 @@ public final class CheckerCommand * * @param info * a deleted bitstream. + * @throws SQLException if database error */ protected void processDeletedBitstream(MostRecentChecksum info) throws SQLException { info.setProcessStartDate(new Date()); @@ -223,6 +228,7 @@ public final class CheckerCommand * @param info * A not found BitStreamInfo * TODO is this method required? + * @throws SQLException if database error */ protected void processNullInfoBitstream(MostRecentChecksum info) throws SQLException { info.setInfoFound(false); @@ -246,6 +252,7 @@ public final class CheckerCommand * * @param info * BitstreamInfo to handle + * @throws SQLException if database error */ protected void processBitstream(MostRecentChecksum info) throws SQLException { info.setProcessStartDate(new Date()); diff --git a/dspace-api/src/main/java/org/dspace/checker/CheckerConsumer.java b/dspace-api/src/main/java/org/dspace/checker/CheckerConsumer.java index e7b5acb818..93eb7aa260 100644 --- a/dspace-api/src/main/java/org/dspace/checker/CheckerConsumer.java +++ b/dspace-api/src/main/java/org/dspace/checker/CheckerConsumer.java @@ -33,6 +33,7 @@ public class CheckerConsumer implements Consumer /** * Initialize - allocate any resources required to operate. * Called at the start of ANY sequence of event consume() calls. + * @throws Exception if error */ @Override public void initialize() throws Exception @@ -46,6 +47,7 @@ public class CheckerConsumer implements Consumer * @param ctx the execution context object * * @param event the content event + * @throws Exception if error */ @Override public void consume(Context ctx, Event event) throws Exception @@ -63,6 +65,8 @@ public class CheckerConsumer implements Consumer /** * Signal that there are no more events queued in this * event stream. + * @param ctx Context + * @throws Exception if error */ @Override public void end(Context ctx) throws Exception @@ -73,6 +77,8 @@ public class CheckerConsumer implements Consumer /** * Finish - free any allocated resources. * Called when consumer is being released + * @param ctx Context + * @throws Exception if error */ @Override public void finish(Context ctx) throws Exception diff --git a/dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java b/dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java index 5885250c12..1298e5d734 100644 --- a/dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java +++ b/dspace-api/src/main/java/org/dspace/checker/ChecksumHistory.java @@ -12,7 +12,6 @@ import org.dspace.content.Bitstream; import javax.persistence.*; import java.util.Date; -import java.util.UUID; /** *

@@ -169,6 +168,7 @@ public class ChecksumHistory /** * Return the processing result. + * @return result */ public ChecksumResult getResult() { diff --git a/dspace-api/src/main/java/org/dspace/checker/ChecksumHistoryServiceImpl.java b/dspace-api/src/main/java/org/dspace/checker/ChecksumHistoryServiceImpl.java index 98f255d74e..ec8e602ae7 100644 --- a/dspace-api/src/main/java/org/dspace/checker/ChecksumHistoryServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/checker/ChecksumHistoryServiceImpl.java @@ -88,6 +88,7 @@ public class ChecksumHistoryServiceImpl implements ChecksumHistoryService { /** * Delete the history records from the database. * + * @param context Context * @param retentionDate * any records older than this data are deleted. * @param checksumResultCode diff --git a/dspace-api/src/main/java/org/dspace/checker/ChecksumResultServiceImpl.java b/dspace-api/src/main/java/org/dspace/checker/ChecksumResultServiceImpl.java index b671e77a2e..3335ceafd0 100644 --- a/dspace-api/src/main/java/org/dspace/checker/ChecksumResultServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/checker/ChecksumResultServiceImpl.java @@ -35,9 +35,11 @@ public class ChecksumResultServiceImpl implements ChecksumResultService { /** * Get the result description for the given result code * + * @param context Context * @param code * to get the description for. * @return the found description. + * @throws SQLException if database error */ @Override public ChecksumResult findByCode(Context context, ChecksumResultCode code) throws SQLException @@ -48,7 +50,9 @@ public class ChecksumResultServiceImpl implements ChecksumResultService { /** * Get a list of all the possible result codes. * + * @param context Context * @return a list of all the result codes + * @throws SQLException if database error */ @Override public List findAll(Context context) throws SQLException { diff --git a/dspace-api/src/main/java/org/dspace/checker/ChecksumResultsCollector.java b/dspace-api/src/main/java/org/dspace/checker/ChecksumResultsCollector.java index 8821c29da1..615e30b28d 100644 --- a/dspace-api/src/main/java/org/dspace/checker/ChecksumResultsCollector.java +++ b/dspace-api/src/main/java/org/dspace/checker/ChecksumResultsCollector.java @@ -24,8 +24,10 @@ public interface ChecksumResultsCollector /** * Collects results. * + * @param context Context * @param info * BitstreamInfo representing the check results. + * @throws SQLException if database error */ void collect(Context context, MostRecentChecksum info) throws SQLException; } diff --git a/dspace-api/src/main/java/org/dspace/checker/HandleDispatcher.java b/dspace-api/src/main/java/org/dspace/checker/HandleDispatcher.java index ae21173139..84e1f8c631 100644 --- a/dspace-api/src/main/java/org/dspace/checker/HandleDispatcher.java +++ b/dspace-api/src/main/java/org/dspace/checker/HandleDispatcher.java @@ -61,6 +61,7 @@ public class HandleDispatcher implements BitstreamDispatcher /** * Main constructor. * + * @param context Context * @param hdl * the handle to get bitstreams from. */ @@ -110,6 +111,7 @@ public class HandleDispatcher implements BitstreamDispatcher /** * Initializes this dispatcher on first execution. * + * @throws SQLException if database error * @see org.dspace.checker.BitstreamDispatcher#next() */ @Override diff --git a/dspace-api/src/main/java/org/dspace/checker/LimitedCountDispatcher.java b/dspace-api/src/main/java/org/dspace/checker/LimitedCountDispatcher.java index 49e6021be8..9e18570890 100644 --- a/dspace-api/src/main/java/org/dspace/checker/LimitedCountDispatcher.java +++ b/dspace-api/src/main/java/org/dspace/checker/LimitedCountDispatcher.java @@ -67,6 +67,7 @@ public class LimitedCountDispatcher implements BitstreamDispatcher * Retreives the next bitstream to be checked. * * @return the bitstream + * @throws SQLException if database error */ @Override public Bitstream next() throws SQLException { diff --git a/dspace-api/src/main/java/org/dspace/checker/LimitedDurationDispatcher.java b/dspace-api/src/main/java/org/dspace/checker/LimitedDurationDispatcher.java index 763ae5a7d3..21547d280d 100644 --- a/dspace-api/src/main/java/org/dspace/checker/LimitedDurationDispatcher.java +++ b/dspace-api/src/main/java/org/dspace/checker/LimitedDurationDispatcher.java @@ -67,6 +67,7 @@ public class LimitedDurationDispatcher implements BitstreamDispatcher } /** + * @throws SQLException if database error * @see org.dspace.checker.BitstreamDispatcher#next() */ @Override diff --git a/dspace-api/src/main/java/org/dspace/checker/MostRecentChecksumServiceImpl.java b/dspace-api/src/main/java/org/dspace/checker/MostRecentChecksumServiceImpl.java index c5015a110c..efe9298168 100644 --- a/dspace-api/src/main/java/org/dspace/checker/MostRecentChecksumServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/checker/MostRecentChecksumServiceImpl.java @@ -60,11 +60,13 @@ public class MostRecentChecksumServiceImpl implements MostRecentChecksumService * Find all bitstreams that were set to not be processed for the specified * date range. * + * @param context Context * @param startDate * the start of the date range * @param endDate * the end of the date range * @return a list of BitstreamHistoryInfo objects + * @throws SQLException if database error */ @Override public List findNotProcessedBitstreamsReport(Context context, Date startDate, Date endDate) throws SQLException @@ -76,6 +78,7 @@ public class MostRecentChecksumServiceImpl implements MostRecentChecksumService * Select the most recent bitstream for a given date range with the * specified status. * + * @param context Context * @param startDate * the start date range * @param endDate @@ -84,6 +87,7 @@ public class MostRecentChecksumServiceImpl implements MostRecentChecksumService * the result code * * @return a list of BitstreamHistoryInfo objects + * @throws SQLException if database error */ @Override public List findBitstreamResultTypeReport(Context context, Date startDate, Date endDate, ChecksumResultCode resultCode) throws SQLException { @@ -94,6 +98,8 @@ public class MostRecentChecksumServiceImpl implements MostRecentChecksumService * Queries the bitstream table for bitstream IDs that are not yet in the * most_recent_checksum table, and inserts them into the * most_recent_checksum and checksum_history tables. + * @param context Context + * @throws SQLException if database error */ @Override public void updateMissingBitstreams(Context context) throws SQLException { @@ -161,7 +167,9 @@ public class MostRecentChecksumServiceImpl implements MostRecentChecksumService * Get the oldest most recent checksum record. If more than * one found the first one in the result set is returned. * + * @param context COntext * @return the oldest MostRecentChecksum or NULL if the table is empty + * @throws SQLException if database error * */ @Override @@ -174,8 +182,10 @@ public class MostRecentChecksumServiceImpl implements MostRecentChecksumService * Returns the oldest bitstream that in the set of bitstreams that are less * than the specified date. If no bitstreams are found -1 is returned. * - * @param lessThanDate + * @param context context + * @param lessThanDate date * @return id of olded bitstream or -1 if not bitstreams are found + * @throws SQLException if database error */ @Override public MostRecentChecksum findOldestRecord(Context context, Date lessThanDate) throws SQLException diff --git a/dspace-api/src/main/java/org/dspace/checker/ResultsLogger.java b/dspace-api/src/main/java/org/dspace/checker/ResultsLogger.java index 22ae64c3a4..8ae5364efe 100644 --- a/dspace-api/src/main/java/org/dspace/checker/ResultsLogger.java +++ b/dspace-api/src/main/java/org/dspace/checker/ResultsLogger.java @@ -83,8 +83,10 @@ public class ResultsLogger implements ChecksumResultsCollector /** * Collect a result for logging. * + * @param context Context * @param info * the BitstreamInfo representing the result. + * @throws SQLException if database error * @see org.dspace.checker.ChecksumResultsCollector#collect(org.dspace.core.Context, org.dspace.checker.MostRecentChecksum) */ @Override diff --git a/dspace-api/src/main/java/org/dspace/checker/ResultsPruner.java b/dspace-api/src/main/java/org/dspace/checker/ResultsPruner.java index 43170eb9bb..292728a668 100644 --- a/dspace-api/src/main/java/org/dspace/checker/ResultsPruner.java +++ b/dspace-api/src/main/java/org/dspace/checker/ResultsPruner.java @@ -49,6 +49,7 @@ public final class ResultsPruner * Factory method for the default results pruner configuration using * dspace.cfg * + * @param context Context * @return a ResultsPruner that represent the default retention policy */ public static ResultsPruner getDefaultPruner(Context context) @@ -69,6 +70,7 @@ public final class ResultsPruner /** * Factory method for ResultsPruners * + * @param context Context * @param propsFile * to configure the results pruner. * @return the configured results pruner. @@ -112,7 +114,9 @@ public final class ResultsPruner * Factory method for ResultsPruners (used to load ConfigurationManager * properties. * - * @param props + * @param context Context + * @param props Properties + * @return pruner * @throws FileNotFoundException if file doesn't exist */ public static ResultsPruner getPruner(Context context, Properties props) @@ -177,6 +181,7 @@ public final class ResultsPruner /** * Default Constructor + * @param context Context */ public ResultsPruner(Context context) { @@ -234,6 +239,7 @@ public final class ResultsPruner * registered with this object. * * @return number of results removed. + * @throws SQLException if database error */ public int prune() throws SQLException { ChecksumResultCode[] codes = ChecksumResultCode.values(); diff --git a/dspace-api/src/main/java/org/dspace/checker/SimpleDispatcher.java b/dspace-api/src/main/java/org/dspace/checker/SimpleDispatcher.java index ab8b7c0aec..9b3ea00a22 100644 --- a/dspace-api/src/main/java/org/dspace/checker/SimpleDispatcher.java +++ b/dspace-api/src/main/java/org/dspace/checker/SimpleDispatcher.java @@ -47,6 +47,7 @@ public class SimpleDispatcher implements BitstreamDispatcher /** * Creates a new SimpleDispatcher. * + * @param context Context * @param startTime * timestamp for beginning of checker process * @param looping @@ -71,6 +72,7 @@ public class SimpleDispatcher implements BitstreamDispatcher /** * Selects the next candidate bitstream. * + * @throws SQLException if database error * @see org.dspace.checker.BitstreamDispatcher#next() */ @Override diff --git a/dspace-api/src/main/java/org/dspace/checker/SimpleReporterServiceImpl.java b/dspace-api/src/main/java/org/dspace/checker/SimpleReporterServiceImpl.java index e7d1abac6b..daeba9c0f1 100644 --- a/dspace-api/src/main/java/org/dspace/checker/SimpleReporterServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/checker/SimpleReporterServiceImpl.java @@ -55,6 +55,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService * Sends the Deleted bitstream report to an administrator. for the * specified date range. * + * @param context context * @param startDate * the start date for the range * @param endDate @@ -66,6 +67,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ @Override public int getDeletedBitstreamReport(Context context, Date startDate, Date endDate, @@ -100,6 +102,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService /** * Send the checksum changed report for the specified date range. * + * @param context context * @param startDate * the start date for the range * @param endDate @@ -111,6 +114,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ @Override public int getChangedChecksumReport(Context context, Date startDate, Date endDate, @@ -147,6 +151,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService /** * Send the bitstream not found report for the specified date range. * + * @param context context * @param startDate * the start date for the range. * @param endDate @@ -158,6 +163,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ @Override public int getBitstreamNotFoundReport(Context context, Date startDate, Date endDate, @@ -193,6 +199,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService * Send the bitstreams that were set to not be processed report for the * specified date range. * + * @param context context * @param startDate * the start date for the range * @param endDate @@ -204,6 +211,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ @Override public int getNotToBeProcessedReport(Context context, Date startDate, Date endDate, @@ -239,6 +247,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService /** * Get any bitstreams that are not checked by the checksum checker. * + * @param context context * @param osw * the OutputStreamWriter to write to * @@ -246,6 +255,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ @Override public int getUncheckedBitstreamsReport(Context context, OutputStreamWriter osw) @@ -313,6 +323,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService /** * Create a list of the found history records. * + * @param context context * @param bitstreams * the list of history records to be iterated over. * @param osw @@ -320,6 +331,7 @@ public class SimpleReporterServiceImpl implements SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ protected void printDSpaceInfoRecords(Context context, List bitstreams, OutputStreamWriter osw) throws IOException, SQLException { diff --git a/dspace-api/src/main/java/org/dspace/checker/service/ChecksumHistoryService.java b/dspace-api/src/main/java/org/dspace/checker/service/ChecksumHistoryService.java index fabfbc884c..578214ac1d 100644 --- a/dspace-api/src/main/java/org/dspace/checker/service/ChecksumHistoryService.java +++ b/dspace-api/src/main/java/org/dspace/checker/service/ChecksumHistoryService.java @@ -35,11 +35,13 @@ public interface ChecksumHistoryService { /** * Prune the history records from the database. * + * @param context context * @param interests * set of results and the duration of time before they are * removed from the database * * @return number of bitstreams deleted + * @throws SQLException if database error */ public int prune(Context context, Map interests) throws SQLException; } diff --git a/dspace-api/src/main/java/org/dspace/checker/service/SimpleReporterService.java b/dspace-api/src/main/java/org/dspace/checker/service/SimpleReporterService.java index ef13ef3dda..b4b159890e 100644 --- a/dspace-api/src/main/java/org/dspace/checker/service/SimpleReporterService.java +++ b/dspace-api/src/main/java/org/dspace/checker/service/SimpleReporterService.java @@ -29,6 +29,7 @@ public interface SimpleReporterService * Returns the bitstreams set found to be deleted for the specified date * range. * + * @param context context * @param startDate * the start date range * @param endDate @@ -40,6 +41,7 @@ public interface SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ public int getDeletedBitstreamReport(Context context, Date startDate, Date endDate, OutputStreamWriter osw) throws IOException, SQLException; @@ -48,6 +50,7 @@ public interface SimpleReporterService * The a report of bitstreams found where the checksum has been changed * since the last check for the specified date range. * + * @param context context * @param startDate * the start date range. * @param endDate @@ -59,6 +62,7 @@ public interface SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ public int getChangedChecksumReport(Context context, Date startDate, Date endDate, OutputStreamWriter osw) throws IOException, SQLException; @@ -67,6 +71,7 @@ public interface SimpleReporterService * The report of bitstreams for the specified date range where it was * determined the bitstreams can no longer be found. * + * @param context context * @param startDate * the start date range. * @param endDate @@ -78,6 +83,7 @@ public interface SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error */ public int getBitstreamNotFoundReport(Context context, Date startDate, Date endDate, OutputStreamWriter osw) throws IOException, SQLException; @@ -86,15 +92,18 @@ public interface SimpleReporterService * The bitstreams that were set to not be processed report for the specified * date range. * + * @param context context * @param startDate * the start date range. * @param endDate * the end date range. * @param osw * the output stream writer to write to + * @return number of bitstreams found * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error * */ public int getNotToBeProcessedReport(Context context, Date startDate, Date endDate, @@ -104,6 +113,7 @@ public interface SimpleReporterService * The bitstreams that are not known to the checksum checker. This means * they are in the bitstream table but not in the most recent checksum table * + * @param context context * @param osw * the output stream writer to write to * @@ -111,6 +121,7 @@ public interface SimpleReporterService * * @throws IOException if IO error * if io error occurs + * @throws SQLException if database error * */ public int getUncheckedBitstreamsReport(Context context, OutputStreamWriter osw) diff --git a/dspace-api/src/main/java/org/dspace/content/Bitstream.java b/dspace-api/src/main/java/org/dspace/content/Bitstream.java index bbbde237c7..8632cd23c3 100644 --- a/dspace-api/src/main/java/org/dspace/content/Bitstream.java +++ b/dspace-api/src/main/java/org/dspace/content/Bitstream.java @@ -127,8 +127,10 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport /** * Set the name of the bitstream * + * @param context context * @param n * the new name of the bitstream + * @throws SQLException if database error */ public void setName(Context context, String n) throws SQLException { getBitstreamService().setMetadataSingleValue(context, this, MetadataSchema.DC_SCHEMA, "title", null, null, n); @@ -149,8 +151,10 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport /** * Set the source of the bitstream * + * @param context context * @param n * the new source of the bitstream + * @throws SQLException if database error */ public void setSource(Context context, String n) throws SQLException { getBitstreamService().setMetadataSingleValue(context, this, MetadataSchema.DC_SCHEMA, "source", null, null, n); @@ -170,8 +174,10 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport /** * Set the description of the bitstream * + * @param context context * @param n * the new description of the bitstream + * @throws SQLException if database error */ public void setDescription(Context context, String n) throws SQLException { getBitstreamService().setMetadataSingleValue(context, this, MetadataSchema.DC_SCHEMA, "description", null, null, n); @@ -238,7 +244,9 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport /** * Get the format of the bitstream * + * @param context context * @return the format of this bitstream + * @throws SQLException if database error */ public BitstreamFormat getFormat(Context context) throws SQLException { @@ -255,6 +263,7 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport * This method allows us to verify is the bitstream is still valid * * @return true if the bitstream has been deleted + * @throws SQLException if database error */ public boolean isDeleted() throws SQLException { @@ -335,6 +344,7 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport * Set the user's format description. This implies that the format of the * bitstream is uncertain, and the format is set to "unknown." * + * @param context * @param desc * the user's description of the format * @throws SQLException if database error @@ -348,7 +358,9 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport * Get the description of the format - either the user's or the description * of the format defined by the system. * + * @param context context * @return a description of the format. + * @throws SQLException if database error */ public String getFormatDescription(Context context) throws SQLException { @@ -360,6 +372,7 @@ public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport * description, it is cleared. Passing in null sets the type * of this bitstream to "unknown". * + * @param context context * @param f * the format of this bitstream, or null for * unknown diff --git a/dspace-api/src/main/java/org/dspace/content/BitstreamServiceImpl.java b/dspace-api/src/main/java/org/dspace/content/BitstreamServiceImpl.java index 4f410d6d4c..6e44f255d5 100644 --- a/dspace-api/src/main/java/org/dspace/content/BitstreamServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/BitstreamServiceImpl.java @@ -146,6 +146,7 @@ public class BitstreamServiceImpl extends DSpaceObjectServiceImpl imp * @return the newly registered bitstream * @throws IOException if IO error * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public Bitstream register(Context context, diff --git a/dspace-api/src/main/java/org/dspace/content/Bundle.java b/dspace-api/src/main/java/org/dspace/content/Bundle.java index 9bf2111ad4..ef2f7173ce 100644 --- a/dspace-api/src/main/java/org/dspace/content/Bundle.java +++ b/dspace-api/src/main/java/org/dspace/content/Bundle.java @@ -88,9 +88,11 @@ public class Bundle extends DSpaceObject implements DSpaceObjectLegacySupport /** * Set the name of the bundle * + * @param context context * @param name * string name of the bundle (ORIGINAL, TEXT, THUMBNAIL) are the * values currently used + * @throws SQLException if database error */ public void setName(Context context, String name) throws SQLException { @@ -197,6 +199,7 @@ public class Bundle extends DSpaceObject implements DSpaceObjectLegacySupport /** * return type found in Constants + * @return bundle type */ @Override public int getType() diff --git a/dspace-api/src/main/java/org/dspace/content/Collection.java b/dspace-api/src/main/java/org/dspace/content/Collection.java index 65b10aab11..43a145842c 100644 --- a/dspace-api/src/main/java/org/dspace/content/Collection.java +++ b/dspace-api/src/main/java/org/dspace/content/Collection.java @@ -228,8 +228,9 @@ public class Collection extends DSpaceObject implements DSpaceObjectLegacySuppor * Set the license for this collection. Passing in null means * that the site-wide default will be used. * - * @param license - * the license, or null + * @param context context + * @param license the license, or null + * @throws SQLException if database error */ public void setLicense(Context context, String license) throws SQLException { getCollectionService().setMetadata(context, this, "license", license); @@ -242,6 +243,7 @@ public class Collection extends DSpaceObject implements DSpaceObjectLegacySuppor * for a submission. * * @return the item template, or null + * @throws SQLException if database error */ public Item getTemplateItem() throws SQLException { diff --git a/dspace-api/src/main/java/org/dspace/content/Community.java b/dspace-api/src/main/java/org/dspace/content/Community.java index e998db44e4..8e0897208e 100644 --- a/dspace-api/src/main/java/org/dspace/content/Community.java +++ b/dspace-api/src/main/java/org/dspace/content/Community.java @@ -224,6 +224,7 @@ public class Community extends DSpaceObject implements DSpaceObjectLegacySupport /** * return type found in Constants + * @return Community type */ @Override public int getType() diff --git a/dspace-api/src/main/java/org/dspace/content/CommunityServiceImpl.java b/dspace-api/src/main/java/org/dspace/content/CommunityServiceImpl.java index d1277550a2..a391637905 100644 --- a/dspace-api/src/main/java/org/dspace/content/CommunityServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/CommunityServiceImpl.java @@ -328,6 +328,9 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl imp /** * Internal method to process subcommunities recursively + * @param community community + * @param collectionList list of collections + * @throws SQLException if database error */ protected void addCollectionList(Community community, List collectionList) throws SQLException { @@ -488,6 +491,8 @@ public class CommunityServiceImpl extends DSpaceObjectServiceImpl imp * Internal method to remove the community and all its children from the * database, and perform any pre/post-cleanup * + * @param context context + * @param community community * @throws SQLException if database error * @throws AuthorizeException if authorization error * @throws IOException if IO error diff --git a/dspace-api/src/main/java/org/dspace/content/DCSeriesNumber.java b/dspace-api/src/main/java/org/dspace/content/DCSeriesNumber.java index 93e79b138e..9820687d49 100644 --- a/dspace-api/src/main/java/org/dspace/content/DCSeriesNumber.java +++ b/dspace-api/src/main/java/org/dspace/content/DCSeriesNumber.java @@ -93,6 +93,7 @@ public class DCSeriesNumber /** * Get the series name - guaranteed non-null + * @return name */ public String getSeries() { @@ -101,6 +102,7 @@ public class DCSeriesNumber /** * Get the number - guaranteed non-null + * @return number */ public String getNumber() { diff --git a/dspace-api/src/main/java/org/dspace/content/DSpaceObjectServiceImpl.java b/dspace-api/src/main/java/org/dspace/content/DSpaceObjectServiceImpl.java index 8b9f5976bf..cc04f7f5b9 100644 --- a/dspace-api/src/main/java/org/dspace/content/DSpaceObjectServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/DSpaceObjectServiceImpl.java @@ -34,6 +34,7 @@ import java.util.*; * are required to have. * * @author kevinvandevelde at atmire.com + * @param class type */ public abstract class DSpaceObjectServiceImpl implements DSpaceObjectService { @@ -357,6 +358,12 @@ public abstract class DSpaceObjectServiceImpl implements /** * Retrieve first metadata field value + * @param dso + * @param language + * @param element + * @param schema + * @param qualifier + * @return */ @Override public String getMetadataFirstValue(T dso, String schema, String element, String qualifier, String language){ @@ -369,6 +376,7 @@ public abstract class DSpaceObjectServiceImpl implements /** * Set first metadata field value + * @throws SQLException if database error */ @Override public void setMetadataSingleValue(Context context, T dso, String schema, String element, String qualifier, String language, String value) throws SQLException { @@ -384,6 +392,7 @@ public abstract class DSpaceObjectServiceImpl implements * Protected method that deletes all metadata values from the database, should only be called when deleting the item. * @param context the dspaceObject * @param dso the dspaceObject who's metadata we are to delete + * @throws SQLException if database error */ protected void deleteMetadata(Context context, T dso) throws SQLException { @@ -491,6 +500,8 @@ public abstract class DSpaceObjectServiceImpl implements * The returned array will always have length greater than or equal to 4 *

* Values in the returned array can be empty or null. + * @param fieldName field name + * @return array */ protected String[] getElements(String fieldName) { String[] tokens = StringUtils.split(fieldName, "."); @@ -509,6 +520,8 @@ public abstract class DSpaceObjectServiceImpl implements * The returned array will always have length greater than or equal to 4 *

* When @param fill is true, elements that would be empty or null are replaced by Item.ANY + * @param fieldName field name + * @return array */ protected String[] getElementsFilled(String fieldName) { String[] elements = getElements(fieldName); diff --git a/dspace-api/src/main/java/org/dspace/content/InProgressSubmission.java b/dspace-api/src/main/java/org/dspace/content/InProgressSubmission.java index 7979034982..33a294f968 100644 --- a/dspace-api/src/main/java/org/dspace/content/InProgressSubmission.java +++ b/dspace-api/src/main/java/org/dspace/content/InProgressSubmission.java @@ -45,6 +45,7 @@ public interface InProgressSubmission * Get the submitter * * @return the submitting e-person + * @throws SQLException if database error */ EPerson getSubmitter() throws SQLException; diff --git a/dspace-api/src/main/java/org/dspace/content/MetadataFieldServiceImpl.java b/dspace-api/src/main/java/org/dspace/content/MetadataFieldServiceImpl.java index db33fb3b72..c55559ae96 100644 --- a/dspace-api/src/main/java/org/dspace/content/MetadataFieldServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/MetadataFieldServiceImpl.java @@ -153,9 +153,10 @@ public class MetadataFieldServiceImpl implements MetadataFieldService { * database constraint. * * @param context dspace context + * @param fieldId field id * @param metadataSchema metadataSchema - * @param element - * @param qualifier + * @param element element + * @param qualifier qualifier * @return true if unique * @throws SQLException if database error */ diff --git a/dspace-api/src/main/java/org/dspace/content/MetadataSchemaServiceImpl.java b/dspace-api/src/main/java/org/dspace/content/MetadataSchemaServiceImpl.java index b5991e13f4..547e1effd3 100644 --- a/dspace-api/src/main/java/org/dspace/content/MetadataSchemaServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/MetadataSchemaServiceImpl.java @@ -151,6 +151,7 @@ public class MetadataSchemaServiceImpl implements MetadataSchemaService { * number of times in the current schema. * * @param context DSpace context + * @param metadataSchemaId metadata schema id * @param namespace namespace URI to match * @return true of false * @throws SQLException if database error @@ -165,6 +166,7 @@ public class MetadataSchemaServiceImpl implements MetadataSchemaService { * Return true if and only if the passed name is unique. * * @param context DSpace context + * @param metadataSchemaId metadata schema id * @param name short name of schema * @return true of false * @throws SQLException if database error diff --git a/dspace-api/src/main/java/org/dspace/content/authority/Choices.java b/dspace-api/src/main/java/org/dspace/content/authority/Choices.java index fba7012f4f..5780f6c1b1 100644 --- a/dspace-api/src/main/java/org/dspace/content/authority/Choices.java +++ b/dspace-api/src/main/java/org/dspace/content/authority/Choices.java @@ -97,6 +97,11 @@ public class Choices /** * Constructor for general purpose + * @param values values array + * @param start start number + * @param total total results + * @param confidence confidence level + * @param more whether more values */ public Choices(Choice values[], int start, int total, int confidence, boolean more) { @@ -110,6 +115,12 @@ public class Choices /** * Constructor for general purpose + * @param values values array + * @param start start number + * @param total total results + * @param confidence confidence level + * @param more whether more values + * @param defaultSelected default selected value */ public Choices(Choice values[], int start, int total, int confidence, boolean more, int defaultSelected) { @@ -124,6 +135,7 @@ public class Choices /** * Constructor for error results + * @param confidence confidence level */ public Choices(int confidence) { @@ -133,6 +145,7 @@ public class Choices /** * Constructor for simple empty or error results + * @param isError whether error */ public Choices(boolean isError) { diff --git a/dspace-api/src/main/java/org/dspace/content/authority/MetadataAuthorityServiceImpl.java b/dspace-api/src/main/java/org/dspace/content/authority/MetadataAuthorityServiceImpl.java index e07495fb6a..21ec172d2d 100644 --- a/dspace-api/src/main/java/org/dspace/content/authority/MetadataAuthorityServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/authority/MetadataAuthorityServiceImpl.java @@ -216,6 +216,7 @@ public class MetadataAuthorityServiceImpl implements MetadataAuthorityService /** * Give the minimal level of confidence required to consider valid an authority value * for the given metadata. + * @param metadataField metadata field * @return the minimal valid level of confidence for the given metadata */ @Override diff --git a/dspace-api/src/main/java/org/dspace/content/authority/service/ChoiceAuthorityService.java b/dspace-api/src/main/java/org/dspace/content/authority/service/ChoiceAuthorityService.java index a0e54f30be..0b2381b944 100644 --- a/dspace-api/src/main/java/org/dspace/content/authority/service/ChoiceAuthorityService.java +++ b/dspace-api/src/main/java/org/dspace/content/authority/service/ChoiceAuthorityService.java @@ -88,18 +88,26 @@ public interface ChoiceAuthorityService /** * Wrapper that calls getLabel method of the plugin corresponding to * the metadata field defined by schema,element,qualifier. + * @param metadataValue metadata value + * @param locale explicit localization key if available + * @return label */ public String getLabel(MetadataValue metadataValue, String locale); /** * Wrapper that calls getLabel method of the plugin corresponding to * the metadata field defined by single field key. + * @param fieldKey single string identifying metadata field + * @param locale explicit localization key if available + * @param authKey authority key + * @return label */ public String getLabel(String fieldKey, String authKey, String locale); /** * Predicate, is there a Choices configuration of any kind for the * given metadata field? + * @param fieldKey single string identifying metadata field * @return true if choices are configured for this field. */ public boolean isChoicesConfigured(String fieldKey); @@ -108,6 +116,7 @@ public interface ChoiceAuthorityService * Get the presentation keyword (should be "lookup", "select" or "suggest", but this * is an informal convention so it can be easily extended) for this field. * + * @param fieldKey field key * @return configured presentation type for this field, or null if none found */ public String getPresentation(String fieldKey); @@ -115,12 +124,15 @@ public interface ChoiceAuthorityService /** * Get the configured "closed" value for this field. * + * @param fieldKey single string identifying metadata field * @return true if choices are closed for this field. */ public boolean isClosed(String fieldKey); /** * Wrapper to call plugin's getVariants(). + * @param metadataValue metadata value + * @return List of variants */ public List getVariants(MetadataValue metadataValue); } \ No newline at end of file diff --git a/dspace-api/src/main/java/org/dspace/content/authority/service/MetadataAuthorityService.java b/dspace-api/src/main/java/org/dspace/content/authority/service/MetadataAuthorityService.java index 862408e6dc..66436be6de 100644 --- a/dspace-api/src/main/java/org/dspace/content/authority/service/MetadataAuthorityService.java +++ b/dspace-api/src/main/java/org/dspace/content/authority/service/MetadataAuthorityService.java @@ -41,16 +41,32 @@ import java.util.List; */ public interface MetadataAuthorityService { - /** Predicate - is field authority-controlled? */ + /** + * Predicate - is field authority-controlled? + * @param metadataField metadata field + * @return true/false + */ public boolean isAuthorityControlled(MetadataField metadataField); - /** Predicate - is field authority-controlled? */ + /** + * Predicate - is field authority-controlled? + * @param fieldKey field key + * @return true/false + */ public boolean isAuthorityControlled(String fieldKey); - /** Predicate - is authority value required for field? */ + /** + * Predicate - is authority value required for field? + * @param metadataField metadata field + * @return true/false + */ public boolean isAuthorityRequired(MetadataField metadataField); - /** Predicate - is authority value required for field? */ + /** + * Predicate - is authority value required for field? + * @param fieldKey field key + * @return true/false + */ public boolean isAuthorityRequired(String fieldKey); @@ -58,6 +74,8 @@ public interface MetadataAuthorityService { * Construct a single key from the tuple of schema/element/qualifier * that describes a metadata field. Punt to the function we use for * submission UI input forms, for now. + * @param metadataField metadata field + * @return field key */ public String makeFieldKey(MetadataField metadataField); @@ -65,12 +83,17 @@ public interface MetadataAuthorityService { * Construct a single key from the tuple of schema/element/qualifier * that describes a metadata field. Punt to the function we use for * submission UI input forms, for now. + * @param schema schema + * @param element element + * @param qualifier qualifier + * @return field key */ public String makeFieldKey(String schema, String element, String qualifier); /** * Give the minimal level of confidence required to consider valid an authority value * for the given metadata. + * @param metadataField metadata field * @return the minimal valid level of confidence for the given metadata */ public int getMinConfidence(MetadataField metadataField); diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/AIPDIMCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/AIPDIMCrosswalk.java index b551527ca5..a5d29247d7 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/AIPDIMCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/AIPDIMCrosswalk.java @@ -115,6 +115,7 @@ public class AIPDIMCrosswalk * When there are no results, an * empty list is returned, but never null. * + * @param context context * @param dso the DSpace Object whose metadata to export. * @return results of crosswalk as list of XML elements. * @@ -139,6 +140,7 @@ public class AIPDIMCrosswalk * This is typically the root element of a document. *

* + * @param context context * @param dso the DSpace Object whose metadata to export. * @return root Element of the target metadata, never null * @@ -160,6 +162,11 @@ public class AIPDIMCrosswalk * Ingest a whole document. Build Document object around root element, * and feed that to the transformation, since it may get handled * differently than a List of metadata elements. + * @param createMissingMetadataFields whether to create missing fields + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void ingest(Context context, DSpaceObject dso, Element root, boolean createMissingMetadataFields) @@ -171,6 +178,12 @@ public class AIPDIMCrosswalk /** * Fields correspond directly to Item.addMetadata() calls so * they are simply executed. + * @param createMissingMetadataFields whether to create missing fields + * @param dimList List of elements + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void ingest(Context context, DSpaceObject dso, List dimList, boolean createMissingMetadataFields) diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/AIPTechMDCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/AIPTechMDCrosswalk.java index 3a56fbf9e9..1856615edd 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/AIPTechMDCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/AIPTechMDCrosswalk.java @@ -157,6 +157,7 @@ public class AIPTechMDCrosswalk implements IngestionCrosswalk, DisseminationCros * When there are no results, an * empty list is returned, but never null. * + * @param context context * @param dso the DSpace Object whose metadata to export. * @return results of crosswalk as list of XML elements. * @@ -181,6 +182,7 @@ public class AIPTechMDCrosswalk implements IngestionCrosswalk, DisseminationCros * This is typically the root element of a document. *

* + * @param context context * @param dso the DSpace Object whose metadata to export. * @return root Element of the target metadata, never null * @@ -323,6 +325,11 @@ public class AIPTechMDCrosswalk implements IngestionCrosswalk, DisseminationCros * Ingest a whole document. Build Document object around root element, * and feed that to the transformation, since it may get handled * differently than a List of metadata elements. + * @param createMissingMetadataFields whether to create missing fields + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void ingest(Context context, DSpaceObject dso, Element root, boolean createMissingMetadataFields) @@ -336,6 +343,12 @@ public class AIPTechMDCrosswalk implements IngestionCrosswalk, DisseminationCros * Translation produces a list of DIM "field" elements; * these correspond directly to Item.addMetadata() calls so * they are simply executed. + * @param createMissingMetadataFields whether to create missing fields + * @param dimList List of elements + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void ingest(Context context, DSpaceObject dso, List dimList, boolean createMissingMetadataFields) diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/CrosswalkUtils.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/CrosswalkUtils.java index 9c8725018c..0199658a94 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/CrosswalkUtils.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/CrosswalkUtils.java @@ -28,6 +28,14 @@ public class CrosswalkUtils { /** * Scans metadata for elements not defined in this DSpace instance. It then takes action based * on a configurable parameter (fail, ignore, add). + * @param context context + * @param schema schema + * @param element element + * @param qualifier qualifier + * @param forceCreate force create flag + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws CrosswalkException if crosswalk error */ public static void checkMetadata(Context context, String schema, String element, String qualifier, boolean forceCreate) throws SQLException, AuthorizeException, CrosswalkException { // The two options, with three possibilities each: add, ignore, fail diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/DisseminationCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/DisseminationCrosswalk.java index e272f355a4..bcc73bc80c 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/DisseminationCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/DisseminationCrosswalk.java @@ -91,6 +91,7 @@ public interface DisseminationCrosswalk * When there are no results, an * empty list is returned, but never null. * + * @param context context * @param dso the DSpace Object whose metadata to export. * @return results of crosswalk as list of XML elements. * @@ -110,6 +111,7 @@ public interface DisseminationCrosswalk * This is typically the root element of a document. *

* + * @param context context * @param dso the DSpace Object whose metadata to export. * @return root Element of the target metadata, never null * diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/IngestionCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/IngestionCrosswalk.java index ec6a057c21..3151c2ec67 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/IngestionCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/IngestionCrosswalk.java @@ -63,6 +63,7 @@ public interface IngestionCrosswalk * @param context DSpace context. * @param dso DSpace Object (Item, Bitstream, etc) to which new metadata gets attached. * @param metadata List of XML Elements of metadata + * @param createMissingMetadataFields whether to create missing fields * * @throws CrosswalkInternalException (CrosswalkException) failure of the crosswalk itself. * @throws CrosswalkObjectNotSupported (CrosswalkException) Cannot crosswalk into this kind of DSpace object. @@ -85,6 +86,7 @@ public interface IngestionCrosswalk * @param context DSpace context. * @param dso DSpace Object (usually an Item) to which new metadata gets attached. * @param root root Element of metadata document. + * @param createMissingMetadataFields whether to create missing fields * * @throws CrosswalkInternalException (CrosswalkException) failure of the crosswalk itself. * @throws CrosswalkObjectNotSupported (CrosswalkException) Cannot crosswalk into this kind of DSpace object. diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/METSRightsCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/METSRightsCrosswalk.java index c55237b11c..a2bf63ddcd 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/METSRightsCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/METSRightsCrosswalk.java @@ -130,6 +130,7 @@ public class METSRightsCrosswalk * policies (permissions) for the provided object, and translates them into * METSRights PermissionTypes. * + * @param context context * @param dso DSpace Object * @return XML Element corresponding to the new {@code } translation * @throws CrosswalkException if crosswalk error @@ -404,6 +405,7 @@ public class METSRightsCrosswalk * @param context * @param dso * @param root + * @param createMissingMetadataFields * @throws CrosswalkException if crosswalk error * @throws IOException if IO error * @throws SQLException if database error @@ -432,8 +434,10 @@ public class METSRightsCrosswalk * conjunction with another Crosswalk which can create/restore missing * Groups or EPeople (e.g. RoleCrosswalk). * - * @param context - * @param dso + * @param context context + * @param dso Dspace object + * @param ml list of elements + * @param createMissingMetadataFields whether to create missing fields * @throws CrosswalkException if crosswalk error * @throws IOException if IO error * @throws SQLException if database error diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/MODSDisseminationCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/MODSDisseminationCrosswalk.java index 8ec6ddf628..acfb3f6e29 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/MODSDisseminationCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/MODSDisseminationCrosswalk.java @@ -310,6 +310,11 @@ public class MODSDisseminationCrosswalk extends SelfNamedPlugin /** * Returns object's metadata in MODS format, as List of XML structure nodes. + * @param context context + * @throws org.dspace.content.crosswalk.CrosswalkException + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public List disseminateList(Context context, DSpaceObject dso) @@ -321,6 +326,11 @@ public class MODSDisseminationCrosswalk extends SelfNamedPlugin /** * Disseminate an Item, Collection, or Community to MODS. + * @param context context + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public Element disseminateElement(Context context, DSpaceObject dso) @@ -439,6 +449,7 @@ public class MODSDisseminationCrosswalk extends SelfNamedPlugin * * @param site * The site to derive metadata from + * @return list of metadata */ protected List site2Metadata(Site site) { @@ -473,6 +484,7 @@ public class MODSDisseminationCrosswalk extends SelfNamedPlugin * * @param community * The community to derive metadata from + * @return list of metadata */ protected List community2Metadata(Community community) { @@ -522,6 +534,7 @@ public class MODSDisseminationCrosswalk extends SelfNamedPlugin * * @param collection * The collection to derive metadata from + * @return list of metadata */ protected List collection2Metadata(Collection collection) { @@ -585,6 +598,7 @@ public class MODSDisseminationCrosswalk extends SelfNamedPlugin * * @param item * The item to derive metadata from + * @return list of metadata */ protected List item2Metadata(Item item) { diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/QDCCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/QDCCrosswalk.java index f7d929d085..b412dfc812 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/QDCCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/QDCCrosswalk.java @@ -336,6 +336,11 @@ public class QDCCrosswalk extends SelfNamedPlugin /** * Returns object's metadata in MODS format, as XML structure node. + * @param context context + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public List disseminateList(Context context, DSpaceObject dso) diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/RoleCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/RoleCrosswalk.java index 825c5571ae..ad56dd1d45 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/RoleCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/RoleCrosswalk.java @@ -135,6 +135,7 @@ public class RoleCrosswalk * When there are no results, an * empty list is returned, but never null. * + * @param context context * @param dso the DSpace Object whose metadata to export. * @return results of crosswalk as list of XML elements. * @@ -159,6 +160,7 @@ public class RoleCrosswalk * This is typically the root element of a document. *

* + * @param context context * @param dso the DSpace Object whose metadata to export. * @return root Element of the target metadata, never null * @@ -241,9 +243,10 @@ public class RoleCrosswalk /** * Ingest a List of XML elements * - * @param context - * @param dso - * @param metadata + * @param context context + * @param dso DSpaceObject + * @param metadata list of metadata + * @param createMissingMetadataFields whether to create missing fields * @throws CrosswalkException if crosswalk error * @throws IOException if IO error * @throws SQLException if database error @@ -265,9 +268,10 @@ public class RoleCrosswalk *

* This essentially just wraps a call to the configured Role PackageIngester. * - * @param context - * @param dso - * @param root + * @param context context + * @param dso DSpaceObject + * @param root root element + * @param createMissingMetadataFields whether to create missing fields * @throws CrosswalkException if crosswalk error * @throws IOException if IO error * @throws SQLException if database error diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/SimpleDCDisseminationCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/SimpleDCDisseminationCrosswalk.java index b60136bdb5..78ad431049 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/SimpleDCDisseminationCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/SimpleDCDisseminationCrosswalk.java @@ -77,6 +77,11 @@ public class SimpleDCDisseminationCrosswalk extends SelfNamedPlugin * Returns object's metadata as XML elements. * Simple-minded copying of elements: convert contributor.author to * "creator" but otherwise just grab element name without qualifier. + * @param context context + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public List disseminateList(Context context, DSpaceObject dso) diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/StreamDisseminationCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/StreamDisseminationCrosswalk.java index 8380dce629..c4582b0302 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/StreamDisseminationCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/StreamDisseminationCrosswalk.java @@ -35,6 +35,7 @@ public interface StreamDisseminationCrosswalk /** * Predicate: Can this disseminator crosswalk the given object. * + * @param context context * @param dso dspace object, e.g. an Item. * @return true when disseminator is capable of producing metadata. */ diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/XHTMLHeadDisseminationCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/XHTMLHeadDisseminationCrosswalk.java index 81486e8d60..80f8e651e3 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/XHTMLHeadDisseminationCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/XHTMLHeadDisseminationCrosswalk.java @@ -146,6 +146,11 @@ public class XHTMLHeadDisseminationCrosswalk extends SelfNamedPlugin implements /** * This generates a <head> element around the metadata; in general * this will probably not be used + * @param context context + * @throws CrosswalkException crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public Element disseminateElement(Context context, DSpaceObject dso) @@ -161,6 +166,11 @@ public class XHTMLHeadDisseminationCrosswalk extends SelfNamedPlugin implements /** * Return <meta> elements that can be put in the <head> element * of an XHTML document. + * @param context context + * @throws CrosswalkException crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public List disseminateList(Context context, DSpaceObject dso) throws CrosswalkException, diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTDisseminationCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTDisseminationCrosswalk.java index 5aa6c4f7d9..687bde5a1f 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTDisseminationCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTDisseminationCrosswalk.java @@ -250,6 +250,11 @@ public class XSLTDisseminationCrosswalk /** * Disseminate the DSpace item, collection, or community. * + * @param context context + * @throws CrosswalkException crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error * @see DisseminationCrosswalk */ @Override @@ -321,6 +326,8 @@ public class XSLTDisseminationCrosswalk * Generate an intermediate representation of a DSpace object. * * @param dso The dspace object to build a representation of. + * @param dcvs list of metadata + * @return element */ public static Element createDIM(DSpaceObject dso, List dcvs) { @@ -343,6 +350,7 @@ public class XSLTDisseminationCrosswalk * Generate an intermediate representation of a DSpace object. * * @param dso The dspace object to build a representation of. + * @return element */ public static Element createDIM(DSpaceObject dso) { @@ -516,6 +524,8 @@ public class XSLTDisseminationCrosswalk /** * Simple command-line rig for testing the DIM output of a stylesheet. * Usage: {@code java XSLTDisseminationCrosswalk [output-file]} + * @param argv arguments + * @throws Exception if error */ public static void main(String[] argv) throws Exception { diff --git a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTIngestionCrosswalk.java b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTIngestionCrosswalk.java index 5327fb45e9..2c6ae6559e 100644 --- a/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTIngestionCrosswalk.java +++ b/dspace-api/src/main/java/org/dspace/content/crosswalk/XSLTIngestionCrosswalk.java @@ -126,6 +126,11 @@ public class XSLTIngestionCrosswalk * Translation produces a list of DIM "field" elements; * these correspond directly to Item.addMetadata() calls so * they are simply executed. + * @param createMissingMetadataFields whether to create missing fields + * @throws CrosswalkException crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void ingest(Context context, DSpaceObject dso, List metadata, @@ -155,6 +160,11 @@ public class XSLTIngestionCrosswalk * Ingest a whole document. Build Document object around root element, * and feed that to the transformation, since it may get handled * differently than a List of metadata elements. + * @param createMissingMetadataFields whether to create missing fields + * @throws CrosswalkException crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void ingest(Context context, DSpaceObject dso, Element root, boolean createMissingMetadataFields) @@ -207,6 +217,11 @@ public class XSLTIngestionCrosswalk * @param context the context * @param dso object into which to ingest metadata * @param dim root of a DIM expression + * @param createMissingMetadataFields whether to create missing fields + * @throws CrosswalkException crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public static void ingestDIM(Context context, DSpaceObject dso, Element dim, boolean createMissingMetadataFields) @@ -276,6 +291,8 @@ public class XSLTIngestionCrosswalk /** * Simple command-line rig for testing the DIM output of a stylesheet. * Usage: {@code java XSLTIngestionCrosswalk } + * @param argv arguments + * @throws Exception if error */ public static void main(String[] argv) throws Exception { diff --git a/dspace-api/src/main/java/org/dspace/content/dao/ItemDAO.java b/dspace-api/src/main/java/org/dspace/content/dao/ItemDAO.java index b39c458091..80f7fa834d 100644 --- a/dspace-api/src/main/java/org/dspace/content/dao/ItemDAO.java +++ b/dspace-api/src/main/java/org/dspace/content/dao/ItemDAO.java @@ -35,9 +35,10 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO /** * Find all Items modified since a Date. * - * @param context + * @param context Context * @param since Earliest interesting last-modified date. - * @return + * @return iterator over items + * @throws SQLException if database error */ public Iterator findByLastModifiedSince(Context context, Date since) throws SQLException; @@ -58,7 +59,7 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO /** * Count number of items in a given collection - * @param context + * @param context context * @param collection the collection * @param includeArchived whether to include archived items in count * @param includeWithdrawn whether to include withdrawn items in count @@ -73,7 +74,7 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO * {@link org.dspace.content.service.CommunityService#getAllCollections(Context,Community)} * to determine the unique number of items in a Community. * - * @param context + * @param context context * @param collections the list of collections * @param includeArchived whether to include archived items in count * @param includeWithdrawn whether to include withdrawn items in count @@ -84,12 +85,13 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO /** * Get all Items installed or withdrawn, discoverable, and modified since a Date. - * @param context - * @param archived - * @param withdrawn - * @param discoverable + * @param context context + * @param archived whether to find archived + * @param withdrawn whether to find withdrawn + * @param discoverable whether to find discoverable * @param lastModified earliest interesting last-modified date. - * @return + * @return iterator over items + * @throws SQLException if database error */ public Iterator findAll(Context context, boolean archived, boolean withdrawn, boolean discoverable, Date lastModified) @@ -97,7 +99,7 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO /** * Count total number of items (rows in item table) - * @param context + * @param context context * @return total count * @throws SQLException if database error */ @@ -105,7 +107,7 @@ public interface ItemDAO extends DSpaceObjectLegacySupportDAO /** * Count number of items based on specific status flags - * @param context + * @param context context * @param includeArchived whether to include archived items in count * @param includeWithdrawn whether to include withdrawn items in count * @return count of items diff --git a/dspace-api/src/main/java/org/dspace/content/dao/impl/CommunityDAOImpl.java b/dspace-api/src/main/java/org/dspace/content/dao/impl/CommunityDAOImpl.java index 47fd0f9e58..76fa2f6c74 100644 --- a/dspace-api/src/main/java/org/dspace/content/dao/impl/CommunityDAOImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/dao/impl/CommunityDAOImpl.java @@ -43,10 +43,11 @@ public class CommunityDAOImpl extends AbstractHibernateDSODAO impleme * Get a list of all communities in the system. These are alphabetically * sorted by community name. * - * @param context - * DSpace context object + * @param context DSpace context object + * @param sortField sort field * * @return the communities in the system + * @throws SQLException if database error */ @Override public List findAll(Context context, MetadataField sortField) throws SQLException diff --git a/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataSchemaDAOImpl.java b/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataSchemaDAOImpl.java index 7b78ba3716..42339e24b1 100644 --- a/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataSchemaDAOImpl.java +++ b/dspace-api/src/main/java/org/dspace/content/dao/impl/MetadataSchemaDAOImpl.java @@ -66,6 +66,7 @@ public class MetadataSchemaDAOImpl extends AbstractHibernateDAO * number of times in the current schema. * * @param context DSpace context + * @param metadataSchemaId schema id * @param namespace namespace URI to match * @return true of false * @throws SQLException if database error @@ -87,6 +88,7 @@ public class MetadataSchemaDAOImpl extends AbstractHibernateDAO * Return true if and only if the passed name is unique. * * @param context DSpace context + * @param metadataSchemaId schema id * @param name short name of schema * @return true of false * @throws SQLException if database error diff --git a/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java b/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java index cbeca6c170..eb36bafc47 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSDisseminator.java @@ -227,6 +227,10 @@ public abstract class AbstractMETSDisseminator * @param pkgFile File where export package should be written * @throws PackageValidationException if package cannot be created or there * is a fatal error in creating it. + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error */ @Override public void disseminate(Context context, DSpaceObject dso, @@ -306,7 +310,9 @@ public abstract class AbstractMETSDisseminator * @param params Parameters to the Packager script * @param pkg Package output stream * @throws PackageValidationException if package validation error + * @throws CrosswalkException if crosswalk error * @throws AuthorizeException if authorization error + * @throws MetsException if METS error * @throws SQLException if database error * @throws IOException if IO error */ @@ -409,6 +415,10 @@ public abstract class AbstractMETSDisseminator * @param dso The DSpace Object * @param params Parameters to the Packager script * @param zip Zip output + * @throws PackageValidationException if validation error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error */ protected void addBitstreamsToZip(Context context, DSpaceObject dso, PackageParameters params, ZipOutputStream zip) @@ -786,6 +796,17 @@ public abstract class AbstractMETSDisseminator /** * Write out a METS manifest. * Mostly lifted from Rob Tansley's METS exporter. + * @param context context + * @param dso DSpaceObject + * @param params packaging params + * @param extraStreams streams + * @return METS manifest + * @throws MetsException if mets error + * @throws PackageValidationException if validation error + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error */ protected Mets makeManifest(Context context, DSpaceObject dso, PackageParameters params, @@ -1195,7 +1216,7 @@ public abstract class AbstractMETSDisseminator * all child objects). * @param type - type attr value for the {@code

} * @param dso - object for which to create the div - * @param params + * @param params package params * @return a new {@code Div} with {@code dso} as child. */ protected Div makeChildDiv(String type, DSpaceObject dso, PackageParameters params) @@ -1260,6 +1281,7 @@ public abstract class AbstractMETSDisseminator * the derived bitstream * * @return the corresponding original bitstream (or null) + * @throws SQLException if database error */ protected Bitstream findOriginalBitstream(Item item, Bitstream derived) throws SQLException @@ -1475,9 +1497,11 @@ public abstract class AbstractMETSDisseminator * For a manifest-only METS, this is a reference to an HTTP URL where * the bitstream should be able to be downloaded from. * + * @param context context * @param bitstream the Bitstream * @param params Packager Parameters * @return String in URL format naming path to bitstream. + * @throws SQLException if database error */ public String makeBitstreamURL(Context context, Bitstream bitstream, PackageParameters params) throws SQLException { // if bare manifest, use external "persistent" URI for bitstreams @@ -1541,6 +1565,11 @@ public abstract class AbstractMETSDisseminator /** * Create metsHdr element - separate so subclasses can override. + * @param context context + * @param dso DSpaceObject + * @param params packaging params + * @return Mets header + * @throws SQLException if database error */ public abstract MetsHdr makeMetsHdr(Context context, DSpaceObject dso, PackageParameters params) throws SQLException; @@ -1568,8 +1597,13 @@ public abstract class AbstractMETSDisseminator * E.g. the type string "DC:qualifiedDublinCore" tells it to * create a METS section with MDTYPE="DC" and use the plugin * named "qualifiedDublinCore" to obtain the data. + * @param context context + * @param dso DSpaceObject * @param params the PackageParameters passed to the disseminator. * @return array of metadata type strings, never null. + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract String [] getDmdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException; @@ -1579,8 +1613,13 @@ public abstract class AbstractMETSDisseminator * object and each Bitstream in an Item. The type string may be a * simple name or colon-separated compound as specified for * getDmdTypes() above. + * @param context context + * @param dso DSpaceObject * @param params the PackageParameters passed to the disseminator. * @return array of metadata type strings, never null. + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract String[] getTechMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException; @@ -1590,8 +1629,13 @@ public abstract class AbstractMETSDisseminator * object and each Bitstream in an Item. The type string may be a * simple name or colon-separated compound as specified for * getDmdTypes() above. + * @param context context + * @param dso DSpaceObject * @param params the PackageParameters passed to the disseminator. * @return array of metadata type strings, never null. + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract String[] getSourceMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException; @@ -1602,8 +1646,13 @@ public abstract class AbstractMETSDisseminator * The type string may be a simple name or colon-separated compound * as specified for getDmdTypes() above. * + * @param context context + * @param dso DSpaceObject * @param params the PackageParameters passed to the disseminator. * @return array of metadata type strings, never null. + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract String[] getDigiprovMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException; @@ -1614,8 +1663,13 @@ public abstract class AbstractMETSDisseminator * The type string may be a simple name or colon-separated compound * as specified for getDmdTypes() above. * + * @param context context + * @param dso DSpaceObject * @param params the PackageParameters passed to the disseminator. * @return array of metadata type strings, never null. + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract String[] getRightsMdTypes(Context context, DSpaceObject dso, PackageParameters params) throws SQLException, IOException, AuthorizeException; @@ -1625,13 +1679,21 @@ public abstract class AbstractMETSDisseminator * METS document, as required by this subclass. A simple default * structure map which fulfills the minimal DSpace METS DIP/SIP * requirements is already present, so this does not need to do anything. + * @param context context + * @param dso DSpaceObject * @param mets the METS document to which to add structMaps + * @param params the PackageParameters passed to the disseminator. + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws MetsException if METS error */ public abstract void addStructMap(Context context, DSpaceObject dso, PackageParameters params, Mets mets) throws SQLException, IOException, AuthorizeException, MetsException; /** + * @param bundle bundle * @return true when this bundle should be included as "content" * in the package.. e.g. DSpace SIP does not include metadata bundles. */ diff --git a/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSIngester.java b/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSIngester.java index e11969e8ce..14ed4237ef 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSIngester.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/AbstractMETSIngester.java @@ -136,6 +136,8 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * @param mdref * the METS mdRef element to locate the input for. * @return the input stream of its content. + * @throws MetadataValidationException if validation error + * @throws IOException if IO error * @see METSManifest */ @Override @@ -185,6 +187,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * @throws AuthorizeException if authorization error * @throws SQLException if database error * @throws IOException if IO error + * @throws WorkflowException if workflow error */ @Override public DSpaceObject ingest(Context context, DSpaceObject parent, @@ -371,6 +374,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * @throws AuthorizeException if authorization error * @throws CrosswalkException if crosswalk error * @throws MetadataValidationException if metadata validation error + * @throws WorkflowException if workflow error * @throws PackageValidationException if package validation error */ protected DSpaceObject ingestObject(Context context, DSpaceObject parent, @@ -910,6 +914,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * DSpace Item * @param manifest * The METS Manifest + * @throws IOException if IO error * @throws SQLException if database error * @throws AuthorizeException if authorization error * @throws PackageValidationException if package validation error @@ -1117,6 +1122,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * @throws SQLException if database error * @throws AuthorizeException if authorization error * @throws CrosswalkException if crosswalk error + * @throws WorkflowException if workflow error */ @Override public DSpaceObject replace(Context context, DSpaceObject dsoToReplace, @@ -1297,8 +1303,12 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester /** * Remove an existing DSpace Object (called during a replace) * + * @param context context * @param dso * DSpace Object + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ protected void removeObject(Context context, DSpaceObject dso) throws AuthorizeException, SQLException, IOException @@ -1396,6 +1406,8 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * @return handle as a string (or null, if not found) * @throws PackageValidationException if package validation error * if handle cannot be found in manifest + * @throws MetadataValidationException if validation error + * @throws SQLException if database error */ public String getObjectHandle(METSManifest manifest) throws PackageValidationException, MetadataValidationException, @@ -1429,6 +1441,8 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * @param path * the File path (either path in Zip package or a URL) * @return the InputStream for the file + * @throws MetadataValidationException if validation error + * @throws IOException if IO error */ protected static InputStream getFileInputStream(File pkgFile, PackageParameters params, String path) @@ -1531,10 +1545,9 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * Note that item and manifest are available as * protected fields from the superclass. * - * @param context - * the DSpace context - * @param manifest - * the METSManifest + * @param context the DSpace context + * @param dso DSpace Object + * @param manifest the METSManifest * @param callback * the MdrefManager (manages all external metadata files * referenced by METS mdref elements) @@ -1542,6 +1555,11 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * array of Elements, each a METS dmdSec that * applies to the Item as a whole. * @param params + * @throws CrosswalkException if crosswalk error + * @throws PackageValidationException if package validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract void crosswalkObjectDmd(Context context, DSpaceObject dso, METSManifest manifest, MdrefManager callback, Element dmds[], @@ -1566,10 +1584,16 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * * @param context * the DSpace context + * @param item Item * @param collection * DSpace Collection to which the item is being submitted. * @param license * optional user-supplied Deposit License text (may be null) + * @param params + * @throws PackageValidationException if package validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract void addLicense(Context context, Item item, String license, Collection collection, PackageParameters params) @@ -1588,6 +1612,11 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * the DSpace Object * @param params * the Packager Parameters + * @throws CrosswalkException if crosswalk error + * @throws PackageValidationException if package validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract void finishObject(Context context, DSpaceObject dso, PackageParameters params) throws PackageValidationException, @@ -1596,7 +1625,9 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester /** * Determines what type of DSpace object is represented in this METS doc. * + * @param manifest METS manifest * @return one of the object types in Constants. + * @throws PackageValidationException if package validation error */ public abstract int getObjectType(METSManifest manifest) throws PackageValidationException; @@ -1604,6 +1635,15 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester /** * Subclass-dependent final processing on a Bitstream; could include fixing * up the name, bundle, other attributes. + * @param context context + * @param manifest METS manifest + * @param bs bitstream + * @param mfile element + * @param params package params + * @throws MetadataValidationException if validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public abstract void finishBitstream(Context context, Bitstream bs, Element mfile, METSManifest manifest, PackageParameters params) @@ -1614,6 +1654,7 @@ public abstract class AbstractMETSIngester extends AbstractPackageIngester * Returns keyword that makes the configuration keys of this subclass * unique, e.g. if it returns NAME, the key would be: * "mets.NAME.ingest.preserveManifest = true" + * @return name */ public abstract String getConfigurationName(); diff --git a/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageDisseminator.java b/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageDisseminator.java index 5797a3a6b2..8e06918438 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageDisseminator.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageDisseminator.java @@ -76,6 +76,10 @@ public abstract class AbstractPackageDisseminator * packages will be written to the same directory as this File. * @throws PackageValidationException if package cannot be created or there is * a fatal error in creating it. + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public List disseminateAll(Context context, DSpaceObject dso, diff --git a/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageIngester.java b/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageIngester.java index ded409ad35..ead6225f75 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageIngester.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/AbstractPackageIngester.java @@ -114,6 +114,11 @@ public abstract class AbstractPackageIngester * is unacceptable or there is a fatal error in creating a DSpaceObject * @throws UnsupportedOperationException if this packager does not * implement ingestAll + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws WorkflowException if workflow error */ @Override public List ingestAll(Context context, DSpaceObject parent, File pkgFile, @@ -254,6 +259,11 @@ public abstract class AbstractPackageIngester * is unacceptable or there is a fatal error in creating a DSpaceObject * @throws UnsupportedOperationException if this packager does not * implement replaceAll + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws WorkflowException if workflow error */ @Override public List replaceAll(Context context, DSpaceObject dso, diff --git a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceAIPIngester.java b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceAIPIngester.java index d360b7caae..edf88aacd8 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceAIPIngester.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceAIPIngester.java @@ -95,6 +95,11 @@ public class DSpaceAIPIngester * 3. If (1) or (2) succeeds, crosswalk it and ignore all other DMDs with * same GROUPID
* 4. Crosswalk remaining DMDs not eliminated already. + * @throws PackageValidationException validation error + * @throws CrosswalkException if crosswalk error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void crosswalkObjectDmd(Context context, DSpaceObject dso, @@ -193,6 +198,10 @@ public class DSpaceAIPIngester * license supplied by explicit argument next, else use collection's * default deposit license. * Normally the rightsMD crosswalks should provide a license. + * @throws PackageValidationException validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void addLicense(Context context, Item item, String license, @@ -232,6 +241,11 @@ public class DSpaceAIPIngester * @param context DSpace Context * @param dso DSpace object * @param params Packager Parameters + * @throws org.dspace.content.packager.PackageValidationException + * @throws java.sql.SQLException + * @throws org.dspace.content.crosswalk.CrosswalkException + * @throws java.io.IOException + * @throws org.dspace.authorize.AuthorizeException */ @Override public void finishObject(Context context, DSpaceObject dso, PackageParameters params) @@ -256,6 +270,10 @@ public class DSpaceAIPIngester /** * Nothing extra to do to bitstream after ingestion. + * @throws MetadataValidationException if validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void finishBitstream(Context context, @@ -271,6 +289,8 @@ public class DSpaceAIPIngester /** * Return the type of DSpaceObject in this package; it is * in the TYPE attribute of the mets:mets element. + * @return type + * @throws PackageValidationException if package validation error */ @Override public int getObjectType(METSManifest manifest) @@ -296,6 +316,7 @@ public class DSpaceAIPIngester /** * Name used to distinguish DSpace Configuration entries for this subclass. + * @return config name */ @Override public String getConfigurationName() diff --git a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSDisseminator.java b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSDisseminator.java index d563d5b3a6..de96d561aa 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSDisseminator.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSDisseminator.java @@ -104,6 +104,7 @@ public class DSpaceMETSDisseminator /** * Create metsHdr element - separate so subclasses can override. + * @return mets header */ @Override public MetsHdr makeMetsHdr(Context context, DSpaceObject dso, @@ -134,6 +135,10 @@ public class DSpaceMETSDisseminator * params may contain one or more values for "dmd"; each of those is * the name of a crosswalk plugin, optionally followed by colon and * its METS MDTYPE name. + * @return array of DMD types + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public String [] getDmdTypes(Context context, DSpaceObject dso, PackageParameters params) @@ -159,6 +164,10 @@ public class DSpaceMETSDisseminator * Get name of technical metadata crosswalk for Bitstreams. * Default is PREMIS. This is both the name of the crosswalk plugin * and the METS MDTYPE. + * @return array of TechMD types + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public String[] getTechMdTypes(Context context, DSpaceObject dso, PackageParameters params) @@ -193,6 +202,10 @@ public class DSpaceMETSDisseminator /** * Add rights MD (licenses) for DSpace item. These * may include a deposit license, and Creative Commons. + * @return array of RightsMD types + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public String[] getRightsMdTypes(Context context, DSpaceObject dso, PackageParameters params) diff --git a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSIngester.java b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSIngester.java index ab7eaeea87..4ea1f3e349 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSIngester.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/DSpaceMETSIngester.java @@ -76,6 +76,11 @@ public class DSpaceMETSIngester * 3. If (1) or (2) succeeds, crosswalk it and ignore all other DMDs with * same GROUPID
* 4. Crosswalk remaining DMDs not eliminated already. + * @throws CrosswalkException if crosswalk error + * @throws PackageValidationException if validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void crosswalkObjectDmd(Context context, DSpaceObject dso, @@ -167,6 +172,10 @@ public class DSpaceMETSIngester * supplied by explicit argument first, else use collection's * default deposit license. * For Creative Commons, look for a rightsMd containing a CC license. + * @throws PackageValidationException if validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void addLicense(Context context, Item item, String license, @@ -220,6 +229,10 @@ public class DSpaceMETSIngester /** * Take a second pass over files to correct names of derived files * (e.g. thumbnails, extracted text) to what DSpace expects: + * @throws MetadataValidationException if validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ @Override public void finishBitstream(Context context, diff --git a/dspace-api/src/main/java/org/dspace/content/packager/METSManifest.java b/dspace-api/src/main/java/org/dspace/content/packager/METSManifest.java index 6b3d86e6df..160b413b6b 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/METSManifest.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/METSManifest.java @@ -107,9 +107,10 @@ public class METSManifest * @param mdRef JDOM element of mdRef in the METS manifest. * @return stream containing the metadata mentioned in mdRef. * @throws MetadataValidationException if the mdRef is unacceptable or missing required information. - * @throws IOException if it is returned by services called by this method. - * @throws SQLException if it is returned by services called by this method. - * @throws AuthorizeException if it is returned by services called by this method. + * @throws PackageValidationException if package validation error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public InputStream getInputStream(Element mdRef) throws MetadataValidationException, PackageValidationException, @@ -230,6 +231,7 @@ public class METSManifest * Default constructor, only called internally. * @param builder XML parser (for parsing mdRef'd files and binData) * @param mets parsed METS document + * @param configName config name */ protected METSManifest(SAXBuilder builder, Element mets, String configName) { @@ -245,6 +247,8 @@ public class METSManifest * @param is input stream containing serialized XML * @param validate if true, enable XML validation using schemas * in document. Also validates any sub-documents. + * @param configName config name + * @throws IOException if IO error * @throws MetadataValidationException if there is any error parsing * or validating the METS. * @return new METSManifest object. @@ -318,6 +322,7 @@ public class METSManifest * Gets all file elements which make up * the item's content. * @return a List of Elements. + * @throws MetadataValidationException if validation error */ public List getBundleFiles() throws MetadataValidationException @@ -375,6 +380,7 @@ public class METSManifest * document. Used by ingester to e.g. check that all * required files are present. * @return a List of Elements. + * @throws MetadataValidationException if validation error */ public List getMdFiles() throws MetadataValidationException @@ -463,6 +469,7 @@ public class METSManifest * Get the DSpace bundle name corresponding to the USE * attribute of the file group enclosing this file element. * + * @param file file element * @return DSpace bundle name * @throws MetadataValidationException when there is no USE attribute on the enclosing fileGrp. */ @@ -476,6 +483,8 @@ public class METSManifest * Get the DSpace bundle name corresponding to the USE * attribute of the file group enclosing this file element. * + * @param file file element + * @param getParent parent flag * @return DSpace bundle name * @throws MetadataValidationException when there is no USE attribute on the enclosing fileGrp. */ @@ -500,6 +509,7 @@ public class METSManifest * By "local" we mean the reference to the actual resource containing * the data for this file, e.g. a relative path within a Zip or tar archive * if the METS is serving as a manifest for that sort of package. + * @param file file element * @return "local" file name (i.e. relative to package or content * directory) corresponding to this file or mdRef element. * @throws MetadataValidationException when there is not enough information to find a resource identifier. @@ -551,6 +561,7 @@ public class METSManifest * first {@code structMap} has an {@code fptr}. * * @return file element of Item's primary bitstream, or null if there is none. + * @throws MetadataValidationException if validation error */ public Element getPrimaryOrLogoBitstream() throws MetadataValidationException @@ -576,7 +587,9 @@ public class METSManifest /** * Get the metadata type from within a *mdSec element. + * @param mdSec mdSec element * @return metadata type name. + * @throws MetadataValidationException if validation error */ public String getMdType(Element mdSec) throws MetadataValidationException @@ -604,7 +617,9 @@ public class METSManifest /** * Returns MIME type of metadata content, if available. + * @param mdSec mdSec element * @return MIMEtype word, or null if none is available. + * @throws MetadataValidationException if validation error */ public String getMdContentMimeType(Element mdSec) throws MetadataValidationException @@ -631,8 +646,14 @@ public class METSManifest * Return contents of *md element as List of XML Element objects. * Gets content, dereferencing mdRef if necessary, or decoding and parsing * a binData that contains XML. + * @param mdSec mdSec element + * @param callback mdref callback * @return contents of metadata section, or empty list if no XML content is available. * @throws MetadataValidationException if METS is invalid, or there is an error parsing the XML. + * @throws PackageValidationException if invalid package + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public List getMdContentAsXml(Element mdSec, Mdref callback) throws MetadataValidationException, PackageValidationException, @@ -732,8 +753,14 @@ public class METSManifest * Return contents of *md element as stream. * Gets content, dereferencing mdRef if necessary, or decoding * a binData element if necessary. + * @param mdSec mdSec element + * @param callback mdref callback * @return Stream containing contents of metadata section. Never returns null. * @throws MetadataValidationException if METS format does not contain any metadata. + * @throws PackageValidationException if invalid package + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public InputStream getMdContentAsStream(Element mdSec, Mdref callback) throws MetadataValidationException, PackageValidationException, @@ -1076,6 +1103,17 @@ public class METSManifest /** * Invokes appropriate crosswalks on Item-wide descriptive metadata. + * @param context context + * @param callback mdref callback + * @param dso DSpaceObject + * @param params package params + * @param dmdSec dmdSec element + * @throws MetadataValidationException if METS error + * @throws CrosswalkException if crosswalk error + * @throws PackageValidationException if invalid package + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void crosswalkItemDmd(Context context, PackageParameters params, DSpaceObject dso, @@ -1089,7 +1127,15 @@ public class METSManifest /** * Crosswalk all technical and source metadata sections that belong * to the whole object. + * @param context context + * @param callback mdref callback + * @param params package params + * @param dso DSpaceObject * @throws MetadataValidationException if METS is invalid, e.g. referenced amdSec is missing. + * @throws PackageValidationException if invalid package + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void crosswalkObjectOtherAdminMD(Context context, PackageParameters params, DSpaceObject dso, Mdref callback) @@ -1116,7 +1162,17 @@ public class METSManifest /** * Just crosswalk the sourceMD sections; used to set the handle and parent of AIP. + * @param context context + * @param callback mdref callback + * @param params package params + * @param dso DSpaceObject * @return true if any metadata section was actually crosswalked, false otherwise + * @throws MetadataValidationException if METS is invalid, e.g. referenced amdSec is missing. + * @throws PackageValidationException if invalid package + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws CrosswalkException if crosswalk error */ public boolean crosswalkObjectSourceMD(Context context, PackageParameters params, DSpaceObject dso, Mdref callback) @@ -1277,7 +1333,13 @@ public class METSManifest * @param bitstream bitstream target of the crosswalk * @param fileId value of ID attribute in the file element responsible * for the contents of that bitstream. - * @param callback ??? + * @param callback mdref callback + * @throws MetadataValidationException if METS is invalid, e.g. referenced amdSec is missing. + * @throws PackageValidationException if invalid package + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws CrosswalkException if crosswalk error */ public void crosswalkBitstream(Context context, PackageParameters params, Bitstream bitstream, diff --git a/dspace-api/src/main/java/org/dspace/content/packager/PDFPackager.java b/dspace-api/src/main/java/org/dspace/content/packager/PDFPackager.java index 4c980c88f5..7c4087fa6e 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/PDFPackager.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/PDFPackager.java @@ -185,6 +185,12 @@ public class PDFPackager /** * IngestAll() cannot be implemented for a PDF ingester, because there's only one PDF to ingest + * @throws UnsupportedOperationException if unsupported operation + * @throws PackageException if package error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws CrosswalkException if crosswalk error */ @Override public List ingestAll(Context context, DSpaceObject parent, File pkgFile, @@ -199,6 +205,12 @@ public class PDFPackager /** * Replace is not implemented. + * @throws UnsupportedOperationException if unsupported operation + * @throws PackageException if package error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws CrosswalkException if crosswalk error */ @Override public DSpaceObject replace(Context context, DSpaceObject dso, @@ -212,6 +224,12 @@ public class PDFPackager /** * ReplaceAll() cannot be implemented for a PDF ingester, because there's only one PDF to ingest + * @throws UnsupportedOperationException if unsupported operation + * @throws PackageException if package error + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws CrosswalkException if crosswalk error */ @Override public List replaceAll(Context context, DSpaceObject dso, @@ -227,6 +245,11 @@ public class PDFPackager * VERY crude dissemination: just look for the first * bitstream with the PDF package type, and toss it out. * Works on packages importer with this packager, and maybe some others. + * @param dso DSpaceObject + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error */ @Override public void disseminate(Context context, DSpaceObject dso, @@ -277,6 +300,11 @@ public class PDFPackager /** * disseminateAll() cannot be implemented for a PDF disseminator, because there's only one PDF to disseminate + * @throws PackageException if package error + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error */ @Override public List disseminateAll(Context context, DSpaceObject dso, @@ -291,6 +319,7 @@ public class PDFPackager /** * Identifies the MIME-type of this package, i.e. "application/pdf". * + * @param params package params * @return the MIME type (content-type header) of the package to be returned */ @Override diff --git a/dspace-api/src/main/java/org/dspace/content/packager/PackageDisseminator.java b/dspace-api/src/main/java/org/dspace/content/packager/PackageDisseminator.java index ea3049b5ce..e15aa06316 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/PackageDisseminator.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/PackageDisseminator.java @@ -67,6 +67,10 @@ public interface PackageDisseminator * @param pkgFile File where export package should be written * @throws PackageValidationException if package cannot be created or there is * a fatal error in creating it. + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error */ void disseminate(Context context, DSpaceObject object, PackageParameters params, File pkgFile) @@ -103,6 +107,10 @@ public interface PackageDisseminator * @return List of all package Files which were successfully disseminated * @throws PackageValidationException if package cannot be created or there is * a fatal error in creating it. + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error */ List disseminateAll(Context context, DSpaceObject dso, PackageParameters params, File pkgFile) @@ -115,6 +123,7 @@ public interface PackageDisseminator * Required when sending the package via HTTP, to * provide the Content-Type header. * + * @param params Package Parameters * @return the MIME type (content-type header) of the package to be returned */ String getMIMEType(PackageParameters params); diff --git a/dspace-api/src/main/java/org/dspace/content/packager/PackageException.java b/dspace-api/src/main/java/org/dspace/content/packager/PackageException.java index 92442593cd..0257387b7a 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/PackageException.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/PackageException.java @@ -62,6 +62,7 @@ public class PackageException extends Exception /** * Write details of this exception to the indicated logger. * Dump a stack trace to the log to aid in debugging. + * @param log logger */ public void log(Logger log) { diff --git a/dspace-api/src/main/java/org/dspace/content/packager/PackageIngester.java b/dspace-api/src/main/java/org/dspace/content/packager/PackageIngester.java index 9f01dd3896..85733fe200 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/PackageIngester.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/PackageIngester.java @@ -70,6 +70,11 @@ public interface PackageIngester * * @throws PackageValidationException if package is unacceptable or there is * a fatal error turning it into a DSpaceObject. + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error + * @throws WorkflowException if workflow error */ DSpaceObject ingest(Context context, DSpaceObject parent, File pkgFile, PackageParameters params, String license) @@ -112,6 +117,11 @@ public interface PackageIngester * is unacceptable or there is a fatal error in creating a DSpaceObject * @throws UnsupportedOperationException if this packager does not * implement ingestAll + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error + * @throws WorkflowException if workflow error */ List ingestAll(Context context, DSpaceObject parent, File pkgFile, PackageParameters params, String license) @@ -139,6 +149,11 @@ public interface PackageIngester * a fatal error turning it into an Item. * @throws UnsupportedOperationException if this packager does not * implement replace. + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error + * @throws WorkflowException if workflow error */ DSpaceObject replace(Context context, DSpaceObject dso, File pkgFile, PackageParameters params) @@ -179,6 +194,11 @@ public interface PackageIngester * is unacceptable or there is a fatal error in creating a DSpaceObject * @throws UnsupportedOperationException if this packager does not * implement replaceAll + * @throws CrosswalkException if crosswalk error + * @throws AuthorizeException if authorization error + * @throws SQLException if database error + * @throws IOException if IO error + * @throws WorkflowException if workflow error */ List replaceAll(Context context, DSpaceObject dso, File pkgFile, PackageParameters params) diff --git a/dspace-api/src/main/java/org/dspace/content/packager/PackageUtils.java b/dspace-api/src/main/java/org/dspace/content/packager/PackageUtils.java index 204d417c44..402763a6b7 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/PackageUtils.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/PackageUtils.java @@ -128,6 +128,7 @@ public class PackageUtils * Used by all SIP processors as a common sanity test. * * @param item - item to test. + * @throws PackageValidationException if validation error */ public static void checkItemMetadata(Item item) throws PackageValidationException @@ -149,6 +150,9 @@ public class PackageUtils * @param license - license string to add, may be null to invoke default. * @param item - the item. * @param collection - get the default license from here. + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public static void addDepositLicense(Context context, String license, Item item, Collection collection) @@ -192,6 +196,7 @@ public class PackageUtils * @param item Item whose bitstreams to search. * @param name Bitstream's name to match. * @return first bitstream found or null. + * @throws SQLException if database error */ public static Bitstream getBitstreamByName(Item item, String name) throws SQLException @@ -206,6 +211,7 @@ public class PackageUtils * @param bsName - name of bitstream to match. * @param bnName - bundle name to match, or null for all. * @return the format found or null if none found. + * @throws SQLException if database error */ public static Bitstream getBitstreamByName(Item item, String bsName, String bnName) throws SQLException @@ -237,10 +243,12 @@ public class PackageUtils * Find bitstream by its format, looking in a specific bundle. * Used to look for particularly-typed Package Manifest bitstreams. * + * @param context context * @param item - dspace item whose bundles to search. * @param bsf - BitstreamFormat object to match. * @param bnName - bundle name to match, or null for all. * @return the format found or null if none found. + * @throws SQLException if database error */ public static Bitstream getBitstreamByFormat(Context context, Item item, BitstreamFormat bsf, String bnName) @@ -326,6 +334,8 @@ public class PackageUtils * @param MIMEType - MIME content-type * @param desc - long description * @return BitstreamFormat object that was found or created. Never null. + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public static BitstreamFormat findOrCreateBitstreamFormat(Context context, String shortDesc, String MIMEType, String desc) @@ -347,8 +357,11 @@ public class PackageUtils * @param shortDesc - short descriptive name, used to locate existing format. * @param MIMEType - mime content-type * @param desc - long description + * @param supportLevel support level * @param internal value for the 'internal' flag of a new format if created. * @return BitstreamFormat object that was found or created. Never null. + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public static BitstreamFormat findOrCreateBitstreamFormat(Context context, String shortDesc, String MIMEType, String desc, int supportLevel, boolean internal) @@ -378,9 +391,9 @@ public class PackageUtils * @param item * the item * @return the license bitstream or null - * - * @throws IOException if IO error - * if the license bitstream can't be read + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws IOException if the license bitstream can't be read */ public static Bitstream findDepositLicense(Context context, Item item) throws SQLException, IOException, AuthorizeException @@ -497,6 +510,7 @@ public class PackageUtils * @throws IOException if IO error * @throws SQLException if database error * @throws AuthorizeException if authorization error + * @throws WorkflowException if workflow error */ public static Item finishCreateItem(Context context, WorkspaceItem wsi, String handle, PackageParameters params) throws IOException, SQLException, AuthorizeException, WorkflowException { @@ -536,7 +550,11 @@ public class PackageUtils *

* This method is necessary as there is no generic 'update()' on a DSpaceObject * + * @param context context * @param dso DSpaceObject to update + * @throws SQLException if database error + * @throws AuthorizeException if authorization error + * @throws IOException if IO error */ public static void updateDSpaceObject(Context context, DSpaceObject dso) throws AuthorizeException, SQLException, IOException @@ -614,7 +632,7 @@ public class PackageUtils * Creates the specified file (along with all parent directories) if it doesn't already * exist. If the file already exists, nothing happens. * - * @param file + * @param file file * @return boolean true if succeeded, false otherwise * @throws IOException if IO error */ @@ -648,7 +666,11 @@ public class PackageUtils *

* This method is useful for replace functionality. * + * @param context context * @param dso The object to remove all bitstreams from + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public static void removeAllBitstreams(Context context, DSpaceObject dso) throws SQLException, IOException, AuthorizeException @@ -687,7 +709,11 @@ public class PackageUtils *

* This method is useful for replace functionality. * + * @param context context * @param dso The object to remove all metadata from + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public static void clearAllMetadata(Context context, DSpaceObject dso) throws SQLException, IOException, AuthorizeException @@ -784,6 +810,7 @@ public class PackageUtils * @param context current DSpace Context * @param groupName Group's name * @return the group name, with any internal IDs translated to Handles + * @throws PackageException if package error */ public static String translateGroupNameForExport(Context context, String groupName) throws PackageException @@ -869,6 +896,7 @@ public class PackageUtils * @param context current DSpace Context * @param groupName Group's name * @return the group name, with any Handles translated to internal IDs + * @throws PackageException if package error */ public static String translateGroupNameForImport(Context context, String groupName) throws PackageException diff --git a/dspace-api/src/main/java/org/dspace/content/packager/RoleDisseminator.java b/dspace-api/src/main/java/org/dspace/content/packager/RoleDisseminator.java index b2fc15a361..fedc54ac44 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/RoleDisseminator.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/RoleDisseminator.java @@ -438,6 +438,7 @@ public class RoleDisseminator implements PackageDisseminator * the description to this stream * @param emitPassword * do not export the password hash unless true + * @throws XMLStreamException if XML error */ protected void writeEPerson(EPerson eperson, XMLStreamWriter writer, boolean emitPassword) throws XMLStreamException @@ -535,6 +536,7 @@ public class RoleDisseminator implements PackageDisseminator * @param context The DSpace context * @param object the DSpace object * @return array of all associated groups + * @throws SQLException if database error */ protected List findAssociatedGroups(Context context, DSpaceObject object) throws SQLException @@ -637,6 +639,7 @@ public class RoleDisseminator implements PackageDisseminator * @param context The DSpace context * @param object the DSpace object * @return array of all associated EPerson objects + * @throws SQLException if database error */ protected List findAssociatedPeople(Context context, DSpaceObject object) throws SQLException diff --git a/dspace-api/src/main/java/org/dspace/content/packager/RoleIngester.java b/dspace-api/src/main/java/org/dspace/content/packager/RoleIngester.java index 92076a25bc..9e230e0e55 100644 --- a/dspace-api/src/main/java/org/dspace/content/packager/RoleIngester.java +++ b/dspace-api/src/main/java/org/dspace/content/packager/RoleIngester.java @@ -427,12 +427,9 @@ public class RoleIngester implements PackageIngester /** * Ingest roles from an InputStream. * - * @param context - * DSpace Context - * @param parent - * the Parent DSpaceObject - * @param stream - * the XML Document InputStream + * @param context DSpace Context + * @param parent the Parent DSpaceObject + * @param params package params * @throws PackageException if packaging error * @throws SQLException if database error * @throws AuthorizeException if authorization error diff --git a/dspace-api/src/main/java/org/dspace/content/service/BitstreamFormatService.java b/dspace-api/src/main/java/org/dspace/content/service/BitstreamFormatService.java index efa26c0c54..e5f83243c7 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/BitstreamFormatService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/BitstreamFormatService.java @@ -96,8 +96,11 @@ public interface BitstreamFormatService extends DSpaceCRUDServiceUNKNOWN,KNOWN or SUPPORTED. * + * @param bitstreamFormat format * @return the support level */ public String getSupportLevelText(BitstreamFormat bitstreamFormat); @@ -113,6 +117,7 @@ public interface BitstreamFormatService extends DSpaceCRUDServiceUNKNOWN,KNOWN or SUPPORTED. * + * @param bitstreamFormat format * @param supportLevel * the new support level */ @@ -134,10 +139,12 @@ public interface BitstreamFormatService extends DSpaceCRUDService, DSpace /** * Create a new top-level community, with a new ID. * + * @param parent parent community * @param context * DSpace context object * * @return the newly created community + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public Community create(Community parent, Context context) throws SQLException, AuthorizeException; @@ -44,11 +47,14 @@ public interface CommunityService extends DSpaceObjectService, DSpace /** * Create a new top-level community, with a new ID. * + * @param parent parent community * @param context * DSpace context object * @param handle the pre-determined Handle to assign to the new community * * @return the newly created community + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public Community create(Community parent, Context context, String handle) throws SQLException, AuthorizeException; @@ -62,15 +68,16 @@ public interface CommunityService extends DSpaceObjectService, DSpace * DSpace context object * * @return the communities in the system + * @throws SQLException if database error */ public List findAll(Context context) throws SQLException; /** * Get all communities in the system. Adds support for limit and offset. - * @param context - * @param limit - * @param offset - * @return + * @param context context + * @param limit limit + * @param offset offset + * @return list of communities * @throws SQLException if database error */ public List findAll(Context context, Integer limit, Integer offset) throws SQLException; @@ -84,12 +91,14 @@ public interface CommunityService extends DSpaceObjectService, DSpace * DSpace context object * * @return the top-level communities in the system + * @throws SQLException if database error */ public List findAllTop(Context context) throws SQLException; /** * Get the value of a metadata field * + * @param community community * @param field * the name of the metadata field to get * @@ -97,6 +106,7 @@ public interface CommunityService extends DSpaceObjectService, DSpace * * @exception IllegalArgumentException * if the requested metadata field doesn't exist + * @deprecated */ @Override @Deprecated @@ -106,6 +116,8 @@ public interface CommunityService extends DSpaceObjectService, DSpace /** * Set a metadata value * + * @param context context + * @param community community * @param field * the name of the metadata field to get * @param value @@ -114,6 +126,8 @@ public interface CommunityService extends DSpaceObjectService, DSpace * @exception IllegalArgumentException * if the requested metadata field doesn't exist * @exception java.util.MissingResourceException + * @throws SQLException if database error + * @deprecated */ @Deprecated public void setMetadata(Context context, Community community, String field, String value) throws MissingResourceException, SQLException; @@ -126,10 +140,15 @@ public interface CommunityService extends DSpaceObjectService, DSpace * effect. Setting a logo and not calling update later may * result in a previous logo lying around as an "orphaned" bitstream. * + * @param context context + * @param community community * @param is the stream to use as the new logo * * @return the new logo bitstream, or null if there is no * logo (null was passed in) + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public Bitstream setLogo(Context context, Community community, InputStream is) throws AuthorizeException, IOException, SQLException; @@ -139,6 +158,8 @@ public interface CommunityService extends DSpaceObjectService, DSpace * Returns either the newly created group or the previously existing one. * Note that other groups may also be administrators. * + * @param context context + * @param community community * @return the default group of editors associated with this community * @throws SQLException if database error * @throws AuthorizeException if authorization error @@ -150,6 +171,10 @@ public interface CommunityService extends DSpaceObjectService, DSpace * then return without error. This will merely dereference the current * administrators group from the community so that it may be deleted * without violating database constraints. + * @param context context + * @param community community + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void removeAdministrators(Context context, Community community) throws SQLException, AuthorizeException; @@ -157,14 +182,20 @@ public interface CommunityService extends DSpaceObjectService, DSpace * Return an array of parent communities of this community, in ascending * order. If community is top-level, return an empty array. * + * @param context context + * @param community community * @return an array of parent communities, empty if top-level + * @throws SQLException if database error */ public List getAllParents(Context context, Community community) throws SQLException; /** * Return an array of collections of this community and its subcommunities * + * @param context context + * @param community community * @return an array of collections + * @throws SQLException if database error */ public List getAllCollections(Context context, Community community) throws SQLException; @@ -173,8 +204,12 @@ public interface CommunityService extends DSpaceObjectService, DSpace /** * Add an exisiting collection to the community * + * @param context context + * @param community community * @param collection * collection to add + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void addCollection(Context context, Community community, Collection collection) throws SQLException, AuthorizeException; @@ -182,26 +217,37 @@ public interface CommunityService extends DSpaceObjectService, DSpace /** * Create a new sub-community within this community. * + * @param context context + * @param parentCommunity parent community * @return the new community + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public Community createSubcommunity(Context context, Community parentCommunity) throws SQLException, AuthorizeException; /** * Create a new sub-community within this community. * + * @param context context * @param handle the pre-determined Handle to assign to the new community + * @param parentCommunity parent community * @return the new community + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public Community createSubcommunity(Context context, Community parentCommunity, String handle) throws SQLException, AuthorizeException; /** - * Add an exisiting community as a subcommunity to the community + * Add an existing community as a subcommunity to the community * + * @param context context * @param parentCommunity * parent community to add our subcommunity to * @param childCommunity * subcommunity to add + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void addSubcommunity(Context context, Community parentCommunity, Community childCommunity) throws SQLException, AuthorizeException; @@ -211,8 +257,9 @@ public interface CommunityService extends DSpaceObjectService, DSpace * then it is permanently deleted. If it has more than one parent community, * it is simply unmapped from the current community. * - * @param c - * collection to remove + * @param context context + * @param c collection to remove + * @param community community * @throws SQLException if database error * @throws AuthorizeException if authorization error * @throws IOException if IO error @@ -225,8 +272,10 @@ public interface CommunityService extends DSpaceObjectService, DSpace * then it is permanently deleted. If it has more than one parent community, * it is simply unmapped from the current community. * + * @param context context * @param childCommunity * subcommunity to remove + * @param parentCommunity parent community * @throws SQLException if database error * @throws AuthorizeException if authorization error * @throws IOException if IO error @@ -237,7 +286,10 @@ public interface CommunityService extends DSpaceObjectService, DSpace /** * return TRUE if context's user can edit community, false otherwise * + * @param context context + * @param community community * @return boolean true = current user can edit community + * @throws SQLException if database error */ public boolean canEditBoolean(Context context, Community community) throws java.sql.SQLException; diff --git a/dspace-api/src/main/java/org/dspace/content/service/DSpaceObjectLegacySupportService.java b/dspace-api/src/main/java/org/dspace/content/service/DSpaceObjectLegacySupportService.java index 1420a57266..b5023f4afa 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/DSpaceObjectLegacySupportService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/DSpaceObjectLegacySupportService.java @@ -17,6 +17,7 @@ import java.sql.SQLException; * to identify DSpaceObjects prior to DSpace 6.0 * * @author kevinvandevelde at atmire.com + * @param class type */ public interface DSpaceObjectLegacySupportService { diff --git a/dspace-api/src/main/java/org/dspace/content/service/DSpaceObjectService.java b/dspace-api/src/main/java/org/dspace/content/service/DSpaceObjectService.java index 033d2a65bb..2336f3a9c4 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/DSpaceObjectService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/DSpaceObjectService.java @@ -25,6 +25,7 @@ import java.util.UUID; * are required to have. * * @author kevinvandevelde at atmire.com + * @param class type */ public interface DSpaceObjectService { @@ -215,6 +216,7 @@ public interface DSpaceObjectService { * value has no language (for example, a date). * @param values * the values to add. + * @throws SQLException if database error */ public void addMetadata(Context context, T dso, String schema, String element, String qualifier, String lang, List values) throws SQLException; @@ -243,6 +245,7 @@ public interface DSpaceObjectService { * the external authority key for this value (or null) * @param confidences * the authority confidence (default 0) + * @throws SQLException if database error */ public void addMetadata(Context context, T dso, String schema, String element, String qualifier, String lang, List values, List authorities, List confidences) throws SQLException; @@ -265,6 +268,7 @@ public interface DSpaceObjectService { * the external authority key for this value (or null) * @param confidences * the authority confidence (default 0) + * @throws SQLException if database error */ public void addMetadata(Context context, T dso, MetadataField metadataField, String lang, List values, List authorities, List confidences) throws SQLException; @@ -293,6 +297,7 @@ public interface DSpaceObjectService { * value has no language (for example, a date). * @param value * the value to add. + * @throws SQLException if database error */ public void addMetadata(Context context, T dso, String schema, String element, String qualifier, String lang, String value) throws SQLException; @@ -320,6 +325,7 @@ public interface DSpaceObjectService { * the external authority key for this value (or null) * @param confidence * the authority confidence (default 0) + * @throws SQLException if database error */ public void addMetadata(Context context, T dso, String schema, String element, String qualifier, String lang, String value, String authority, int confidence) throws SQLException; @@ -348,6 +354,7 @@ public interface DSpaceObjectService { * values with no language are removed, and Item.ANY * means values with any country code or no country code are * removed. + * @throws SQLException if database error */ public void clearMetadata(Context context, T dso, String schema, String element, String qualifier, String lang) throws SQLException; diff --git a/dspace-api/src/main/java/org/dspace/content/service/InProgressSubmissionService.java b/dspace-api/src/main/java/org/dspace/content/service/InProgressSubmissionService.java index fa878b0940..c08935bda7 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/InProgressSubmissionService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/InProgressSubmissionService.java @@ -19,16 +19,25 @@ import java.sql.SQLException; * are required to have. * * @author kevinvandevelde at atmire.com + * @param class type */ public interface InProgressSubmissionService { /** * Deletes submission wrapper, doesn't delete item contents + * @param context context + * @param inProgressSubmission submission + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void deleteWrapper(Context context, T inProgressSubmission) throws SQLException, AuthorizeException; /** * Update the submission, including the unarchived item. + * @param context context + * @param inProgressSubmission submission + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void update(Context context, T inProgressSubmission) throws SQLException, AuthorizeException; } diff --git a/dspace-api/src/main/java/org/dspace/content/service/InstallItemService.java b/dspace-api/src/main/java/org/dspace/content/service/InstallItemService.java index 273c0e80df..3fe6e1e4f0 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/InstallItemService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/InstallItemService.java @@ -33,6 +33,8 @@ public interface InstallItemService { * submission to install * * @return the fully archived Item + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public Item installItem(Context context, InProgressSubmission is) throws SQLException, AuthorizeException; @@ -47,6 +49,9 @@ public interface InstallItemService { * the existing Handle to give to the installed item * * @return the fully archived Item + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public Item installItem(Context c, InProgressSubmission is, String suppliedHandle) throws SQLException, @@ -68,6 +73,9 @@ public interface InstallItemService { * to create a new one. * * @return the fully archived Item + * @throws IOException if IO error + * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public Item restoreItem(Context c, InProgressSubmission is, String suppliedHandle) throws SQLException, IOException, AuthorizeException; @@ -76,9 +84,11 @@ public interface InstallItemService { * Generate provenance-worthy description of the bitstreams contained in an * item. * + * @param context context * @param myitem the item to generate description for * * @return provenance description + * @throws SQLException if database error */ public String getBitstreamProvenanceMessage(Context context, Item myitem) throws SQLException; diff --git a/dspace-api/src/main/java/org/dspace/content/service/ItemService.java b/dspace-api/src/main/java/org/dspace/content/service/ItemService.java index 8feef66075..5f639bc9ed 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/ItemService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/ItemService.java @@ -53,6 +53,7 @@ public interface ItemService extends DSpaceObjectService, DSpaceObjectLega * * @param context DSpace context object * @param collection Collection (parent) + * @return Item * @throws SQLException if database error * @throws AuthorizeException if authorization error */ @@ -95,8 +96,8 @@ public interface ItemService extends DSpaceObjectService, DSpaceObjectLega /** * Retrieve the list of Items submitted by eperson, ordered by recently submitted, optionally limitable - * @param context - * @param eperson + * @param context context + * @param eperson eperson * @param limit a positive integer to limit, -1 or null for unlimited * @return * @throws SQLException if database error @@ -127,7 +128,7 @@ public interface ItemService extends DSpaceObjectService, DSpaceObjectLega /** * Get all Items installed or withdrawn, discoverable, and modified since a Date. - * @param context + * @param context context * @param since earliest interesting last-modified date, or null for no date test. * @return an iterator over the items in the collection. * @throws SQLException if database error @@ -361,6 +362,7 @@ public interface ItemService extends DSpaceObjectService, DSpaceObjectLega * @param group * Group referenced by policies that needs to be removed * @throws SQLException if database error + * @throws AuthorizeException if authorization error */ public void removeGroupPolicies(Context context, Item item, Group group) throws SQLException, AuthorizeException; @@ -490,8 +492,8 @@ public interface ItemService extends DSpaceObjectService, DSpaceObjectLega * Service method for knowing if this Item should be visible in the item list. * Items only show up in the "item list" if the user has READ permission * and if the Item isn't flagged as unlisted. - * @param context - * @param item + * @param context context + * @param item item * @return true or false */ public boolean isItemListedForUser(Context context, Item item); @@ -502,13 +504,14 @@ public interface ItemService extends DSpaceObjectService, DSpaceObjectLega * @param context DSpace context object * @param collection Collection * @return total items + * @throws SQLException if database error */ public int countItems(Context context, Collection collection) throws SQLException; /** * Find all Items modified since a Date. * - * @param context + * @param context context * @param last Earliest interesting last-modified date. * @return iterator over items * @throws SQLException if database error diff --git a/dspace-api/src/main/java/org/dspace/content/service/MetadataFieldService.java b/dspace-api/src/main/java/org/dspace/content/service/MetadataFieldService.java index 9576d7ffec..4199498010 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/MetadataFieldService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/MetadataFieldService.java @@ -30,6 +30,11 @@ public interface MetadataFieldService { * * @param context * DSpace context object + * @param metadataSchema schema + * @param scopeNote scope note + * @param element element + * @param qualifier qualifier + * @return new MetadataField * @throws AuthorizeException if authorization error * @throws SQLException if database error * @throws NonUniqueMetadataException @@ -94,6 +99,7 @@ public interface MetadataFieldService { * Update the metadata field in the database. * * @param context dspace context + * @param metadataField metadata field * @throws SQLException if database error * @throws AuthorizeException if authorization error * @throws NonUniqueMetadataException @@ -106,6 +112,7 @@ public interface MetadataFieldService { * Delete the metadata field. * * @param context dspace context + * @param metadataField metadata field * @throws SQLException if database error * @throws AuthorizeException if authorization error */ diff --git a/dspace-api/src/main/java/org/dspace/content/service/MetadataSchemaService.java b/dspace-api/src/main/java/org/dspace/content/service/MetadataSchemaService.java index 3bd730acc4..b2a2e45662 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/MetadataSchemaService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/MetadataSchemaService.java @@ -28,6 +28,9 @@ public interface MetadataSchemaService { * * @param context * DSpace context object + * @param name name + * @param namespace namespace + * @return new MetadataSchema * @throws SQLException if database error * @throws AuthorizeException if authorization error * @throws NonUniqueMetadataException @@ -48,6 +51,7 @@ public interface MetadataSchemaService { * Update the metadata schema in the database. * * @param context DSpace context + * @param metadataSchema metadata schema * @throws SQLException if database error * @throws AuthorizeException if authorization error * @throws NonUniqueMetadataException @@ -58,6 +62,7 @@ public interface MetadataSchemaService { * Delete the metadata schema. * * @param context DSpace context + * @param metadataSchema metadata schema * @throws SQLException if database error * @throws AuthorizeException if authorization error */ diff --git a/dspace-api/src/main/java/org/dspace/content/service/MetadataValueService.java b/dspace-api/src/main/java/org/dspace/content/service/MetadataValueService.java index ba1202ad28..71356f0292 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/MetadataValueService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/MetadataValueService.java @@ -30,6 +30,9 @@ public interface MetadataValueService { * * @param context * DSpace context object + * @param dso DSpaceObject + * @param metadataField metadata field + * @return new MetadataValue * @throws SQLException if database error */ public MetadataValue create(Context context, DSpaceObject dso, MetadataField metadataField) throws SQLException; @@ -63,6 +66,7 @@ public interface MetadataValueService { * Update the metadata value in the database. * * @param context dspace context + * @param metadataValue metadata value * @throws SQLException if database error */ public void update(Context context, MetadataValue metadataValue) throws SQLException; @@ -73,6 +77,7 @@ public interface MetadataValueService { * Delete the metadata field. * * @param context dspace context + * @param metadataValue metadata value * @throws SQLException if database error */ public void delete(Context context, MetadataValue metadataValue) throws SQLException; diff --git a/dspace-api/src/main/java/org/dspace/content/service/SupervisedItemService.java b/dspace-api/src/main/java/org/dspace/content/service/SupervisedItemService.java index 19735ca28b..e1a48596df 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/SupervisedItemService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/SupervisedItemService.java @@ -28,6 +28,7 @@ public interface SupervisedItemService * @param context the context this object exists in * * @return array of SupervisedItems + * @throws SQLException if database error */ public List getAll(Context context) throws SQLException; @@ -39,6 +40,7 @@ public interface SupervisedItemService * @param context the dspace context * * @return the items eperson is supervising in an array + * @throws SQLException if database error */ public List findbyEPerson(Context context, EPerson ep) throws SQLException; diff --git a/dspace-api/src/main/java/org/dspace/content/service/WorkspaceItemService.java b/dspace-api/src/main/java/org/dspace/content/service/WorkspaceItemService.java index d8772f3644..061dd0dd24 100644 --- a/dspace-api/src/main/java/org/dspace/content/service/WorkspaceItemService.java +++ b/dspace-api/src/main/java/org/dspace/content/service/WorkspaceItemService.java @@ -38,6 +38,7 @@ public interface WorkspaceItemService extends InProgressSubmissionService findByEPerson(Context context, EPerson ep) throws SQLException; @@ -86,6 +90,7 @@ public interface WorkspaceItemService extends InProgressSubmissionService findByCollection(Context context, Collection collection) throws SQLException; @@ -101,6 +106,7 @@ public interface WorkspaceItemService extends InProgressSubmissionService findAll(Context context) throws SQLException; @@ -123,6 +130,11 @@ public interface WorkspaceItemService extends InProgressSubmissionService class type */ public abstract class AbstractHibernateDAO implements GenericDAO { diff --git a/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDSODAO.java b/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDSODAO.java index 1b6a78517b..db91b7a0fc 100644 --- a/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDSODAO.java +++ b/dspace-api/src/main/java/org/dspace/core/AbstractHibernateDSODAO.java @@ -23,6 +23,7 @@ import java.util.List; * Each DSO Database Access Objects should extend this class to prevent code duplication. * * @author kevinvandevelde at atmire.com + * @param class type */ public abstract class AbstractHibernateDSODAO extends AbstractHibernateDAO { diff --git a/dspace-api/src/main/java/org/dspace/core/Context.java b/dspace-api/src/main/java/org/dspace/core/Context.java index ceb6e47cf3..d80440d63e 100644 --- a/dspace-api/src/main/java/org/dspace/core/Context.java +++ b/dspace-api/src/main/java/org/dspace/core/Context.java @@ -397,6 +397,7 @@ public class Context /** * Select an event dispatcher, null selects the default * + * @param dispatcher dispatcher */ public void setDispatcher(String dispatcher) { @@ -559,6 +560,7 @@ public class Context /** * Get an array of all of the special groups that current user is a member * of. + * @return list of groups * @throws SQLException if database error */ public List getSpecialGroups() throws SQLException diff --git a/dspace-api/src/main/java/org/dspace/core/DBConnection.java b/dspace-api/src/main/java/org/dspace/core/DBConnection.java index d9f9b80ea4..e59b7e4e66 100644 --- a/dspace-api/src/main/java/org/dspace/core/DBConnection.java +++ b/dspace-api/src/main/java/org/dspace/core/DBConnection.java @@ -16,6 +16,7 @@ import java.sql.SQLException; * Interface representing a Database connection, this class should only be access by the context object. * * @author kevinvandevelde at atmire.com + * @param class type */ public interface DBConnection { diff --git a/dspace-api/src/main/java/org/dspace/core/GenericDAO.java b/dspace-api/src/main/java/org/dspace/core/GenericDAO.java index d76bd00fda..b67bea2473 100644 --- a/dspace-api/src/main/java/org/dspace/core/GenericDAO.java +++ b/dspace-api/src/main/java/org/dspace/core/GenericDAO.java @@ -17,6 +17,7 @@ import java.util.UUID; * The default hibernate implementation offers up a class that implements all these methods. * * @author kevinvandevelde at atmire.com + * @param class type */ public interface GenericDAO { diff --git a/dspace-api/src/main/java/org/dspace/core/I18nUtil.java b/dspace-api/src/main/java/org/dspace/core/I18nUtil.java index 2fa03be9b0..aba0bff4e3 100644 --- a/dspace-api/src/main/java/org/dspace/core/I18nUtil.java +++ b/dspace-api/src/main/java/org/dspace/core/I18nUtil.java @@ -97,7 +97,8 @@ public class I18nUtil * Get the Locale for a specified EPerson. If the language is missing, * return the default Locale for the repository. * - * @param ep + * @param ep Eperson + * @return Locale */ public static Locale getEPersonLocale(EPerson ep) { diff --git a/dspace-api/src/main/java/org/dspace/core/LegacyPluginServiceImpl.java b/dspace-api/src/main/java/org/dspace/core/LegacyPluginServiceImpl.java index 1a1acbd484..29e05063a4 100644 --- a/dspace-api/src/main/java/org/dspace/core/LegacyPluginServiceImpl.java +++ b/dspace-api/src/main/java/org/dspace/core/LegacyPluginServiceImpl.java @@ -548,6 +548,7 @@ public class LegacyPluginServiceImpl implements PluginService *

  • Implementations of named plugin have no name collisions. *
  • Named plugin entries lacking names. * + * @throws IOException if IO error */ public void checkConfiguration() throws IOException @@ -712,6 +713,8 @@ public class LegacyPluginServiceImpl implements PluginService * Invoking this class from the command line just runs * checkConfiguration and shows the results. * There are no command-line options. + * @param argv arguments + * @throws Exception if error */ public void main(String[] argv) throws Exception { diff --git a/dspace-api/src/main/java/org/dspace/core/Utils.java b/dspace-api/src/main/java/org/dspace/core/Utils.java index 5274145657..cdb297cbf4 100644 --- a/dspace-api/src/main/java/org/dspace/core/Utils.java +++ b/dspace-api/src/main/java/org/dspace/core/Utils.java @@ -217,6 +217,7 @@ public final class Utils * The InputStream to obtain data from. * @param output * The OutputStream to copy data to. + * @throws IOException if IO error */ public static void copy(final InputStream input, final OutputStream output) throws IOException @@ -253,6 +254,7 @@ public final class Utils * The InputStream to obtain data from. * @param destination * The OutputStream to copy data to. + * @throws IOException if IO error */ public static void bufferedCopy(final InputStream source, final OutputStream destination) throws IOException diff --git a/dspace-api/src/main/java/org/dspace/core/service/LicenseService.java b/dspace-api/src/main/java/org/dspace/core/service/LicenseService.java index d0f36bed61..732fe93b53 100644 --- a/dspace-api/src/main/java/org/dspace/core/service/LicenseService.java +++ b/dspace-api/src/main/java/org/dspace/core/service/LicenseService.java @@ -20,6 +20,7 @@ public interface LicenseService { * @param licenseFile * name for the file into which license will be written, * relative to the current directory. + * @param newLicense new license */ public void writeLicenseFile(String licenseFile, String newLicense); diff --git a/dspace-api/src/main/java/org/dspace/core/service/NewsService.java b/dspace-api/src/main/java/org/dspace/core/service/NewsService.java index c342ae0305..7612614f25 100644 --- a/dspace-api/src/main/java/org/dspace/core/service/NewsService.java +++ b/dspace-api/src/main/java/org/dspace/core/service/NewsService.java @@ -19,6 +19,7 @@ public interface NewsService { * * @param newsFile * name of the news file to read in, relative to the news file path. + * @return contents */ public String readNewsFile(String newsFile); @@ -29,12 +30,14 @@ public interface NewsService { * name of the news file to read in, relative to the news file path. * @param news * the text to be written to the file. + * @return string */ public String writeNewsFile(String newsFile, String news); /** * Get the path for the news files. * + * @return path */ public String getNewsFilePath();