blob: ac0de4d3cb3072f01744b0a1dc0c58788eaee08b [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.
28 * @param workflow registering workflow
29 */
30 void register(Workflow workflow);
31
32 /**
33 * Unregisters workflow.
34 * @param id id of workflow
35 */
36 void unregister(URI id);
37
38 /**
39 * Gets workflow.
40 * @param id id of workflow
41 * @return workflow
42 */
43 Workflow get(URI id);
44
45 /**
46 * Gets all workflow.
47 * @return collection of workflow
48 */
49 Collection<Workflow> getAll();
50
51 /**
52 * Registers local class loader.
53 * @param loader class loader
54 */
55 void registerLocal(ClassLoader loader);
56
57 /**
58 * Unregisters local class loader.
59 * @param loader class loader
60 */
61 void unregisterLocal(ClassLoader loader);
62
63 /**
64 * Gets class from registered class loaders.
65 * @param name name of class
66 * @return class
67 * @throws ClassNotFoundException class not found exception
68 */
69 Class getClass(String name) throws ClassNotFoundException;
70}