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 2008 Sun Microsystems, Inc. 015 */ 016package org.forgerock.opendj.server.config.server; 017 018 019 020import java.util.SortedSet; 021import org.forgerock.opendj.config.server.ConfigurationChangeListener; 022import org.forgerock.opendj.ldap.schema.AttributeType; 023import org.forgerock.opendj.server.config.meta.EntityTagVirtualAttributeCfgDefn.ChecksumAlgorithm; 024import org.forgerock.opendj.server.config.meta.VirtualAttributeCfgDefn.ConflictBehavior; 025 026 027 028/** 029 * A server-side interface for querying Entity Tag Virtual Attribute 030 * settings. 031 * <p> 032 * The Entity Tag Virtual Attribute ensures that all entries contain 033 * an "entity tag" or "Etag" as defined in section 3.11 of RFC 2616. 034 */ 035public interface EntityTagVirtualAttributeCfg extends VirtualAttributeCfg { 036 037 /** 038 * Gets the configuration class associated with this Entity Tag Virtual Attribute. 039 * 040 * @return Returns the configuration class associated with this Entity Tag Virtual Attribute. 041 */ 042 Class<? extends EntityTagVirtualAttributeCfg> configurationClass(); 043 044 045 046 /** 047 * Register to be notified when this Entity Tag Virtual Attribute is changed. 048 * 049 * @param listener 050 * The Entity Tag Virtual Attribute configuration change listener. 051 */ 052 void addEntityTagChangeListener(ConfigurationChangeListener<EntityTagVirtualAttributeCfg> listener); 053 054 055 056 /** 057 * Deregister an existing Entity Tag Virtual Attribute configuration change listener. 058 * 059 * @param listener 060 * The Entity Tag Virtual Attribute configuration change listener. 061 */ 062 void removeEntityTagChangeListener(ConfigurationChangeListener<EntityTagVirtualAttributeCfg> listener); 063 064 065 066 /** 067 * Gets the "attribute-type" property. 068 * <p> 069 * Specifies the attribute type for the attribute whose values are 070 * to be dynamically assigned by the virtual attribute. 071 * 072 * @return Returns the value of the "attribute-type" property. 073 */ 074 AttributeType getAttributeType(); 075 076 077 078 /** 079 * Gets the "checksum-algorithm" property. 080 * <p> 081 * The algorithm which should be used for calculating the entity tag 082 * checksum value. 083 * 084 * @return Returns the value of the "checksum-algorithm" property. 085 */ 086 ChecksumAlgorithm getChecksumAlgorithm(); 087 088 089 090 /** 091 * Gets the "conflict-behavior" property. 092 * <p> 093 * Specifies the behavior that the server is to exhibit for entries 094 * that already contain one or more real values for the associated 095 * attribute. 096 * 097 * @return Returns the value of the "conflict-behavior" property. 098 */ 099 ConflictBehavior getConflictBehavior(); 100 101 102 103 /** 104 * Gets the "excluded-attribute" property. 105 * <p> 106 * The list of attributes which should be ignored when calculating 107 * the entity tag checksum value. 108 * <p> 109 * Certain attributes like "ds-sync-hist" may vary between replicas 110 * due to different purging schedules and should not be included in 111 * the checksum. 112 * 113 * @return Returns an unmodifiable set containing the values of the "excluded-attribute" property. 114 */ 115 SortedSet<AttributeType> getExcludedAttribute(); 116 117 118 119 /** 120 * Gets the "java-class" property. 121 * <p> 122 * Specifies the fully-qualified name of the virtual attribute 123 * provider class that generates the attribute values. 124 * 125 * @return Returns the value of the "java-class" property. 126 */ 127 String getJavaClass(); 128 129}