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

Support method for checking what type of Archive this is

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Pull Request Sent (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0.0
    • Fix Version/s: None
    • Component/s: api, impl-base
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              aslak Aslak Knutsen
              Reporter:
              aslak Aslak Knutsen
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: