alcatel/dataparser/ClientDocumentaryFileAttributes.py
changeset 27 8ca7f2cea729
child 37 3848e1813a30
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/alcatel/dataparser/ClientDocumentaryFileAttributes.py	Thu Jan 24 16:58:55 2013 +0100
@@ -0,0 +1,53 @@
+'''
+Created on 06 August 2012
+
+@author: Corinne
+'''
+import logging
+
+logger = logging.getLogger('document')
+
+class ClientDocumentaryFileAttributes(object):
+
+    def __init__(self, request):
+        self.request = request
+    
+    def get_user(self):
+        user = ''
+        try:
+            user = self.request.POST['user']
+        except Exception, err:
+            logger.info('No user attribute in the http post request.' + str(err))
+        return user
+    
+    def get_title(self):
+        title = ''
+        try:
+            title = self.request.POST['title']
+        except Exception, err:
+            logger.info('No title attribute in the http post request.' + str(err))
+        return title
+    
+    def get_description(self):
+        description = ''
+        try:
+            description = self.request.POST['description']
+        except Exception, err:
+            logger.info('No description attribute in the http post request.' + str(err))
+        return description
+    
+    def get_query_id(self):
+        query_id = ''
+        try:
+            query_id = self.request.POST['query_id']
+        except Exception, err:
+            logger.info('No query_id attribute in the http post request. ' + str(err))
+        return query_id
+    
+    def get_visibility(self):
+        visibility = False
+        try:
+            visibility = self.request.POST['visibility']
+        except Exception, err:
+            logger.info('No visibility attribute in the http post request. ' + str(err))
+        return visibility
\ No newline at end of file