utilities - data
Die nachfolgenden Inhalte sind nur in englischer Sprache verfügbar.
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__(self, planta_id) | planta_id: UUID of the load record | None | |
LoadCheck.check_booking_is_cancelled(self) | None | Check if booking is cancelled and, if so, raise BookingCancelledException. | |
LoadCheck.check_deadline_for_modification(self) | 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(self) | 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(self) | 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(self) | 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(self) | 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, date) | project_id: ID of the project (DI001001) date: java Date object | True if allowed, False otherwise | Checks whether the posting type allows bookings on this date |
check_deadline(date=None) | 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, task_id, date) | project_id: ID of the project (DI001001) task_id: ID of the task (DI001098) date: java Date object | False | Check if creating a booking for the given parameters is possible Raises a subclass of WebInterfaceException if not |
check_load_creation(project_id, task_id, resource_id, date, load, load_id=None) | project_id: ID of the project (DI001001) task_id: ID of the task (DI001098) resource_id: ID of the resource (DI001218) date: java Date object load: load value (float) load_id: UUID of the load record | None | Check if a load may be created with the given data Raises a subclass of WebInterfaceException if we may not create a load |
check_load_modification(planta_id) | planta_id: UUID of the load record | None | Check if a load may be modified with the given data Raises a subclass of WebInterfaceException if we may not modify a load |
check_negative_load(load) | load: load value (float) | None | Check if the load value is negative Raises a subclass of WebInterfaceException if the load value is negative and posting cancelation is enabled |
check_project_or_task_are_finished_based_on_project_and_task(project_id, task_id) | project_id: ID of the project (DI001001) task_id: ID of the task (DI001098) | None | Check if the assigned project/task for a given load are finished |
check_resource_assignment_is_finished(project_id, task_id, resource_id) | project_id: ID of the project (DI001001) task_id: ID of the task (DI001098) resource_id: ID of the resource (DI001218) | 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) | 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, task_id) | project_id: ID of the project (DI001001) task_id: ID of the task (DI001098) | 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) | task_id: UUID of the task record | Position of the task (Integer) | Get the position of the given task |
is_valid_resource(resource_id) | resource_id: ID of the resource (DI001218) | True if resource exists, False otherwise | Check whether the given resource exists |
load_exists(item) | item: UUID of the load record | True if load exists, False otherwise | Check whether the given load exists |
max_hours_reached(resource_id, date, load, load_id=None) | resource_id: ID of the resource (DI001218) date: java Date object load: load value (float) load_id: UUID of the load record | None | Check if the maximum allowed hours for the given resource/date combination are reached and raise MaxHoursReachedException if so |
project_exists(project_id) | project_id: UUID of the project record | True if project exists, False otherwise | Check whether the given project exists |
project_is_active(project_id) | 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) | 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) | 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, task_id, resource_id) | project_id: ID of the project (DI001001) task_id: ID of the task (DI001098) resource_id: ID of the resource (DI001218) | 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) | task_id: UUID of the task record | True if task exists, False otherwise | Check whether the given task exists |
task_is_locked(project_id, task_id) | project_id: ID of the project (DI001001) task_id: ID of the task (DI001098) | True if task is locked, False otherwise | Check whether the given task in the given project is locked |
-
Page: