Example #1
0
        public GetChapterContract GetChapterResource(long chapterId)
        {
            m_authorizationManager.AuthorizeResource(chapterId, PermissionFlag.ReadProject);

            var result = m_projectItemManager.GetChapterResource(chapterId);

            return(result);
        }
Example #2
0
        public TrackContract GetTrackResource(long trackId)
        {
            m_authorizationManager.AuthorizeResource(trackId, PermissionFlag.ReadProject);

            var result = m_projectItemManager.GetTrackResource(trackId);

            return(result);
        }
Example #3
0
        public ImageContract GetImageResourceByPageId(long pageId)
        {
            m_authorizationManager.AuthorizeResource(pageId, PermissionFlag.ReadProject);

            var result = m_projectContentManager.GetImageResourceByPageId(pageId);

            return(result);
        }
Example #4
0
        public PageContract GetPageResource(long pageId)
        {
            m_authorizationManager.AuthorizeResource(pageId, PermissionFlag.ReadProject);

            var result = m_projectItemManager.GetPage(pageId);

            return(result);
        }
Example #5
0
        public FullTextContract GetTextResourceByPageId(long pageId, [FromQuery] TextFormatEnumContract?format)
        {
            m_authorizationManager.AuthorizeResource(pageId, PermissionFlag.ReadProject);

            if (format == null)
            {
                format = TextFormatEnumContract.Html;
            }

            var result = m_projectContentManager.GetTextResourceByPageId(pageId, format.Value);

            return(result);
        }
Example #6
0
        public void RemoveResource(long resourceId)
        {
            m_authorizationManager.AuthorizeResource(resourceId, PermissionFlag.EditProject);

            m_projectContentManager.RemoveResource(resourceId);
        }