if (existing != null && !isAllowDuplicateFragmentNames()) throw new IllegalStateException("Duplicate fragment name: "+descriptor.getName()+" for "+existing.getResource()+" and "+descriptor.getResource());
/** * Get the web-fragment.xml from a jar * * @param jar * @param frags * @return * @throws Exception */ public FragmentDescriptor getFragmentFromJar (Resource jar, List<FragmentDescriptor> frags) throws Exception { //check if the jar has a web-fragment.xml FragmentDescriptor d = null; for (FragmentDescriptor frag: frags) { Resource fragResource = frag.getResource(); //eg jar:file:///a/b/c/foo.jar!/META-INF/web-fragment.xml if (Resource.isContainedIn(fragResource,jar)) { d = frag; break; } } return d; }
/** * Get the web-fragment.xml from a jar * * @param jar the jar to look in for a fragment * @param frags the fragments previously found * @return true if the fragment if found, or null of not found * @throws Exception if unable to determine the the fragment contains */ public FragmentDescriptor getFragmentFromJar (Resource jar, List<FragmentDescriptor> frags) throws Exception { //check if the jar has a web-fragment.xml FragmentDescriptor d = null; for (FragmentDescriptor frag: frags) { Resource fragResource = frag.getResource(); //eg jar:file:///a/b/c/foo.jar!/META-INF/web-fragment.xml if (Resource.isContainedIn(fragResource,jar)) { d = frag; break; } } return d; }
/** * Get the web-fragment.xml from a jar * * @param jar * @param frags * @return * @throws Exception */ public FragmentDescriptor getFragmentFromJar (Resource jar, List<FragmentDescriptor> frags) throws Exception { //check if the jar has a web-fragment.xml FragmentDescriptor d = null; for (FragmentDescriptor frag: frags) { Resource fragResource = frag.getResource(); //eg jar:file:///a/b/c/foo.jar!/META-INF/web-fragment.xml if (Resource.isContainedIn(fragResource,jar)) { d = frag; break; } } return d; }
/** * Get the web-fragment.xml from a jar * * @param jar * @param frags * @return * @throws Exception */ public FragmentDescriptor getFragmentFromJar (Resource jar, List<FragmentDescriptor> frags) throws Exception { //check if the jar has a web-fragment.xml FragmentDescriptor d = null; for (FragmentDescriptor frag: frags) { Resource fragResource = frag.getResource(); //eg jar:file:///a/b/c/foo.jar!/META-INF/web-fragment.xml if (Resource.isContainedIn(fragResource,jar)) { d = frag; break; } } return d; }
if (existing != null && !isAllowDuplicateFragmentNames()) throw new IllegalStateException("Duplicate fragment name: "+descriptor.getName()+" for "+existing.getResource()+" and "+descriptor.getResource());
if (existing != null && !isAllowDuplicateFragmentNames()) throw new IllegalStateException("Duplicate fragment name: "+descriptor.getName()+" for "+existing.getResource()+" and "+descriptor.getResource());
if (existing != null && !isAllowDuplicateFragmentNames()) throw new IllegalStateException("Duplicate fragment name: "+descriptor.getName()+" for "+existing.getResource()+" and "+descriptor.getResource());
if (existing != null && !isAllowDuplicateFragmentNames()) throw new IllegalStateException("Duplicate fragment name: "+descriptor.getName()+" for "+existing.getResource()+" and "+descriptor.getResource());
if (existing != null && !isAllowDuplicateFragmentNames()) throw new IllegalStateException("Duplicate fragment name: "+descriptor.getName()+" for "+existing.getResource()+" and "+descriptor.getResource());
if (existing != null && !isAllowDuplicateFragmentNames()) throw new IllegalStateException("Duplicate fragment name: "+descriptor.getName()+" for "+existing.getResource()+" and "+descriptor.getResource());