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.opends.server.admin.std.client; 017 018 019 020import java.util.Collection; 021import org.opends.server.admin.client.AuthorizationException; 022import org.opends.server.admin.client.CommunicationException; 023import org.opends.server.admin.client.ConcurrentModificationException; 024import org.opends.server.admin.client.IllegalManagedObjectNameException; 025import org.opends.server.admin.client.ManagedObjectDecodingException; 026import org.opends.server.admin.client.OperationRejectedException; 027import org.opends.server.admin.DefinitionDecodingException; 028import org.opends.server.admin.ManagedObjectDefinition; 029import org.opends.server.admin.ManagedObjectNotFoundException; 030import org.opends.server.admin.PropertyException; 031import org.opends.server.admin.std.meta.AccessLogPublisherCfgDefn.FilteringPolicy; 032import org.opends.server.admin.std.server.AccessLogFilteringCriteriaCfg; 033import org.opends.server.admin.std.server.AccessLogPublisherCfg; 034 035 036 037/** 038 * A client-side interface for reading and modifying Access Log 039 * Publisher settings. 040 * <p> 041 * Access Log Publishers are responsible for distributing access log 042 * messages from the access logger to a destination. 043 */ 044public interface AccessLogPublisherCfgClient extends LogPublisherCfgClient { 045 046 /** 047 * Get the configuration definition associated with this Access Log Publisher. 048 * 049 * @return Returns the configuration definition associated with this Access Log Publisher. 050 */ 051 ManagedObjectDefinition<? extends AccessLogPublisherCfgClient, ? extends AccessLogPublisherCfg> definition(); 052 053 054 055 /** 056 * Gets the "filtering-policy" property. 057 * <p> 058 * Specifies how filtering criteria should be applied to log 059 * records. 060 * 061 * @return Returns the value of the "filtering-policy" property. 062 */ 063 FilteringPolicy getFilteringPolicy(); 064 065 066 067 /** 068 * Sets the "filtering-policy" property. 069 * <p> 070 * Specifies how filtering criteria should be applied to log 071 * records. 072 * 073 * @param value The value of the "filtering-policy" property. 074 * @throws PropertyException 075 * If the new value is invalid. 076 */ 077 void setFilteringPolicy(FilteringPolicy value) throws PropertyException; 078 079 080 081 /** 082 * Gets the "java-class" property. 083 * <p> 084 * The fully-qualified name of the Java class that provides the 085 * Access Log Publisher implementation. 086 * 087 * @return Returns the value of the "java-class" property. 088 */ 089 String getJavaClass(); 090 091 092 093 /** 094 * Sets the "java-class" property. 095 * <p> 096 * The fully-qualified name of the Java class that provides the 097 * Access Log Publisher implementation. 098 * 099 * @param value The value of the "java-class" property. 100 * @throws PropertyException 101 * If the new value is invalid. 102 */ 103 void setJavaClass(String value) throws PropertyException; 104 105 106 107 /** 108 * Gets the "suppress-internal-operations" property. 109 * <p> 110 * Indicates whether internal operations (for example, operations 111 * that are initiated by plugins) should be logged along with the 112 * operations that are requested by users. 113 * 114 * @return Returns the value of the "suppress-internal-operations" property. 115 */ 116 boolean isSuppressInternalOperations(); 117 118 119 120 /** 121 * Sets the "suppress-internal-operations" property. 122 * <p> 123 * Indicates whether internal operations (for example, operations 124 * that are initiated by plugins) should be logged along with the 125 * operations that are requested by users. 126 * 127 * @param value The value of the "suppress-internal-operations" property. 128 * @throws PropertyException 129 * If the new value is invalid. 130 */ 131 void setSuppressInternalOperations(Boolean value) throws PropertyException; 132 133 134 135 /** 136 * Gets the "suppress-synchronization-operations" property. 137 * <p> 138 * Indicates whether access messages that are generated by 139 * synchronization operations should be suppressed. 140 * 141 * @return Returns the value of the "suppress-synchronization-operations" property. 142 */ 143 boolean isSuppressSynchronizationOperations(); 144 145 146 147 /** 148 * Sets the "suppress-synchronization-operations" property. 149 * <p> 150 * Indicates whether access messages that are generated by 151 * synchronization operations should be suppressed. 152 * 153 * @param value The value of the "suppress-synchronization-operations" property. 154 * @throws PropertyException 155 * If the new value is invalid. 156 */ 157 void setSuppressSynchronizationOperations(Boolean value) throws PropertyException; 158 159 160 161 /** 162 * Lists the Access Log Filtering Criteria. 163 * 164 * @return Returns an array containing the names of the Access Log 165 * Filtering Criteria. 166 * @throws ConcurrentModificationException 167 * If this Access Log Publisher has been removed from the 168 * server by another client. 169 * @throws AuthorizationException 170 * If the server refuses to list the Access Log Filtering 171 * Criteria because the client does not have the correct 172 * privileges. 173 * @throws CommunicationException 174 * If the client cannot contact the server due to an 175 * underlying communication problem. 176 */ 177 String[] listAccessLogFilteringCriteria() throws ConcurrentModificationException, 178 AuthorizationException, CommunicationException; 179 180 181 182 /** 183 * Gets the named Access Log Filtering Criteria. 184 * 185 * @param name 186 * The name of the Access Log Filtering Criteria to 187 * retrieve. 188 * @return Returns the named Access Log Filtering Criteria. 189 * @throws DefinitionDecodingException 190 * If the named Access Log Filtering Criteria was found 191 * but its type could not be determined. 192 * @throws ManagedObjectDecodingException 193 * If the named Access Log Filtering Criteria was found 194 * but one or more of its properties could not be decoded. 195 * @throws ManagedObjectNotFoundException 196 * If the named Access Log Filtering Criteria was not 197 * found on the server. 198 * @throws ConcurrentModificationException 199 * If this Access Log Publisher has been removed from the 200 * server by another client. 201 * @throws AuthorizationException 202 * If the server refuses to retrieve the named Access Log 203 * Filtering Criteria because the client does not have the 204 * correct privileges. 205 * @throws CommunicationException 206 * If the client cannot contact the server due to an 207 * underlying communication problem. 208 */ 209 AccessLogFilteringCriteriaCfgClient getAccessLogFilteringCriteria(String name) 210 throws DefinitionDecodingException, ManagedObjectDecodingException, 211 ManagedObjectNotFoundException, ConcurrentModificationException, 212 AuthorizationException, CommunicationException; 213 214 215 216 /** 217 * Creates a new Access Log Filtering Criteria. The new Access Log 218 * Filtering Criteria will initially not contain any property values 219 * (including mandatory properties). Once the Access Log Filtering 220 * Criteria has been configured it can be added to the server using 221 * the {@link #commit()} method. 222 * 223 * @param <C> 224 * The type of the Access Log Filtering Criteria being 225 * created. 226 * @param d 227 * The definition of the Access Log Filtering Criteria to 228 * be created. 229 * @param name 230 * The name of the new Access Log Filtering Criteria. 231 * @param exceptions 232 * An optional collection in which to place any {@link 233 * PropertyException}s that occurred whilst attempting to 234 * determine the default values of the Access Log Filtering 235 * Criteria. This argument can be <code>null<code>. 236 * @return Returns a new Access Log Filtering Criteria configuration 237 * instance. 238 * @throws IllegalManagedObjectNameException 239 * If the name of the new Access Log Filtering Criteria is 240 * invalid. 241 */ 242 <C extends AccessLogFilteringCriteriaCfgClient> C createAccessLogFilteringCriteria( 243 ManagedObjectDefinition<C, ? extends AccessLogFilteringCriteriaCfg> d, String name, Collection<PropertyException> exceptions) throws IllegalManagedObjectNameException; 244 245 246 247 /** 248 * Removes the named Access Log Filtering Criteria. 249 * 250 * @param name 251 * The name of the Access Log Filtering Criteria to remove. 252 * @throws ManagedObjectNotFoundException 253 * If the Access Log Filtering Criteria does not exist. 254 * @throws OperationRejectedException 255 * If the server refuses to remove the Access Log 256 * Filtering Criteria due to some server-side constraint 257 * which cannot be satisfied (for example, if it is 258 * referenced by another managed object). 259 * @throws ConcurrentModificationException 260 * If this Access Log Publisher has been removed from the 261 * server by another client. 262 * @throws AuthorizationException 263 * If the server refuses to remove the Access Log 264 * Filtering Criteria because the client does not have the 265 * correct privileges. 266 * @throws CommunicationException 267 * If the client cannot contact the server due to an 268 * underlying communication problem. 269 */ 270 void removeAccessLogFilteringCriteria(String name) 271 throws ManagedObjectNotFoundException, OperationRejectedException, 272 ConcurrentModificationException, AuthorizationException, 273 CommunicationException; 274 275}