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.client; 017 018 019 020import java.util.Collection; 021import java.util.SortedSet; 022import org.forgerock.opendj.config.ManagedObjectDefinition; 023import org.forgerock.opendj.config.PropertyException; 024import org.forgerock.opendj.ldap.schema.AttributeType; 025import org.forgerock.opendj.server.config.meta.EntityTagVirtualAttributeCfgDefn.ChecksumAlgorithm; 026import org.forgerock.opendj.server.config.meta.VirtualAttributeCfgDefn.ConflictBehavior; 027import org.forgerock.opendj.server.config.server.EntityTagVirtualAttributeCfg; 028 029 030 031/** 032 * A client-side interface for reading and modifying Entity Tag 033 * Virtual Attribute settings. 034 * <p> 035 * The Entity Tag Virtual Attribute ensures that all entries contain 036 * an "entity tag" or "Etag" as defined in section 3.11 of RFC 2616. 037 */ 038public interface EntityTagVirtualAttributeCfgClient extends VirtualAttributeCfgClient { 039 040 /** 041 * Get the configuration definition associated with this Entity Tag Virtual Attribute. 042 * 043 * @return Returns the configuration definition associated with this Entity Tag Virtual Attribute. 044 */ 045 ManagedObjectDefinition<? extends EntityTagVirtualAttributeCfgClient, ? extends EntityTagVirtualAttributeCfg> definition(); 046 047 048 049 /** 050 * Gets the "attribute-type" property. 051 * <p> 052 * Specifies the attribute type for the attribute whose values are 053 * to be dynamically assigned by the virtual attribute. 054 * 055 * @return Returns the value of the "attribute-type" property. 056 */ 057 AttributeType getAttributeType(); 058 059 060 061 /** 062 * Sets the "attribute-type" property. 063 * <p> 064 * Specifies the attribute type for the attribute whose values are 065 * to be dynamically assigned by the virtual attribute. 066 * 067 * @param value The value of the "attribute-type" property. 068 * @throws PropertyException 069 * If the new value is invalid. 070 */ 071 void setAttributeType(AttributeType value) throws PropertyException; 072 073 074 075 /** 076 * Gets the "checksum-algorithm" property. 077 * <p> 078 * The algorithm which should be used for calculating the entity tag 079 * checksum value. 080 * 081 * @return Returns the value of the "checksum-algorithm" property. 082 */ 083 ChecksumAlgorithm getChecksumAlgorithm(); 084 085 086 087 /** 088 * Sets the "checksum-algorithm" property. 089 * <p> 090 * The algorithm which should be used for calculating the entity tag 091 * checksum value. 092 * 093 * @param value The value of the "checksum-algorithm" property. 094 * @throws PropertyException 095 * If the new value is invalid. 096 */ 097 void setChecksumAlgorithm(ChecksumAlgorithm value) throws PropertyException; 098 099 100 101 /** 102 * Gets the "conflict-behavior" property. 103 * <p> 104 * Specifies the behavior that the server is to exhibit for entries 105 * that already contain one or more real values for the associated 106 * attribute. 107 * 108 * @return Returns the value of the "conflict-behavior" property. 109 */ 110 ConflictBehavior getConflictBehavior(); 111 112 113 114 /** 115 * Sets the "conflict-behavior" property. 116 * <p> 117 * Specifies the behavior that the server is to exhibit for entries 118 * that already contain one or more real values for the associated 119 * attribute. 120 * 121 * @param value The value of the "conflict-behavior" property. 122 * @throws PropertyException 123 * If the new value is invalid. 124 */ 125 void setConflictBehavior(ConflictBehavior value) throws PropertyException; 126 127 128 129 /** 130 * Gets the "excluded-attribute" property. 131 * <p> 132 * The list of attributes which should be ignored when calculating 133 * the entity tag checksum value. 134 * <p> 135 * Certain attributes like "ds-sync-hist" may vary between replicas 136 * due to different purging schedules and should not be included in 137 * the checksum. 138 * 139 * @return Returns the values of the "excluded-attribute" property. 140 */ 141 SortedSet<AttributeType> getExcludedAttribute(); 142 143 144 145 /** 146 * Sets the "excluded-attribute" property. 147 * <p> 148 * The list of attributes which should be ignored when calculating 149 * the entity tag checksum value. 150 * <p> 151 * Certain attributes like "ds-sync-hist" may vary between replicas 152 * due to different purging schedules and should not be included in 153 * the checksum. 154 * 155 * @param values The values of the "excluded-attribute" property. 156 * @throws PropertyException 157 * If one or more of the new values are invalid. 158 */ 159 void setExcludedAttribute(Collection<AttributeType> values) throws PropertyException; 160 161 162 163 /** 164 * Gets the "java-class" property. 165 * <p> 166 * Specifies the fully-qualified name of the virtual attribute 167 * provider class that generates the attribute values. 168 * 169 * @return Returns the value of the "java-class" property. 170 */ 171 String getJavaClass(); 172 173 174 175 /** 176 * Sets the "java-class" property. 177 * <p> 178 * Specifies the fully-qualified name of the virtual attribute 179 * provider class that generates the attribute values. 180 * 181 * @param value The value of the "java-class" property. 182 * @throws PropertyException 183 * If the new value is invalid. 184 */ 185 void setJavaClass(String value) throws PropertyException; 186 187}