#-*- mode: python; mode: fold -*-
# $Id: __init__.py 238 2006-06-01 16:57:18Z joachim $
from Products.CMFCore.utils import ContentInit, ToolInit
from Products.CMFCore.DirectoryView import registerDirectory
from Products.CMFCore import utils as cmfutils
from Products.CMFCore.CMFCorePermissions import AddPortalContent

from Products.GenericSetup import profile_registry
from Products.GenericSetup import EXTENSION

from Products.CPSCore.interfaces import ICPSSite

from Products.WAeUP.University import University, addUniversity
from Products.WAeUP.Accommodation import AccoFolder, addAccoFolder
from Products.WAeUP.Accommodation import Accommodation, addAccommodation
from Products.WAeUP.Academics import SCFolder, addSCFolder
from Products.WAeUP.Academics import StudyCourse, addStudyCourse
from Products.WAeUP.Academics import Faculty, addFaculty
from Products.WAeUP.Academics import Department, addDepartment
from Products.WAeUP.Academics import Course, addCourse
from Products.WAeUP.Academics import CourseTicket, addCourseTicket
from Products.WAeUP.Students import Student, addStudent
from Products.WAeUP.Students import StudentPersonal, addStudentPersonal
from Products.WAeUP.Students import StudentEligibility, addStudentEligibility
from Products.WAeUP.Students import StudentDocuments, addStudentDocuments
from Products.WAeUP.Students import Jamb, addJamb
from Products.WAeUP.Students import StudyLevel, addStudyLevel
from Products.WAeUP.Students import Semester, addSemester


import Widgets

contentClasses = (
    University,
    SCFolder,
    StudyCourse,
    Faculty,
    Department,
    Course,
    CourseTicket,
    AccoFolder,
    Accommodation,
    Student,
    StudentPersonal,
    StudentEligibility,
    StudentDocuments,
    Jamb,
    StudyLevel,
    Semester,
    )

contentConstructors = (
    addUniversity,
    addSCFolder,
    addStudyCourse,
    addFaculty,
    addDepartment,
    addCourse,
    addCourseTicket,
    addAccoFolder,
    addAccommodation,
    addStudent,
    addStudentPersonal,
    addStudentEligibility,
    addStudentDocuments,
    addJamb,
    addStudyLevel,
    addSemester,
    )

fti = (
    {}, # University
    {}, #SCFolder
    {}, #StudyCourse
    {}, # Faculty
    {}, # Department
    {}, # Course
    {}, # CourseTicket
    {}, # AccoFolder
    {}, # Accommodation
    {}, # Student,
    {}, # StudentPersonal,
    {}, # StudentEligibility,
    {}, # StudentDocuments,
    {}, # Jamb,
    {}, # StudyLevel,
    {}, # Semester,
    )

registerDirectory('skins', globals())

def initialize(registrar):
    ContentInit('WAeUP Types',
                content_types = contentClasses,
                permission = AddPortalContent,
                extra_constructors = contentConstructors,
                fti = fti,
                ).initialize(registrar)

    # Extension profile registration
    profile_registry.registerProfile(
        'default',
        'WAeUP',
        "The WestAfrican e-University Project",
        'profiles/default',
        'WAeUP',
        EXTENSION,
        for_=ICPSSite)

