public List <TrackContract> GetTrackList(long projectId) { m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.ReadProject); var result = m_projectItemManager.GetTrackList(projectId); return(result); }
public IList <ChapterHierarchyDetailContract> GetChapterList(long projectId) { m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.ReadProject); var result = m_projectItemManager.GetChapterList(projectId); return(result); }
public IList <SnapshotAggregatedInfoContract> GetSnapshotList(long projectId, [FromQuery] int?start, [FromQuery] int?count, [FromQuery] string filterByComment) { m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.ReadProject); var result = m_snapshotManager.GetPublishedSnapshotWithAggregatedInfo(projectId, start, count, filterByComment); SetTotalCountHeader(result.TotalCount); return(result.List); }
public List <TextWithPageContract> GetTextResourceList(long projectId, [FromQuery] long?resourceGroupId) { m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.ReadProject); var result = m_projectContentManager.GetTextResourceList(projectId, resourceGroupId); return(result); }
public List <ImageWithPageContract> GetImageList(long projectId) { m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.ReadProject); var result = m_projectContentManager.GetImageResourceList(projectId); return(result); }
public IActionResult CreateEditionNoteVersion(long projectId, [FromBody] CreateEditionNoteContract data) { m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.EditProject); try { var resultId = m_editionNoteManager.CreateEditionNoteVersion(projectId, data); return(Ok(resultId)); } catch (HttpErrorCodeException exception) { return(StatusCode((int)exception.StatusCode, exception.Message)); } }
public IList <ResourceWithLatestVersionContract> GetResourceList(long projectId, [FromQuery] ResourceTypeEnumContract?resourceType) { m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.ReadProject); return(m_projectContentManager.GetResourceList(projectId, resourceType)); }
public IActionResult GetProject(long projectId, [FromQuery] bool?fetchPageCount, [FromQuery] bool?fetchAuthors, [FromQuery] bool?fetchResponsiblePersons, //[FromQuery] bool? fetchLatestChangedResource, [FromQuery] bool?fetchPermissions) { m_authorizationManager.AuthorizeBook(projectId, PermissionFlag.ReadProject); var isFetchPageCount = fetchPageCount ?? false; var isFetchAuthors = fetchAuthors ?? false; var isFetchResponsiblePersons = fetchResponsiblePersons ?? false; //var isFetchLatestChangedResource = fetchLatestChangedResource ?? false; var isFetchPermissions = fetchPermissions ?? false; var projectData = m_projectManager.GetProject(projectId, isFetchPageCount, isFetchAuthors, isFetchResponsiblePersons, isFetchPermissions); if (projectData == null) { return(NotFound()); } return(Ok(projectData)); }
public long CreateSnapshot([FromBody] CreateSnapshotContract data) { m_authorizationManager.AuthorizeBook(data.ProjectId, PermissionFlag.EditProject); return(m_snapshotManager.CreateSnapshot(data)); }