]> git.mxchange.org Git - jjobs-lib.git/blobdiff - src/org/mxchange/jjobs/model/skill/AdminSkillSessionBeanRemote.java
Continued:
[jjobs-lib.git] / src / org / mxchange / jjobs / model / skill / AdminSkillSessionBeanRemote.java
diff --git a/src/org/mxchange/jjobs/model/skill/AdminSkillSessionBeanRemote.java b/src/org/mxchange/jjobs/model/skill/AdminSkillSessionBeanRemote.java
new file mode 100644 (file)
index 0000000..3ab4994
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2023 Roland Häder<roland@mxchange.org>
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+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
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+@Remote
+public interface AdminSkillSessionBeanRemote extends Serializable {
+
+       /**
+        * Updates given skill instance and throws an exception if the skill wasn't
+        * found.
+        * <p>
+        * @param currentSkill An instance of a Skillable class
+        * <p>
+        * @return Updated Skillable instance
+        * <p>
+        * @throws SkillNotFoundException If given Skillable instance wasn't found
+        */
+       Skillable updateSkill (Skillable currentSkill) throws SkillNotFoundException;
+
+       /**
+        * Adds given Skillable instance to database
+        * <p>
+        * @param skillable An instance of a Skillable class
+        * <p>
+        * @return Updated instance
+        * <p>
+        * @throws SkillAlreadyAddedException If the instance has already been added
+        */
+       Skillable addSkill (final Skillable skillable) throws SkillAlreadyAddedException;
+
+}