Class DestinationOption

java.lang.Object
ecmwf.ecpds.master.transfer.DestinationOption

public final class DestinationOption extends Object
The Class DestinationOption.
  • Field Details

    • UNKNOWN_TYPE

      public static final String UNKNOWN_TYPE
      The Constant UNKNOWN_TYPE.
      See Also:
    • TYPE_USER_AND_GROUP

      public static final String TYPE_USER_AND_GROUP
      The Constant TYPE_USER_AND_GROUP.
      See Also:
    • deleteFromSpool

      public static final List<String> deleteFromSpool
      The Constant deleteFromSpool.
    • ifTargetExist

      public static final List<String> ifTargetExist
      The Constant ifTargetExist.
    • onHostFailure

      public static final List<String> onHostFailure
      The Constant onHostFailure.
  • Constructor Details

    • DestinationOption

      public DestinationOption(Destination destination)
      Instantiates a new destination option.
      Parameters:
      destination - the destination
  • Method Details

    • getList

      public static List<DestinationOption.TypeEntry> getList()
      Gets the list.
      Returns:
      the list
    • setList

      public static void setList(List<DestinationOption.TypeEntry> list)
      Sets the list.
      Parameters:
      list - the new list
    • getTypes

      public static List<Map.Entry<Integer,String>> getTypes(boolean addAllSelectors)
      Get the type list ordered by the pos field.
      Parameters:
      addAllSelectors - if set add all selectors
      Returns:
      the ordered list of types
    • exists

      public static boolean exists(int id)
      Check if the id exists.
      Parameters:
      id - the id
      Returns:
      if it exists
    • getLabel

      public static String getLabel(String id)
      Get the label for an id.
      Parameters:
      id - the id
      Returns:
      the label for the id
    • getTypeEntry

      public static DestinationOption.TypeEntry getTypeEntry(String label)
      Get the type entry for a label.
      Parameters:
      label - the label
      Returns:
      the type entry for the label
    • getLabel

      public static String getLabel(int id)
      Get the label for an id.
      Parameters:
      id - the id
      Returns:
      the label for the id
    • isAcquisition

      public static boolean isAcquisition(int id)
      Checks if is acquisition.
      Parameters:
      id - the id
      Returns:
      true, if is acquisition
    • isDissemination

      public static boolean isDissemination(int id)
      Checks if is dissemination.
      Parameters:
      id - the id
      Returns:
      true, if is dissemination
    • isTimeCritical

      public static boolean isTimeCritical(int id)
      Checks if is time critical.
      Parameters:
      id - the id
      Returns:
      true, if is time critical
    • getTypeIds

      public static String getTypeIds(String category)
      Gets the list of ids for the selected category.
      Parameters:
      category - the category
      Returns:
      true, if is time critical
    • ifTargetExistResume

      public boolean ifTargetExistResume()
      If target exist resume.
      Returns:
      true, if successful
    • ifTargetExistOverwrite

      public boolean ifTargetExistOverwrite()
      If target exist overwrite.
      Returns:
      true, if successful
    • deleteFromSpoolOnSuccess

      public boolean deleteFromSpoolOnSuccess()
      Delete from spool on success.
      Returns:
      true, if successful
    • deleteFromSpoolOnExpiration

      public boolean deleteFromSpoolOnExpiration()
      Delete from spool on expiration.
      Returns:
      true, if successful
    • onHostFailureNextAndRetry

      public boolean onHostFailureNextAndRetry()
      On host failure next and retry.
      Returns:
      true, if successful
    • onHostFailureNextAndStay

      public boolean onHostFailureNextAndStay()
      On host failure next and stay.
      Returns:
      true, if successful
    • parseDate

      public static long parseDate(Destination destination, String date)
      Parse the date according to the format specified in the Destination, or the default one if it is not specified.
      Parameters:
      destination - the formatted date
      date - the date
      Returns:
      the date
    • formatDate

      public static String formatDate(Destination destination, long date)
      Format the date according to the format specified in the Destination, or the default one if it is not specified.
      Parameters:
      destination - the date
      date - the date
      Returns:
      the formatted date