Top Description Fields Constructors Methods
org.apache.tomcat.util.descriptor.web

public Class FragmentJarScannerCallback

extends Object
implements JarScannerCallback
Class Inheritance
All Implemented Interfaces
org.apache.tomcat.JarScannerCallback
Imports
java.io.File, .FileInputStream, .IOException, .InputStream, java.net.URL, java.util.HashMap, .Map, org.apache.tomcat.Jar, .JarScannerCallback, org.xml.sax.InputSource

Callback handling a web-fragment.xml descriptor.

Field Summary

Modifier and TypeField and Description
private final boolean
private static final String
private final Map<String, WebXml>
private boolean
private final boolean
private final WebXmlParser

Constructor Summary

AccessConstructor and Description
public
FragmentJarScannerCallback(WebXmlParser webXmlParser, boolean delegate, boolean parseRequired)

Method Summary

Modifier and TypeMethod and Description
private void
addFragment(WebXml fragment, URL url)

private String
public Map<String, WebXml>
public boolean
isOk()

public void
scan(Jar
The JAR to process
jar
,
String
The path, if any, to the JAR within the web application
webappPath
,
boolean
Indicates if the JAR was found within a web application. If false the JAR should be treated as being provided by the container
isWebapp
)

Implements org.apache.tomcat.JarScannerCallback.scan.

A JAR was found and may be accessed for further processing via the provided URL connection.

public void
scan(File
The directory containing the unpacked JAR.
file
,
String
The path, if any, to the file within the web application
webappPath
,
boolean
Indicates if the JAR was found within a web application. If false the JAR should be treated as being provided by the container
isWebapp
)

Implements org.apache.tomcat.JarScannerCallback.scan.

A directory was found that is to be treated as an unpacked JAR.

public void
scanWebInfClasses()

Implements org.apache.tomcat.JarScannerCallback.scanWebInfClasses.

A directory structure was found within the web application at /WEB-INF/classes that should be handled as an unpacked JAR.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private final boolean delegate
FRAGMENT_LOCATIONback to summary
private static final String FRAGMENT_LOCATION
fragmentsback to summary
private final Map<String, WebXml> fragments
okback to summary
private boolean ok
parseRequiredback to summary
private final boolean parseRequired
webXmlParserback to summary
private final WebXmlParser webXmlParser

Constructor Detail

FragmentJarScannerCallbackback to summary
public FragmentJarScannerCallback(WebXmlParser webXmlParser, boolean delegate, boolean parseRequired)

Method Detail

addFragmentback to summary
private void addFragment(WebXml fragment, URL url)
extractJarFileNameback to summary
private String extractJarFileName(URL input)
getFragmentsback to summary
public Map<String, WebXml> getFragments()
isOkback to summary
public boolean isOk()
scanback to summary
public void scan(Jar jar, String webappPath, boolean isWebapp) throws IOException

Implements org.apache.tomcat.JarScannerCallback.scan.

Doc from org.apache.tomcat.JarScannerCallback.scan.

A JAR was found and may be accessed for further processing via the provided URL connection. The caller is responsible for closing the JAR.

Parameters
jar:Jar

The JAR to process

webappPath:String

The path, if any, to the JAR within the web application

isWebapp:boolean

Indicates if the JAR was found within a web application. If false the JAR should be treated as being provided by the container

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs while scanning the JAR
scanback to summary
public void scan(File file, String webappPath, boolean isWebapp) throws IOException

Implements org.apache.tomcat.JarScannerCallback.scan.

Doc from org.apache.tomcat.JarScannerCallback.scan.

A directory was found that is to be treated as an unpacked JAR. The directory may be accessed for further processing via the provided file.

Parameters
file:File

The directory containing the unpacked JAR.

webappPath:String

The path, if any, to the file within the web application

isWebapp:boolean

Indicates if the JAR was found within a web application. If false the JAR should be treated as being provided by the container

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs while scanning the JAR
scanWebInfClassesback to summary
public void scanWebInfClasses()

Implements org.apache.tomcat.JarScannerCallback.scanWebInfClasses.

Doc from org.apache.tomcat.JarScannerCallback.scanWebInfClasses.

A directory structure was found within the web application at /WEB-INF/classes that should be handled as an unpacked JAR. Note that all resource access must be via the ServletContext to ensure that any additional resources are visible.

Annotations
@Override