class QueuePlacementPolicy {

  public String assignAppToQueue(String requestedQueue, String user)
      throws IOException {
    for (QueuePlacementRule rule : rules) {
      String queue = rule.assignAppToQueue(requestedQueue, user, groups,
          configuredQueues);
      if (queue == null || !queue.isEmpty()) {
        return queue;
      }
    }
    throw new IllegalStateException("Should have applied a rule before " +
    		"reaching here");
  }

  public  QueuePlacementPolicy(List<QueuePlacementRule> rules,
      Map<FSQueueType, Set<String>> configuredQueues, Configuration conf);

}