Adicionado classificaĆ§Ć£o do log conforme exemplo
[simdecs.git] / src / java / org / ufcspa / simdecs / bn / ui / NodeRoleController.java
CommitLineData
7f3a0a9f
MS
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package org.ufcspa.simdecs.bn.ui;
6
7import java.util.ArrayList;
8import java.util.List;
9import javax.faces.bean.ApplicationScoped;
10import javax.faces.bean.ManagedBean;
11import javax.faces.model.SelectItem;
12import org.ufcspa.simdecs.bn.entity.NodeRole;
13
14/**
15 *
16 * @author mchelem
17 */
18@ManagedBean(name = "nodeRoleController")
19@ApplicationScoped
20public class NodeRoleController {
21 private NodeRole nodeRole;
22
23 public void setNodeRole(NodeRole nodeRole) { this.nodeRole=nodeRole; }
24
25 public NodeRole getNodeRole() { return this.nodeRole; }
26
27 public List<SelectItem> getNodeRoles() {
28 List<SelectItem> items = new ArrayList<SelectItem>();
29 for (NodeRole role: NodeRole.values()) {
30 items.add(new SelectItem(role, role.toString()));
31 }
32 return items;
33 }
34}