summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/group/GroupNotFoundException.java
blob: 3bd9241b69dfe62b21761638457b9a545937ce93 (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
package com.netscape.certsrv.group;

import com.netscape.certsrv.base.ResourceNotFoundException;

public class GroupNotFoundException extends ResourceNotFoundException {

    private static final long serialVersionUID = 2283994502912462263L;
    public String groupId;

    public GroupNotFoundException(String groupId) {
        this(groupId, "Group " + groupId + " not found");
    }

    public GroupNotFoundException(String groupId, String message) {
        super(message);
        this.groupId = groupId;
    }

    public GroupNotFoundException(String groupId, String message, Throwable cause) {
        super(message, cause);
        this.groupId = groupId;
    }

    public GroupNotFoundException(Data data) {
        super(data);
        groupId = data.getAttribute("groupId");
    }

    public Data getData() {
        Data data = super.getData();
        data.setAttribute("groupId", groupId);
        return data;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }
}