/** * Gets the traces. * * @return Current traces */ private String getTraces() { // Store system properties StringBuilder traces = new StringBuilder("<HTML><font color='green'><b>") .append(cleanHTML(UtilString.getAnonymizedSystemProperties().toString())) .append("<br>") .append(cleanHTML(UtilString.getAnonymizedJajukProperties().toString())) .append("</b></font><br>"); // Store last traces for (String line : Log.getSpool()) { traces.append(line).append("<br>"); } traces.append("</HTML>"); return traces.toString(); }
/** * Set all personal properties of an XML file for an item (doesn't overwrite existing properties * for perfs). * * @param attributes : list of attributes for this XML item */ @Override public void populateProperties(final Attributes attributes) { for (int i = 0; i < attributes.getLength(); i++) { final String sProperty = attributes.getQName(i); if (!getProperties().containsKey(sProperty)) { String sValue = attributes.getValue(i); final PropertyMetaInformation meta = getMeta(sProperty); // compatibility code for <1.1 : auto-refresh is now a double, // no more a boolean if (meta.getName().equals(Const.XML_DEVICE_AUTO_REFRESH) && (sValue.equalsIgnoreCase(Const.TRUE) || sValue.equalsIgnoreCase(Const.FALSE))) { if (getType() == Type.DIRECTORY) { sValue = "0.5d"; } if (getType() == Type.FILES_CD) { sValue = "0d"; } if (getType() == Type.NETWORK_DRIVE) { sValue = "0d"; } if (getType() == Type.EXTDD) { sValue = "3d"; } if (getType() == Type.PLAYER) { sValue = "3d"; } } try { setProperty(sProperty, UtilString.parse(sValue, meta.getType())); } catch (final Exception e) { Log.error(137, sProperty, e); } } } }