diff --git a/src/lib/ng-noosfero-api/http/article_facility_service.ts b/src/lib/ng-noosfero-api/http/article_facility_service.ts deleted file mode 100644 index afd4fdb..0000000 --- a/src/lib/ng-noosfero-api/http/article_facility_service.ts +++ /dev/null @@ -1,39 +0,0 @@ - - -export class ArticleFactilityService { - - public static ARTICLES_RESOURCE_NAME = "articles"; - - resourceBase: restangular.IElement = null; - - constructor( - protected restangularService: restangular.IService, - protected profile: noosfero.Profile) { - if (!profile) { - throw new Error("Could not instantiate ArticleOwner Service! Profile is missing!"); - } - } - - - getArticles(params?: any, headers?: any): restangular.ICollectionPromise { - return this.profile.getList(ArticleFactilityService.ARTICLES_RESOURCE_NAME, params, headers); - } - - getArticle(id: number, params?: any, headers?: any): restangular.IPromise { - return this.profile.one(ArticleFactilityService.ARTICLES_RESOURCE_NAME, id).get(params, headers); - } - - removeArticle(article: noosfero.Article, params?: any, headers?: any): restangular.IPromise { - let element: restangular.IElement = this.restangularService.restangularizeElement(this.profile, article, ArticleFactilityService.ARTICLES_RESOURCE_NAME); - return element.remove(params, headers); - } - - createArticle(article: noosfero.Article, params?: any, headers?: any): restangular.IPromise { - return this.profile.post(ArticleFactilityService.ARTICLES_RESOURCE_NAME, article, params, headers); - } - - updateArticle(article: noosfero.Article, params?: any, headers?: any): restangular.IPromise { - let element: restangular.IElement = this.restangularService.restangularizeElement(this.profile, article, ArticleFactilityService.ARTICLES_RESOURCE_NAME); - return element.put(params, headers); - } -} \ No newline at end of file -- libgit2 0.21.2