blob: 2e02eb5b5bff99e76d4f4edd9d813cfb6aa2fb22 [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ranger.view;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.ranger.common.AppConstants;
import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;
import org.codehaus.jackson.map.annotate.JsonSerialize;
@JsonAutoDetect(getterVisibility=Visibility.NONE, setterVisibility=Visibility.NONE, fieldVisibility=Visibility.ANY)
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL )
@JsonIgnoreProperties(ignoreUnknown=true)
@XmlRootElement
public class VXGroupPermission extends VXDataObject implements java.io.Serializable {
private static final long serialVersionUID = 1L;
protected Long groupId;
protected Long moduleId;
protected Integer isAllowed;
protected String moduleName;
protected String groupName;
public VXGroupPermission() {
// TODO Auto-generated constructor stub
}
/**
* @return the id
*/
public Long getId() {
return id;
}
/**
* @param id the id to set
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return the groupId
*/
public Long getGroupId() {
return groupId;
}
/**
* @param groupId the groupId to set
*/
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
/**
* @return the groupName
*/
public String getGroupName() {
return groupName;
}
/**
* @param groupName the groupName to set
*/
public void setGroupName(String groupName) {
this.groupName = groupName;
}
/**
* @return the moduleId
*/
public Long getModuleId() {
return moduleId;
}
/**
* @param moduleId the moduleId to set
*/
public void setModuleId(Long moduleId) {
this.moduleId = moduleId;
}
/**
* @return the isAllowed
*/
public Integer getIsAllowed() {
return isAllowed;
}
/**
* @param isAllowed the isAllowed to set
*/
public void setIsAllowed(Integer isAllowed) {
this.isAllowed = isAllowed;
}
public String getModuleName() {
return moduleName;
}
public void setModuleName(String moduleName) {
this.moduleName = moduleName;
}
@Override
public int getMyClassType() {
return AppConstants.CLASS_TYPE_RANGER_GROUP_PERMISSION;
}
@Override
public String toString() {
String str = "VXGroupPermission={";
str += super.toString();
str += "id={" + id + "} ";
str += "groupId={" + groupId + "} ";
str += "moduleId={" + moduleId + "} ";
str += "isAllowed={" + isAllowed + "} ";
str += "moduleName={" + moduleName + "} ";
str += "}";
return str;
}
}