summaryrefslogtreecommitdiffstats
blob: cd6aadfe9a714620de48353ce78f951fe79e94ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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_;
}