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 org.forgerock.opendj.config.server.ConfigException; 021import org.forgerock.opendj.config.server.ConfigurationAddListener; 022import org.forgerock.opendj.config.server.ConfigurationChangeListener; 023import org.forgerock.opendj.config.server.ConfigurationDeleteListener; 024import org.forgerock.opendj.server.config.meta.AccessLogPublisherCfgDefn.FilteringPolicy; 025 026 027 028/** 029 * A server-side interface for querying Access Log Publisher settings. 030 * <p> 031 * Access Log Publishers are responsible for distributing access log 032 * messages from the access logger to a destination. 033 */ 034public interface AccessLogPublisherCfg extends LogPublisherCfg { 035 036 /** 037 * Gets the configuration class associated with this Access Log Publisher. 038 * 039 * @return Returns the configuration class associated with this Access Log Publisher. 040 */ 041 Class<? extends AccessLogPublisherCfg> configurationClass(); 042 043 044 045 /** 046 * Register to be notified when this Access Log Publisher is changed. 047 * 048 * @param listener 049 * The Access Log Publisher configuration change listener. 050 */ 051 void addAccessChangeListener(ConfigurationChangeListener<AccessLogPublisherCfg> listener); 052 053 054 055 /** 056 * Deregister an existing Access Log Publisher configuration change listener. 057 * 058 * @param listener 059 * The Access Log Publisher configuration change listener. 060 */ 061 void removeAccessChangeListener(ConfigurationChangeListener<AccessLogPublisherCfg> listener); 062 063 064 065 /** 066 * Gets the "filtering-policy" property. 067 * <p> 068 * Specifies how filtering criteria should be applied to log 069 * records. 070 * 071 * @return Returns the value of the "filtering-policy" property. 072 */ 073 FilteringPolicy getFilteringPolicy(); 074 075 076 077 /** 078 * Gets the "java-class" property. 079 * <p> 080 * The fully-qualified name of the Java class that provides the 081 * Access Log Publisher implementation. 082 * 083 * @return Returns the value of the "java-class" property. 084 */ 085 String getJavaClass(); 086 087 088 089 /** 090 * Gets the "suppress-internal-operations" property. 091 * <p> 092 * Indicates whether internal operations (for example, operations 093 * that are initiated by plugins) should be logged along with the 094 * operations that are requested by users. 095 * 096 * @return Returns the value of the "suppress-internal-operations" property. 097 */ 098 boolean isSuppressInternalOperations(); 099 100 101 102 /** 103 * Gets the "suppress-synchronization-operations" property. 104 * <p> 105 * Indicates whether access messages that are generated by 106 * synchronization operations should be suppressed. 107 * 108 * @return Returns the value of the "suppress-synchronization-operations" property. 109 */ 110 boolean isSuppressSynchronizationOperations(); 111 112 113 114 /** 115 * Lists the Access Log Filtering Criteria. 116 * 117 * @return Returns an array containing the names of the 118 * Access Log Filtering Criteria. 119 */ 120 String[] listAccessLogFilteringCriteria(); 121 122 123 124 /** 125 * Gets the named Access Log Filtering Criteria. 126 * 127 * @param name 128 * The name of the Access Log Filtering Criteria to retrieve. 129 * @return Returns the named Access Log Filtering Criteria. 130 * @throws ConfigException 131 * If the Access Log Filtering Criteria could not be found or it 132 * could not be successfully decoded. 133 */ 134 AccessLogFilteringCriteriaCfg getAccessLogFilteringCriteria(String name) throws ConfigException; 135 136 137 138 /** 139 * Registers to be notified when new Access Log Filtering Criteria are added. 140 * 141 * @param listener 142 * The Access Log Filtering Criteria configuration add listener. 143 * @throws ConfigException 144 * If the add listener could not be registered. 145 */ 146 void addAccessLogFilteringCriteriaAddListener(ConfigurationAddListener<AccessLogFilteringCriteriaCfg> listener) throws ConfigException; 147 148 149 150 /** 151 * Deregisters an existing Access Log Filtering Criteria configuration add listener. 152 * 153 * @param listener 154 * The Access Log Filtering Criteria configuration add listener. 155 */ 156 void removeAccessLogFilteringCriteriaAddListener(ConfigurationAddListener<AccessLogFilteringCriteriaCfg> listener); 157 158 159 160 /** 161 * Registers to be notified when existing Access Log Filtering Criteria are deleted. 162 * 163 * @param listener 164 * The Access Log Filtering Criteria configuration delete listener. 165 * @throws ConfigException 166 * If the delete listener could not be registered. 167 */ 168 void addAccessLogFilteringCriteriaDeleteListener(ConfigurationDeleteListener<AccessLogFilteringCriteriaCfg> listener) throws ConfigException; 169 170 171 172 /** 173 * Deregisters an existing Access Log Filtering Criteria configuration delete listener. 174 * 175 * @param listener 176 * The Access Log Filtering Criteria configuration delete listener. 177 */ 178 void removeAccessLogFilteringCriteriaDeleteListener(ConfigurationDeleteListener<AccessLogFilteringCriteriaCfg> listener); 179 180}