if (themeName == null) {
throw new IllegalArgumentException("themeName cannot be null");
}
try {
RuntimeDeviceTheme theme = retrieveBestDeviceTheme(themeName);
if (theme != null) {
if (logger.isDebugEnabled()) {
logger.debug("Retrieved " + theme + " for theme " +
themeName + " for device " +
getEnvironmentContext().
getSessionDevice().getName());
}
styleSheet = theme.getCompiledStyleSheet();
} else {
if (logger.isDebugEnabled()) {
logger.debug("Failed to retrieve DeviceTheme " +
themeName + " for device " +
getEnvironmentContext().