Copyright (C) 2012, University of Cambridge, Department of Psychiatry. Created by Rudolf Cardinal (firstname.lastname@example.org).
This file is part of CamCOPS.
CamCOPS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
CamCOPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with CamCOPS. If not, see <https://www.gnu.org/licenses/>.
- class camcops_server.cc_modules.cc_exportrecipient.ExportRecipient(*args, **kwargs)¶
SQLAlchemy ORM class representing an export recipient.
This has a close relationship with (and inherits from)
Full details of parameters are in the docs for the config file.
- __init__(*args, **kwargs)¶
Creates a blank
NB not called when SQLAlchemy objects loaded from database; see
- property db_url_obscuring_password: Optional[str]¶
Returns the database URL (if present), but with its password obscured.
- get_attrnames() List[str] ¶
Returns all relevant attribute names.
- classmethod get_existing_matching_recipient(dbsession: sqlalchemy.orm.session.Session, recipient: camcops_server.cc_modules.cc_exportrecipient.ExportRecipient) Optional[camcops_server.cc_modules.cc_exportrecipient.ExportRecipient] ¶
Retrieves an active instance from the database that matches
other, if there is one.
- init_on_load() None ¶
Called when SQLAlchemy recreates an object; see https://docs.sqlalchemy.org/en/latest/orm/constructors.html.
Sets Python-only attributes.
See also IGNORE_FOR_EQ_ATTRNAMES, NEEDS_RECOPYING_EACH_TIME_FROM_CONFIG_ATTRNAMES.
- is_task_suitable(task: Task) bool ¶
Used as a double-check that a task remains suitable.
is the task suitable for this recipient?
- Return type
- is_upload_suitable_for_push(tablename: str, uploading_group_id: int) bool ¶
Might an upload potentially give tasks to be “pushed”?
tablename – table name being uploaded
uploading_group_id – group ID if the uploading user
whether this upload should be considered further