mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
[core] Move IqData construction API to the right place
AbstractIqBuilder is the wrong place for those methods, they belong in IqData.
This commit is contained in:
parent
6b14fcab75
commit
a806595a77
2 changed files with 10 additions and 0 deletions
|
@ -40,10 +40,12 @@ public abstract class AbstractIqBuilder<IB extends AbstractIqBuilder<IB>> extend
|
|||
super(stanzaId);
|
||||
}
|
||||
|
||||
// TODO: Deprecate and use corresponding method in IqData instead.
|
||||
public static IqData createResponse(IqView request) {
|
||||
return createResponse(request, IQ.ResponseType.result);
|
||||
}
|
||||
|
||||
// TODO: Deprecate and use corresponding method in IqData instead.
|
||||
public static IqData createErrorResponse(IqView request) {
|
||||
return createResponse(request, IQ.ResponseType.error);
|
||||
}
|
||||
|
|
|
@ -46,4 +46,12 @@ public final class IqData extends AbstractIqBuilder<IqData> {
|
|||
public Stanza build() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public static IqData createResponseData(IqView request) {
|
||||
return createResponse(request, IQ.ResponseType.result);
|
||||
}
|
||||
|
||||
public static IqData createErrorResponseDAta(IqView request) {
|
||||
return createResponse(request, IQ.ResponseType.error);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue