xslt.setStylesheetParameter("unauthenticated", String.valueOf(!staticData.getPerson().getSecurityContext().isAuthenticated()));
xslt.transform();
}
public ChannelCacheKey generateKey() {
ChannelCacheKey k = new ChannelCacheKey();
StringBuffer sbKey = new StringBuffer(1024);
// guest pages are cached system-wide
if(staticData.getPerson().isGuest()) {
k.setKeyScope(ChannelCacheKey.SYSTEM_KEY_SCOPE);
sbKey.append(systemCacheId);
} else {
k.setKeyScope(ChannelCacheKey.INSTANCE_KEY_SCOPE);
}
sbKey.append("userId:").append(staticData.getPerson().getID()).append(", ");
sbKey.append("authenticated:").append(staticData.getPerson().getSecurityContext().isAuthenticated()).append(", ");
if(xslUriForKey == null) {
try {
String sslUri = ResourceLoader.getResourceAsURLString(this.getClass(), sslLocation);
xslUriForKey=XSLT.getStylesheetURI(sslUri, runtimeData.getBrowserInfo());
} catch (PortalException pe) {
xslUriForKey = "Not attainable!";
}
}
sbKey.append("xslUri:").append(xslUriForKey).append(", ");
sbKey.append("bAuthenticated:").append(bAuthenticated).append(", ");
sbKey.append("bauthenticationAttemptFailed:").append(bauthenticationAttemptFailed).append(", ");
sbKey.append("attemptedUserName:").append(attemptedUserName).append(", ");
sbKey.append("bSecurityError:").append(bSecurityError).append(", ");
sbKey.append("locales:").append(LocaleManager.stringValueOf(runtimeData.getLocales()));
k.setKey(sbKey.toString());
k.setKeyValidity(new Long(System.currentTimeMillis()));
return k;
}