'''
Created on 06 August 2012

@author: Corinne
'''
import logging

logger = logging.getLogger('document')

class ClientDocumentaryFileVisibilityAttribute(object):

    def __init__(self, request):
        self.request = request
    
    def get_documentary_file_id(self):
        documentary_file_id = ''
        try:
            documentary_file_id = self.request.POST['documentary_file_id']
        except Exception, err:
            logger.info('No documentary_file_id attribute in the http post request. ' + str(err))
        return documentary_file_id
    
    def get_visibility(self):
        visibility = ''
        try:
            visibility = self.request.POST['visibility']
        except Exception, err:
            logger.info('No visibility attribute in the http post request. ' + str(err))
        return visibility
    
    def get_user(self):
        user = ''
        try:
            user = self.request.POST['user']
        except Exception, err:
            logger.info('No description attribute in the http post request.' + str(err))
        return user