heliport.gate_connection.proposal_management package
Submodules
heliport.gate_connection.proposal_management.gate_user_management module
- class heliport.gate_connection.proposal_management.gate_user_management.GateUser(gate_id, gate_manager)
Bases:
User
- check_new(user_queries: UserQueries)
- download(session, ldap_manager)
- static extract_users(project)
- get_db_user_from(user_queries: UserQueries)
- save_to(user_queries: UserQueries)
heliport.gate_connection.proposal_management.hzdr_gate_proposal_management module
- class heliport.gate_connection.proposal_management.hzdr_gate_proposal_management.GateProject(main_dict, user_dict)
Bases:
object
- class heliport.gate_connection.proposal_management.hzdr_gate_proposal_management.GateQueries
Bases:
object
- abstract static create_or_update_gate_project(gate_project: GateProject)
- class heliport.gate_connection.proposal_management.hzdr_gate_proposal_management.HZDRGateProposalManager
Bases:
ProposalManager
- download_proposals()
- get_paged_data(url, object_name)
- import_users(projects, user_queries, force_update_users=False)
- insert_user_objects(users)
- retrieve_token()
- save_proposal(gate_project, gate_queries)
- class heliport.gate_connection.proposal_management.hzdr_gate_proposal_management.ProposalManager
Bases:
object
- abstract download_proposals()
- abstract import_users(projects, user_queries, force_update_users=False)
- abstract save_proposal(proposal, gate_queries: GateQueries)
- session: Session | None
heliport.gate_connection.proposal_management.ldap_user_management module
- class heliport.gate_connection.proposal_management.ldap_user_management.LDAPUser(ldap_id)
Bases:
User
- check_new(user_queries: UserQueries)
- download(session, user_info_manager: LdapUserInformationManager)
- classmethod extract_users(project)
- get_db_user_from(user_queries: UserQueries)
- save_to(user_queries: UserQueries)
heliport.gate_connection.proposal_management.use_cases module
- class heliport.gate_connection.proposal_management.use_cases.UpdateProposalDatabaseUseCase(user_queries, gate_queries, force_update_users=False)
Bases:
object
A class representing the Gate proposal import process.
Start the process by using the
execute()
method.- Parameters:
user_queries – The
heliport.gate_connection.models.ProposalUserQueries
class.gate_queries – The
heliport.gate_connection.models.ProposalQueries
class.force_update_users – Also download and update users that already exist.
- execute()
- update_gate_database(proposal_manager)
heliport.gate_connection.proposal_management.user_management module
- class heliport.gate_connection.proposal_management.user_management.User
Bases:
object
- abstract check_new(user_queries)
- classmethod collect_into_set(gate_projects)
- abstract download(session: Session, ldap_manager: LdapUserInformationManager)
Download all information to update this user later.
- abstract static extract_users(project)
- abstract get_db_user_from(user_queries)
- classmethod import_users(gate_projects, user_queries, session: Session, ldap_manager: LdapUserInformationManager, force_update_users=False)
- abstract save_to(user_queries)
- class heliport.gate_connection.proposal_management.user_management.UserQueries
Bases:
object
- abstract static create_user()
- abstract static get_user_by_gate_id(gate_id)
- abstract static get_user_by_ldap_id(ldap_id)
- abstract static get_user_by_ldap_id_check_gate_duplication(ldap_id, gate_id)
- abstract static update_user(user, display_name, ldap_id, gate_id=None, affiliation=None, email=None)
Update the heliport user with the provided attributes.
Additionally, the
heliport.gate_connection.models.GateUser
is updated ifgate_id
is provided.