Class I18nArtifact

java.lang.Object
org.nuiton.i18n.plugin.bundle.I18nArtifact

public class I18nArtifact
extends java.lang.Object
Since:
0.12
Author:
Tony Chemit - chemit@codelutin.com
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected org.apache.maven.artifact.Artifact artifact  
    protected I18nBundle[] bundles  
    protected java.net.URL url  
  • Constructor Summary

    Constructors 
    Constructor Description
    I18nArtifact​(org.apache.maven.artifact.Artifact artifact)  
    I18nArtifact​(org.apache.maven.artifact.Artifact artifact, java.io.File file)  
  • Method Summary

    Modifier and Type Method Description
    boolean detectBundles()
    Detects the i18n bundles for this artifacts, says in i18n directory.
    org.apache.maven.artifact.Artifact getArtifact()  
    I18nBundleEntry[] getBundleEntries​(java.util.Locale l, java.util.Locale defaultLocale)  
    java.net.URL getUrl()  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • artifact

      protected final org.apache.maven.artifact.Artifact artifact
    • url

      protected final java.net.URL url
    • bundles

      protected I18nBundle[] bundles
  • Constructor Details

    • I18nArtifact

      public I18nArtifact​(org.apache.maven.artifact.Artifact artifact) throws java.net.MalformedURLException
      Throws:
      java.net.MalformedURLException
    • I18nArtifact

      public I18nArtifact​(org.apache.maven.artifact.Artifact artifact, java.io.File file) throws java.net.MalformedURLException
      Throws:
      java.net.MalformedURLException
  • Method Details

    • getArtifact

      public org.apache.maven.artifact.Artifact getArtifact()
    • getUrl

      public java.net.URL getUrl()
    • getBundleEntries

      public I18nBundleEntry[] getBundleEntries​(java.util.Locale l, java.util.Locale defaultLocale)
    • detectBundles

      public boolean detectBundles() throws java.io.IOException
      Detects the i18n bundles for this artifacts, says in i18n directory.
      Returns:
      true if artifact has some i18n bunbles, false otherwise.
      Throws:
      java.io.IOException - if any IO error.
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object