File: MSProjectAttachment.py

package info (click to toggle)
zope-zaaplugins 2.21-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,920 kB
  • ctags: 293
  • sloc: python: 1,402; sh: 1,365; xml: 1,274; makefile: 89
file content (56 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
##############################################################################
#
# Copyright (c) 2002 Ingeniweb SARL
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################

"""
ZAttachmentAttribute product
"""


from config import *
import os
import string

from Products.ZAttachmentAttribute import ZAttachmentAttribute
from Products.ZAttachmentAttribute import ZAttachmentRegistry
from Products.ZAttachmentAttribute import ZAbstractAttachment
from Products.ZAttachmentAttribute.Log import *

class MSProjectAttachment(ZAbstractAttachment.ZAbstractAttachment):
    """
    MS Project file abstraction
    """
    
    icon_file = "msproject.gif"
    small_icon_file = "msproject_small.gif"
    content_types = ('application/vnd.ms-project', )
    index_list = ()


    def indexAttachment(self):
        """
        indexAttachment(self) => nothing
        No indexing is done on images
        """
        raise RuntimeError, "Unable to index this"


    def isPreviewAvailable(self,):
        return 0


    def convertPreview(self,):
        return None


ZAttachmentRegistry.AttachmentRegistry.registerClass(MSProjectAttachment, globals())