1 /**************************************************************** 2 * Licensed to the Apache Software Foundation (ASF) under one * 3 * or more contributor license agreements. See the NOTICE file * 4 * distributed with this work for additional information * 5 * regarding copyright ownership. The ASF licenses this file * 6 * to you under the Apache License, Version 2.0 (the * 7 * "License"); you may not use this file except in compliance * 8 * with the License. You may obtain a copy of the License at * 9 * * 10 * http://www.apache.org/licenses/LICENSE-2.0 * 11 * * 12 * Unless required by applicable law or agreed to in writing, * 13 * software distributed under the License is distributed on an * 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * 15 * KIND, either express or implied. See the License for the * 16 * specific language governing permissions and limitations * 17 * under the License. * 18 ****************************************************************/ 19 20 21 22 package org.apache.james.management; 23 24 import java.util.List; 25 26 import org.apache.james.management.DomainListManagementException; 27 28 public interface DomainListManagementMBean { 29 30 /** 31 * Add domain to the service 32 * 33 * @phoenix:mx-operation 34 * @phoenix:mx-description Add domain to the service 35 * 36 * 37 * @param domain domain to add 38 * @return true if successfully 39 * @throws DomainListManagementException 40 */ 41 public boolean addDomain(String domain) throws DomainListManagementException; 42 43 /** 44 * Remove domain from the service 45 * 46 * @phoenix:mx-operation 47 * @phoenix:mx-description Remove domain to the service 48 * 49 * @param domain domain to remove 50 * @return true if succesfully 51 * @throws DomainListManagementException 52 */ 53 public boolean removeDomain(String domain) throws DomainListManagementException; 54 55 /** 56 * Return List of domains which should be used as localdomains. Return null if no 57 * domains were found 58 * 59 * @phoenix:mx-operation 60 * @phoenix:mx-description Return List of domains which should be used as localdomains. Return null if no 61 * domains were found 62 * 63 * @return domains 64 */ 65 public List getDomains(); 66 67 /** 68 * Return true if the domain exists in the service 69 * 70 * @phoenix:mx-operation 71 * @phoenix:mx-description Return true if the domain exists in the service 72 * 73 * @param domain the domain 74 * @return true if the given domain exists in the service 75 */ 76 public boolean containsDomain(String domain); 77 }