Class DeliveryHelper

java.lang.Object
com.ptc.windchill.wp.delivery.DeliveryHelper
All Implemented Interfaces:
Externalizable, Serializable

public class DeliveryHelper extends Object implements Externalizable


Supported API: true

Extendable: false.
See Also:
  • Method Details

    • getService

      public static DeliveryService getService()
      Gets the object for the association that plays role: service.

      Supported API: true

      Returns:
      DeliveryService
    • isZipInProcess

      public static boolean isZipInProcess(DeliveryRecord record) throws WTException
      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

      public static boolean isZipCreated(DeliveryRecord record) throws WTException
      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

      public static DeliveryMediumType getDeliveryMedium(DeliveryRecord delivery)
      Gets the DeliveryMedium of the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      Returns:
      DeliveryMediumType
    • setDeliveryMedium

      public static void setDeliveryMedium(DeliveryRecord delivery, DeliveryMediumType deliveryMediumType) throws WTException
      Sets the DeliveryMedium on the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      deliveryMediumType - the delivery medium type
      Throws:
      WTException - the wT exception
    • getDeliveryFormatType

      public static ExportFormatType getDeliveryFormatType(DeliveryRecord delivery)
      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 delivery
      deliveryFormatType - the delivery format type
      Throws:
      WTException - the wT exception
    • getDeliveryOption

      public static DeliveryOptionType getDeliveryOption(DeliveryRecord delivery)
      Gets the DeliveryOption of the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      Returns:
      DeliveryOptionType
    • setDeliveryOption

      public static void setDeliveryOption(DeliveryRecord delivery, DeliveryOptionType DeliveryOptionType) throws WTException
      Sets the DeliveryOption on the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      DeliveryOptionType - the delivery option type
      Throws:
      WTException - the wT exception
    • getDeliveryManifest

      public static DeliveryManifestType getDeliveryManifest(DeliveryRecord delivery)
      Gets the DeliveryManifest of the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      Returns:
      DeliveryManifestType
    • setDeliveryManifest

      public static void setDeliveryManifest(DeliveryRecord delivery, DeliveryManifestType DeliveryOptionType) throws WTException
      Sets the DeliveryManifest on the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      DeliveryOptionType - the delivery option type
      Throws:
      WTException - the wT exception
    • getWorkPackage

      public static AbstractWorkPackage getWorkPackage(DeliveryRecord delivery) throws WTException
      Gets the WorkPackage related to the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      Returns:
      AbstractWorkPackage
      Throws:
      WTException
    • setWorkPackage

      public static void setWorkPackage(DeliveryRecord delivery, AbstractWorkPackage workpackage) throws WTException
      Sets the WorkPackage related to the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      workpackage - the workpackage
      Throws:
      WTException - the wT exception
    • getBaseDeliveryRecord

      public static DeliveryRecord getBaseDeliveryRecord(DeliveryRecord delivery)
      Gets the base delivery record of the DeliveryRecord

      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 the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      baseDeliveryRecord - the base delivery record
      Throws:
      WTException - the wT exception
    • getSentFrom

      public static WTUser getSentFrom(DeliveryRecord delivery)
      Gets the sender of the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      Returns:
      sender - WTUser
    • getSentTo

      public static WTUser getSentTo(DeliveryRecord delivery)
      Gets the recipient of the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      Returns:
      recipient - WTUser
    • setSentTo

      public static void setSentTo(DeliveryRecord delivery, WTUser sentFromUser) throws WTException
      Sets the recipient on the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      sentFromUser - the sent from user
      Throws:
      WTException - the wT exception
    • setSentFrom

      public static void setSentFrom(DeliveryRecord delivery, WTUser sentFromUser) throws WTException
      Sets the sender on the DeliveryRecord

      Supported API: true

      .
      Parameters:
      delivery - the delivery
      sentFromUser - the sent from user
      Throws:
      WTException - the wT exception
    • setSentFromAddress

      public static void setSentFromAddress(DeliveryRecord delivery, WTUser sentFrom) throws WTException
      Sets the sentFromAddress on DeliveryRecord.

      Supported API: true

      Parameters:
      delivery - the delivery
      sentFrom - the sent from
      Throws:
      WTException - the wT exception
    • setSentToAddress

      public static void setSentToAddress(DeliveryRecord delivery, WTUser sentTo) throws WTException
      Sets the sentToAddress on DeliveryRecord.

      Supported API: true

      Parameters:
      delivery - the delivery
      sentTo - 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 delivery
      name - the name
      email - the email
      address - the address
      Throws:
      WTException - the wT exception
    • checkPackageHasSentDeliveries

      public static boolean checkPackageHasSentDeliveries(AbstractWorkPackage wp) throws WTException
      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 as DeliveryStatusType.DELIVERED.

      Supported API: true

      Parameters:
      delivery - - DeliveryRecord
      time - - Timestamp the GMT time, if null, the system time would be used.
      user - - WTPrincipalReference if 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 as DeliveryStatusType.RECEIVED This would also unmark the delivery being DeliveryStatusType.ACCEPTED A delivery can only be received if it has been sent.

      Supported API: true

      Parameters:
      delivery - - DeliveryRecord
      time - - Timestamp the 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 as DeliveryStatusType.ACCEPTED This would also mark the delivery as DeliveryStatusType.RECEIVED if not already received. A delivery can only be accepted if it has been sent.

      Supported API: true

      Parameters:
      delivery - - DeliveryRecord
      time - - Timestamp the 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 as DeliveryStatusType.REJECTED This would also mark the delivery as DeliveryStatusType.RECEIVED if not already received. A delivery can only be rejected if it has been sent.

      Supported API: true

      Parameters:
      delivery - - DeliveryRecord
      time - - Timestamp the GMT time, if null, the system time would be used.
      user - - WTPrincipalReferenceif null, the session user would be used.
      Throws:
      WTException - the wT exception