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