KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > formview > usecases > permission > RolePermisionAdapter


1 package net.sourceforge.formview.usecases.permission;
2
3 import java.util.Map JavaDoc;
4
5 import net.sourceforge.formview.permission.AbstractRolesPermissionsAdapter;
6
7 public class RolePermisionAdapter extends AbstractRolesPermissionsAdapter {
8
9     private Map JavaDoc roles;
10     public RolePermisionAdapter(Map JavaDoc roles) {
11         this.roles = roles;
12     }
13     
14     public boolean hasRole(String JavaDoc role) {
15         if (roles != null) {
16             return (roles.get(role) != null);
17         }
18         // TODO Auto-generated method stub
19
return false;
20     }
21
22 }
23
Popular Tags