Package com.ptc.windchill.wp.delivery
Class DeliveryHelper
java.lang.Object
com.ptc.windchill.wp.delivery.DeliveryHelper
- All Implemented Interfaces:
Externalizable,Serializable
Supported API: true
Extendable: false.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if the package has any deliveries which are sent.Returns true if there are any deliveries which are sent.static DeliveryRecordgetBaseDeliveryRecord(DeliveryRecord delivery) Gets the base delivery record of theDeliveryRecord
Supported API: true
.static ExportFormatTypegetDeliveryFormatType(DeliveryRecord delivery) Gets the ExportFormatType on the DeliveryRecord.static DeliveryManifestTypegetDeliveryManifest(DeliveryRecord delivery) Gets theDeliveryManifestof theDeliveryRecord
Supported API: true
.static DeliveryMediumTypegetDeliveryMedium(DeliveryRecord delivery) Gets theDeliveryMediumof theDeliveryRecord
Supported API: true
.static DeliveryOptionTypegetDeliveryOption(DeliveryRecord delivery) Gets theDeliveryOptionof theDeliveryRecord
Supported API: true
.static WTUsergetSentFrom(DeliveryRecord delivery) Gets the sender of theDeliveryRecord
Supported API: true
.static WTUsergetSentTo(DeliveryRecord delivery) Gets the recipient of theDeliveryRecord
Supported API: true
.static DeliveryServiceGets the object for the association that plays role: service.static AbstractWorkPackagegetWorkPackage(DeliveryRecord delivery) Gets theWorkPackagerelated to theDeliveryRecord
Supported API: true
.static booleanisZipCreated(DeliveryRecord record) Utility method to determine if the delivery has a zip.static booleanisZipInProcess(DeliveryRecord record) Utility method to determine if the delivery has a zip in process.static voidmarkDeliveryAsAccepted(DeliveryRecord delivery, Timestamp time, WTPrincipalReference user) Updates the delivery status asDeliveryStatusType.ACCEPTEDThis would also mark the delivery asDeliveryStatusType.RECEIVEDif not already received.static voidmarkDeliveryAsReceived(DeliveryRecord delivery, Timestamp time, WTPrincipalReference user) Updates the delivery status asDeliveryStatusType.RECEIVEDThis would also unmark the delivery beingDeliveryStatusType.ACCEPTEDA delivery can only be received if it has been sent.static voidmarkDeliveryAsRejected(DeliveryRecord delivery, Timestamp time, WTPrincipalReference user) Updates the delivery status asDeliveryStatusType.REJECTEDThis would also mark the delivery asDeliveryStatusType.RECEIVEDif not already received.static voidmarkDeliveryAsSent(DeliveryRecord delivery, Timestamp time, WTPrincipalReference user) Updates the delivery status asDeliveryStatusType.DELIVERED.static voidsetBaseDeliveryRecord(DeliveryRecord delivery, DeliveryRecord baseDeliveryRecord) Sets the base delivery record on theDeliveryRecord
Supported API: true
.static voidsetDeliveryFormatType(DeliveryRecord delivery, ExportFormatType deliveryFormatType) Sets the ExportFormatType on the DeliveryRecord
Supported API: true
.static voidsetDeliveryManifest(DeliveryRecord delivery, DeliveryManifestType DeliveryOptionType) Sets theDeliveryManifeston theDeliveryRecord
Supported API: true
.static voidsetDeliveryMedium(DeliveryRecord delivery, DeliveryMediumType deliveryMediumType) Sets theDeliveryMediumon theDeliveryRecord
Supported API: true
.static voidsetDeliveryOption(DeliveryRecord delivery, DeliveryOptionType DeliveryOptionType) Sets theDeliveryOptionon theDeliveryRecord
Supported API: true
.static voidsetSentFrom(DeliveryRecord delivery, WTUser sentFromUser) Sets the sender on theDeliveryRecord
Supported API: true
.static voidsetSentFromAddress(DeliveryRecord delivery, WTUser sentFrom) Sets the sentFromAddress on DeliveryRecord.static voidsetSentTo(DeliveryRecord delivery, WTUser sentFromUser) Sets the recipient on theDeliveryRecord
Supported API: true
.static voidsetSentToAddress(DeliveryRecord delivery, String name, String email, String address) Sets the sentToAddress on DeliveryRecord.static voidsetSentToAddress(DeliveryRecord delivery, WTUser sentTo) Sets the sentToAddress on DeliveryRecord.static voidsetWorkPackage(DeliveryRecord delivery, AbstractWorkPackage workpackage) Sets theWorkPackagerelated to theDeliveryRecord
Supported API: true
.
-
Method Details
-
getService
Gets the object for the association that plays role: service.
Supported API: true
- Returns:
- DeliveryService
-
isZipInProcess
Utility method to determine if the delivery has a zip in process.
Supported API: true
- Parameters:
record- the record- Returns:
- boolean
- Throws:
WTException- the wT exception
-
isZipCreated
Utility method to determine if the delivery has a zip.
Supported API: true
- Parameters:
record- the record- Returns:
- boolean
- Throws:
WTException- the wT exception
-
getDeliveryMedium
Gets theDeliveryMediumof theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the delivery- Returns:
DeliveryMediumType
-
setDeliveryMedium
public static void setDeliveryMedium(DeliveryRecord delivery, DeliveryMediumType deliveryMediumType) throws WTException Sets theDeliveryMediumon theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the deliverydeliveryMediumType- the delivery medium type- Throws:
WTException- the wT exception
-
getDeliveryFormatType
Gets the ExportFormatType on the DeliveryRecord.
Supported API: true
- Parameters:
delivery- the delivery- Returns:
- ExportFormatType
-
setDeliveryFormatType
public static void setDeliveryFormatType(DeliveryRecord delivery, ExportFormatType deliveryFormatType) throws WTException Sets the ExportFormatType on the DeliveryRecord
Supported API: true
.- Parameters:
delivery- the deliverydeliveryFormatType- the delivery format type- Throws:
WTException- the wT exception
-
getDeliveryOption
Gets theDeliveryOptionof theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the delivery- Returns:
DeliveryOptionType
-
setDeliveryOption
public static void setDeliveryOption(DeliveryRecord delivery, DeliveryOptionType DeliveryOptionType) throws WTException Sets theDeliveryOptionon theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the deliveryDeliveryOptionType- the delivery option type- Throws:
WTException- the wT exception
-
getDeliveryManifest
Gets theDeliveryManifestof theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the delivery- Returns:
DeliveryManifestType
-
setDeliveryManifest
public static void setDeliveryManifest(DeliveryRecord delivery, DeliveryManifestType DeliveryOptionType) throws WTException Sets theDeliveryManifeston theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the deliveryDeliveryOptionType- the delivery option type- Throws:
WTException- the wT exception
-
getWorkPackage
Gets theWorkPackagerelated to theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the delivery- Returns:
AbstractWorkPackage- Throws:
WTException
-
setWorkPackage
public static void setWorkPackage(DeliveryRecord delivery, AbstractWorkPackage workpackage) throws WTException Sets theWorkPackagerelated to theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the deliveryworkpackage- the workpackage- Throws:
WTException- the wT exception
-
getBaseDeliveryRecord
Gets the base delivery record of theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the delivery- Returns:
- baseDelivery -
DeliveryRecord
-
setBaseDeliveryRecord
public static void setBaseDeliveryRecord(DeliveryRecord delivery, DeliveryRecord baseDeliveryRecord) throws WTException Sets the base delivery record on theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the deliverybaseDeliveryRecord- the base delivery record- Throws:
WTException- the wT exception
-
getSentFrom
Gets the sender of theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the delivery- Returns:
- sender -
WTUser
-
getSentTo
Gets the recipient of theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the delivery- Returns:
- recipient -
WTUser
-
setSentTo
Sets the recipient on theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the deliverysentFromUser- the sent from user- Throws:
WTException- the wT exception
-
setSentFrom
Sets the sender on theDeliveryRecord
Supported API: true
.- Parameters:
delivery- the deliverysentFromUser- the sent from user- Throws:
WTException- the wT exception
-
setSentFromAddress
Sets the sentFromAddress on DeliveryRecord.
Supported API: true
- Parameters:
delivery- the deliverysentFrom- the sent from- Throws:
WTException- the wT exception
-
setSentToAddress
Sets the sentToAddress on DeliveryRecord.
Supported API: true
- Parameters:
delivery- the deliverysentTo- the sent to- Throws:
WTException- the wT exception
-
setSentToAddress
public static void setSentToAddress(DeliveryRecord delivery, String name, String email, String address) throws WTException Sets the sentToAddress on DeliveryRecord.
Supported API: true
- Parameters:
delivery- the deliveryname- the nameemail- the emailaddress- the address- Throws:
WTException- the wT exception
-
checkPackageHasSentDeliveries
Checks if the package has any deliveries which are sent.Returns true if there are any deliveries which are sent.
Supported API: true
- Parameters:
wp- the wp- Returns:
- boolean
- Throws:
WTException- the wT exception
-
markDeliveryAsSent
public static void markDeliveryAsSent(DeliveryRecord delivery, Timestamp time, WTPrincipalReference user) throws WTException Updates the delivery status asDeliveryStatusType.DELIVERED.
Supported API: true
- Parameters:
delivery- -DeliveryRecordtime- -Timestampthe GMT time, if null, the system time would be used.user- -WTPrincipalReferenceif null, the session user would be used.- Throws:
WTException- the wT exception
-
markDeliveryAsReceived
public static void markDeliveryAsReceived(DeliveryRecord delivery, Timestamp time, WTPrincipalReference user) throws WTException Updates the delivery status asDeliveryStatusType.RECEIVEDThis would also unmark the delivery beingDeliveryStatusType.ACCEPTEDA delivery can only be received if it has been sent.
Supported API: true
- Parameters:
delivery- -DeliveryRecordtime- -Timestampthe GMT time, if null, the system time would be used.user- -WTPrincipalReferenceif null, the session user would be used.- Throws:
WTException- the wT exception
-
markDeliveryAsAccepted
public static void markDeliveryAsAccepted(DeliveryRecord delivery, Timestamp time, WTPrincipalReference user) throws WTException Updates the delivery status asDeliveryStatusType.ACCEPTEDThis would also mark the delivery asDeliveryStatusType.RECEIVEDif not already received. A delivery can only be accepted if it has been sent.
Supported API: true
- Parameters:
delivery- -DeliveryRecordtime- -Timestampthe GMT time, if null, the system time would be used.user- -WTPrincipalReferenceif null, the session user would be used.- Throws:
WTException- the wT exception
-
markDeliveryAsRejected
public static void markDeliveryAsRejected(DeliveryRecord delivery, Timestamp time, WTPrincipalReference user) throws WTException Updates the delivery status asDeliveryStatusType.REJECTEDThis would also mark the delivery asDeliveryStatusType.RECEIVEDif not already received. A delivery can only be rejected if it has been sent.
Supported API: true
- Parameters:
delivery- -DeliveryRecordtime- -Timestampthe GMT time, if null, the system time would be used.user- -WTPrincipalReferenceif null, the session user would be used.- Throws:
WTException- the wT exception
-