001/*
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: DSEvent.java,v 1.4 2009/01/28 05:34:49 ww203982 Exp $
026 *
027 * Portions Copyrighted 2015 ForgeRock AS.
028 */
029
030package com.iplanet.services.ldap.event;
031
032import org.forgerock.openam.ldap.PersistentSearchChangeType;
033
034/**
035 * @supported.api
036 */
037public class DSEvent {
038
039    private int _eventType;
040
041    private String _searchId;
042
043    private String _id;
044
045    private String _className;
046
047    public static final int OBJECT_ADDED = PersistentSearchChangeType.ADDED;
048
049    public static final int OBJECT_REMOVED = PersistentSearchChangeType.REMOVED;
050
051    public static final int OBJECT_RENAMED = PersistentSearchChangeType.RENAMED;
052
053    public static final int OBJECT_CHANGED = PersistentSearchChangeType.MODIFIED;
054
055    /**
056     * Default constructor
057     */
058    DSEvent() {
059
060    }
061
062    /**
063     * 
064     */
065    void setEventType(int eventType) {
066        this._eventType = eventType;
067    }
068
069    /**
070     * Returns the type of change event either add, modify, delete, etc.
071     * 
072     * @supported.api
073     */
074    public int getEventType() {
075        return _eventType;
076    }
077
078    /**
079     * 
080     */
081    void setID(String id) {
082        this._id = id;
083    }
084
085    /**
086     * Return the Directory Server ID assigned to the entry changed
087     * 
088     * @supported.api
089     */
090    public String getID() {
091        return _id;
092    }
093
094    /**
095     * 
096     */
097    void setClassName(String className) {
098        this._className = className;
099    }
100
101    /**
102     * Returns the Directory Server class name for the given entry
103     * 
104     * @supported.api
105     */
106    public String getClassName() {
107        return _className;
108    }
109
110    /**
111     * 
112     */
113    void setSearchID(String id) {
114        this._searchId = id;
115    }
116
117    /**
118     * Returns the Directory Server search ID that was assigned when the
119     * persistent search was first submited. 
120     * @supported.api
121     */
122    public String getSearchID() {
123        return _searchId;
124    }
125}