alcatel/dataparser/ClientDocumentaryFileAttributes.py
changeset 27 8ca7f2cea729
child 37 3848e1813a30
equal deleted inserted replaced
26:94f586daa623 27:8ca7f2cea729
       
     1 '''
       
     2 Created on 06 August 2012
       
     3 
       
     4 @author: Corinne
       
     5 '''
       
     6 import logging
       
     7 
       
     8 logger = logging.getLogger('document')
       
     9 
       
    10 class ClientDocumentaryFileAttributes(object):
       
    11 
       
    12     def __init__(self, request):
       
    13         self.request = request
       
    14     
       
    15     def get_user(self):
       
    16         user = ''
       
    17         try:
       
    18             user = self.request.POST['user']
       
    19         except Exception, err:
       
    20             logger.info('No user attribute in the http post request.' + str(err))
       
    21         return user
       
    22     
       
    23     def get_title(self):
       
    24         title = ''
       
    25         try:
       
    26             title = self.request.POST['title']
       
    27         except Exception, err:
       
    28             logger.info('No title attribute in the http post request.' + str(err))
       
    29         return title
       
    30     
       
    31     def get_description(self):
       
    32         description = ''
       
    33         try:
       
    34             description = self.request.POST['description']
       
    35         except Exception, err:
       
    36             logger.info('No description attribute in the http post request.' + str(err))
       
    37         return description
       
    38     
       
    39     def get_query_id(self):
       
    40         query_id = ''
       
    41         try:
       
    42             query_id = self.request.POST['query_id']
       
    43         except Exception, err:
       
    44             logger.info('No query_id attribute in the http post request. ' + str(err))
       
    45         return query_id
       
    46     
       
    47     def get_visibility(self):
       
    48         visibility = False
       
    49         try:
       
    50             visibility = self.request.POST['visibility']
       
    51         except Exception, err:
       
    52             logger.info('No visibility attribute in the http post request. ' + str(err))
       
    53         return visibility