blob: efc95377d0dfe2087561867ef0827acf1ebd767f [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",
Bri Prebilic Cole8b66a852015-06-10 17:15:10 -070029 "Discover the joys of high-speed, reliable Internet" +
30 " connectivity delivered seamlessly to your home.",
Simon Hunt30abc9a2015-06-09 17:13:51 -070031 false,
32 true),
Simon Huntf844f632015-05-20 19:06:35 -070033
34 /**
35 * Firewall function.
36 */
37 FIREWALL("firewall",
38 "Firewall",
Bri Prebilic Cole8b66a852015-06-10 17:15:10 -070039 "Simple access control and filtering with minimal set-up.",
Simon Hunt30abc9a2015-06-09 17:13:51 -070040 true,
Simon Hunt90dc8c52015-05-27 16:56:03 -070041 true),
Simon Huntf844f632015-05-20 19:06:35 -070042
43 /**
44 * URL Filtering function (parental controls).
45 */
Simon Hunta29c87b2015-05-21 09:56:19 -070046 URL_FILTER("url_filter",
47 "Parental Control",
Bri Prebilic Cole8b66a852015-06-10 17:15:10 -070048 "Parental Control is peace of mind that your kids are safe" +
49 " - whether you are around or away. Indicate with a " +
50 "few clicks what online content is appropriate for " +
51 "your children, and voila - you have control over" +
52 " what your kids can and cannot view.",
Simon Hunt30abc9a2015-06-09 17:13:51 -070053 true,
Simon Hunt90dc8c52015-05-27 16:56:03 -070054 true),
55
56 /**
57 * Content Distribution function.
58 */
59 CDN("cdn",
60 "CDN",
61 "Content Distribution Network service.",
Simon Hunt30abc9a2015-06-09 17:13:51 -070062 true,
63 false);
Simon Hunt90dc8c52015-05-27 16:56:03 -070064
Simon Huntf844f632015-05-20 19:06:35 -070065
66 private final String id;
67 private final String displayName;
68 private final String description;
Simon Hunt90dc8c52015-05-27 16:56:03 -070069 private final boolean backend;
Simon Hunt30abc9a2015-06-09 17:13:51 -070070 private final boolean visible;
Simon Huntf844f632015-05-20 19:06:35 -070071
Simon Hunt90dc8c52015-05-27 16:56:03 -070072 XosFunctionDescriptor(String id, String displayName, String description,
Simon Hunt30abc9a2015-06-09 17:13:51 -070073 boolean backend, boolean visible) {
Simon Huntf844f632015-05-20 19:06:35 -070074 this.id = id;
75 this.displayName = displayName;
76 this.description = description;
Simon Hunt90dc8c52015-05-27 16:56:03 -070077 this.backend = backend;
Simon Hunt30abc9a2015-06-09 17:13:51 -070078 this.visible = visible;
Simon Huntf844f632015-05-20 19:06:35 -070079 }
80
81 /**
82 * Returns this function's internal identifier.
83 *
84 * @return the identifier
85 */
86 public String id() {
87 return id;
88 }
89
90 /**
91 * Returns this function's display name.
92 *
93 * @return display name
94 */
95 public String displayName() {
96 return displayName;
97 }
98
99 /**
100 * Returns a short, textual description of the function.
101 *
102 * @return textual description
103 */
104 public String description() {
105 return description;
106 }
107
Simon Hunt90dc8c52015-05-27 16:56:03 -0700108 /**
109 * Returns true if this function is supported by the XOS backend.
110 *
111 * @return true if backend function exists
112 */
113 public boolean backend() {
114 return backend;
115 }
116
Simon Hunt30abc9a2015-06-09 17:13:51 -0700117 /**
118 * Returns true if this function should be shown in the GUI, in the
119 * bundle listing.
120 *
121 * @return true if to be displayed
122 */
123 public boolean visible() {
124 return visible;
125 }
Simon Huntf844f632015-05-20 19:06:35 -0700126}