001/* 002 * The contents of this file are subject to the terms of the Common Development and 003 * Distribution License (the License). You may not use this file except in compliance with the 004 * License. 005 * 006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the 007 * specific language governing permission and limitations under the License. 008 * 009 * When distributing Covered Software, include this CDDL Header Notice in each file and include 010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL 011 * Header, with the fields enclosed by brackets [] replaced by your own identifying 012 * information: "Portions Copyright [year] [name of copyright owner]". 013 * 014 * Copyright 2006-2008 Sun Microsystems, Inc. 015 * Portions Copyright 2014-2016 ForgeRock AS. 016 */ 017package org.opends.server.util; 018 019import static org.forgerock.util.Reject.*; 020 021import org.forgerock.opendj.ldap.DN; 022 023/** 024 * This abstract class defines methods for a change record entry. It 025 * includes operations to get the DN, as well as methods to 026 * decode the entry. 027 */ 028@org.opends.server.types.PublicAPI( 029 stability=org.opends.server.types.StabilityLevel.VOLATILE, 030 mayInstantiate=false, 031 mayExtend=false, 032 mayInvoke=true) 033public abstract class ChangeRecordEntry 034{ 035 /** The DN for this entry. */ 036 private DN dn; 037 038 /** 039 * Creates a new change record entry with the provided information. 040 * 041 * @param dn The distinguished name for this change record entry. It must 042 * not be <CODE>null</CODE>. 043 */ 044 protected ChangeRecordEntry(DN dn) 045 { 046 ifNull(dn); 047 this.dn = dn; 048 } 049 050 /** 051 * Retrieves the distinguished name for this entry. 052 * 053 * @return The distinguished name for this entry. 054 */ 055 public final DN getDN() 056 { 057 return dn; 058 } 059 060 /** 061 * Retrieves the name of the change operation type. 062 * 063 * @return The name of the change operation type. 064 */ 065 public abstract ChangeOperationType getChangeOperationType(); 066 067 @Override 068 public abstract String toString(); 069}