コード例 #1
0
def delete_domain(domain_name):
    if db.domain_exists(domain_name):
        domain_content_connector = factory.get_entity_data_connector()
        db.remove_domain(domain_name)
        domain_content_connector.delete_domain_items(domain_name)
        return json.dumps(dict(success=True))
    return json.dumps(dict(success=False))
コード例 #2
0
ファイル: domainupload.py プロジェクト: mrG7/Datawake
def delete_domain(team_id, domain_id):
    tangelo.log("deleting domain: " + str(domain_id))
    domain_content_connector = factory.get_entity_data_connector()
    domain_content_connector.delete_domain_items(domain_id)
    tangelo.log("delted features")
    db.remove_domain(domain_id)
    tangelo.log("delted meta data")
    return json.dumps(dict(success=True))
コード例 #3
0
def delete_domain(team_id, domain_id):
    tangelo.log("deleting domain: " + str(domain_id))
    domain_content_connector = factory.get_entity_data_connector()
    domain_content_connector.delete_domain_items(domain_id)
    tangelo.log("delted features")
    db.remove_domain(domain_id)
    tangelo.log("delted meta data")
    return json.dumps(dict(success=True))
コード例 #4
0
ファイル: loader.py プロジェクト: diffeo/Datawake
def delete_domain(*args, **kwargs):
    domain_name = kwargs.get("domain_name")
    for key in kwargs.keys():
        tangelo.log(key)
    if db.domain_exists(domain_name):
        domain_content_connector = factory.get_entity_data_connector()
        db.remove_domain(domain_name)
        domain_content_connector.delete_domain_items(domain_name)
        return json.dumps(dict(success=True))
    else:
        return json.dumps(dict(success=False))
コード例 #5
0
ファイル: domainupload.py プロジェクト: mrG7/Datawake
def upload_file(team_id, name, description, features):

    # tangelo.log("Loading new domain: ")
    # tangelo.log(name)
    # tangelo.log(description)
    # tangelo.log(features)

    domain_id = db.add_new_domain(team_id, name, description)

    domain_content_connector = factory.get_entity_data_connector()

    try:
        domain_content_connector.add_new_domain_items(domain_id, features)
    except:
        db.remove_domain(domain_id)
        raise
    finally:
        domain_content_connector.close()

    newdomain = dict(id=domain_id, name=name, description=description)
    # tangelo.log("loaded new domain")
    # tangelo.log(newdomain)
    return json.dumps(newdomain)
コード例 #6
0
def upload_file(team_id, name, description, features):

    #tangelo.log("Loading new domain: ")
    #tangelo.log(name)
    #tangelo.log(description)
    #tangelo.log(features)

    domain_id = db.add_new_domain(team_id, name, description)

    domain_content_connector = factory.get_entity_data_connector()

    try:
        domain_content_connector.add_new_domain_items(domain_id, features)
    except:
        db.remove_domain(domain_id)
        raise
    finally:
        domain_content_connector.close()

    newdomain = dict(id=domain_id, name=name, description=description)
    #tangelo.log("loaded new domain")
    #tangelo.log(newdomain)
    return json.dumps(newdomain)