Esempio n. 1
0
 /** @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();
   }
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
 public ConditionalPermissionUpdate newConditionalPermissionUpdate() {
   synchronized (lock) {
     return new SecurityTableUpdate(this, condAdminTable.getRows(), timeStamp);
   }
 }