@@ -32,6 +32,46 @@ public List<PublicationSystem> call(ApiCaller ac, Deserializer parms) throws Pe
3232 }
3333 },
3434
35+ /*#
36+ * Deletes PublicationSystem by its ID.
37+ *
38+ * @param id int ID of PublicationSystem to delete.
39+ * @throw CabinetException When Category doesn't exists or has publications
40+ */
41+ deletePublicationSystem {
42+ public Void call (ApiCaller ac , Deserializer parms ) throws PerunException {
43+ ac .stateChangingCheck ();
44+ ac .getCabinetManager ().deletePublicationSystem (ac .getSession (), ac .getPublicationSystemById (parms .readInt ("id" )));
45+ return null ;
46+ }
47+ },
48+
49+ /*#
50+ * Creates new PublicationSystem.
51+ *
52+ * @param pubsys PublicationSystem Publication system to create.
53+ * @return PublicationSystem Created PublicationSystem with ID set.
54+ */
55+ createPublicationSystem {
56+ public PublicationSystem call (ApiCaller ac , Deserializer parms ) throws PerunException {
57+ ac .stateChangingCheck ();
58+ return ac .getCabinetManager ().createPublicationSystem (ac .getSession (), parms .read ("pubsys" , PublicationSystem .class ));
59+ }
60+ },
61+
62+ /*#
63+ * Updates PublicationSystem by its ID.
64+ *
65+ * @param pubsys PublicationSystem Publication system to update.
66+ * @return PublicationSystem Created PublicationSystem with ID set.
67+ */
68+ updatePublicationSystem {
69+ public PublicationSystem call (ApiCaller ac , Deserializer parms ) throws PerunException {
70+ ac .stateChangingCheck ();
71+ return ac .getCabinetManager ().updatePublicationSystem (ac .getSession (), parms .read ("pubsys" , PublicationSystem .class ));
72+ }
73+ },
74+
3575 /*#
3676 * Return list of all Categories in Perun or empty list of none present.
3777 *
0 commit comments