public void UpdateRole(int groupId, RoleContract data)
        {
            try
            {
                m_client.Put <object>($"role/{groupId}", data);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
        public void UpdateFavoriteLabel(long favoriteLabelId, FavoriteLabelContractBase data)
        {
            try
            {
                m_client.Put <object>($"favorite/label/{favoriteLabelId}", data);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
Example #3
0
        public object UpdateCategory(int categoryId, CategoryContract category)
        {
            try
            {
                var resultId = m_client.Put <object>($"category/{categoryId}", category);
                return(resultId);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
        public void UpdateExternalRepository(int externalRepositoryId, ExternalRepositoryDetailContract externalRepository)
        {
            try
            {
                m_client.Put <object>($"bibliography/repository/{externalRepositoryId}", externalRepository);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
Example #5
0
        public void EnsureAuthServiceHasRequiredPermissions()
        {
            try
            {
                m_client.Put <object>($"permission/ensure", null);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
        public void UpdateFilteringExpressionSet(int filteringExpressionSetId, FilteringExpressionSetDetailContract filteringExpressionSet)
        {
            try
            {
                m_client.Put <object>($"bibliography/filtering-expression-set/{filteringExpressionSetId}", filteringExpressionSet);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
Example #7
0
        public void UpdateCurrentUser(UpdateUserContract data)
        {
            try
            {
                //EnsureSecuredClient();
                m_client.Put <object>("user/current", data);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }
Example #8
0
        public void UpdateProject(long projectId, ItemNameContract data)
        {
            try
            {
                m_client.Put <object>($"project/{projectId}", data);
            }
            catch (HttpRequestException e)
            {
                if (m_logger.IsErrorEnabled())
                {
                    m_logger.LogError("{0} failed with {1}", m_client.GetCurrentMethod(), e);
                }

                throw;
            }
        }