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 */ 016 017package org.opends.server.admin; 018 019 020 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.MissingMandatoryPropertiesException; 025import org.opends.server.admin.client.OperationRejectedException; 026 027 028 029/** 030 * A common base interface for all managed object configuration 031 * clients. 032 */ 033public interface ConfigurationClient { 034 035 /** 036 * Get the configuration definition associated with this 037 * configuration. 038 * 039 * @return Returns the configuration definition associated with this 040 * configuration. 041 */ 042 ManagedObjectDefinition<? extends ConfigurationClient, 043 ? extends Configuration> definition(); 044 045 046 047 /** 048 * Get a property provider view of this configuration. 049 * 050 * @return Returns a property provider view of this configuration. 051 */ 052 PropertyProvider properties(); 053 054 055 056 /** 057 * If this is a new configuration this method will attempt to add it 058 * to the server, otherwise it will commit any changes made to this 059 * configuration. 060 * 061 * @throws ManagedObjectAlreadyExistsException 062 * If this is a new configuration but it could not be 063 * added to the server because it already exists. 064 * @throws MissingMandatoryPropertiesException 065 * If this configuration contains some mandatory 066 * properties which have been left undefined. 067 * @throws ConcurrentModificationException 068 * If this is a new configuration which is being added to 069 * the server but its parent has been removed by another 070 * client, or if this configuration is being modified but 071 * it has been removed from the server by another client. 072 * @throws OperationRejectedException 073 * If the server refuses to add or modify this 074 * configuration due to some server-side constraint which 075 * cannot be satisfied. 076 * @throws AuthorizationException 077 * If the server refuses to add or modify this 078 * configuration because the client does not have the 079 * correct privileges. 080 * @throws CommunicationException 081 * If the client cannot contact the server due to an 082 * underlying communication problem. 083 */ 084 void commit() throws ManagedObjectAlreadyExistsException, 085 MissingMandatoryPropertiesException, ConcurrentModificationException, 086 OperationRejectedException, AuthorizationException, 087 CommunicationException; 088 089}