public static class PayloadFilesManager.Perm extends PayloadFilesManager
The Perm manager constructs output file paths this way. The URI from the manager's targetDir (which the caller passes to the constructor) is the default parent URI for the output file.
Next, the Part's properties are checked for a file-xfer-root property. If found, it is used as a URI (either absolute or, if relative, resolved against the targetDir).
Finally, the "output name" is either the
name from the Payload.Part for the #extractFile(org.glassfish.api.admin.Payload.Part)
method or the caller-provided argument in the PayloadFilesManager.extractFile(org.glassfish.api.admin.Payload.Part, java.lang.String)
method.
In either case, the output name is used as a URI string and is resolved against the targetDir combined with (if present) the file-xfer-root property.
The net effect of this is that if the output name is an absolute URI then it will override the targetDir and the file-xfer-root setting. If the output name is relative then it will be resolved against the targetDir plus file-xfer-root URI to derive the URI for the output file.
PayloadFilesManager.ActionReportHandler, PayloadFilesManager.Perm, PayloadFilesManager.TempdirTimestamps, logger, strings| Constructor and Description |
|---|
Perm()
Creates a new PayloadFilesManager for permanent files anchored at
the caller's current directory.
|
Perm(org.glassfish.api.ActionReport report,
Logger logger)
Creates a new PayloadFilesManager for permanent files anchored at
the caller's current directory.
|
Perm(org.glassfish.api.ActionReport report,
Logger logger,
PayloadFilesManager.ActionReportHandler reportHandler)
Creates a new PayloadFilesManager for permanent files anchored at
the caller's current directory.
|
Perm(File targetDir,
org.glassfish.api.ActionReport report,
Logger logger)
Creates a new PayloadFilesManager for dealing with permanent files that
will be anchored at the specified target directory.
|
Perm(File targetDir,
org.glassfish.api.ActionReport report,
Logger logger,
PayloadFilesManager.ActionReportHandler reportHandler)
Creates a new PayloadFilesManager for permanent files anchored at
the specified target directory.
|
Perm(Logger logger)
Creates a new PayloadFilesManager for permanent files anchored at
the caller's current directory.
|
Perm(PayloadFilesManager.ActionReportHandler reportHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
postExtract(File extractedFile) |
protected void |
postProcessParts() |
getOutputFileURI, getParentURI, getTargetDir, processParts, processPartsExtendedpublic Perm(File targetDir, org.glassfish.api.ActionReport report, Logger logger)
targetDir - directory under which the payload's files should be storedreport - result report to which extraction results will be appenedlogger - logger to receive messagespublic Perm(File targetDir, org.glassfish.api.ActionReport report, Logger logger, PayloadFilesManager.ActionReportHandler reportHandler)
targetDir - directory under which the payload's files should be storedreport - result report to which extraction results will be appenedlogger - logger to receive messagesreportHandler - handler to invoke for each ActionReport in the payloadpublic Perm(org.glassfish.api.ActionReport report,
Logger logger)
report - result report to which extraction results will be appendedlogger - logger to receive messagespublic Perm(org.glassfish.api.ActionReport report,
Logger logger,
PayloadFilesManager.ActionReportHandler reportHandler)
report - result report to which extraction results will be appenedlogger - logger to receive messagesreportHandler - handler to invoke for each ActionReport in the payloadpublic Perm(Logger logger)
logger - logger to receive messagespublic Perm()
public Perm(PayloadFilesManager.ActionReportHandler reportHandler)
protected void postExtract(File extractedFile)
postExtract in class PayloadFilesManagerprotected void postProcessParts()
postProcessParts in class PayloadFilesManagerCopyright © 2017–2020 Eclipse Foundation. All rights reserved.