public class RegisterPackageServlet extends BaseJobServlet
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_PATH |
static String |
PARAMETER_LOAD |
static String |
PARAMETER_TYPE |
static String |
TYPE_JOB |
static String |
TYPE_TRANS |
detections, jobMap, log, socketRepository, transformationMap
Constructor and Description |
---|
RegisterPackageServlet() |
Modifier and Type | Method and Description |
---|---|
protected String |
concat(String basePath,
String relativePath)
Combine the two paths with with a separator such as:
basePath + / + relativePath . |
protected void |
copyAndClose(InputStream inputStream,
OutputStream outputStream)
Copy contents from
inputStream over to outputStream and close outputStream . |
protected String |
copyRequestToDirectory(javax.servlet.http.HttpServletRequest request,
String directory)
Copy file specified in
request to directory . |
protected String |
copyRequestToDirectory(InputStream inputStream,
String directory)
Copy contents of
inputStream to directory . |
protected String |
createTempDirString()
Create temporary directory with unique random folder at base.
|
protected String |
createTempDirString(String baseDirectory)
Create temporary directory with unique random folder at base.
|
protected String |
createTempDirString(String baseDirectory,
String folderName)
Create temporary directory with unique random folder at base.
|
protected void |
deleteArchive(String file)
Remove file.
|
protected String |
extract(String zipFilePath)
Decompress zip file.
|
protected void |
extract(String zipFilePath,
String destinationDirectory)
Decompress zip file.
|
protected Node |
getConfigNode(String archiveUrl,
String fileName,
String xmlTag)
Retrieve config xml,
xmlTag from combined path of archiveUrl and fileName . |
String |
getContextPath() |
protected String |
getStartFileUrl(String archiveUrl,
String requestLoad)
Determine the start file url for the ktr/kjb.
|
protected static ZipService |
getZipService() |
protected boolean |
isJob(javax.servlet.http.HttpServletRequest request)
Determines if
request is kettle job. |
protected boolean |
isJob(String parameterTypeValue)
Determines if
parameterTypeValue is kettle job. |
void |
setup(TransformationMap transformationMap,
JobMap jobMap,
SocketRepository socketRepository,
List<SlaveServerDetection> detections) |
protected static void |
setZipService(ZipService aZipService) |
protected boolean |
useXML(javax.servlet.http.HttpServletRequest request) |
createJob, createTrans
beginHtml, doGet, endHtml, getService, startXml
convertContextPath, doDelete, doPost, doPut, getDetections, getJobMap, getSocketRepository, getTransformationMap, isJettyMode, logBasic, logBasic, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logRowlevel, setJettyMode
doHead, doOptions, doTrace, getLastModified, service, service
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isJettyMode, setJettyMode
public static final String CONTEXT_PATH
public static final String PARAMETER_LOAD
public static final String PARAMETER_TYPE
public static final String TYPE_JOB
public static final String TYPE_TRANS
public void setup(TransformationMap transformationMap, JobMap jobMap, SocketRepository socketRepository, List<SlaveServerDetection> detections)
setup
in interface CartePluginInterface
setup
in class BaseHttpServlet
public String getContextPath()
protected boolean isJob(javax.servlet.http.HttpServletRequest request)
request
is kettle job.request
- http request with parameters.protected boolean isJob(String parameterTypeValue)
parameterTypeValue
is kettle job.parameterTypeValue
- http parameter type valueprotected boolean useXML(javax.servlet.http.HttpServletRequest request)
useXML
in class BodyHttpServlet
protected String getStartFileUrl(String archiveUrl, String requestLoad)
archiveUrl
- requestLoad
- protected String concat(String basePath, String relativePath)
basePath
+ / + relativePath
.basePath
- full path to root of directory.relativePath
- a non-absolute path.protected Node getConfigNode(String archiveUrl, String fileName, String xmlTag) throws KettleXMLException
xmlTag
from combined path of archiveUrl
and fileName
.archiveUrl
- root file path.fileName
- xml configuration file at root of archiveUrl
.xmlTag
- xml root tag.KettleXMLException
protected String createTempDirString()
protected String createTempDirString(String baseDirectory)
baseDirectory
- base file path directory.protected String createTempDirString(String baseDirectory, String folderName)
Format : baseDirectory
+ / + folderName
baseDirectory
- base file path directory.folderName
- protected String copyRequestToDirectory(javax.servlet.http.HttpServletRequest request, String directory) throws KettleException
request
to directory
.request
- http request with payload.directory
- local destination directory.KettleException
protected String copyRequestToDirectory(InputStream inputStream, String directory) throws KettleException
inputStream
to directory
. Expecting zip file.inputStream
- zip file input stream.directory
- local destination directory.KettleException
protected void copyAndClose(InputStream inputStream, OutputStream outputStream) throws IOException
inputStream
over to outputStream
and close outputStream
.inputStream
- outputStream
- IOException
protected String extract(String zipFilePath) throws KettleException
zipFilePath
- zip file path.KettleException
protected void extract(String zipFilePath, String destinationDirectory) throws KettleException
zipFilePath
- zip file.destinationDirectory
- destination directory.KettleException
protected void deleteArchive(String file)
file
- path to file.protected static void setZipService(ZipService aZipService)
protected static ZipService getZipService()
Copyright © 2020 Hitachi Vantara. All rights reserved.