Class DestinationOption
java.lang.Object
ecmwf.ecpds.master.transfer.DestinationOption
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Entry for each type. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDestinationOption
(Destination destination) Instantiates a new destination option. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Delete from spool on expiration.boolean
Delete from spool on success.static boolean
exists
(int id) Check if the id exists.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.static String
getLabel
(int id) Get the label for an id.static String
Get the label for an id.static List
<DestinationOption.TypeEntry> getList()
Gets the list.static DestinationOption.TypeEntry
getTypeEntry
(String label) Get the type entry for a label.static String
getTypeIds
(String category) Gets the list of ids for the selected category.getTypes
(boolean addAllSelectors) Get the type list ordered by the pos field.boolean
If target exist overwrite.boolean
If target exist resume.static boolean
isAcquisition
(int id) Checks if is acquisition.static boolean
isDissemination
(int id) Checks if is dissemination.static boolean
isTimeCritical
(int id) Checks if is time critical.boolean
On host failure next and retry.boolean
On host failure next and stay.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.static void
Sets the list.
-
Field Details
-
UNKNOWN_TYPE
-
TYPE_USER_AND_GROUP
-
deleteFromSpool
-
ifTargetExist
-
onHostFailure
-
-
Constructor Details
-
DestinationOption
Instantiates a new destination option.- Parameters:
destination
- the destination
-
-
Method Details
-
getList
-
setList
Sets the list.- Parameters:
list
- the new list
-
getTypes
-
exists
public static boolean exists(int id) Check if the id exists.- Parameters:
id
- the id- Returns:
- if it exists
-
getLabel
-
getTypeEntry
Get the type entry for a label.- Parameters:
label
- the label- Returns:
- the type entry for the label
-
getLabel
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
-
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
Parse the date according to the format specified in the Destination, or the default one if it is not specified.- Parameters:
destination
- the formatted datedate
- the date- Returns:
- the date
-
formatDate
Format the date according to the format specified in the Destination, or the default one if it is not specified.- Parameters:
destination
- the datedate
- the date- Returns:
- the formatted date
-