org.glassfish.admin.payload
Class PayloadFilesManager.Perm

java.lang.Object
  extended by org.glassfish.admin.payload.PayloadFilesManager
      extended by org.glassfish.admin.payload.PayloadFilesManager.Perm
Enclosing class:
PayloadFilesManager

public static class PayloadFilesManager.Perm
extends PayloadFilesManager

Extracts files from a Payload and leaves them on disk.

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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.glassfish.admin.payload.PayloadFilesManager
PayloadFilesManager.ActionReportHandler, PayloadFilesManager.Perm, PayloadFilesManager.Temp
 
Field Summary
 
Fields inherited from class org.glassfish.admin.payload.PayloadFilesManager
dirTimestamps, logger, strings
 
Constructor Summary
PayloadFilesManager.Perm()
          Creates a new PayloadFilesManager for permanent files anchored at the caller's current directory.
PayloadFilesManager.Perm(ActionReport report, Logger logger)
          Creates a new PayloadFilesManager for permanent files anchored at the caller's current directory.
PayloadFilesManager.Perm(ActionReport report, Logger logger, PayloadFilesManager.ActionReportHandler reportHandler)
          Creates a new PayloadFilesManager for permanent files anchored at the caller's current directory.
PayloadFilesManager.Perm(File targetDir, ActionReport report, Logger logger)
          Creates a new PayloadFilesManager for dealing with permanent files that will be anchored at the specified target directory.
PayloadFilesManager.Perm(File targetDir, ActionReport report, Logger logger, PayloadFilesManager.ActionReportHandler reportHandler)
          Creates a new PayloadFilesManager for permanent files anchored at the specified target directory.
PayloadFilesManager.Perm(Logger logger)
          Creates a new PayloadFilesManager for permanent files anchored at the caller's current directory.
PayloadFilesManager.Perm(PayloadFilesManager.ActionReportHandler reportHandler)
           
 
Method Summary
protected  void postExtract(File extractedFile)
           
protected  void postProcessParts()
           
 
Methods inherited from class org.glassfish.admin.payload.PayloadFilesManager
getOutputFileURI, getParentURI, getTargetDir, processParts, processPartsExtended
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PayloadFilesManager.Perm

public PayloadFilesManager.Perm(File targetDir,
                                ActionReport report,
                                Logger logger)
Creates a new PayloadFilesManager for dealing with permanent files that will be anchored at the specified target directory.

Parameters:
targetDir - directory under which the payload's files should be stored
report - result report to which extraction results will be appened
logger - logger to receive messages

PayloadFilesManager.Perm

public PayloadFilesManager.Perm(File targetDir,
                                ActionReport report,
                                Logger logger,
                                PayloadFilesManager.ActionReportHandler reportHandler)
Creates a new PayloadFilesManager for permanent files anchored at the specified target directory.

Parameters:
targetDir - directory under which the payload's files should be stored
report - result report to which extraction results will be appened
logger - logger to receive messages
reportHandler - handler to invoke for each ActionReport in the payload

PayloadFilesManager.Perm

public PayloadFilesManager.Perm(ActionReport report,
                                Logger logger)
Creates a new PayloadFilesManager for permanent files anchored at the caller's current directory.

Parameters:
report - result report to which extraction results will be appended
logger - logger to receive messages

PayloadFilesManager.Perm

public PayloadFilesManager.Perm(ActionReport report,
                                Logger logger,
                                PayloadFilesManager.ActionReportHandler reportHandler)
Creates a new PayloadFilesManager for permanent files anchored at the caller's current directory.

Parameters:
report - result report to which extraction results will be appened
logger - logger to receive messages
reportHandler - handler to invoke for each ActionReport in the payload

PayloadFilesManager.Perm

public PayloadFilesManager.Perm(Logger logger)
Creates a new PayloadFilesManager for permanent files anchored at the caller's current directory.

Parameters:
logger - logger to receive messages

PayloadFilesManager.Perm

public PayloadFilesManager.Perm()
Creates a new PayloadFilesManager for permanent files anchored at the caller's current directory.


PayloadFilesManager.Perm

public PayloadFilesManager.Perm(PayloadFilesManager.ActionReportHandler reportHandler)
Method Detail

postExtract

protected void postExtract(File extractedFile)
Specified by:
postExtract in class PayloadFilesManager

postProcessParts

protected void postProcessParts()
Specified by:
postProcessParts in class PayloadFilesManager


Copyright © 2012 GlassFish Community. All Rights Reserved.