Ejemplo n.º 1
0
    '''Flag indicating that the application should be scanned for localized messages'''
    return False

# --------------------------------------------------------------------

@ioc.entity
def scanner(): return Scanner()

@ioc.entity
def cdmLocale() -> ICDM:
    '''
    The content delivery manager (CDM) for the locale files.
    '''
    return ExtendPathCDM(contentDeliveryManager(), 'cache/locale/%s')

@ioc.replace(ioc.getEntity(IPOFileService, modules[__name__]))
def poFileService() -> IPOFileService:
    srv = POFileService()
    srv.cdmLocale = cdmLocale()
    return srv

@ioc.replace(ioc.getEntity(IJSONLocaleFileService))
def jsonFileService() -> IJSONLocaleFileService:
    srv = JSONFileService()
    srv.cdmLocale = cdmLocale()
    return srv

# --------------------------------------------------------------------

@ioc.after(createTables)
def scan():
Ejemplo n.º 2
0
'''
Created on Aug 23, 2012

@package: superdesk media archive image
@copyright: 2012 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Ioan v. Pocol

Contains the services setups for media image archive.
'''

from ..superdesk import service
from ally.container import ioc
from superdesk.media_archive.api.image_data import IImageDataService
from superdesk.media_archive.impl.image_data import ImageDataServiceAlchemy

# --------------------------------------------------------------------

imageDataHandler = ioc.getEntity('imageDataHandler', service)


@ioc.replace(ioc.getEntity(IImageDataService, service))
def imageData() -> IImageDataService:
    b = ImageDataServiceAlchemy()
    b.handler = imageDataHandler()
    return b
Ejemplo n.º 3
0
"""
Created on Aug 23, 2012

@package: superdesk media archive video
@copyright: 2012 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Ioan v. Pocol

Contains the services setups for media video archive.
"""

from ..superdesk import service
from ally.container import ioc
from superdesk.media_archive.api.video_data import IVideoDataService
from superdesk.media_archive.impl.video_data import VideoDataServiceAlchemy

# --------------------------------------------------------------------

videoDataHandler = ioc.getEntity("videoDataHandler", service)


@ioc.replace(ioc.getEntity(IVideoDataService, service))
def videoData() -> IVideoDataService:
    b = VideoDataServiceAlchemy()
    b.handler = videoDataHandler()
    return b
Ejemplo n.º 4
0
'''
Created on Aug 23, 2012

@package: superdesk media archive video
@copyright: 2012 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Ioan v. Pocol

Contains the services setups for media video archive.
'''

from ..superdesk import service
from ally.container import ioc
from superdesk.media_archive.api.video_data import IVideoDataService
from superdesk.media_archive.impl.video_data import VideoDataServiceAlchemy

# --------------------------------------------------------------------

videoDataHandler = ioc.getEntity('videoDataHandler', service)


@ioc.replace(ioc.getEntity(IVideoDataService, service))
def videoData() -> IVideoDataService:
    b = VideoDataServiceAlchemy()
    b.handler = videoDataHandler()
    return b
Ejemplo n.º 5
0
'''
Created on Oct 1, 2012

@package: superdesk media archive audio
@copyright: 2012 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Ioan v. Pocol

Contains the services setups for media audio archive.
'''

from ..superdesk import service
from ally.container import ioc
from superdesk.media_archive.api.audio_data import IAudioDataService
from superdesk.media_archive.impl.audio_data import AudioDataServiceAlchemy

# --------------------------------------------------------------------

audioDataHandler = ioc.getEntity('audioDataHandler', service)

@ioc.replace(ioc.getEntity(IAudioDataService, service))
def audioData() -> IAudioDataService:
    b = AudioDataServiceAlchemy()
    b.handler = audioDataHandler()
    return b
Ejemplo n.º 6
0
@ioc.entity
def cdmArchive() -> ICDM:
    '''
    The content delivery manager (CDM) for the media archive.
    '''
    return ExtendPathCDM(contentDeliveryManager(), 'media_archive/%s')

@ioc.entity
def cdmThumbnail() -> ICDM:
    '''
    The content delivery manager (CDM) for the thumbnails media archive.
    '''
    return ExtendPathCDM(contentDeliveryManager(), 'media_archive/thumbnail/%s')

@ioc.replace(ioc.getEntity(IThumbnailManager))
def thumbnailManager() -> IThumbnailManager:
    b = ThumbnailManagerAlchemy()
    b.cdm = cdmThumbnail()
    return b

@ioc.entity
def metaDataHandlers(): return []

@ioc.replace(ioc.getEntity(IMetaDataUploadService, service))
def metaDataService() -> IMetaDataUploadService:
    b = MetaDataServiceAlchemy()
    b.cdmArchive = cdmArchive()
    b.metaDataHandlers = metaDataHandlers()
    return b
Ejemplo n.º 7
0
    '''
    The content delivery manager (CDM) for the media archive.
    '''
    return ExtendPathCDM(contentDeliveryManager(), 'media_archive/%s')


@ioc.entity
def cdmThumbnail() -> ICDM:
    '''
    The content delivery manager (CDM) for the thumbnails media archive.
    '''
    return ExtendPathCDM(contentDeliveryManager(),
                         'media_archive/thumbnail/%s')


@ioc.replace(ioc.getEntity(IThumbnailManager))
def thumbnailManager() -> IThumbnailManager:
    b = ThumbnailManagerAlchemy()
    b.cdm = cdmThumbnail()
    return b


@ioc.entity
def metaDataHandlers():
    return []


@ioc.replace(ioc.getEntity(IMetaDataUploadService, service))
def metaDataService() -> IMetaDataUploadService:
    b = MetaDataServiceAlchemy()
    b.cdmArchive = cdmArchive()
Ejemplo n.º 8
0
'''
Created on Feb 23, 2012

@package: ally actions gui 
@copyright: 2011 Sourcefabric o.p.s.
@license:  http://www.gnu.org/licenses/gpl-3.0.txt
@author: Mihai Balaceanu


'''
from ..gui_core import service
from ally.container import ioc
from gui.action.api.action import IActionManagerService
from gui.action.impl.action import ActionManagerService

# --------------------------------------------------------------------

@ioc.replace(ioc.getEntity(IActionManagerService, service))
def actionManagerService() -> IActionManagerService:
    b = ActionManagerService()
    return b
Ejemplo n.º 9
0
'''
Created on Aug 23, 2012

@package: superdesk media archive image
@copyright: 2012 Sourcefabric o.p.s.
@license: http://www.gnu.org/licenses/gpl-3.0.txt
@author: Ioan v. Pocol

Contains the services setups for media image archive.
'''

from ..superdesk import service
from ally.container import ioc
from superdesk.media_archive.api.image_data import IImageDataService
from superdesk.media_archive.impl.image_data import ImageDataServiceAlchemy

# --------------------------------------------------------------------

imageDataHandler = ioc.getEntity('imageDataHandler', service)

@ioc.replace(ioc.getEntity(IImageDataService, service))
def imageData() -> IImageDataService:
    b = ImageDataServiceAlchemy()
    b.handler = imageDataHandler()
    return b