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