package info.bukova.isspst.ui.users;

import info.bukova.isspst.Module;
import info.bukova.isspst.ModuleUtils;
import info.bukova.isspst.data.Role;
import info.bukova.isspst.services.users.RoleService;
import info.bukova.isspst.ui.ListViewModel;

import java.util.List;

import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.select.annotation.WireVariable;

public class PermissionsList extends ListViewModel<Role> {
	
	@WireVariable
	private RoleService roleService;
	
	@Init
	public void init() {
		service = roleService;
		dataClass = Role.class;
		formZul = "permForm.zul";
	}
	
	public List<Module> getModules() {
		return ModuleUtils.getActiveModules();
	}

}
