Cleanup drl files in policy/engine test modules
[policy/engine.git] / ONAP-REST / src / main / java / org / onap / policy / rest / jpa / GlobalRoleSettings.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP-REST
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.rest.jpa;
22
23 import java.io.Serializable;
24
25 import javax.persistence.Column;
26 import javax.persistence.Entity;
27 import javax.persistence.Id;
28 import javax.persistence.NamedQuery;
29 import javax.persistence.Table;
30
31
32 /**
33  * Entity implementation class for Entity: Administration
34  *
35  */
36 @Entity
37 @Table(name="GlobalRoleSettings")
38 @NamedQuery(name="GlobalRoleSettings.findAll", query="SELECT g FROM GlobalRoleSettings g")
39 public class GlobalRoleSettings implements Serializable {       
40     private static final long serialVersionUID = 1L;
41
42     @Id
43     @Column(name="role", length=45)
44     private String role;
45
46     @Column(name="lockdown")
47     private boolean lockdown;
48
49     public GlobalRoleSettings() {
50         super();
51     }
52
53     public GlobalRoleSettings(boolean lockdown) {
54         this.role = org.onap.policy.rest.XacmlAdminAuthorization.Role.ROLE_SUPERADMIN.toString();
55         this.lockdown = lockdown;
56     }
57
58     /**
59      * return the role
60      *
61      * @return the role
62      */
63     public String getRole() {
64         return role;
65     }
66
67     /**
68      * set role
69      *
70      * @param role the role to set
71      */
72     public void setRole(String role) {
73         this.role = role;
74     }
75
76     /**
77      * is the system locked down
78      *
79      * @return
80      */
81     public boolean isLockdown() {
82         return lockdown;
83     }
84
85     /**
86      * sets lockdown configuration
87      *
88      * @param lockdown
89      */
90     public void setLockdown(boolean lockdown) {
91         this.lockdown = lockdown;
92     }
93 }