Class TabAttachments
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.openbravo.base.HttpBaseServlet
-
- org.openbravo.base.secureApp.HttpSecureAppServlet
-
- org.openbravo.erpCommon.businessUtility.TabAttachments
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,ConnectionProvider
public class TabAttachments extends HttpSecureAppServlet
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.openbravo.base.secureApp.HttpSecureAppServlet
boolHist, classInfo
-
Fields inherited from class org.openbravo.base.HttpBaseServlet
globalParameters, log4j, myPool, strDefaultServlet, strDireccion, strReplaceWith, strReplaceWithFull, xmlEngine
-
-
Constructor Summary
Constructors Constructor Description TabAttachments()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static String
getAttachmentDirectory(String tableID, String recordID, String fileName)
static String
getAttachmentDirectoryForNewAttachments(String tableID, String recordID)
static String
getPath(String fileDirectory)
Deprecated.void
init(javax.servlet.ServletConfig config)
Loads basic configuration settings that this class and all that extend it require to function properly.void
post(VariablesSecureApp vars, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
static String
splitPath(String origname)
Deprecated.-
Methods inherited from class org.openbravo.base.secureApp.HttpSecureAppServlet
advise, advisePopUp, advisePopUp, advisePopUpRefresh, bdError, bdErrorAjax, bdErrorConnection, bdErrorGeneralPopUp, bdErrorHidden, getServletInfo, hasGeneralAccess, invalidateSession, licenseError, logout, pageError, pageErrorCallOut, pageErrorPopUp, printPageClosePopUp, printPageClosePopUp, printPageClosePopUp, printPageClosePopUpAndRefreshParent, printPagePopUpDownload, printPagePopUpDownloadAndRefresh, readNumberFormat, readProperties, renderJR, renderJR, renderJR, renderJR, service, setClassInfo, setHistoryCommand, whitePage, whitePage
-
Methods inherited from class org.openbravo.base.HttpBaseServlet
doGet, doGetCall, doPostCall, getBaseDesignPath, getCallableStatement, getCallableStatement, getCallableStatement, getConnection, getPoolStatus, getPreparedStatement, getPreparedStatement, getPreparedStatement, getRDBMS, getStatement, getStatement, getStatement, getStatus, getTransactionConnection, initialize, releaseCallableStatement, releaseCommitConnection, releasePreparedStatement, releaseRollbackConnection, releaseStatement, releaseTransactionalPreparedStatement, releaseTransactionalStatement, serviceInitialized
-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.openbravo.database.ConnectionProvider
destroy
-
-
-
-
Method Detail
-
init
public void init(javax.servlet.ServletConfig config)
Description copied from class:HttpBaseServlet
Loads basic configuration settings that this class and all that extend it require to function properly. Also instantiates XmlEngine object. This method is called upon load of the class, which is configured to be loaded upon start of the application server. See also web.xml (load-on-startup).- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classHttpSecureAppServlet
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
- Overrides:
doPost
in classjavax.servlet.http.HttpServlet
- Throws:
IOException
javax.servlet.ServletException
-
post
public void post(VariablesSecureApp vars, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException, javax.servlet.ServletException
- Throws:
IOException
javax.servlet.ServletException
-
getAttachmentDirectoryForNewAttachments
@Deprecated public static String getAttachmentDirectoryForNewAttachments(String tableID, String recordID)
Deprecated.Provides the directory in which the attachment has to be stored. For example for tableId "259", recordId "0F3A10E019754BACA5844387FB37B0D5", the file directory returned is "259/0F3/A10/E01/975/4BA/CA5/844/387/FB3/7B0/D5". In case 'SaveAttachmentsOldWay' preference is enabled then the file directory returned is "259-0F3A10E019754BACA5844387FB37B0D5"- Parameters:
tableID
- UUID of the tablerecordID
- UUID of the record- Returns:
- file directory to save the attachment
-
getAttachmentDirectory
@Deprecated public static String getAttachmentDirectory(String tableID, String recordID, String fileName)
Deprecated.Provides the directory in which the attachment is stored. For example for tableId "259", recordId "0F3A10E019754BACA5844387FB37B0D5", and fileName "test.txt" the file directory returned is "259/0F3/A10/E01/975/4BA/CA5/844/387/FB3/7B0/D5". In case 'SaveAttachmentsOldWay' preference is enabled then the file directory returned is "259-0F3A10E019754BACA5844387FB37B0D5"- Parameters:
tableID
- UUID of the tablerecordID
- UUID of the recordfileName
- Name of the file- Returns:
- file directory in which the attachment is stored
-
getPath
@Deprecated public static String getPath(String fileDirectory)
Deprecated.Provides the value to be saved in path field in c_file. The path field is used to get the location of the attachment. For example 259/0F3/A10/E01/975/4BA/CA5/844/387/FB3/7B0/D5. This path is relative to the attachments folder- Parameters:
fileDirectory
- the directory that is retrieved from getFileDirectory()- Returns:
- value to be saved in path in c_file
-
splitPath
@Deprecated public static String splitPath(String origname)
Deprecated.Splits the path name component so that the resulting path name is 3 characters long sub directories. For example 12345 is splitted to 123/45- Parameters:
origname
- Original name- Returns:
- splitted name.
-
-