blob: cef3f15fe39f06a358b5c24434c31a9d30cbee78 [file] [log] [blame]
Thomas Vachuskae0f804a2014-10-27 23:40:48 -07001/*
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07002 * Copyright 2014 Open Networking Laboratory
Thomas Vachuskae0f804a2014-10-27 23:40:48 -07003 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07004 * 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
Thomas Vachuskae0f804a2014-10-27 23:40:48 -07007 *
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07008 * 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.
Thomas Vachuskae0f804a2014-10-27 23:40:48 -070015 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.core;
Thomas Vachuskae0f804a2014-10-27 23:40:48 -070017
18import java.util.Set;
19
20/**
21 * Manages application IDs.
22 */
23public interface ApplicationIdStore {
24
25 /**
26 * Returns the set of currently registered application identifiers.
27 *
28 * @return set of application ids
29 */
30 Set<ApplicationId> getAppIds();
31
32 /**
33 * Returns an existing application id from a given id.
34 * @param id the short value of the id
35 * @return an application id
36 */
37 ApplicationId getAppId(Short id);
38
39 /**
40 * Registers a new application by its name, which is expected
41 * to follow the reverse DNS convention, e.g.
42 * {@code org.flying.circus.app}
43 *
44 * @param identifier string identifier
45 * @return the application id
46 */
47 ApplicationId registerApplication(String identifier);
48
49}