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.server;
028    
029    
030    
031    import java.util.SortedSet;
032    import org.opends.server.admin.Configuration;
033    import org.opends.server.admin.server.ConfigurationChangeListener;
034    import org.opends.server.types.DN;
035    
036    
037    
038    /**
039     * A server-side interface for querying Network Group settings.
040     * <p>
041     * The Network Group is used to classify incoming connections and
042     * route requests to workflows.
043     */
044    public interface NetworkGroupCfg extends Configuration {
045    
046      /**
047       * Gets the configuration class associated with this Network Group.
048       *
049       * @return Returns the configuration class associated with this Network Group.
050       */
051      Class<? extends NetworkGroupCfg> configurationClass();
052    
053    
054    
055      /**
056       * Register to be notified when this Network Group is changed.
057       *
058       * @param listener
059       *          The Network Group configuration change listener.
060       */
061      void addChangeListener(ConfigurationChangeListener<NetworkGroupCfg> listener);
062    
063    
064    
065      /**
066       * Deregister an existing Network Group configuration change listener.
067       *
068       * @param listener
069       *          The Network Group configuration change listener.
070       */
071      void removeChangeListener(ConfigurationChangeListener<NetworkGroupCfg> listener);
072    
073    
074    
075      /**
076       * Gets the "enabled" property.
077       * <p>
078       * Indicates whether the Network Group is enabled for use in the
079       * server.
080       * <p>
081       * If a network group is not enabled, its workflows will not be
082       * accessible when processing operations.
083       *
084       * @return Returns the value of the "enabled" property.
085       */
086      boolean isEnabled();
087    
088    
089    
090      /**
091       * Gets the "network-group-id" property.
092       * <p>
093       * Specifies the name that is used to identify the associated
094       * Network Group .
095       * <p>
096       * The name must be unique among all the Network Groups in the
097       * server.
098       *
099       * @return Returns the value of the "network-group-id" property.
100       */
101      String getNetworkGroupId();
102    
103    
104    
105      /**
106       * Gets the "workflow" property.
107       * <p>
108       * Identifies the workflows in the network group.
109       *
110       * @return Returns an unmodifiable set containing the values of the "workflow" property.
111       */
112      SortedSet<String> getWorkflow();
113    
114    
115    
116      /**
117       * Gets the "workflow" property as a set of DNs.
118       * <p>
119       * Identifies the workflows in the network group.
120       *
121       * @return Returns the DN values of the "workflow" property.
122       */
123      SortedSet<DN> getWorkflowDNs();
124    
125    }