public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<history"); if (getMaxChars() != -1) { buf.append(" maxchars=\"").append(getMaxChars()).append("\""); } if (getMaxStanzas() != -1) { buf.append(" maxstanzas=\"").append(getMaxStanzas()).append("\""); } if (getSeconds() != -1) { buf.append(" seconds=\"").append(getSeconds()).append("\""); } if (getSince() != null) { SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); buf.append(" since=\"").append(utcFormat.format(getSince())).append("\""); } buf.append("/>"); return buf.toString(); } }
public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<").append(getElementName()).append(" xmlns=\"").append(getNamespace()).append( "\">"); if (getPassword() != null) { buf.append("<password>").append(getPassword()).append("</password>"); } if (getHistory() != null) { buf.append(getHistory().toXML()); } buf.append("</").append(getElementName()).append(">"); return buf.toString(); }
/** * Returns the History that manages the amount of discussion history provided on entering a * room. * * @return the History that manages the amount of discussion history provided on entering a * room. */ MUCInitialPresence.History getMUCHistory() { // Return null if the history was not properly configured if (!isConfigured()) { return null; } MUCInitialPresence.History mucHistory = new MUCInitialPresence.History(); if (maxChars > -1) { mucHistory.setMaxChars(maxChars); } if (maxStanzas > -1) { mucHistory.setMaxStanzas(maxStanzas); } if (seconds > -1) { mucHistory.setSeconds(seconds); } if (since != null) { mucHistory.setSince(since); } return mucHistory; } }
/** * Returns the History that manages the amount of discussion history provided on entering a * room. * * @return the History that manages the amount of discussion history provided on entering a * room. */ MUCInitialPresence.History getMUCHistory() { // Return null if the history was not properly configured if (!isConfigured()) { return null; } MUCInitialPresence.History mucHistory = new MUCInitialPresence.History(); if (maxChars > -1) { mucHistory.setMaxChars(maxChars); } if (maxStanzas > -1) { mucHistory.setMaxStanzas(maxStanzas); } if (seconds > -1) { mucHistory.setSeconds(seconds); } if (since != null) { mucHistory.setSince(since); } return mucHistory; } }
/** * Returns the History that manages the amount of discussion history provided on entering a * room. * * @return the History that manages the amount of discussion history provided on entering a * room. */ MUCInitialPresence.History getMUCHistory() { // Return null if the history was not properly configured if (!isConfigured()) { return null; } MUCInitialPresence.History mucHistory = new MUCInitialPresence.History(); if (maxChars > -1) { mucHistory.setMaxChars(maxChars); } if (maxStanzas > -1) { mucHistory.setMaxStanzas(maxStanzas); } if (seconds > -1) { mucHistory.setSeconds(seconds); } if (since != null) { mucHistory.setSince(since); } return mucHistory; } }
/** * Returns the History that manages the amount of discussion history provided on entering a * room. * * @return the History that manages the amount of discussion history provided on entering a * room. */ MUCInitialPresence.History getMUCHistory() { // Return null if the history was not properly configured if (!isConfigured()) { return null; } MUCInitialPresence.History mucHistory = new MUCInitialPresence.History(); if (maxChars > -1) { mucHistory.setMaxChars(maxChars); } if (maxStanzas > -1) { mucHistory.setMaxStanzas(maxStanzas); } if (seconds > -1) { mucHistory.setSeconds(seconds); } if (since != null) { mucHistory.setSince(since); } return mucHistory; } }
public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<history"); if (getMaxChars() != -1) { buf.append(" maxchars=\"").append(getMaxChars()).append("\""); } if (getMaxStanzas() != -1) { buf.append(" maxstanzas=\"").append(getMaxStanzas()).append("\""); } if (getSeconds() != -1) { buf.append(" seconds=\"").append(getSeconds()).append("\""); } if (getSince() != null) { SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); buf.append(" since=\"").append(utcFormat.format(getSince())).append("\""); } buf.append("/>"); return buf.toString(); } }
public String toXML() { StringBuffer buf = new StringBuffer(); buf.append("<history"); if (getMaxChars() != -1) { buf.append(" maxchars=\"").append(getMaxChars()).append("\""); } if (getMaxStanzas() != -1) { buf.append(" maxstanzas=\"").append(getMaxStanzas()).append("\""); } if (getSeconds() != -1) { buf.append(" seconds=\"").append(getSeconds()).append("\""); } if (getSince() != null) { SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); buf.append(" since=\"").append(utcFormat.format(getSince())).append("\""); } buf.append("/>"); return buf.toString(); } }
public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<history"); if (getMaxChars() != -1) { buf.append(" maxchars=\"").append(getMaxChars()).append("\""); } if (getMaxStanzas() != -1) { buf.append(" maxstanzas=\"").append(getMaxStanzas()).append("\""); } if (getSeconds() != -1) { buf.append(" seconds=\"").append(getSeconds()).append("\""); } if (getSince() != null) { SimpleDateFormat utcFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); utcFormat.setTimeZone(TimeZone.getTimeZone("UTC")); buf.append(" since=\"").append(utcFormat.format(getSince())).append("\""); } buf.append("/>"); return buf.toString(); } }
public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<").append(getElementName()).append(" xmlns=\"").append(getNamespace()).append( "\">"); if (getPassword() != null) { buf.append("<password>").append(getPassword()).append("</password>"); } if (getHistory() != null) { buf.append(getHistory().toXML()); } buf.append("</").append(getElementName()).append(">"); return buf.toString(); }
public String toXML() { StringBuffer buf = new StringBuffer(); buf.append("<").append(getElementName()).append(" xmlns=\"").append(getNamespace()).append( "\">"); if (getPassword() != null) { buf.append("<password>").append(getPassword()).append("</password>"); } if (getHistory() != null) { buf.append(getHistory().toXML()); } buf.append("</").append(getElementName()).append(">"); return buf.toString(); }
public String toXML() { StringBuilder buf = new StringBuilder(); buf.append("<").append(getElementName()).append(" xmlns=\"").append(getNamespace()).append( "\">"); if (getPassword() != null) { buf.append("<password>").append(getPassword()).append("</password>"); } if (getHistory() != null) { buf.append(getHistory().toXML()); } buf.append("</").append(getElementName()).append(">"); return buf.toString(); }