@Override public boolean inService(String contextID) throws PolicyContextException { checkNotNullParam("contextID", contextID); synchronized (configurationRegistry) { PolicyConfiguration policyConfiguration = configurationRegistry.get(contextID); if (policyConfiguration == null) { return false; } return policyConfiguration.inService(); } }
if (!policyConfiguration.inService()) { throw log.authzPolicyConfigurationNotInService(contextID);
public boolean inService(String contextID) throws PolicyContextException { PolicyConfiguration configuration = getPolicyConfiguration(contextID, false); log.trace("Policy configuration " + contextID + " put into service"); return configuration.inService(); }
@Override public boolean inService(String contextID) throws PolicyContextException { checkNotNullParam("contextID", contextID); synchronized (configurationRegistry) { PolicyConfiguration policyConfiguration = configurationRegistry.get(contextID); if (policyConfiguration == null) { return false; } return policyConfiguration.inService(); } }
public boolean inService(final String contextID) throws PolicyContextException { final PolicyConfiguration configuration = getPolicyConfiguration(contextID, false); return configuration.inService(); }
public boolean inService(final String contextID) throws PolicyContextException { final PolicyConfiguration configuration = getPolicyConfiguration(contextID, false); return configuration.inService(); }
@Override public boolean inService(String contextID) throws PolicyContextException { checkNotNullParam("contextID", contextID); synchronized (configurationRegistry) { PolicyConfiguration policyConfiguration = configurationRegistry.get(contextID); if (policyConfiguration == null) { return false; } return policyConfiguration.inService(); } }
@Override public boolean inService(String contextID) throws PolicyContextException { checkNotNullParam("contextID", contextID); synchronized (configurationRegistry) { PolicyConfiguration policyConfiguration = configurationRegistry.get(contextID); if (policyConfiguration == null) { return false; } return policyConfiguration.inService(); } }
public boolean inService(String contextID) throws PolicyContextException { PolicyConfiguration configuration = getPolicyConfiguration(contextID, false); return configuration.inService(); }
if (!policyConfiguration.inService()) { throw log.authzPolicyConfigurationNotInService(contextID);
/** * This method determines if the identified policy context * exists with state "inService" in the Policy provider * associated with the factory. * <P> * @param contextID A string identifying a policy context * * @return true if the identified policy context exists within the * provider and its state is "inService", false otherwise. * * @throws java.lang.SecurityException * when called by an AccessControlContext that has not been * granted the "setPolicy" SecurityPermission. * * @throws javax.security.jacc.PolicyContextException * if the implementation throws a checked exception that has not been * accounted for by the inService method signature. The exception thrown * by the implementation class will be encapsulated (during construction) * in the thrown PolicyContextException. */ public boolean inService(String contextID) throws PolicyContextException{ checkSetPolicyPermission(); PolicyConfiguration pc = getPolicyConfigImpl(contextID); // if the pc is not in the table, see if it was copied into the // filesystem (e.g. by the DAS) if (pc == null) { pc = getPolicyConfigurationImplFromDirectory(contextID,false,false); } return pc == null ? false : pc.inService(); }
/** * This method determines if the identified policy context * exists with state "inService" in the Policy provider * associated with the factory. * <P> * @param contextID A string identifying a policy context * * @return true if the identified policy context exists within the * provider and its state is "inService", false otherwise. * * @throws java.lang.SecurityException * when called by an AccessControlContext that has not been * granted the "setPolicy" SecurityPermission. * * @throws javax.security.jacc.PolicyContextException * if the implementation throws a checked exception that has not been * accounted for by the inService method signature. The exception thrown * by the implementation class will be encapsulated (during construction) * in the thrown PolicyContextException. */ public boolean inService(String contextID) throws PolicyContextException{ checkSetPolicyPermission(); PolicyConfiguration pc = getPolicyConfigImpl(contextID); // if the pc is not in the table, see if it was copied into the // filesystem (e.g. by the DAS) if (pc == null) { pc = getPolicyConfigurationImplFromDirectory(contextID,false,false); } return pc == null ? false : pc.inService(); }
if (!policyConfiguration.inService()) { throw log.authzPolicyConfigurationNotInService(contextID);
/** * This method determines if the identified policy context exists with state * "inService" in the Policy provider associated with the factory. * @param contextID A string identifying a policy context * @return true if the identified policy context exists within the provider * and its state is "inService", false otherwise. * @throws SecurityException when called by an AccessControlContext that has * not been granted the "setPolicy" SecurityPermission. * @throws PolicyContextException if the implementation throws a checked * exception that has not been accounted for by the inService method * signature. The exception thrown by the implementation class will * be encapsulated (during construction) in the thrown * PolicyContextException. */ @Override public boolean inService(final String contextID) throws PolicyContextException, SecurityException { // Section 3.3 - Check permissions logger.debug("Check setpolicy..."); checkSetPolicy(); // Context exists ? if (policyConfigurations.containsKey(contextID)) { logger.debug("Existing config for contextID ''{0}'', gets internal config...", contextID); return getInternalPolicyConfiguration(contextID).inService(); } // false otherwise (see javaDoc) logger.debug("Config for contextID ''{0}'' not found, return false", contextID); return false; }
if (!policyConfiguration.inService()) { throw log.authzPolicyConfigurationNotInService(contextID);
logger.log(BasicLevel.DEBUG, "Look internal config..."); return getInternalPolicyConfiguration(contextID).inService(); } else {
if (pc.inService() == false) pc.commit();