summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/isode/stroke/elements/PubSubError.java')
-rw-r--r--src/com/isode/stroke/elements/PubSubError.java108
1 files changed, 108 insertions, 0 deletions
diff --git a/src/com/isode/stroke/elements/PubSubError.java b/src/com/isode/stroke/elements/PubSubError.java
new file mode 100644
index 0000000..cd6aadf
--- /dev/null
+++ b/src/com/isode/stroke/elements/PubSubError.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2014, Isode Limited, London, England.
+ * All rights reserved.
+ */
+/*
+ * Copyright (c) 2014, Remko Tronçon.
+ * All rights reserved.
+ */
+
+package com.isode.stroke.elements;
+
+public class PubSubError extends Payload {
+ public enum Type {
+ UnknownType,
+ ClosedNode,
+ ConfigurationRequired,
+ InvalidJID,
+ InvalidOptions,
+ InvalidPayload,
+ InvalidSubscriptionID,
+ ItemForbidden,
+ ItemRequired,
+ JIDRequired,
+ MaximumItemsExceeded,
+ MaximumNodesExceeded,
+ NodeIDRequired,
+ NotInRosterGroup,
+ NotSubscribed,
+ PayloadTooBig,
+ PayloadRequired,
+ PendingSubscription,
+ PresenceSubscriptionRequired,
+ SubscriptionIDRequired,
+ TooManySubscriptions,
+ Unsupported,
+ UnsupportedAccessModel
+ };
+
+ public enum UnsupportedFeatureType {
+ UnknownUnsupportedFeatureType,
+ AccessAuthorize,
+ AccessOpen,
+ AccessPresence,
+ AccessRoster,
+ AccessWhitelist,
+ AutoCreate,
+ AutoSubscribe,
+ Collections,
+ ConfigNode,
+ CreateAndConfigure,
+ CreateNodes,
+ DeleteItems,
+ DeleteNodes,
+ FilteredNotifications,
+ GetPending,
+ InstantNodes,
+ ItemIDs,
+ LastPublished,
+ LeasedSubscription,
+ ManageSubscriptions,
+ MemberAffiliation,
+ MetaData,
+ ModifyAffiliations,
+ MultiCollection,
+ MultiSubscribe,
+ OutcastAffiliation,
+ PersistentItems,
+ PresenceNotifications,
+ PresenceSubscribe,
+ Publish,
+ PublishOptions,
+ PublishOnlyAffiliation,
+ PublisherAffiliation,
+ PurgeNodes,
+ RetractItems,
+ RetrieveAffiliations,
+ RetrieveDefault,
+ RetrieveItems,
+ RetrieveSubscriptions,
+ Subscribe,
+ SubscriptionOptions,
+ SubscriptionNotifications
+ };
+
+ public PubSubError(Type type) {
+ type_ = Type.UnknownType;
+ unsupportedType_ = UnsupportedFeatureType.UnknownUnsupportedFeatureType;
+ }
+
+ public Type getType() {
+ return type_;
+ }
+
+ public void setType(Type type) {
+ type_ = type;
+ }
+
+ public UnsupportedFeatureType getUnsupportedFeatureType() {
+ return unsupportedType_;
+ }
+
+ public void setUnsupportedFeatureType(UnsupportedFeatureType unsupportedType) {
+ unsupportedType_ = unsupportedType;
+ }
+
+ Type type_;
+ UnsupportedFeatureType unsupportedType_;
+}