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 */ 028 029package com.iplanet.services.ldap.event; 030 031import com.sun.identity.shared.ldap.controls.LDAPPersistSearchControl; 032 033/** 034 * @supported.api 035 */ 036public class DSEvent { 037 038 private int _eventType; 039 040 private String _searchId; 041 042 private String _id; 043 044 private String _className; 045 046 public static final int OBJECT_ADDED = LDAPPersistSearchControl.ADD; 047 048 public static final int OBJECT_REMOVED = LDAPPersistSearchControl.DELETE; 049 050 public static final int OBJECT_RENAMED = LDAPPersistSearchControl.MODDN; 051 052 public static final int OBJECT_CHANGED = LDAPPersistSearchControl.MODIFY; 053 054 /** 055 * Default constructor 056 */ 057 DSEvent() { 058 059 } 060 061 /** 062 * 063 */ 064 void setEventType(int eventType) { 065 this._eventType = eventType; 066 } 067 068 /** 069 * Returns the type of change event either add, modify, delete, etc. 070 * 071 * @supported.api 072 */ 073 public int getEventType() { 074 return _eventType; 075 } 076 077 /** 078 * 079 */ 080 void setID(String id) { 081 this._id = id; 082 } 083 084 /** 085 * Return the Directory Server ID assigned to the entry changed 086 * 087 * @supported.api 088 */ 089 public String getID() { 090 return _id; 091 } 092 093 /** 094 * 095 */ 096 void setClassName(String className) { 097 this._className = className; 098 } 099 100 /** 101 * Returns the Directory Server class name for the given entry 102 * 103 * @supported.api 104 */ 105 public String getClassName() { 106 return _className; 107 } 108 109 /** 110 * 111 */ 112 void setSearchID(String id) { 113 this._searchId = id; 114 } 115 116 /** 117 * Returns the Directory Server search ID that was assigned when the 118 * persistent search was first submited. 119 * @supported.api 120 */ 121 public String getSearchID() { 122 return _searchId; 123 } 124}