def connections_delete_request(request_handler): request_id = util.generate_request_id() params, raw_post_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('delete_connection', params, False, request_id, raw_post_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def connections_delete_request(request_handler): request_id = util.generate_request_id() params, raw_post_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('delete_connection', params, False, request_id, raw_post_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def get_active_session_request(request_handler): ''' GET /[email protected]&password=force&org_type=developer ''' request_id = util.generate_request_id() params, json_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('get_active_session', params, False, request_id, json_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def get_active_session_request(request_handler): ''' GET /[email protected]&password=force&org_type=developer ''' request_id = util.generate_request_id() params, json_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('get_active_session', params, False, request_id, json_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def project_edit_subscription(request_handler): ''' POST /project/subscription { "project_name" : "my project name" "subscription" : ["ApexClass", "ApexPage"] } ''' request_id = util.generate_request_id() params, raw_post_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('update_subscription', params, False, request_id, raw_post_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def refresh_metadata_index(request_handler): ''' GET /project/get_index/refresh { "project_name" : "my project name", "metadata_types" : ["ApexClass"] } call to refresh a certain type of metadata ''' request_id = util.generate_request_id() params, json_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('refresh_metadata_index', params, False, request_id, json_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def get_metadata_index(request_handler): ''' GET /project/get_index { "project_name" : "my project name", "keyword" : "mykeyword" //optional } call to get the metadata index for a project ''' request_id = util.generate_request_id() params, json_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('get_indexed_metadata', params, False, request_id, json_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def metadata_list_request(request_handler): ''' GET /metadata/list { "sid" : "", "metadata_type" : "", "murl" : "" } call to get a list of metadata of a certain type ''' request_id = util.generate_request_id() params, json_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('list_metadata', params, False, request_id, json_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def metadata_list_request(request_handler): ''' GET /metadata/list { "sid" : "", "metadata_type" : "", "murl" : "" } call to get a list of metadata of a certain type ''' request_id = util.generate_request_id() params, json_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('list_metadata', params, False, request_id, json_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def update_credentials_request(request_handler): ''' POST /project/creds { "project_name" : "my project name" "username" : "*****@*****.**", "password" : "force", "org_type" : "developer", } NOTE: project name should not be updated, as it is used to find the project in question TODO: maybe we assign a unique ID to each project which will give users the flexibility to change the project name?? TODO: we may need to implement a "clean" flag which will clean the project after creds have been updated ''' request_id = util.generate_request_id() params, raw_post_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('update_credentials', params, False, request_id, raw_post_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)
def update_credentials_request(request_handler): ''' POST /project/creds { "project_name" : "my project name" "username" : "*****@*****.**", "password" : "force", "org_type" : "developer", } NOTE: project name should not be updated, as it is used to find the project in question TODO: maybe we assign a unique ID to each project which will give users the flexibility to change the project name?? TODO: we may need to implement a "clean" flag which will clean the project after creds have been updated ''' request_id = util.generate_request_id() params, raw_post_body, plugin_client = get_request_params(request_handler) worker_thread = BackgroundWorker('update_credentials', params, False, request_id, raw_post_body, plugin_client) worker_thread.start() worker_thread.join() response = worker_thread.response respond(request_handler, response)