hive = new SimpleCachingHive();
else
hive = new BasicHive();
Principal principal = new SimplePrincipal("speed");
SwarmAction action = (SwarmAction) actionFactory.getAction("access, render");
hive.addPermission(principal, new ComponentPermission(
"org.apache.wicket.security.pages.SpeedPage", action));
for (int i = 0; i < ROWS; i++)
{
for (int j = 0; j < COLS / denialFactor; j++)
{
// not granting a permission for each component will add
// linear time to check, the more permissions the more time
// will be added
hive.addPermission(principal, new ComponentPermission(
"org.apache.wicket.security.pages.SpeedPage:rows:" + i + ":cols:" + j
+ ":label", action));
}
}
return hive;