Package org.bladerunnerjs.aliasing

Examples of org.bladerunnerjs.aliasing.AliasOverride


      AliasesFile aliasesFile = bundlableNode.aliasesFile();
     
      for(AliasDefinitionsFile aliasDefinitionFile : bundlableNode.aliasDefinitionFiles()) {
        for(AliasDefinition aliasDefinition : aliasDefinitionFile.aliases()) {
          if(!aliasesFile.hasAlias(aliasDefinition.getName()) && (aliasDefinition != null) && (aliasDefinition.getInterfaceName() != null)) {
            aliasesFile.addAlias(new AliasOverride(aliasDefinition.getName(), aliasDefinition.getInterfaceName()));
          }
        }
      }
    }
    catch(ContentFileProcessingException e) {
View Full Code Here


  }
 
  private static void processGroupAlias(String groupName, XMLStreamReader2 streamReader, AliasDefinitionsData data) {
    String aliasName = streamReader.getAttributeValue(null, "name");
    String aliasClass = streamReader.getAttributeValue(null, "class");
    AliasOverride groupAlias = new AliasOverride(aliasName, aliasClass);
   
    data.getGroupAliases(groupName).add(groupAlias);
  }
View Full Code Here

  }
 
  private static void processScenario(String aliasName, XMLStreamReader2 streamReader, AliasDefinitionsData data) {
    String scenarioName = streamReader.getAttributeValue(null, "name");
    String aliasClass = streamReader.getAttributeValue(null, "class");
    AliasOverride scenarioAlias = new AliasOverride(aliasName, aliasClass);
   
    data.getScenarioAliases(aliasName).put(scenarioName, scenarioAlias);
  }
View Full Code Here

   
    if((aliasClass == null) || (aliasClass.equals(""))) {
      throw new IncompleteAliasException(aliasesFile, aliasName);
    }
   
    aliasesData.aliasOverrides.add(new AliasOverride(aliasName, aliasClass));
  }
View Full Code Here

    aliasOverrides.add(aliasOverride);
    persistentAliasesData.getData().aliasOverrides = aliasOverrides;
  }
 
  public AliasDefinition getAlias(String aliasName) throws AliasException, ContentFileProcessingException {
    AliasOverride aliasOverride = getLocalAliasOverride(aliasName);
    AliasDefinition aliasDefinition = getAliasDefinition(aliasName);
    AliasOverride groupAliasOverride = getGroupAliasOverride(aliasName);
   
    if ((aliasOverride == null) && (groupAliasOverride != null)) {
      aliasOverride = groupAliasOverride;
    }
   
View Full Code Here

  public void write() throws ContentFileProcessingException {
    persistentAliasesData.writeData();
  }
 
  private AliasOverride getLocalAliasOverride(String aliasName) throws ContentFileProcessingException {
    AliasOverride aliasOverride = null;
   
    for(AliasOverride nextAliasOverride : aliasOverrides()) {
      if(nextAliasOverride.getName().equals(aliasName)) {
        aliasOverride = nextAliasOverride;
        break;
View Full Code Here

   
    return aliasOverride;
  }
 
  private AliasOverride getGroupAliasOverride(String aliasName) throws ContentFileProcessingException, AmbiguousAliasException {
    AliasOverride aliasOverride = null;
    List<String> groupNames = groupNames();
   
    for(AliasDefinitionsFile aliasDefinitionsFile : bundlableNode.aliasDefinitionFiles()) {
      AliasOverride nextAliasOverride = aliasDefinitionsFile.getGroupOverride(aliasName, groupNames);
     
     
     
      if(aliasOverride != null && nextAliasOverride != null) {
        throw new AmbiguousAliasException(getUnderlyingFile(), aliasName, groupNames);
View Full Code Here

   
    try {
      for(AliasDefinition nextAliasDefinition : aliases()) {
        if(nextAliasDefinition.getName().equals(aliasName)) {
          if(scenarioName != null) {
            AliasOverride scenarioAlias = persistentAliasDefinitionsData.getData().getScenarioAliases(nextAliasDefinition.getName()).get(scenarioName);
           
            if(scenarioAlias != null) {
              nextAliasDefinition = new AliasDefinition(nextAliasDefinition.getName(), scenarioAlias.getClassName(), nextAliasDefinition.getInterfaceName());
            }
          }
         
          if(aliasDefinition != null) {
            throw new AmbiguousAliasException(aliasDefinitionsFile, aliasName, scenarioName);
View Full Code Here

   
    return aliasDefinition;
  }
 
  public AliasOverride getGroupOverride(String aliasName, List<String> groupNames) throws ContentFileProcessingException, AmbiguousAliasException {
    AliasOverride aliasOverride = null;
   
    for(String groupName : groupNames) {
      for(AliasOverride nextGroupAlias : groupAliases(groupName)) {
        if(nextGroupAlias.getName().equals(aliasName)) {
          if(aliasOverride != null) {
View Full Code Here

        if(aliasDefinition.getInterfaceName() != null) {
          aliasBuilder.a("interface", aliasDefinition.getInterfaceName());
        }
       
        for (String scenarioName : scenarioAliases.keySet()) {
          AliasOverride scenarioAlias = scenarioAliases.get(scenarioName);
          aliasBuilder.e("scenario").a("name", scenarioName).a("class", scenarioAlias.getClassName());
        }
      }
     
      for (String groupName : data.groupAliases.keySet()) {
        XMLBuilder groupBuilder = builder.e("group").a("name", groupName);
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.aliasing.AliasOverride

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.