public static String get() { String hostName = host.get(); if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceHostThreadLocalGet(hostName, Thread.currentThread().getId()); } return hostName; }
public static void set(String hostVal) { if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceHostThreadLocalSet(hostVal, Thread.currentThread().getId()); } host.set(hostVal); }
private void logException(SAXParseException sax) { StringBuilder builder = new StringBuilder(); if(PicketBoxLogger.LOGGER.isTraceEnabled()) { builder.append("[").append(sax.getLineNumber()).append(",").append(sax.getColumnNumber()).append("]"); builder.append(":").append(sax.getLocalizedMessage()); PicketBoxLogger.LOGGER.trace(builder.toString()); } } });
private void loadSunConfig(URL sunConfig, ArrayList configNames) throws Exception { InputStream is = null; InputStreamReader configFile = null; try { is = sunConfig.openStream(); configFile = new InputStreamReader(is); SunConfigParser.doParse(configFile, this, PicketBoxLogger.LOGGER.isTraceEnabled()); } finally { safeClose(configFile); safeClose(is); } }
if (PicketBoxLogger.LOGGER.isTraceEnabled())
/** * Perform hasResourcePermission Check * @param caller * @param role * @return * @throws IOException */ private boolean hasResourcePermission(Subject caller, Role role) throws IOException { Principal requestPrincipal = request.getUserPrincipal(); WebResourcePermission perm = new WebResourcePermission(this.canonicalRequestURI, request.getMethod()); boolean allowed = checkPolicy(perm, requestPrincipal, caller, role ); if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceHasResourcePermission(perm.toString(), allowed); } return allowed; }
public void audit(AuditEvent auditEvent) { if(!PicketBoxLogger.AUDIT_LOGGER.isTraceEnabled()) { return; } Exception e = auditEvent.getUnderlyingException(); if(e != null) { PicketBoxLogger.AUDIT_LOGGER.trace(auditEvent, e); } else { PicketBoxLogger.AUDIT_LOGGER.trace(auditEvent); } } }
/** * @see PolicyRegistration#registerPolicy(String, String, URL) */ public void registerPolicy(String contextID, String type, URL location) { InputStream is = null; try { if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceRegisterPolicy(contextID, type, location != null ? location.getPath() : null); } is = location.openStream(); registerPolicy(contextID, type, is); } catch (Exception e) { PicketBoxLogger.LOGGER.debugIgnoredException(e); } finally { safeClose(is); } }
public void linkConfiguration(PolicyConfiguration link) throws PolicyContextException { if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceLinkConfiguration(link.getContextID()); } validateState("linkConfiguration"); policy.linkConfiguration(contextID, link); }
if (PicketBoxLogger.LOGGER.isTraceEnabled())
/** * Add an application configuration */ public void addAppConfig(String appName, AppConfigurationEntry[] entries) { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPermission(REFRESH_PERM); AuthenticationInfo authInfo = new AuthenticationInfo(appName); authInfo.setAppConfigurationEntry(entries); if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceAddAppConfig(appName, authInfo.toString()); } ApplicationPolicy aPolicy = new ApplicationPolicy(appName, authInfo); appConfigs.add(aPolicy); SecurityConfiguration.addApplicationPolicy(aPolicy); }
if (PicketBoxLogger.LOGGER.isTraceEnabled()) if (PicketBoxLogger.LOGGER.isTraceEnabled())
/** * Perform hasUserDataPermission check for the realm. * If this module returns false, the base class (Realm) will * make the decision as to whether a redirection to the ssl * port needs to be done * @return * @throws IOException */ private boolean hasUserDataPermission() throws IOException { WebUserDataPermission perm = new WebUserDataPermission(this.canonicalRequestURI, request.getMethod()); boolean ok = false; try { Principal[] principals = null; ok = checkPolicy(perm, principals); } catch(Exception e) { PicketBoxLogger.LOGGER.debugIgnoredException(e); } if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceHasUserDataPermission(perm.toString(), ok); } return ok; }
@Override public AppConfigurationEntry[] getAppConfigurationEntry(String appName) if (PicketBoxLogger.LOGGER.isTraceEnabled()) if (PicketBoxLogger.LOGGER.isTraceEnabled()) if (PicketBoxLogger.LOGGER.isTraceEnabled())
if (PicketBoxLogger.LOGGER.isTraceEnabled()) if (PicketBoxLogger.LOGGER.isTraceEnabled())
if (PicketBoxLogger.LOGGER.isTraceEnabled())
if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceFailureExecutingMethod("isCallerInRole", e); } else {
if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceFailureExecutingMethod("hasUserDataPermission", e); } else {
if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceFailureExecutingMethod("hasResourcePermission", e); } else {
if (PicketBoxLogger.LOGGER.isTraceEnabled()) { PicketBoxLogger.LOGGER.traceFailureExecutingMethod("isCallerInRole", e); } else {