001 /* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at 010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE 011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2008 Sun Microsystems, Inc. 026 */ 027 package org.opends.server.admin.std.client; 028 029 030 031 import java.util.Collection; 032 import java.util.SortedSet; 033 import org.opends.server.admin.ConfigurationClient; 034 import org.opends.server.admin.IllegalPropertyValueException; 035 import org.opends.server.admin.ManagedObjectDefinition; 036 import org.opends.server.admin.std.meta.PluginCfgDefn.PluginType; 037 import org.opends.server.admin.std.server.PluginCfg; 038 039 040 041 /** 042 * A client-side interface for reading and modifying Plugin settings. 043 * <p> 044 * Plugins provide a mechanism for executing custom code at specified 045 * points in operation processing and in the course of other events 046 * like connection establishment and termination, server startup and 047 * shutdown, and LDIF import and export. 048 */ 049 public interface PluginCfgClient extends ConfigurationClient { 050 051 /** 052 * Get the configuration definition associated with this Plugin. 053 * 054 * @return Returns the configuration definition associated with this Plugin. 055 */ 056 ManagedObjectDefinition<? extends PluginCfgClient, ? extends PluginCfg> definition(); 057 058 059 060 /** 061 * Gets the "enabled" property. 062 * <p> 063 * Indicates whether the plug-in is enabled for use. 064 * 065 * @return Returns the value of the "enabled" property. 066 */ 067 Boolean isEnabled(); 068 069 070 071 /** 072 * Sets the "enabled" property. 073 * <p> 074 * Indicates whether the plug-in is enabled for use. 075 * 076 * @param value The value of the "enabled" property. 077 * @throws IllegalPropertyValueException 078 * If the new value is invalid. 079 */ 080 void setEnabled(boolean value) throws IllegalPropertyValueException; 081 082 083 084 /** 085 * Gets the "invoke-for-internal-operations" property. 086 * <p> 087 * Indicates whether the plug-in should be invoked for internal 088 * operations. 089 * <p> 090 * Any plug-in that can be invoked for internal operations must 091 * ensure that it does not create any new internal operatons that can 092 * cause the same plug-in to be re-invoked. 093 * 094 * @return Returns the value of the "invoke-for-internal-operations" property. 095 */ 096 boolean isInvokeForInternalOperations(); 097 098 099 100 /** 101 * Sets the "invoke-for-internal-operations" property. 102 * <p> 103 * Indicates whether the plug-in should be invoked for internal 104 * operations. 105 * <p> 106 * Any plug-in that can be invoked for internal operations must 107 * ensure that it does not create any new internal operatons that can 108 * cause the same plug-in to be re-invoked. 109 * 110 * @param value The value of the "invoke-for-internal-operations" property. 111 * @throws IllegalPropertyValueException 112 * If the new value is invalid. 113 */ 114 void setInvokeForInternalOperations(Boolean value) throws IllegalPropertyValueException; 115 116 117 118 /** 119 * Gets the "java-class" property. 120 * <p> 121 * Specifies the fully-qualified name of the Java class that 122 * provides the plug-in implementation. 123 * 124 * @return Returns the value of the "java-class" property. 125 */ 126 String getJavaClass(); 127 128 129 130 /** 131 * Sets the "java-class" property. 132 * <p> 133 * Specifies the fully-qualified name of the Java class that 134 * provides the plug-in implementation. 135 * 136 * @param value The value of the "java-class" property. 137 * @throws IllegalPropertyValueException 138 * If the new value is invalid. 139 */ 140 void setJavaClass(String value) throws IllegalPropertyValueException; 141 142 143 144 /** 145 * Gets the "plugin-type" property. 146 * <p> 147 * Specifies the set of plug-in types for the plug-in, which 148 * specifies the times at which the plug-in is invoked. 149 * 150 * @return Returns the values of the "plugin-type" property. 151 */ 152 SortedSet<PluginType> getPluginType(); 153 154 155 156 /** 157 * Sets the "plugin-type" property. 158 * <p> 159 * Specifies the set of plug-in types for the plug-in, which 160 * specifies the times at which the plug-in is invoked. 161 * 162 * @param values The values of the "plugin-type" property. 163 * @throws IllegalPropertyValueException 164 * If one or more of the new values are invalid. 165 */ 166 void setPluginType(Collection<PluginType> values) throws IllegalPropertyValueException; 167 168 }