1 28 29 package com.caucho.security; 30 31 import com.caucho.loader.Environment; 32 import com.caucho.log.Log; 33 import com.caucho.util.L10N; 34 35 import java.security.Permission ; 36 import java.security.Policy ; 37 import java.util.ArrayList ; 38 import java.util.logging.Logger ; 39 40 43 public class GrantConfig { 44 static final Logger log = Log.open(GrantConfig.class); 45 static final L10N L = new L10N(GrantConfig.class); 46 47 private ArrayList <Permission > _permissionList = 48 new ArrayList <Permission >(); 49 50 public void addPermission(PermissionConfig permission) 51 { 52 _permissionList.add(permission.getPermission()); 53 } 54 55 public void init() 56 { 57 if (! (Policy.getPolicy() instanceof PolicyImpl)) { 58 Policy.setPolicy(PolicyImpl.getPolicy()); 59 } 60 61 for (int i = 0; i < _permissionList.size(); i++) { 62 Environment.addPermission(_permissionList.get(i)); 63 } 64 } 65 } 66 | Popular Tags |