Пример #1
0
 public void addGroupAliases(GroupDefinition groupToUse, String scenario)
     throws ContentProcessingException {
   List<AliasDefinition> scenarioAliases = groupToUse.getAliasDefinitions(scenario);
   if (scenarioAliases != null) {
     for (AliasDefinition alias : scenarioAliases) {
       String groupName = groupToUse.getName();
       alias.setGroup(groupName);
       alias.setInterfaceName(getInterfaceForAlias(alias.getName()));
       addClassAlias(alias);
     }
   }
 }
Пример #2
0
  public void addGroup(GroupDefinition groupDefinition) throws ContentProcessingException {

    String groupName = groupDefinition.getName();
    if (groupDefinitions == null) {
      groupDefinitions = new HashMap<String, GroupDefinition>();
    }

    if (groupDefinitions.containsKey(groupName)) {
      throw new ContentProcessingException(
          "The alias group " + groupName + " has already been defined");
    }
    groupDefinitions.put(groupName, groupDefinition);
  }