/** @deprecated */ public Enumeration getConditionalPermissionInfos() { // could implement our own Enumeration, but we don't care about performance here. Just do // something simple: synchronized (lock) { SecurityRow[] rows = condAdminTable.getRows(); Vector vRows = new Vector(rows.length); for (int i = 0; i < rows.length; i++) vRows.add(rows[i]); return vRows.elements(); } }
public void clearCaches() { PermissionInfoCollection[] permAdminCollections; SecurityRow[] condAdminRows; synchronized (lock) { permAdminCollections = permAdminTable.getCollections(); condAdminRows = condAdminTable.getRows(); } for (int i = 0; i < permAdminCollections.length; i++) permAdminCollections[i].clearPermissionCache(); for (int i = 0; i < condAdminRows.length; i++) condAdminRows[i].clearCaches(); }
private SecurityAdmin getSnapShot() { SecurityAdmin sa; synchronized (lock) { sa = new SecurityAdmin( supportedSecurityManager, framework, impliedPermissionInfos, permAdminDefaults); SecurityRow[] rows = condAdminTable.getRows(); SecurityRow[] rowsSnapShot = new SecurityRow[rows.length]; for (int i = 0; i < rows.length; i++) rowsSnapShot[i] = new SecurityRow( sa, rows[i].getName(), rows[i].getConditionInfos(), rows[i].getPermissionInfos(), rows[i].getAccessDecision()); sa.condAdminTable = new SecurityTable(sa, rowsSnapShot); } return sa; }
public ConditionalPermissionUpdate newConditionalPermissionUpdate() { synchronized (lock) { return new SecurityTableUpdate(this, condAdminTable.getRows(), timeStamp); } }