'''
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