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.ConfigurationClient; 023import org.forgerock.opendj.config.ManagedObjectDefinition; 024import org.forgerock.opendj.config.PropertyException; 025import org.forgerock.opendj.server.config.meta.PluginCfgDefn.PluginType; 026import org.forgerock.opendj.server.config.server.PluginCfg; 027 028 029 030/** 031 * A client-side interface for reading and modifying Plugin settings. 032 * <p> 033 * Plugins provide a mechanism for executing custom code at specified 034 * points in operation processing and in the course of other events 035 * like connection establishment and termination, server startup and 036 * shutdown, and LDIF import and export. 037 */ 038public interface PluginCfgClient extends ConfigurationClient { 039 040 /** 041 * Get the configuration definition associated with this Plugin. 042 * 043 * @return Returns the configuration definition associated with this Plugin. 044 */ 045 ManagedObjectDefinition<? extends PluginCfgClient, ? extends PluginCfg> definition(); 046 047 048 049 /** 050 * Gets the "enabled" property. 051 * <p> 052 * Indicates whether the plug-in is enabled for use. 053 * 054 * @return Returns the value of the "enabled" property. 055 */ 056 Boolean isEnabled(); 057 058 059 060 /** 061 * Sets the "enabled" property. 062 * <p> 063 * Indicates whether the plug-in is enabled for use. 064 * 065 * @param value The value of the "enabled" property. 066 * @throws PropertyException 067 * If the new value is invalid. 068 */ 069 void setEnabled(boolean value) throws PropertyException; 070 071 072 073 /** 074 * Gets the "invoke-for-internal-operations" property. 075 * <p> 076 * Indicates whether the plug-in should be invoked for internal 077 * operations. 078 * <p> 079 * Any plug-in that can be invoked for internal operations must 080 * ensure that it does not create any new internal operatons that can 081 * cause the same plug-in to be re-invoked. 082 * 083 * @return Returns the value of the "invoke-for-internal-operations" property. 084 */ 085 boolean isInvokeForInternalOperations(); 086 087 088 089 /** 090 * Sets the "invoke-for-internal-operations" property. 091 * <p> 092 * Indicates whether the plug-in should be invoked for internal 093 * operations. 094 * <p> 095 * Any plug-in that can be invoked for internal operations must 096 * ensure that it does not create any new internal operatons that can 097 * cause the same plug-in to be re-invoked. 098 * 099 * @param value The value of the "invoke-for-internal-operations" property. 100 * @throws PropertyException 101 * If the new value is invalid. 102 */ 103 void setInvokeForInternalOperations(Boolean value) throws PropertyException; 104 105 106 107 /** 108 * Gets the "java-class" property. 109 * <p> 110 * Specifies the fully-qualified name of the Java class that 111 * provides the plug-in implementation. 112 * 113 * @return Returns the value of the "java-class" property. 114 */ 115 String getJavaClass(); 116 117 118 119 /** 120 * Sets the "java-class" property. 121 * <p> 122 * Specifies the fully-qualified name of the Java class that 123 * provides the plug-in implementation. 124 * 125 * @param value The value of the "java-class" property. 126 * @throws PropertyException 127 * If the new value is invalid. 128 */ 129 void setJavaClass(String value) throws PropertyException; 130 131 132 133 /** 134 * Gets the "plugin-type" property. 135 * <p> 136 * Specifies the set of plug-in types for the plug-in, which 137 * specifies the times at which the plug-in is invoked. 138 * 139 * @return Returns the values of the "plugin-type" property. 140 */ 141 SortedSet<PluginType> getPluginType(); 142 143 144 145 /** 146 * Sets the "plugin-type" property. 147 * <p> 148 * Specifies the set of plug-in types for the plug-in, which 149 * specifies the times at which the plug-in is invoked. 150 * 151 * @param values The values of the "plugin-type" property. 152 * @throws PropertyException 153 * If one or more of the new values are invalid. 154 */ 155 void setPluginType(Collection<PluginType> values) throws PropertyException; 156 157}