Package org.apache.muse.tools.generator.util

Examples of org.apache.muse.tools.generator.util.MuseRuntimeException


    for (int i = 0; i < wsdlFragments.length; i++) { 
      try {
        definition = new DefinitionInfo(load(wsdlFragments[i]));
      } catch (WSDLException e) {
        Object[] filler = { new Integer(i) };
        throw new MuseRuntimeException("WsdlFragmentParseFailed", _MESSAGES.get("WsdlFragmentParseFailed", filler), e);
      }

      copyOperations(definition, targetDefinition);
      copyProperties(definition, targetDefinition);
    }
View Full Code Here


    for(Iterator i=sourceMetadata.getPropertyNames().iterator(); i.hasNext();) {
      QName nextProperty = (QName)i.next();
      if(targetMetadata.hasProperty(nextProperty)) {
        Object[] filler = { nextProperty };
        throw new MuseRuntimeException("DuplicateProperty", _MESSAGES.get("DuplicateProperty", filler));
      }
     
      try {
        addProperty(nextProperty, sourceMetadata, targetMetadata);
      } catch (Exception e) {
        Object[] filler = { nextProperty };
        throw new MuseRuntimeException("FailedCopyingProperty", _MESSAGES.get("FailedCopyingProperty", filler), e);
      }
    }
  }   
View Full Code Here

    if (addressArg == null) {
      Object filler[] = new Object[] {
          ADDRESS_FLAG,
          HELP_FLAG
        };
      throw new MuseRuntimeException("NoAddressFlag", _MESSAGES.get("NoAddressFlag",filler));
    }
   
    return addressArg;
  }
View Full Code Here

    if (uriArg == null) {
      Object filler[] = new Object[] {
        URI_FLAG,
        HELP_FLAG
      };
      throw new MuseRuntimeException("NoURIFlag", _MESSAGES.get("NoURIFlag",filler));
    }
   
    return uriArg;
  }
View Full Code Here

    if(outputArg == null) {
      Object filler[] = new Object[] {
          OUTPUT_FLAG,
          HELP_FLAG
        };
      throw new MuseRuntimeException("NoOutputFlag", _MESSAGES.get("NoOutputFlag",filler));
    }
   
    return outputArg;
  }
View Full Code Here

    File[] files = new File[argFiles.length];
    for(int i=0; i < argFiles.length; i++) {
      files[i] = new File(argFiles[i])
      if(!files[i].exists()) {
        Object[] filler = { files[i] };
        throw new MuseRuntimeException("NonExistant", _MESSAGES.get("NonExistant", filler));
      }
    }
   
    if(files.length  == 0) {
      Object filler[] = { HELP_FLAG };
      throw new MuseRuntimeException("NoWSDLs", _MESSAGES.get("NoWSDLs", filler));
    }
   
    return files;
  }
View Full Code Here

        FileWriter fileWriter = new FileWriter(metadataDestination);
        fileWriter.write(XmlUtils.toString(rmdDoc));
        fileWriter.close();     
      } catch (Exception e) {
        Object[] filler = {metadataDestination.getAbsolutePath()};
        throw new MuseRuntimeException("FailedWritingRmd", _MESSAGES.get("FailedWritingRmd", filler), e);
      }
    } else {
      handleMessage(_MESSAGES.get("NotOverwriting", new String[] {metadataDestination.getPath()}));
    }
  }
View Full Code Here

        FileWriter fileWriter = new FileWriter(wsdlDestination);
        fileWriter.write(XmlUtils.toString(wsdlDoc));
        fileWriter.close();     
      } catch (Exception e) {
        Object[] filler = {wsdlDestination.getAbsolutePath()};
        throw new MuseRuntimeException("FailedWritingWsdl", _MESSAGES.get("FailedWritingWsdl", filler), e);
      }
    } else {
      handleMessage(_MESSAGES.get("NotOverwriting", new String[] {wsdlDestination.getPath()}));
    }   
  }
View Full Code Here

       
        if(arguments.hasFlag(J2EE_FLAG)) {
          String type = arguments.getFlagValue(J2EE_FLAG);
          if(type == null) {
            Object[] filler = { HELP_FLAG };
            throw new MuseRuntimeException("InvalidArgs",_MESSAGES.get("InvalidArgs", filler));
          } else if(type.equals(MINI_TYPE)) {
            return new J2EEMiniProjectizer();
          } else if(type.equals(AXIS2_TYPE)){
            return new J2EEAxis2Projectizer();
          } else {
            Object[] filler = { HELP_FLAG };
            throw new MuseRuntimeException("InvalidArgs",_MESSAGES.get("InvalidArgs", filler));
          }
        }
   
        if(arguments.hasFlag(OSGI_FLAG)) {
          String type = arguments.getFlagValue(OSGI_FLAG);
          if(type == null) {
            Object[] filler = { HELP_FLAG };
            throw new MuseRuntimeException("InvalidArgs",_MESSAGES.get("InvalidArgs", filler));
          } else if(type.equals(MINI_TYPE)) {
            return new OsgiMiniProjectizer();
          } else if(type.equals(AXIS2_TYPE)){
            return new OsgiAxis2Projectizer();
          } else {
            Object[] filler = { HELP_FLAG };
            throw new MuseRuntimeException("InvalidArgs",_MESSAGES.get("InvalidArgs", filler));
          }
        }
       
    String projectizerArg = arguments.getFlagValue(PROJECTIZER_FLAG);

    if (arguments.hasFlag(PROJECTIZER_FLAG)) {
      if (projectizerArg == null) {
        Object[] filler = { PROJECTIZER_FLAG };
        handleErrorAndExit(_MESSAGES.get("NullProjectizer", filler));
      }
     
      return (Projectizer) loadClass(arguments.getFlagValue(PROJECTIZER_FLAG), Projectizer.class);         
    }
   
    Object[] filler = { HELP_FLAG };
    throw new MuseRuntimeException("InvalidArgs",_MESSAGES.get("InvalidArgs", filler));
  }
View Full Code Here

TOP

Related Classes of org.apache.muse.tools.generator.util.MuseRuntimeException

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.