Skip to content

Commit

Permalink
Fix Checkstyle (javadoc)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Oct 2, 2024
1 parent f7b147a commit a2f15f4
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

package org.kitodo.production.interfaces.activemq;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
Expand All @@ -37,10 +41,6 @@
import org.kitodo.production.services.ServiceManager;
import org.kitodo.production.services.data.ImportConfigurationService;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;

/**
* Order to create a new process. This contains all the necessary data.
*/
Expand Down Expand Up @@ -298,7 +298,7 @@ Process getParent() throws DAOException {
* Specifies the metadata for the logical structure root of the process to
* be created. Can be empty, but never {@code null}.
*
* @return
* @return the metadata
*/
@NonNull
Collection<Metadata> getMetadata() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,19 @@ public Map<String, String> getMapOfStringToString(String key) {
return mapOfStringToString;
}

/**
* Fetches a {@code List<?>} from a MapMessage. May return {@code null} if
* there is no such object.
*
* @param key
* key for which the list to return
* @return the map, or {@code null}
* @throws IllegalArgumentException
* if the object isn’t a {@code List}
* @throws JMSException
* if an I/O exception occurs during read, i.e. if the map
* message sent is larger than the allowed size
*/
@CheckForNull
public List<?> getList(String key) throws JMSException {
Object valueObject = ticket.getObject(key);
Expand All @@ -312,6 +325,19 @@ public List<?> getList(String key) throws JMSException {
return (List<?>) valueObject;
}

/**
* Fetches an {@code Integer} from a MapMessage. May return {@code null} if
* there is no such object.
*
* @param key
* key for which the integer to return
* @return the integer, or {@code null} if there isn’t one
* @throws IllegalArgumentException
* if the object is not an Integer
* @throws JMSException
* if an I/O exception occurs during read, i.e. if the map
* message sent is larger than the allowed size
*/
@CheckForNull
public Integer getInteger(String key) throws JMSException {
Object valueObject = ticket.getObject(key);
Expand All @@ -324,6 +350,20 @@ public Integer getInteger(String key) throws JMSException {
return (Integer) valueObject;
}

/**
* Fetches a {@code Map<String, ?>} from a MapMessage. May return
* {@code null} if there is no such object.
*
* @param key
* key for which the map to return
* @return the map, or {@code null}
* @throws IllegalArgumentException
* if the object isn’t a {@code Map} or one of its keys isn’t a
* {@code String}
* @throws JMSException
* if an I/O exception occurs during read, i.e. if the map
* message sent is larger than the allowed size
*/
@CheckForNull
public Map<String, ?> getMapOfString(String key) throws JMSException {
HashMap<String, Object> mapOfString = new HashMap<>();
Expand Down

0 comments on commit a2f15f4

Please sign in to comment.