Tabnine Logo
ModelloException
Code IndexAdd Tabnine to your IDE (free)

How to use
ModelloException
in
org.codehaus.modello

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

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

  private Template getTemplate( String name )
    throws ModelloException
  {
    try
    {
      return velocity.getEngine().getTemplate( name );
    }
    catch ( ResourceNotFoundException e )
    {
      return null;
    }
    catch ( ParseErrorException e )
    {
      throw new ModelloException( "Could not parse the template '" + name + "'.", e );
    }
    catch ( Exception e )
    {
      throw new ModelloException( "Error while loading template '" + name + "'.", e );
    }
  }
}
origin: org.codehaus.modello/modello-maven-plugin

new MojoExecutionException( "Error generating: " + e.getMessage(), e );
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-store

  private Template getTemplate( String name )
    throws ModelloException
  {
    try
    {
      return velocity.getEngine().getTemplate( name );
    }
    catch ( ResourceNotFoundException e )
    {
      return null;
    }
    catch ( ParseErrorException e )
    {
      throw new ModelloException( "Could not parse the template '" + name + "'.", e );
    }
    catch ( Exception e )
    {
      throw new ModelloException( "Error while loading template '" + name + "'.", e );
    }
  }
}
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 String getCloneMode( ModelAssociation modelAssociation, String cloneModeClass )
  throws ModelloException
{
  JavaAssociationMetadata javaAssociationMetadata =
    (JavaAssociationMetadata) modelAssociation.getAssociationMetadata( JavaAssociationMetadata.ID );
  String cloneModeAssoc = javaAssociationMetadata.getCloneMode();
  if ( cloneModeAssoc == null )
  {
    cloneModeAssoc = cloneModeClass;
  }
  else if ( !JavaAssociationMetadata.CLONE_MODES.contains( cloneModeAssoc ) )
  {
    throw new ModelloException( "The Java Modello Generator cannot use '" + cloneModeAssoc
                    + "' as a value for <association java.clone=\"...\">, "
                    + "only the following values are acceptable "
                    + JavaAssociationMetadata.CLONE_MODES );
  }
  return cloneModeAssoc;
}
org.codehaus.modelloModelloException

Most used methods

  • <init>
  • getMessage

Popular in Java

  • Running tasks concurrently on multiple threads
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • getExternalFilesDir (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Permission (java.security)
    Legacy security code; do not use.
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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