LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.view.web
Class LyFileAttachmentHandler

java.lang.Object
  extended by leon.view.web.LyFileAttachmentHandler
All Implemented Interfaces:
LyFreeInterface

public class LyFileAttachmentHandler
extends java.lang.Object
implements LyFreeInterface

This class handles file attachments in doPost method. Main services are :


Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LyFileAttachmentHandler()
          Constructor.
 
Method Summary
 LyFilePartWriter filePartWriterFactory()
          Factory to create File attachment handler instance.
 void free()
          Clean up everything.
 java.lang.String getAttachmentDirectory()
          Gets the attachment directory from meta-model.
 java.lang.String getEncodingType()
          Gets the supported encoding type.
 LyFilePartWriter getFilePartWriter()
          Gets the LyFilePartWriter instance to manage file attachments.
 javax.servlet.http.HttpServletRequest getParameterPartRequest()
          Gets the parameter part of the request.
 void parseContent()
          Parses the content of the request.
 void setAttachmentDirectory(java.lang.String attachmentDirectory)
          Sets the attachment directory.
 void setEnvironment(LyEnvironment environment)
          Gets the environment.
 void setRequest(javax.servlet.http.HttpServletRequest request)
          Gets the request.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Constructor Detail

LyFileAttachmentHandler

public LyFileAttachmentHandler()
Constructor.

Method Detail

setEnvironment

public void setEnvironment(LyEnvironment environment)
Gets the environment.

Parameters:
environment - Current environment

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)
Gets the request.

Parameters:
request - current user Http request

parseContent

public void parseContent()
                  throws java.io.IOException,
                         org.apache.commons.fileupload.FileUploadException
Parses the content of the request.
Result of this method invocation is :

Throws:
java.io.IOException
org.apache.commons.fileupload.FileUploadException

getParameterPartRequest

public javax.servlet.http.HttpServletRequest getParameterPartRequest()
                                                              throws java.io.IOException
Gets the parameter part of the request.
Result is wrapped into a HttpServletRequest as if there was only one part.

Returns:
the http servlet request corresponding to the parameter part of the request
Throws:
java.io.IOException

filePartWriterFactory

public LyFilePartWriter filePartWriterFactory()
                                       throws java.io.IOException
Factory to create File attachment handler instance. This may be overriden to specify server location, and ways to save/retreive the attachment.

Returns:
a LyFilePartWriter instance.
Throws:
java.io.IOException

getFilePartWriter

public LyFilePartWriter getFilePartWriter()
Gets the LyFilePartWriter instance to manage file attachments.

Returns:
current file management class instance.

getEncodingType

public java.lang.String getEncodingType()
Gets the supported encoding type.

Returns:
the supported encoding type

getAttachmentDirectory

public java.lang.String getAttachmentDirectory()
Gets the attachment directory from meta-model.

Returns:
the attachment directory from meta-model
See Also:
setAttachmentDirectory(String)

setAttachmentDirectory

public void setAttachmentDirectory(java.lang.String attachmentDirectory)
Sets the attachment directory.

Parameters:
attachmentDirectory - the new attachment directory
See Also:
getAttachmentDirectory()

free

public void free()
Clean up everything.

Specified by:
free in interface LyFreeInterface

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com