Skip to content

Commit

Permalink
Require javadocs for all public methods. Fix checkstyle errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdonohue committed Nov 11, 2022
1 parent 2d5eafb commit ee1f9f0
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 25 deletions.
4 changes: 1 addition & 3 deletions checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ For more information on CheckStyle configurations below, see: http://checkstyle.
<!-- Requirements for Javadocs for methods -->
<module name="JavadocMethod">
<!-- All public methods MUST HAVE Javadocs -->
<!-- <property name="scope" value="public"/> -->
<!-- TODO: Above rule has been disabled because of large amount of missing public method Javadocs -->
<property name="scope" value="nothing"/>
<property name="scope" value="public"/>
<!-- Allow params, throws and return tags to be optional -->
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ public void setClientSecret(String clientSecret) {
/**
* tokenUsage true to enable the usage of an access token
*
* @param tokenUsage
* @param tokenEnabled true/false
*/
@Autowired(required = false)
public void setTokenEnabled(boolean tokenEnabled) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void setSourceIdentifier(String sourceIdentifier) {

/**
* This method set the MetadataSource for the ExternalDataProvider
* @param metadataSource {@link org.dspace.importer.external.service.components.MetadataSource} implementation used to process the input data
* @param querySource Source {@link org.dspace.importer.external.service.components.QuerySource} implementation used to process the input data
*/
public void setMetadataSource(QuerySource querySource) {
this.querySource = querySource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ private BibTeXDatabase parseBibTex(InputStream inputStream) throws IOException,


/**
* Retrieve the MetadataFieldMapping containing the mapping between RecordType
* Set the MetadataFieldMapping containing the mapping between RecordType
* (in this case PlainMetadataSourceDto.class) and Metadata
*
* @return The configured MetadataFieldMapping
* @param metadataFieldMap The configured MetadataFieldMapping
*/
@Override
@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface LiveImportClient {
*
* @param timeout The connect timeout in milliseconds
* @param URL URL
* @param requestParams This map contains the parameters to be included in the request.
* @param params This map contains the parameters to be included in the request.
* Each parameter will be added to the url?(key=value)
* @return The response in String type converted from InputStream
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void setQuery(String query) {
* Depending on the retrieved node (using the query), different types of values will be added to the MetadatumDTO
* list
*
* @param t A class to retrieve metadata from.
* @param element A class to retrieve metadata from.
* @return a collection of import records. Only the identifier of the found records may be put in the record.
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void setMetadataProcessor(JsonPathMetadataProcessor metadataProcessor) {
* Retrieve the metadata associated with the given object.
* The toString() of the resulting object will be used.
*
* @param t A class to retrieve metadata from.
* @param fullJson A class to retrieve metadata from.
* @return a collection of import records. Only the identifier of the found records may be put in the record.
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ private List<PlainMetadataKeyValueItem> notAggregatedData(InputStream inputStrea
}

/**
* Retrieve the MetadataFieldMapping containing the mapping between RecordType
* Set the MetadataFieldMapping containing the mapping between RecordType
* (in this case PlainMetadataSourceDto.class) and Metadata
*
* @return The configured MetadataFieldMapping
* @param metadataFieldMap The configured MetadataFieldMapping
*/
@Override
@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public abstract class AbstractPlainMetadataSource
/**
* Set the file extensions supported by this metadata service
*
* @param supportedExtensionsthe file extensions (xml,txt,...) supported by this service
* @param supportedExtensions the file extensions (xml,txt,...) supported by this service
*/
public void setSupportedExtensions(List<String> supportedExtensions) {
this.supportedExtensions = supportedExtensions;
Expand All @@ -57,7 +57,7 @@ public List<String> getSupportedExtensions() {
* Return a list of ImportRecord constructed from input file. This list is based on
* the results retrieved from the file (InputStream) parsed through abstract method readData
*
* @param InputStream The inputStream of the file
* @param is The inputStream of the file
* @return A list of {@link ImportRecord}
* @throws FileSourceException if, for any reason, the file is not parsable
*/
Expand All @@ -76,7 +76,7 @@ public List<ImportRecord> getRecords(InputStream is) throws FileSourceException
* the result retrieved from the file (InputStream) parsed through abstract method
* "readData" implementation
*
* @param InputStream The inputStream of the file
* @param is The inputStream of the file
* @return An {@link ImportRecord} matching the file content
* @throws FileSourceException if, for any reason, the file is not parsable
* @throws FileMultipleOccurencesException if the file contains more than one entry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public interface FileSource extends MetadataSource {
/**
* Return a list of ImportRecord constructed from input file.
*
* @param InputStream The inputStream of the file
* @param inputStream The inputStream of the file
* @return A list of {@link ImportRecord}
* @throws FileSourceException if, for any reason, the file is not parsable
*/
Expand All @@ -40,7 +40,7 @@ public List<ImportRecord> getRecords(InputStream inputStream)
/**
* Return an ImportRecord constructed from input file.
*
* @param InputStream The inputStream of the file
* @param inputStream The inputStream of the file
* @return An {@link ImportRecord} matching the file content
* @throws FileSourceException if, for any reason, the file is not parsable
* @throws FileMultipleOccurencesException if the file contains more than one entry
Expand Down
6 changes: 3 additions & 3 deletions dspace-api/src/main/java/org/dspace/scripts/Process.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ public Date getCreationTime() {
}

/**
* This method sets the special groups associated with the Process.
* This method will return the special groups associated with the Process.
*/
public List<Group> getGroups() {
return groups;
}

/**
* This method will return special groups associated with the Process.
* @return The special groups of this process.
* This method sets the special groups associated with the Process.
* @param groups The special groups of this process.
*/
public void setGroups(List<Group> groups) {
this.groups = groups;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void addAuthenticationDataForUser(HttpServletRequest request, HttpServletRespons
* Checks the current request for a valid authentication token. If found, extracts that token and obtains the
* currently logged in EPerson.
* @param request current request
* @param request current response
* @param response current response
* @param context current DSpace Context
* @return EPerson of the logged in user (if auth token found), or null if no auth token is found
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ private ClaimedTaskMatcher() { }
/**
* Check if the returned json expose all the required links and properties
*
* @param ptask
* the pool task
* @param cTask
* the claimed task
* @param step
* the step name
* @return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private PoolTaskMatcher() { }
/**
* Check if the returned json expose all the required links and properties
*
* @param ptask
* @param pTask
* the pool task
* @param step
* the step name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public interface RequestService {
/**
* Set the ID of the current authenticated user
*
* @return the id of the user associated with the current thread OR null if there is no user
* @param epersonId the id of the user associated with the current thread OR null if there is no user
*/
public void setCurrentUserId(UUID epersonId);

Expand Down

0 comments on commit ee1f9f0

Please sign in to comment.