BUG 2302 : odl-clustering-test-app should not be part of the odl-restconf-all feature set
[controller.git] / opendaylight / sal / api / src / main / java / org / opendaylight / controller / sal / authorization / AppRole.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  * Represents a user role level in the application space
16  * It contains the role name and the role level in the
17  * application context as specified by {@link AppRoleLevel}
18  */
19 public class AppRole implements Serializable {
20     private static final long serialVersionUID = 1L;
21     String name;
22     AppRoleLevel level;
23
24     public AppRole(String name, AppRoleLevel level) {
25         this.name = name;
26         this.level = level;
27     }
28
29     /**
30      * Returns the application role name
31      * @return the string containing the role name
32      */
33     public String getName() {
34         return name;
35     }
36
37     /**
38      * Returns the application role level
39      * @return the application user level
40      */
41     public AppRoleLevel getLevel() {
42         return level;
43     }
44 }