Class JivePropertiesManager

    • Method Detail

      • addProperty

        public static void addProperty​(StanzaBuilder<?> stanzaBuilder,
                                       String name,
                                       Object value)
        Convenience method to add a property to a stanza.
        Parameters:
        stanzaBuilder - the stanza to add the property to.
        name - the name of the property to add.
        value - the value of the property to add.
      • getProperty

        public static Object getProperty​(StanzaView packet,
                                         String name)
        Convenience method to get a property from a packet. Will return null if the stanza contains not property with the given name.
        Parameters:
        packet - TODO javadoc me please
        name - TODO javadoc me please
        Returns:
        the property or null if none found.
      • getPropertiesNames

        public static Collection<StringgetPropertiesNames​(Stanza packet)
        Return a collection of the names of all properties of the given packet. If the packet contains no properties extension, then an empty collection will be returned.
        Parameters:
        packet - TODO javadoc me please
        Returns:
        a collection of the names of all properties.
      • getProperties

        public static Map<String,​ObjectgetProperties​(Stanza packet)
        Return a map of all properties of the given packet. If the stanza contains no properties extension, an empty map will be returned.
        Parameters:
        packet - TODO javadoc me please
        Returns:
        a map of all properties of the given packet.