Class RosterDelimiter
- java.lang.Object
-
- rocks.xmpp.extensions.privatedata.rosterdelimiter.model.RosterDelimiter
-
public final class RosterDelimiter extends Object
The implementation of the<roster/>
element in theroster:delimiter
namespace.It allows to store a roster group delimiter in the private storage, in order to display nested roster groups.
Therefore, the delimiter SHOULD contain multiple characters in order to avoid inconveniencing the user, but single-character delimiters MUST be honored by the client. The exception is if the delimiter is a single alphanumeric character (a-z, A-Z, 0-9); in this case compliant clients MUST treat the situation as if nesting were disabled, to avoid malicious use of this element by setting 'e' or 'm' or some other common single character as a delimiter.
A compliant client SHOULD ask for the nested delimiter before requesting the user's roster, in order to know whether or not to parse the roster 'group' fields accordingly. If there is no delimiter stored, a client MAY set a delimiter but MUST either prompt the user for a delimiter, or use a user-configurable default.
This class is immutable.
- See Also:
- XEP-0083: Nested Roster Groups, XML Schema
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RosterDelimiter
empty()
String
getRosterDelimiter()
Gets the roster delimiter.static RosterDelimiter
of(String rosterDelimiter)
String
toString()
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
roster:delimiter- See Also:
- Constant Field Values
-
-
Method Detail
-
of
public static RosterDelimiter of(String rosterDelimiter)
-
empty
public static RosterDelimiter empty()
-
getRosterDelimiter
public final String getRosterDelimiter()
Gets the roster delimiter.- Returns:
- The roster delimiter.
-
-