blob: a4274935386416940bd1b5fdb26f92e2ed8dc3fb [file] [log] [blame]
jaegonkim6a7b5242018-09-12 23:09:42 +09001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.workflow.api;
17
18import java.net.URI;
19import java.util.Collection;
20
21/**
22 * Store for managing workflow.
23 */
24public interface WorkflowStore {
25
26 /**
27 * Registers workflow.
m.rahil09251882019-04-15 22:58:33 +053028 *
jaegonkim6a7b5242018-09-12 23:09:42 +090029 * @param workflow registering workflow
30 */
31 void register(Workflow workflow);
32
33 /**
34 * Unregisters workflow.
m.rahil09251882019-04-15 22:58:33 +053035 *
jaegonkim6a7b5242018-09-12 23:09:42 +090036 * @param id id of workflow
37 */
38 void unregister(URI id);
39
40 /**
41 * Gets workflow.
m.rahil09251882019-04-15 22:58:33 +053042 *
jaegonkim6a7b5242018-09-12 23:09:42 +090043 * @param id id of workflow
44 * @return workflow
45 */
46 Workflow get(URI id);
47
48 /**
49 * Gets all workflow.
m.rahil09251882019-04-15 22:58:33 +053050 *
jaegonkim6a7b5242018-09-12 23:09:42 +090051 * @return collection of workflow
52 */
53 Collection<Workflow> getAll();
54
55 /**
56 * Registers local class loader.
m.rahil09251882019-04-15 22:58:33 +053057 *
jaegonkim6a7b5242018-09-12 23:09:42 +090058 * @param loader class loader
59 */
60 void registerLocal(ClassLoader loader);
61
62 /**
63 * Unregisters local class loader.
m.rahil09251882019-04-15 22:58:33 +053064 *
jaegonkim6a7b5242018-09-12 23:09:42 +090065 * @param loader class loader
66 */
67 void unregisterLocal(ClassLoader loader);
68
69 /**
70 * Gets class from registered class loaders.
m.rahil09251882019-04-15 22:58:33 +053071 *
jaegonkim6a7b5242018-09-12 23:09:42 +090072 * @param name name of class
73 * @return class
74 * @throws ClassNotFoundException class not found exception
75 */
76 Class getClass(String name) throws ClassNotFoundException;
m.rahil09251882019-04-15 22:58:33 +053077
jaegonkim6a7b5242018-09-12 23:09:42 +090078}