mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +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);
|
super(stanzaId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Deprecate and use corresponding method in IqData instead.
|
||||||
public static IqData createResponse(IqView request) {
|
public static IqData createResponse(IqView request) {
|
||||||
return createResponse(request, IQ.ResponseType.result);
|
return createResponse(request, IQ.ResponseType.result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Deprecate and use corresponding method in IqData instead.
|
||||||
public static IqData createErrorResponse(IqView request) {
|
public static IqData createErrorResponse(IqView request) {
|
||||||
return createResponse(request, IQ.ResponseType.error);
|
return createResponse(request, IQ.ResponseType.error);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,4 +46,12 @@ public final class IqData extends AbstractIqBuilder<IqData> {
|
||||||
public Stanza build() {
|
public Stanza build() {
|
||||||
throw new UnsupportedOperationException();
|
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