blob: 8ed4666d6b2f48f953933f32eb8ffd38ecc2ddb5 [file] [log] [blame]
Simon Huntf844f632015-05-20 19:06:35 -07001/*
2 * Copyright 2015 Open Networking Laboratory
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 *
16 */
17
18package org.onosproject.cord.gui.model;
19
20/**
21 * Designates XOS Functions.
22 */
23public enum XosFunctionDescriptor {
24 /**
25 * Internet function.
26 */
27 INTERNET("internet",
28 "Internet",
Simon Hunt90dc8c52015-05-27 16:56:03 -070029 "Basic internet connectivity.",
30 false),
Simon Huntf844f632015-05-20 19:06:35 -070031
32 /**
33 * Firewall function.
34 */
35 FIREWALL("firewall",
36 "Firewall",
Simon Hunt90dc8c52015-05-27 16:56:03 -070037 "Normal firewall protection.",
38 true),
Simon Huntf844f632015-05-20 19:06:35 -070039
40 /**
41 * URL Filtering function (parental controls).
42 */
Simon Hunta29c87b2015-05-21 09:56:19 -070043 URL_FILTER("url_filter",
44 "Parental Control",
Simon Hunt90dc8c52015-05-27 16:56:03 -070045 "Variable levels of URL filtering.",
46 true),
47
48 /**
49 * Content Distribution function.
50 */
51 CDN("cdn",
52 "CDN",
53 "Content Distribution Network service.",
54 true);
55
Simon Huntf844f632015-05-20 19:06:35 -070056
57 private final String id;
58 private final String displayName;
59 private final String description;
Simon Hunt90dc8c52015-05-27 16:56:03 -070060 private final boolean backend;
Simon Huntf844f632015-05-20 19:06:35 -070061
Simon Hunt90dc8c52015-05-27 16:56:03 -070062 XosFunctionDescriptor(String id, String displayName, String description,
63 boolean backend) {
Simon Huntf844f632015-05-20 19:06:35 -070064 this.id = id;
65 this.displayName = displayName;
66 this.description = description;
Simon Hunt90dc8c52015-05-27 16:56:03 -070067 this.backend = backend;
Simon Huntf844f632015-05-20 19:06:35 -070068 }
69
70 /**
71 * Returns this function's internal identifier.
72 *
73 * @return the identifier
74 */
75 public String id() {
76 return id;
77 }
78
79 /**
80 * Returns this function's display name.
81 *
82 * @return display name
83 */
84 public String displayName() {
85 return displayName;
86 }
87
88 /**
89 * Returns a short, textual description of the function.
90 *
91 * @return textual description
92 */
93 public String description() {
94 return description;
95 }
96
Simon Hunt90dc8c52015-05-27 16:56:03 -070097 /**
98 * Returns true if this function is supported by the XOS backend.
99 *
100 * @return true if backend function exists
101 */
102 public boolean backend() {
103 return backend;
104 }
105
Simon Huntf844f632015-05-20 19:06:35 -0700106}