Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-402

Support method for checking what type of Archive this is

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.0.0
    • api, impl-base
    • None

      ShrinkWrap has the notion of views to wrap a Archive. While a view can be anything, some of the views describes types of Archives, e.g. WebArchive. A Archive should be able to tell which type it is. Even tho the content structure to some extent define the type, external sources like a Container will determine the type of the Archive soley on the archive name extension.

      ShrinkWrap.create(JavaArchive.class).isOfType(WebArchive.class) == false
      ShrinkWrap.create(JavaArchive.class, "my.war").isOfType(WebArchive.class) == true
      ShrinkWrap.create(MySpecialWebArchive.class, "my.war").isOfType(WebArchive.class) == true
      

      A simple check if the current archive name ends with the Types defined extension mapping should work in most cases.

            aslak@redhat.com Aslak Knutsen
            aslak@redhat.com Aslak Knutsen
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: