From: Roland Häder Date: Thu, 19 Jan 2023 06:26:56 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9ec98e83f0b508550165c93170d72149562d07bc;p=jjobs-lib.git Continued: - added remote interface for administrative actions --- diff --git a/src/org/mxchange/jjobs/model/skill/AdminSkillSessionBeanRemote.java b/src/org/mxchange/jjobs/model/skill/AdminSkillSessionBeanRemote.java new file mode 100644 index 0000000..3ab4994 --- /dev/null +++ b/src/org/mxchange/jjobs/model/skill/AdminSkillSessionBeanRemote.java @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2023 Roland Häder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.mxchange.jjobs.model.skill; + +import java.io.Serializable; +import javax.ejb.Remote; +import org.mxchange.jjobs.exceptions.SkillAlreadyAddedException; +import org.mxchange.jjobs.model.exceptions.SkillNotFoundException; + +/** + * A remote interface for administrative actions for skills + *

+ * @author Roland Häder + */ +@Remote +public interface AdminSkillSessionBeanRemote extends Serializable { + + /** + * Updates given skill instance and throws an exception if the skill wasn't + * found. + *

+ * @param currentSkill An instance of a Skillable class + *

+ * @return Updated Skillable instance + *

+ * @throws SkillNotFoundException If given Skillable instance wasn't found + */ + Skillable updateSkill (Skillable currentSkill) throws SkillNotFoundException; + + /** + * Adds given Skillable instance to database + *

+ * @param skillable An instance of a Skillable class + *

+ * @return Updated instance + *

+ * @throws SkillAlreadyAddedException If the instance has already been added + */ + Skillable addSkill (final Skillable skillable) throws SkillAlreadyAddedException; + +}