Bug 1029: Remove dead code: samples/clustersession
[controller.git] / opendaylight / adsal / sal / api / src / main / java / org / opendaylight / controller / sal / authorization / UserLevel.java
1
2 /*
3  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
4  *
5  * This program and the accompanying materials are made available under the
6  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
7  * and is available at http://www.eclipse.org/legal/epl-v10.html
8  */
9
10 package org.opendaylight.controller.sal.authorization;
11
12 import java.io.Serializable;
13
14 /**
15  * Describes the user role level in the controller space
16  */
17 public enum UserLevel implements Serializable {
18     SYSTEMADMIN(0, "System-Admin", "System Administrator"),     // can do everything
19     NETWORKADMIN(1, "Network-Admin", "Network Administrator"),  // can do everything but setting a system admin user profile
20     NETWORKOPERATOR(2, "Network-Operator", "Network Operator"), // can only see what is configured anywhere
21     CONTAINERUSER(4, "Container-User", "Container User"),       // container context user
22     APPUSER(5, "App-User", "Application User"),                                 // application context user
23     NOUSER(255, "Not Authorized", "Not Authorized");
24
25     private int userLevel;
26     private String level;
27     private String prettyLevel;
28
29     private UserLevel(int userlevel, String level, String prettyLevel) {
30         this.userLevel = userlevel;
31         this.level = level;
32         this.prettyLevel = prettyLevel;
33     }
34
35     public int toNumber() {
36         return this.userLevel;
37     }
38
39     public String toString() {
40         return this.level;
41     }
42
43     public String toStringPretty() {
44         return this.prettyLevel;
45     }
46 }