The data module provides functions for verifying project data such as whether certain records exist or if they are allowed to be modified
Classes
LoadCheck
Methods
|
Function |
Parameters |
Return Value |
Description |
|---|---|---|---|
|
LoadCheck.__init__ |
planta_id: UUID of the load record |
None |
|
|
LoadCheck.check_booking_is_cancelled |
|
None |
Check if booking is cancelled and, if so, raise BookingCancelledException. |
|
LoadCheck.check_deadline_for_modification |
|
None |
Verifies whether the booking would violate the deadline. If automatic posting cancelation is not enabled for bookings past the deadline, this raises a DeadlineException. |
|
LoadCheck.check_interface_lock |
|
None |
Verifies whether the booking is locked by the interface. If automatic posting cancelation is not enabled for bookings locked by the interface, this raises a subclass of WebInterfaceException. |
|
LoadCheck.check_modification |
|
None |
Verifies whether the booking is allowed to be modified by invoking all other methods of this class, which in turn raise a subclass of WebInterfaceException if not allowed. |
|
LoadCheck.check_project_or_task_are_finished |
|
None |
Verifies whether the bookings task or project are finished. If automatic posting cancelation is not enabled for bookings on finished tasks or project, this raises a TaskFinishedException or ProjectFinishedException, respectively. |
|
LoadCheck.check_released |
|
None |
Verifies whether the booking is released. If automatic posting cancelation is not enabled for released bookings, this raises a subclass of ReleasedException. |
Functions
|
Function |
Parameters |
Return Value |
Description |
|---|---|---|---|
|
check_date_against_posting_type |
project_id: ID of the project (DI001001)
|
True if allowed, False otherwise |
Checks whether the posting type allows bookings on this date |
|
check_deadline |
date: java Date object |
None |
Verifies whether the booking would violate the deadline. If automatic posting cancelation is not enabled for bookings past the deadline, this raises a DeadlineException |
|
check_if_booking_is_possible |
project_id: ID of the project (DI001001)
|
False |
Check if creating a booking for the given parameters is possible
|
|
check_load_creation |
project_id: ID of the project (DI001001)
|
None |
Check if a load may be created with the given data
|
|
check_load_modification |
planta_id: UUID of the load record |
None |
Check if a load may be modified with the given data
|
|
check_negative_load |
load: load value (float) |
None |
Check if the load value is negative
|
|
check_project_or_task_are_finished_based_on_project_and_task |
project_id: ID of the project (DI001001)
|
None |
Check if the assigned project/task for a given load are finished |
|
check_resource_assignment_is_finished |
project_id: ID of the project (DI001001)
|
None |
Check if the resource assignment has an actual end and raise ResourceAssignmentFinishedException if so |
|
get_current_deadline |
|
Current deadline (java Date object) |
Return the current deadline date |
|
get_default_cost_type_from_resource |
resource_id: UUID of the resource record |
Default cost type of the resource |
Get the default cost type of the given resource |
|
get_reporting_start_and_end |
project_id: ID of the project (DI001001)
|
Tuple of reporting start, reporting end as java Date objects |
Get the reporting start and end dates of the given task in the given project |
|
get_task_position |
task_id: UUID of the task record |
Position of the task (Integer) |
Get the position of the given task |
|
is_valid_resource |
resource_id: ID of the resource (DI001218) |
True if resource exists, False otherwise |
Check whether the given resource exists |
|
load_exists |
item: UUID of the load record |
True if load exists, False otherwise |
Check whether the given load exists |
|
max_hours_reached |
resource_id: ID of the resource (DI001218)
|
None |
Check if the maximum allowed hours for the given resource/date combination are reached and raise MaxHoursReachedException if so |
|
project_exists |
project_id: UUID of the project record |
True if project exists, False otherwise |
Check whether the given project exists |
|
project_is_active |
project_id: ID of the project (DI001001) |
True if project is active, False otherwise |
Check whether the given project is active |
|
project_is_locked |
project_id: ID of the project (DI001001) |
True if project is locked, False otherwise |
Check whether the given project is locked |
|
resource_exists |
resource_id: UUID of the resource record |
True if resource exists, False otherwise |
Check whether the given resource exists |
|
resource_is_assigned_to_task |
project_id: ID of the project (DI001001)
|
True if resource is assigned to task, False otherwise |
Check whether the given resource is assigned to the given task in the given project |
|
task_exists |
task_id: UUID of the task record |
True if task exists, False otherwise |
Check whether the given task exists |
|
task_is_locked |
project_id: ID of the project (DI001001)
|
True if task is locked, False otherwise |
Check whether the given task in the given project is locked |