Commit Graph

21 Commits

Author SHA1 Message Date
Florian Schmaus 3d4e7938a7 Make ExtensionElement marker interface wrt. QNAME field
ExtensionElement is now a marker interface that requires all
implementation non-abstract classes to carry a static final QNAME
field (of type QName). This is verified by a new unit test.

Also FullyQualifiedElement is renamed to simply XmlElement. XmlElement
is used over ExtensionElement when implementing classes do not
statically know the qualified name of the XML elements they
represent. In general, XmlElement should be used sparingly, and every
XML element should be modeled by its own Java class (implementing
ExtensionElement).
2021-04-18 21:07:19 +02:00
Florian Schmaus fe7d3bec30 Make Forwarded a generic type
Fixes SMACK-821.
2020-09-23 17:48:04 +02:00
Florian Schmaus c4ad857c0d [carbons] Add CarbonExtension.Private.addTo(MessageBuilder), deprecate old 2020-05-21 22:44:14 +02:00
Florian Schmaus 7a57bb7c09 Rename Stanza.getExtension(String, String) to getExtensionElement() 2020-04-12 12:09:04 +02:00
Florian Schmaus 07da9ffb48 Do not have Stanza.getExtension(String, String) return a generic type
Returning a generic would allow for

List<ExtensionElement> list = stanza.getExtension("foo", "bar");

to compile (Note the we are calling getExtension(), not
getExtension*s*()).

Users are encouraged to use the type safe getExtension(Class<? extends
ExtensionElement) variant instead.

Fixes SMACK-825.
2020-04-05 22:10:05 +02:00
Florian Schmaus fee3ed81ca Introduce XmlEnvironment 2019-02-05 13:18:03 +01:00
Florian Schmaus e8923b9d16 Enable trailing whitespace checkstyle check
for all source code regions, including javadoc.
2018-05-09 23:26:39 +02:00
Florian Schmaus 5ab2903c32 Change Element.toXml() to toXml(String enclosingNamespace) 2018-04-27 10:05:25 +02:00
Florian Schmaus cc0022c919 Globally s;Stanza(/Packet);Stanza; and more 'packet' → 'stanza' 2018-04-23 21:10:22 +02:00
Florian Schmaus ad87243060 Globally 's;stanza(/packet);stanza;' 2018-03-31 14:17:30 +02:00
Paul Schaub cb18056613 Fix minor codestyle issues 2017-12-17 11:03:46 +01:00
Florian Schmaus 08e897113d Add CustomImportOrder checkstyle rule
And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
2017-06-14 17:12:43 +02:00
Florian Schmaus b4694ec152 Add FinalClass checkstyle check
And mark affected classes final.
2015-04-06 10:45:12 +02:00
Florian Schmaus 5e86db4f80 Substitute 'packet' with 'stanza(/packet)' in javadoc 2015-03-21 09:36:28 +01:00
Florian Schmaus d4a6d8e653 Rename PacketFilter (and implementing classes) and PacketExtension
to StanzaFilter and ExtensionElement.
2015-02-28 13:49:38 +01:00
Florian Schmaus 8e74f7faed Improve 'forward' code
Move Forwarded into forward.packet and remove deprecated methods. Also
make fields final.

Improve ForwardedProvider:
- use INSTANCE of DelayInformationProvider
- use loop label
- don't throw exceptions in certain cases, instead log
2015-01-09 11:32:00 +01:00
Florian Schmaus 58e430af42 PacketExtension.from(Packet), deprecate getFrom()
add 'from(Packet)' to DataForm
2014-09-16 22:22:25 +02:00
Florian Schmaus bbf89c65bf Fix typo in XmlStringBuilder, it's not an Angel
s/rightAngelBracket/rightAngleBracket/
2014-08-20 21:25:14 +02:00
Florian Schmaus bd333bd1ac Add Enable/Disable Carbon IQs 2014-08-13 13:48:15 +02:00
Florian Schmaus 49ee058c38 Cleanup carbons, forwarded and a few others API
Adopt to common design patterns in Smack:

- getFrom(Packet) in Packetextensions
- INSTANCES.put() in getInstanceFor()
- ELEMENT instead of ELEMENT_NAME
- Use XmlStringBuilder
2014-07-16 11:46:30 +02:00
Florian Schmaus 91fd15ad86 Prefix subprojects with 'smack-'
instead of using the old baseName=smack appendix=project.name approach,
we are now going convention over configuration and renaming the
subprojects directories to the proper name.

Having a prefix is actually very helpful, because the resulting
libraries will be named like the subproject. And a core-4.0.0-rc1.jar is
not as explicit about what it actually *is* as a
smack-core-4.0.0-rc1.jar.

SMACK-265
2014-04-28 19:44:14 +02:00
Renamed from experimental/src/main/java/org/jivesoftware/smackx/carbons/packet/CarbonExtension.java (Browse further)