Tabnine Logo
ModelloException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.codehaus.modello.ModelloException
constructor

Best Java code snippets using org.codehaus.modello.ModelloException.<init> (Showing top 20 results out of 315)

origin: org.codehaus.modello/modello-plugin-jpox

private static void writeValueStrategy( String valueStrategy, XMLWriter writer ) throws ModelloException
{
  if ( !"off".equals( valueStrategy ) )
  {
    if ( !VALUE_STRATEGY_LIST.contains( valueStrategy ) )
    {
      throw new ModelloException( "The JDO mapping generator does not support the specified "
              + "value-strategy '" + valueStrategy + "'. " + "Supported types: "
              + VALUE_STRATEGY_LIST );
    }
    writer.addAttribute( "value-strategy", valueStrategy );
  }
}
origin: org.codehaus.modello/modello-core

public Modello()
  throws ModelloException
{
  try
  {
    container = new DefaultPlexusContainer();
    core = (ModelloCore) container.lookup( ModelloCore.ROLE );
  }
  catch ( Exception ex )
  {
    throw new ModelloException( "Error while starting plexus.", ex );
  }
}
origin: org.apache.archiva.redback.components.modello/modello-plugin-jpox

private static void writeValueStrategy( String valueStrategy, XMLWriter writer ) throws ModelloException
{
  if ( !"off".equals( valueStrategy ) )
  {
    if ( !VALUE_STRATEGY_LIST.contains( valueStrategy ) )
    {
      throw new ModelloException( "The JDO mapping generator does not support the specified "
              + "value-strategy '" + valueStrategy + "'. " + "Supported types: "
              + VALUE_STRATEGY_LIST );
    }
    writer.addAttribute( "value-strategy", valueStrategy );
  }
}
origin: org.apache.archiva.redback.components.modello/modello-plugin-jpox

private void assertSupportedIdentityPrimitive( ModelField modelField ) throws ModelloException
{
  if ( !PRIMITIVE_IDENTITY_MAP.containsKey( modelField.getType() ) )
  {
    throw new ModelloException( "The JDO mapping generator does not support the specified " + "field type '"
            + modelField.getType() + "'. " + "Supported types: " + PRIMITIVE_IDENTITY_MAP.keySet() );
  }
}
origin: org.codehaus.modello/modello-plugin-jpox

protected String getEnumString( Map data, String key, String[] legalValues, String defaultValue )
  throws ModelloException
{
  String value = (String) data.get( key );
  if ( StringUtils.isEmpty( value ) )
  {
    return defaultValue;
  }
  for ( int i = 0; i < legalValues.length; i++ )
  {
    String enumString = legalValues[i];
    if ( StringUtils.equals( enumString, value ) )
    {
      return value;
    }
  }
  String emsg = "Unknown " + key + " value: '" + value + "'.  " + "(Allowed values: " + legalValues + ")";
  throw new ModelloException( emsg );
}
origin: org.apache.archiva.redback.components.modello/modello-plugin-jpox

protected String getEnumString( Map data, String key, String[] legalValues, String defaultValue )
  throws ModelloException
{
  String value = (String) data.get( key );
  if ( StringUtils.isEmpty( value ) )
  {
    return defaultValue;
  }
  for ( int i = 0; i < legalValues.length; i++ )
  {
    String enumString = legalValues[i];
    if ( StringUtils.equals( enumString, value ) )
    {
      return value;
    }
  }
  String emsg = "Unknown " + key + " value: '" + value + "'.  " + "(Allowed values: " + legalValues + ")";
  throw new ModelloException( emsg );
}
origin: org.codehaus.modello/modello-plugin-jpox

private void assertSupportedIdentityPrimitive( ModelField modelField ) throws ModelloException
{
  if ( !PRIMITIVE_IDENTITY_MAP.containsKey( modelField.getType() ) )
  {
    throw new ModelloException( "The JDO mapping generator does not support the specified " + "field type '"
            + modelField.getType() + "'. " + "Supported types: " + PRIMITIVE_IDENTITY_MAP.keySet() );
  }
}
origin: org.codehaus.modello/modello-plugin-xsd

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  try
  {
    generateXsd( parameters );
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating xsd.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-dom4j

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  requiresDomSupport = false;
  try
  {
    generateDom4jWriter();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating Dom4j Writer.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-xpp3

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  requiresDomSupport = false;
  try
  {
    generateXpp3Writer();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating XPP3 Writer.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-dom4j

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  requiresDomSupport = false;
  try
  {
    generateDom4jReader();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating Dom4j Reader.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-jdom

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  requiresDomSupport = false;
  try
  {
    generateJDOMWriter();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating JDOM Writer.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-sax

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  requiresDomSupport = false;
  try
  {
    generateSaxWriter();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating SAX Writer.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-jackson

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  requiresDomSupport = true;
  try
  {
    generateJacksonWriter();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating JSON Jackson Writer.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-java

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  try
  {
    generateJava();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating Java.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-stax

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  try
  {
    generateStaxSerializer();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating StAX serializer.", ex );
  }
}
origin: org.codehaus.modello/modello-plugin-java

private JavaAssociationMetadata getJavaAssociationMetadata( ModelAssociation modelAssociation )
  throws ModelloException
{
  JavaAssociationMetadata javaAssociationMetadata =
    (JavaAssociationMetadata) modelAssociation.getAssociationMetadata( JavaAssociationMetadata.ID );
  if ( !JavaAssociationMetadata.INIT_TYPES.contains( javaAssociationMetadata.getInitializationMode() ) )
  {
    throw new ModelloException(
      "The Java Modello Generator cannot use '" + javaAssociationMetadata.getInitializationMode()
        + "' as a <association java.init=\"" + javaAssociationMetadata.getInitializationMode() + "\"> "
        + "value, the only the following are acceptable " + JavaAssociationMetadata.INIT_TYPES );
  }
  return javaAssociationMetadata;
}
origin: org.codehaus.modello/modello-plugin-stax

public void generate( Model model, Properties parameters )
  throws ModelloException
{
  initialize( model, parameters );
  requiresDomSupport = false;
  try
  {
    generateStaxWriter();
  }
  catch ( IOException ex )
  {
    throw new ModelloException( "Exception while generating StAX Writer.", ex );
  }
  
  serializerGenerator.generate( model, parameters );
}
origin: org.codehaus.modello/modello-plugin-store

  private void writeTemplate( String template, File file, Context context )
    throws ModelloException
  {
    try
    {
      Writer writer = getEncoding() == null ? WriterFactory.newPlatformWriter( file )
                : WriterFactory.newWriter( file, getEncoding() );

      velocity.getEngine().mergeTemplate( template, context, writer );

      writer.flush();

      writer.close();
    }
    catch ( Exception e )
    {
      throw new ModelloException( "Error while generating code.", e );
    }
  }
}
origin: org.apache.archiva.redback.components.modello/modello-plugin-store

  private void writeTemplate( String template, File file, Context context )
    throws ModelloException
  {
    try
    {
      Writer writer = getEncoding() == null ? WriterFactory.newPlatformWriter( file )
                : WriterFactory.newWriter( file, getEncoding() );

      velocity.getEngine().mergeTemplate( template, context, writer );

      writer.flush();

      writer.close();
    }
    catch ( Exception e )
    {
      throw new ModelloException( "Error while generating code.", e );
    }
  }
}
org.codehaus.modelloModelloException<init>

Popular methods of ModelloException

  • getMessage

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Reference (javax.naming)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now