Exemplo n.º 1
0
 def get(self):
   session_id = get_session_id(session, request)
   dao = ExportDAO(session_id)
   modelBuf = dao.file_export()
   dao.close()
   resp = make_response(json_serialize(modelBuf, session_id=session_id), httplib.OK)
   resp.headers['Content-Type'] = 'application/json'
   return resp
Exemplo n.º 2
0
 def get(self):
     session_id = get_session_id(session, request)
     dao = ExportDAO(session_id)
     modelBuf = dao.file_export()
     dao.close()
     resp = make_response(modelBuf)
     resp.headers["Content-Type"] = 'application/xml'
     resp.headers["Content-Disposition"] = 'Attachment; filename=model.xml'
     return resp
Exemplo n.º 3
0
 def get(self,task_name,persona_name,environment_name):
   session_id = get_session_id(session, request)
   fileName = request.args.get('filename', task_name + '.grl')
   dao = ExportDAO(session_id)
   modelBuf = dao.grl_export(task_name,persona_name,environment_name)
   dao.close()
   resp = make_response(modelBuf)
   resp.headers["Content-Type"] = 'application/grl'
   resp.headers["Content-Disposition"] = 'Attachment; filename=' + fileName
   return resp
Exemplo n.º 4
0
 def get(self,architectural_pattern_name):
   session_id = get_session_id(session, request)
   fileName = request.args.get('filename', architectural_pattern_name + '.xml')
   dao = ExportDAO(session_id)
   modelBuf = dao.architectural_pattern_export(architectural_pattern_name)
   dao.close()
   resp = make_response(modelBuf)
   resp.headers["Content-Type"] = 'application/xml'
   resp.headers["Content-Disposition"] = 'Attachment; filename=' + fileName
   return resp
Exemplo n.º 5
0
 def get(self, architectural_pattern_name):
     session_id = get_session_id(session, request)
     dao = ExportDAO(session_id)
     modelBuf = dao.architectural_pattern_export(architectural_pattern_name)
     dao.close()
     resp = make_response(modelBuf)
     resp.headers["Content-Type"] = 'application/xml'
     resp.headers[
         "Content-Disposition"] = 'Attachment; filename=' + architectural_pattern_name + '.xml'
     return resp
Exemplo n.º 6
0
 def get(self, task_name, persona_name, environment_name):
     session_id = get_session_id(session, request)
     dao = ExportDAO(session_id)
     modelBuf = dao.grl_export(task_name, persona_name, environment_name)
     dao.close()
     resp = make_response(modelBuf)
     resp.headers["Content-Type"] = 'application/grl'
     resp.headers[
         "Content-Disposition"] = 'Attachment; filename=' + task_name + '.grl'
     return resp
Exemplo n.º 7
0
 def get(self):
     session_id = get_session_id(session, request)
     fileName = request.args.get('filename', 'security_patterns.xml')
     dao = ExportDAO(session_id)
     modelBuf = dao.security_patterns_export()
     dao.close()
     resp = make_response(modelBuf)
     resp.headers["Content-Type"] = 'application/xml'
     resp.headers[
         "Content-Disposition"] = 'Attachment; filename=' + fileName
     return resp
Exemplo n.º 8
0
  def get(self):
    session_id = get_session_id(session, request)
    fileName = request.args.get('filename', 'model')
    fileType = request.args.get('fileType','xml')

    dao = ExportDAO(session_id)
    modelBuf = dao.file_export(fileName,fileType)
    dao.close()
    resp = make_response(modelBuf)
    if (fileType == 'cairis'):
      resp.headers["Content-Type"] = 'application/octet-stream'
    else:
      resp.headers["Content-Type"] = 'application/xml'
    resp.headers["Content-Disposition"] = 'Attachment; filename=' + fileName + '.' + fileType
    return resp
Exemplo n.º 9
0
    def get(self):
        session_id = get_session_id(session, request)
        fileName = request.args.get('filename', 'model')
        fileType = request.args.get('fileType', 'xml')

        dao = ExportDAO(session_id)
        modelBuf = dao.file_export(fileName, fileType)
        dao.close()
        resp = make_response(modelBuf)
        if (fileType == 'cairis'):
            resp.headers["Content-Type"] = 'application/octet-stream'
        else:
            resp.headers["Content-Type"] = 'application/xml'
        resp.headers[
            "Content-Disposition"] = 'Attachment; filename=' + fileName + '.' + fileType
        return resp