updated API description

This commit is contained in:
2019-09-15 13:37:38 +02:00
parent af298c8060
commit a2430f748f
5 changed files with 166 additions and 27 deletions

View File

@ -105,7 +105,7 @@ public abstract class CommonAbstractController {
* updated. Otherwise these fields are skipped.
* @param changedBy the username to apply
* @return an updated audit object to use for the updated entity.
* @throws ControllerException
* @throws ControllerException if the audit object cannot be updated
*/
public Audit applyAuditChanges(Audit audit, boolean onCreate, String changedBy) throws ControllerException {
if (audit == null) {

View File

@ -18,6 +18,7 @@ package de.muehlencord.shared.db;
import javax.ejb.ApplicationException;
/**
* Generic exception if an exception inside a Controller class occurs
*
* @author Joern Muehlencord (joern@muehlencord.de)
*/
@ -39,7 +40,8 @@ public class ControllerException extends Exception {
* message.
*
* @param cause the reason code
* @param message an explanation
* @param message the detail message. The detail message is saved for later
* retrieval by the {@link #getMessage()} method.
*/
public ControllerException(int cause, String message) {
super(message);
@ -48,15 +50,23 @@ public class ControllerException extends Exception {
/**
*
* @param causeCode
* @param message
* @param cause
* @param causeCode the reason code
* @param message the detail message. The detail message is saved for later
* retrieval by the {@link #getMessage()} method.
*
* @param cause the cause (which is saved for later retrieval by the
* {@link #getCause()} method). (A {@code null} value is permitted, and
* indicates that the cause is nonexistent or unknown.)
*/
public ControllerException(int causeCode, String message, Throwable cause) {
super(message, cause);
this.causeCode = causeCode;
}
/**
* returns the cause code
* @return the cause code
*/
public int getCauseCode() {
return causeCode;
}