-
Notifications
You must be signed in to change notification settings - Fork 5
/
ServicePlugin.java
59 lines (54 loc) · 2.27 KB
/
ServicePlugin.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Licensed under MIT (https://github.com/ligoj/ligoj/blob/master/LICENSE)
*/
package org.ligoj.app.api;
/**
* A plug-in. The plug-in behavior is massively based on naming convention. The rules are an extension of the ones of
* {@link org.ligoj.bootstrap.core.plugin.FeaturePlugin} for the key of the plug-in determines the required parent and
* the namespace for web assets. For sample the key <code>service:s:t</code> means :
* <ul>
* <li>"service" is a constant part, and required. And will be published inside the "/service" REST namespace.</li>
* <li>"s" is the first level of service. Lower case part, following the pattern [a-z\\d]+</li>
* <li>"t" is the first level of service. Lower case part, following the pattern [a-z\\d]+</li>
* </ul>
*/
public interface ServicePlugin extends org.ligoj.bootstrap.core.plugin.FeaturePlugin {
/**
* Delete a subscription.
*
* @param subscription the subscription identifier.
* @param remoteData When <code>true</code>, remote data will be also destroyed.
* @throws Exception Deletion failed. This error is caught at higher level.
*/
default void delete(int subscription, boolean remoteData) throws Exception { // NOSONAR Everything could happen
// No custom data by default
}
/**
* Complete the subscription in creation mode. Link data still required.
*
* @param subscription the subscription identifier is being created.
* @throws Exception Create failed. This error is caught at higher level.
*/
default void create(int subscription) throws Exception { // NOSONAR Everything could happen
// No custom data by default
}
/**
* Complete the subscription in link mode.
*
* @param subscription the subscription identifier is being created.
* @throws Exception Link failed. This error is caught at higher level.
*/
default void link(int subscription) throws Exception { // NOSONAR Everything could happen
// No custom data by default
}
/**
* Delete a node.
*
* @param node The node identifier.
* @param remoteData When <code>true</code>, remote data will be also destroyed.
* @throws Exception Delete failed. This error is caught at higher level.
*/
default void delete(String node, boolean remoteData) throws Exception { // NOSONAR Everything could happen
// No custom data by default
}
}