public class TransportPackage extends Object implements com.tridion.transport.ProcessingPackage
| Modifier and Type | Class and Description |
|---|---|
static class |
TransportPackage.FileLocation
Class for expressing file and directory pair (tuple).
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DEPLOY_ACTION
DEPLOY_ACTION.
|
static String |
UNDEPLOY_ACTION
UNDEPLOY_ACTION.
|
| Constructor and Description |
|---|
TransportPackage(File location)
Creates a new instance from an existing transport package file.
|
TransportPackage(File location,
BinaryStorageBase binaryStorage)
Creates a new instance from an existing transport package file.
|
TransportPackage(File workFolder,
com.tridion.transport.transportpackage.TransactionHeader header)
Creates a new
TransportPackage (object and File) with the supplied
TransactionHeader. |
TransportPackage(File workFolder,
com.tridion.transport.transportpackage.TransactionHeader header,
BinaryStorageBase binaryStorage)
Creates a new
TransportPackage (object and File) with the supplied
TransactionHeader. |
TransportPackage(File workFolder,
com.tridion.transport.transportpackage.TransactionHeader header,
String definedFolder,
String control)
Creates a new
TransportPackage (object and File) with the supplied
TransactionHeader. |
TransportPackage(File workFolder,
com.tridion.transport.transportpackage.TransactionHeader header,
String definedFolder,
String control,
BinaryStorageBase binaryStorage)
Creates a new
TransportPackage (object and File) with the supplied
TransactionHeader. |
| Modifier and Type | Method and Description |
|---|---|
void |
addMetaDataFile(com.tridion.transport.transportpackage.MetaDataFile metaDataFile,
String name) |
String |
getAction()
Gets the processor instructions action value.
|
com.fasterxml.jackson.databind.JsonNode |
getBinaryComponentJsonNode(String binaryKey) |
com.tridion.transport.transportpackage.json.Binaries |
getBinaryInstructions() |
Locale |
getBinaryLocale(com.fasterxml.jackson.databind.JsonNode componentNode) |
BinaryStorageBase |
getBinaryStorage() |
File |
getLocation()
Gets the location of this transport package on disk.
|
com.tridion.transport.transportpackage.MetaDataFile |
getMetaData(String type,
String name)
Gets the meta data for this transport package.
|
com.tridion.transport.transportpackage.MetaDataFile |
getMetaDataFile(String type)
Gets the meta data for this transport package.
|
com.tridion.transport.transportpackage.json.Package |
getPackageInstructions() |
com.tridion.transport.transportpackage.ProcessorInstructions |
getProcessorInstructions() |
Optional<String> |
getRawContent(TransportPackage transportPackage,
com.tridion.transport.transportpackage.json.Item item) |
Optional<String> |
getSchemaTitle(File schemaFile) |
com.tridion.transport.TransactionControlType |
getTransactionControl()
Gets the transaction header's control value.
|
com.tridion.transport.transportpackage.TransactionHeader |
getTransactionHeader()
Gets the transaction header.
|
TCMURI |
getTransactionId()
Gets the transaction header's transaction id.
|
boolean |
isDataPipeline() |
void |
setInstructions(com.tridion.transport.transportpackage.ProcessorInstructions instructions) |
void |
setTransactionHeader(com.tridion.transport.transportpackage.TransactionHeader transactionHeader)
Sets the transaction header for this transport package and writes this to disk.
|
void |
toFile(File writeLocation,
String name)
Writes the transaction header to disk as XML.
|
String |
toString()
Returns a string representation of this object.
|
<R> R |
withResource(TransportPackage.FileLocation pair,
Function<? super InputStream,? extends R> function) |
public static final String DEPLOY_ACTION
public static final String UNDEPLOY_ACTION
public TransportPackage(File location)
location - An existing transport package file.public TransportPackage(File location, BinaryStorageBase binaryStorage)
location - An existing transport package file.binaryStorage - Storage implementation.public TransportPackage(File workFolder, com.tridion.transport.transportpackage.TransactionHeader header)
TransportPackage (object and File) with the supplied
TransactionHeader.workFolder - The base folder under which to create the transport package file.header - The transaction header.public TransportPackage(File workFolder, com.tridion.transport.transportpackage.TransactionHeader header, BinaryStorageBase binaryStorage)
TransportPackage (object and File) with the supplied
TransactionHeader.workFolder - The base folder under which to create the transport package file.header - The transaction header.binaryStorage - Storage implementation.public TransportPackage(File workFolder, com.tridion.transport.transportpackage.TransactionHeader header, String definedFolder, String control)
TransportPackage (object and File) with the supplied
TransactionHeader.workFolder - The base folder under which to create the transport package file.header - The transaction header.definedFolder - The location where we're supposed to find the transport package.control - The name of the control to be used as folder name in case the definedFolder does not exist.public TransportPackage(File workFolder, com.tridion.transport.transportpackage.TransactionHeader header, String definedFolder, String control, BinaryStorageBase binaryStorage)
TransportPackage (object and File) with the supplied
TransactionHeader.workFolder - The base folder under which to create the transport package file.header - The transaction header.definedFolder - The location where we're supposed to find the transport package.control - The name of the control to be used as folder name in case the definedFolder does not exist.binaryStorage - Storage implementation.public File getLocation()
getLocation in interface com.tridion.transport.ProcessingPackagepublic TCMURI getTransactionId()
public com.tridion.transport.TransactionControlType getTransactionControl()
public com.tridion.transport.transportpackage.TransactionHeader getTransactionHeader()
public void setTransactionHeader(com.tridion.transport.transportpackage.TransactionHeader transactionHeader)
transactionHeader - The new transaction header.public com.tridion.transport.transportpackage.ProcessorInstructions getProcessorInstructions()
public com.tridion.transport.transportpackage.json.Package getPackageInstructions()
public com.tridion.transport.transportpackage.json.Binaries getBinaryInstructions()
throws ProcessingException
ProcessingExceptionpublic Locale getBinaryLocale(com.fasterxml.jackson.databind.JsonNode componentNode)
public com.fasterxml.jackson.databind.JsonNode getBinaryComponentJsonNode(String binaryKey)
public com.tridion.transport.transportpackage.MetaDataFile getMetaData(String type, String name)
type - The type of the meta data.name - The meta data file name.public void addMetaDataFile(com.tridion.transport.transportpackage.MetaDataFile metaDataFile,
String name)
public void setInstructions(com.tridion.transport.transportpackage.ProcessorInstructions instructions)
public BinaryStorageBase getBinaryStorage()
public String toString()
public void toFile(File writeLocation, String name) throws IOException
writeLocation - The file location to be written to.name - The file name.IOExceptionpublic String getAction()
public com.tridion.transport.transportpackage.MetaDataFile getMetaDataFile(String type)
type - The type of the meta data.public boolean isDataPipeline()
public Optional<String> getRawContent(TransportPackage transportPackage, com.tridion.transport.transportpackage.json.Item item) throws ProcessingException
ProcessingExceptionpublic <R> R withResource(TransportPackage.FileLocation pair, Function<? super InputStream,? extends R> function) throws ProcessingException
ProcessingExceptionCopyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries