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.backends; 018 019import java.util.ArrayList; 020import java.util.List; 021 022import org.forgerock.util.Reject; 023import org.forgerock.opendj.ldap.DN; 024 025/** 026 * This class represents the configuration of a JE backend verification process. 027 */ 028public class VerifyConfig 029{ 030 /** The base DN to be verified. */ 031 private DN baseDN; 032 /** The names of indexes to be verified for completeness. */ 033 private ArrayList<String> completeList = new ArrayList<>(); 034 /** The names of indexes to be verified for cleanliness. */ 035 private ArrayList<String> cleanList = new ArrayList<>(); 036 037 /** 038 * Get the base DN to be verified. 039 * @return The base DN to be verified. 040 */ 041 public DN getBaseDN() 042 { 043 return baseDN; 044 } 045 046 /** 047 * Set the base DN to be verified. 048 * @param baseDN The base DN to be verified. 049 */ 050 public void setBaseDN(DN baseDN) 051 { 052 this.baseDN = baseDN; 053 } 054 055 /** 056 * Get the names of indexes to be verified for completeness. 057 * @return The names of indexes to be verified for completeness. 058 */ 059 public List<String> getCompleteList() 060 { 061 return completeList; 062 } 063 064 /** 065 * Add the name of an index to those indexes to be verified for completeness. 066 * @param index The name of an index to be verified for completeness. 067 */ 068 public void addCompleteIndex(String index) 069 { 070 Reject.ifNull(index); 071 completeList.add(index); 072 } 073 074 /** 075 * Get the names of indexes to be verified for cleanliness. 076 * @return The names of indexes to be verified for cleanliness. 077 */ 078 public List<String> getCleanList() 079 { 080 return cleanList; 081 } 082 083 /** 084 * Add the name of an index to those indexes to be verified for cleanliness. 085 * @param index The name of an index to be verified for cleanliness. 086 */ 087 public void addCleanIndex(String index) 088 { 089 Reject.ifNull(index); 090 cleanList.add(index); 091 } 092}