/** * Checks if the {@link #isSatisfied()} method needs to prompt the user, thus cannot * give results instantly. * This depends on the permission level given in * {@link UserPromptCondition#getCondition(Bundle, ConditionInfo)}. * <ul> * <li>ONESHOT - isPostponed always returns true. The user is prompted for question every time.</li> * <li>SESSION - isPostponed returns true until the user decides either yes or no for the current session.</li> * <li>BLANKET - isPostponed returns true until the user decides either always or never.</li> * </ul> * Regardless of the session level, the user is always given the option to reject the prompt * permanently, as if BLANKET/never was chosen. In this case, the question is not postponed * anymore, and {@link #isSatisfied()} returns false.<br/> * If the system supports an separately accessible permission management GUI, * that may reset the condition * to its initial state. * * @return True, if user interaction is needed. */ public boolean isPostponed() { lookForImplementation(); if (realUserPromptCondition!=null) { return realUserPromptCondition.isPostponed(); } else { return true; } }
private boolean isPostponed(Condition condition) { // postponed checks can only happen if we are using a supported security manager return condition.isPostponed() && securityAdmin.getSupportedSecurityManager() != null; }
void handleImmutable(Condition condition, boolean isSatisfied, boolean mutable) { if (mutable || !condition.isPostponed()) return; // do nothing if (isSatisfied) { synchronized (row.bundleConditions) { Condition[] rowConditions = row.bundleConditions.get(bundlePermissions); boolean isEmpty = true; for (int i = 0; i < rowConditions.length; i++) { if (rowConditions[i] == condition) if (isSatisfied) rowConditions[i] = null; isEmpty &= rowConditions[i] == null; } if (isEmpty) row.bundleConditions.put(bundlePermissions, SATISFIED_LIST); } } else { synchronized (row.bundleConditions) { row.bundleConditions.put(bundlePermissions, ABSTAIN_LIST); } } } }
private boolean isPostponed(Condition condition) { // postponed checks can only happen if we are using a supported security manager return condition.isPostponed() && securityAdmin.getSupportedSecurityManager() != null; }
private boolean isPostponed(Condition condition) { // postponed checks can only happen if we are using a supported security manager return condition.isPostponed() && securityAdmin.getSupportedSecurityManager() != null; }
void handleImmutable(Condition condition, boolean isSatisfied, boolean mutable) { if (mutable || !condition.isPostponed()) return; // do nothing if (isSatisfied) { synchronized (row.bundleConditions) { Condition[] rowConditions = row.bundleConditions.get(bundlePermissions); boolean isEmpty = true; for (int i = 0; i < rowConditions.length; i++) { if (rowConditions[i] == condition) if (isSatisfied) rowConditions[i] = null; isEmpty &= rowConditions[i] == null; } if (isEmpty) row.bundleConditions.put(bundlePermissions, SATISFIED_LIST); } } else { synchronized (row.bundleConditions) { row.bundleConditions.put(bundlePermissions, ABSTAIN_LIST); } } } }
private boolean isPostponed(Condition condition) { // postponed checks can only happen if we are using a supported security manager return condition.isPostponed() && securityAdmin.getSupportedSecurityManager() != null; }
void handleImmutable(Condition condition, boolean isSatisfied, boolean mutable) { if (mutable || !condition.isPostponed()) return; // do nothing if (isSatisfied) { synchronized (row.bundleConditions) { Condition[] rowConditions = row.bundleConditions.get(bundlePermissions); boolean isEmpty = true; for (int i = 0; i < rowConditions.length; i++) { if (rowConditions[i] == condition) if (isSatisfied) rowConditions[i] = null; isEmpty &= rowConditions[i] == null; } if (isEmpty) row.bundleConditions.put(bundlePermissions, SATISFIED_LIST); } } else { synchronized (row.bundleConditions) { row.bundleConditions.put(bundlePermissions, ABSTAIN_LIST); } } } }
private boolean isPostponed(Condition condition) { // postponed checks can only happen if we are using a supported security manager return condition.isPostponed() && securityAdmin.getSupportedSecurityManager() != null; }
private boolean isPostponed(Condition condition) { // postponed checks can only happen if we are using a supported security manager return condition.isPostponed() && securityAdmin.getSupportedSecurityManager() != null; }
private boolean isPostponed(Condition condition) { // postponed checks can only happen if we are using a supported security manager return condition.isPostponed() && securityAdmin.getSupportedSecurityManager() != null; }
void handleImmutable(Condition condition, boolean isSatisfied, boolean mutable) { if (mutable || !condition.isPostponed()) return; // do nothing if (isSatisfied) { synchronized (row.bundleConditions) { Condition[] rowConditions = row.bundleConditions.get(bundlePermissions); boolean isEmpty = true; for (int i = 0; i < rowConditions.length; i++) { if (rowConditions[i] == condition) if (isSatisfied) rowConditions[i] = null; isEmpty &= rowConditions[i] == null; } if (isEmpty) row.bundleConditions.put(bundlePermissions, SATISFIED_LIST); } } else { synchronized (row.bundleConditions) { row.bundleConditions.put(bundlePermissions, ABSTAIN_LIST); } } } }
void handleImmutable(Condition condition, boolean isSatisfied, boolean mutable) { if (mutable || !condition.isPostponed()) return; // do nothing if (isSatisfied) { synchronized (row.bundleConditionsLock) { Condition[] rowConditions = row.bundleConditions.get(bundlePermissions); boolean isEmpty = true; for (int i = 0; i < rowConditions.length; i++) { if (rowConditions[i] == condition) if (isSatisfied) rowConditions[i] = null; isEmpty &= rowConditions[i] == null; } if (isEmpty) row.bundleConditions.put(bundlePermissions, SATISFIED_LIST); } } else { synchronized (row.bundleConditionsLock) { row.bundleConditions.put(bundlePermissions, ABSTAIN_LIST); } } } }
private boolean isPostponed(Condition condition) { // postponed checks can only happen if we are using a supported security manager return condition.isPostponed() && securityAdmin.getSupportedSecurityManager() != null; }
void handleImmutable(Condition condition, boolean isSatisfied, boolean mutable) { if (mutable || !condition.isPostponed()) return; // do nothing if (isSatisfied) { synchronized (row.bundleConditions) { Condition[] rowConditions = row.bundleConditions.get(bundlePermissions); boolean isEmpty = true; for (int i = 0; i < rowConditions.length; i++) { if (rowConditions[i] == condition) if (isSatisfied) rowConditions[i] = null; isEmpty &= rowConditions[i] == null; } if (isEmpty) row.bundleConditions.put(bundlePermissions, SATISFIED_LIST); } } else { synchronized (row.bundleConditions) { row.bundleConditions.put(bundlePermissions, ABSTAIN_LIST); } } } }
void handleImmutable(Condition condition, boolean isSatisfied, boolean mutable) { if (mutable || !condition.isPostponed()) return; // do nothing if (isSatisfied) { synchronized (row.bundleConditions) { Condition[] rowConditions = row.bundleConditions.get(bundlePermissions); boolean isEmpty = true; for (int i = 0; i < rowConditions.length; i++) { if (rowConditions[i] == condition) if (isSatisfied) rowConditions[i] = null; isEmpty &= rowConditions[i] == null; } if (isEmpty) row.bundleConditions.put(bundlePermissions, SATISFIED_LIST); } } else { synchronized (row.bundleConditions) { row.bundleConditions.put(bundlePermissions, ABSTAIN_LIST); } } } }
void handleImmutable(Condition condition, boolean isSatisfied, boolean mutable) { if (mutable || !condition.isPostponed()) return; // do nothing if (isSatisfied) { synchronized (row.bundleConditions) { Condition[] rowConditions = row.bundleConditions.get(bundlePermissions); boolean isEmpty = true; for (int i = 0; i < rowConditions.length; i++) { if (rowConditions[i] == condition) if (isSatisfied) rowConditions[i] = null; isEmpty &= rowConditions[i] == null; } if (isEmpty) row.bundleConditions.put(bundlePermissions, SATISFIED_LIST); } } else { synchronized (row.bundleConditions) { row.bundleConditions.put(bundlePermissions, ABSTAIN_LIST); } } } }
if (checkPostponed || !c.isPostponed()) { final boolean mutable = c.isMutable(); if (c.isSatisfied()) {
if (!c.isPostponed() /* || debug.tck401compat */) { if (c.isSatisfied()) { if (debug.permissions) {