Logo Search packages:      
Sourcecode: zope-extfile version File versions

IExtFile.py

#
# IExtFile and IExtImage public interfaces
#

try: 
    from Interface import Interface
except ImportError:
    # Zope < 2.6
    from Interface import Base as Interface


00012 class IExtFile(Interface):
    '''ExtFile public interface'''

00015     def index_html(icon=0, preview=0, width=None, height=None, REQUEST=None):
        '''The default view. Returns the file's contents.'''

00018     def view_image_or_file():
        '''Redirects to the default view of the file or image.'''
    
00021     def link(text='', **args):
        '''Returns an HTML link tag for the file or image.'''

00024     def is_broken():
        '''Returns true if the file does not exist in the repository, false otherwise.'''

00027     def get_size():
        '''Returns the size of the file or image.'''

00030     def size():
        '''Returns a formatted, stringified version of the file size.'''

00033     def get_filename():
        '''Returns the filesystem path of the file.'''

00036     def getContentType():
        '''Returns the file's content type (MIME type).'''

00039     def static_mode():
        '''Returns true if EXTFILE_STATIC_PATH is set, false otherwise.'''

00042     def static_url():
        '''Returns the Zope or static URL of a file, depending on static_mode().'''

00045     def icon_gif():
        '''Redirects to the icon for the file's MIME type.'''

00048     def icon_html():
        '''Returns an HTML image tag for the icon.'''

00051     def getIconPath():
        '''Returns the filesystem path of the icon for the file's MIME type.'''

00054     def manage_editExtFile(title='', descr='', REQUEST=None):
        '''Changes the properties.'''

00057     def manage_upload(file='', content_type='', REQUEST=None):
        '''Uploads a file from a file handle or string buffer.'''

00060     def manage_file_upload(file='', content_type='', REQUEST=None):
        '''Uploads a file from a file handle or local directory.'''

00063     def manage_http_upload(url, REQUEST=None):
        '''Uploads a file from an HTTP server.'''

00066     def manage_afterUpdate(filename, content_type, size):
        '''Called whenever the file data has been updated.'''


00070 class IExtImage(IExtFile):
    '''ExtImage public interface'''

00073     def tag(preview=0, icon=0, height=None, width=None, alt=None,
            scale=0, xscale=0, yscale=0, border='0', REQUEST=None, **args):
        '''Returns an HTML image tag for this image.'''

00077     def width():
        '''Returns the pixel width of the main image.'''

00080     def height():
        '''Returns the pixle height of the main image.'''

00083     def format():
        '''Returns the file format of the image.'''
    
00086     def is_webviewable():
        '''Returns true if the file format is GIF, JPEG, or PNG; false otherwise.'''

00089     def preview():
        '''Redirects to the preview image.'''

00092     def preview_html():
        '''Returns an HTML image tag for the preview image.'''

00095     def get_prev_size():
        '''Returns the size of the preview image.'''

00098     def prev_size():
        '''Returns a formatted stringified version of the preview image size.'''

00101     def prev_width():
        '''Returns the pixel width of the preview image.'''

00104     def prev_height():
        '''Returns the pixel height of the preview image.'''

00107     def get_prev_filename():
        '''Returns the filesystem path of the preview image.'''

00110     def manage_create_prev(maxx=0, maxy=0, ratio=0, REQUEST=None):
        '''Create the preview from the main image.'''

00113     def manage_del_prev(REQUEST=None):
        '''Deletes the preview image.'''

00116     def manage_upload(file='', content_type='', is_preview=0, create_prev=0, 
                      maxx='', maxy='', ratio=0, REQUEST=None):
        '''Uploads an image or preview from a file handle or string buffer.'''

00120     def manage_file_upload(file='', content_type='', is_preview=0, create_prev=0,
                           maxx='', maxy='', ratio=0, REQUEST=None):
        '''Uploads an image or preview from a file handle or local directory.'''

00124     def manage_http_upload(url, is_preview=0, REQUEST=None):
        '''Uploads an image or preview from an HTTP server.'''


Generated by  Doxygen 1.6.0   Back to index