View Javadoc

1   /*
2    * HostGroup.java
3    *
4    * Created on May 24, 2004, 2:34 PM
5    */
6   
7   package gov.bnl.gums;
8   
9   import java.util.*;
10  
11  /*** It defines a a group of hosts that will be using the same mappings for user
12   * authorization. An object of this class links a series of hostnames to a list
13   * of group mappings.
14   * <p>
15   * This class does not return the list of hosts that will be affected since 
16   * the group of hosts can be defined by a rule, without knowledge of which
17   * systems exist. For example, all the machines in the 130.199.*.* subnet,
18   * or all machines in the usatlas.bnl.gov subdomain.
19   *
20   * @author  Gabriele Carcassi
21   */
22  public interface HostGroup {
23      /***
24       * Returns true if the given machine should be mapped according to the
25       * list of groups defined by this object.
26       * @return true if the host is part of this group.
27       * @param hostname a hostname (i.e. aftpexp.usatlas.bnl.gov)
28       */
29      boolean isInGroup(String hostname);
30      /***
31       * Returns the list of user group mappings to be used by this host group.
32       * @return returns a list of GroupMapper object.
33       */
34      List getGroupMappers();
35  }