public DisabledInfo getDisabledInfo(BundleDescription bundle, String policyName) { return target.getDisabledInfo(bundle, policyName); }
public DisabledInfo getDisabledInfo(BundleDescription bundle, String policyName) { return target.getDisabledInfo(bundle, policyName); }
public DisabledInfo getDisabledInfo(BundleDescription bundle, String policyName) { return platformAdmin.getSystemState().getDisabledInfo(bundle, policyName); }
public DisabledInfo getDisabledInfo(BundleDescription bundle, String policyName) { return platformAdmin.getSystemState().getDisabledInfo(bundle, policyName); }
static void setDisabled(boolean disable, BundleDescription bundle) { State state = bundle.getContainingState(); if (disable) { state.addDisabledInfo(new DisabledInfo(COMPOSITE_POLICY, "Composite companion bundle is not resolved.", bundle)); //$NON-NLS-1$ } else { DisabledInfo toRemove = state.getDisabledInfo(bundle, COMPOSITE_POLICY); if (toRemove != null) state.removeDisabledInfo(toRemove); } }
static void setDisabled(boolean disable, BundleDescription bundle) { State state = bundle.getContainingState(); if (disable) { state.addDisabledInfo(new DisabledInfo(COMPOSITE_POLICY, "Composite companion bundle is not resolved.", bundle)); //$NON-NLS-1$ } else { DisabledInfo toRemove = state.getDisabledInfo(bundle, COMPOSITE_POLICY); if (toRemove != null) state.removeDisabledInfo(toRemove); } }
protected AuthorizationEvent doAuthorize(SignedContent content, Object context) { boolean enabled = isEnabled(content, context); AuthorizationEvent event = null; if (context instanceof Bundle) { BundleDescription desc = systemState.getBundle(((Bundle) context).getBundleId()); if (!enabled) { DisabledInfo info = new DisabledInfo(POLICY_NAME, null, desc); // TODO add an error message systemState.addDisabledInfo(info); event = new AuthorizationEvent(AuthorizationEvent.DENIED, content, context, 0); // TODO severity?? } else { DisabledInfo info = systemState.getDisabledInfo(desc, POLICY_NAME); if (info != null) { systemState.removeDisabledInfo(info); } event = new AuthorizationEvent(AuthorizationEvent.ALLOWED, content, context, 0); } } return event; }
protected AuthorizationEvent doAuthorize(SignedContent content, Object context) { boolean enabled = isEnabled(content, context); AuthorizationEvent event = null; if (context instanceof Bundle) { BundleDescription desc = systemState.getBundle(((Bundle) context).getBundleId()); if (!enabled) { DisabledInfo info = new DisabledInfo(POLICY_NAME, null, desc); // TODO add an error message systemState.addDisabledInfo(info); event = new AuthorizationEvent(AuthorizationEvent.DENIED, content, context, 0); // TODO severity?? } else { DisabledInfo info = systemState.getDisabledInfo(desc, POLICY_NAME); if (info != null) { systemState.removeDisabledInfo(info); } event = new AuthorizationEvent(AuthorizationEvent.ALLOWED, content, context, 0); } } return event; }