blob: a42e0ea548b5b8dcea3335e672ecfab696ede4cf [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
20import com.google.common.collect.ImmutableList;
21
22import java.util.List;
23
24/**
25 * Utility factory for creating bundles and functions etc.
26 */
27public class BundleFactory {
28
29 private static final String BASIC_ID = "basic";
30 private static final String BASIC_DISPLAY_NAME = "Basic Bundle";
31
32 private static final String FAMILY_ID = "family";
33 private static final String FAMILY_DISPLAY_NAME = "Family Bundle";
34
35 // no instantiation
36 private BundleFactory() {}
37
38 private static final BundleDescriptor BASIC =
39 new DefaultBundleDescriptor(BASIC_ID, BASIC_DISPLAY_NAME,
40 XosFunctionDescriptor.INTERNET,
41 XosFunctionDescriptor.FIREWALL);
42
43 private static final BundleDescriptor FAMILY =
44 new DefaultBundleDescriptor(FAMILY_ID, FAMILY_DISPLAY_NAME,
45 XosFunctionDescriptor.INTERNET,
46 XosFunctionDescriptor.FIREWALL,
47 XosFunctionDescriptor.URL_FILTERING);
48
49 /**
50 * Returns the list of available bundles.
51 *
52 * @return available bundles
53 */
54 public static List<BundleDescriptor> availableBundles() {
55 return ImmutableList.of(BASIC, FAMILY);
56 }
57}