Merge pull request #61 from Alfresco/dev-wabson-7

Use client API in document-list component
This commit is contained in:
Denys Vuika
2016-05-12 11:50:47 +01:00
20 changed files with 271 additions and 86 deletions
+4
View File
@@ -18,6 +18,7 @@ For development configuration please refer to* **Configuring development environ
##### Using setup script (recommended) ##### Using setup script (recommended)
```sh ```sh
git clone https://github.com/Alfresco/dev-platform-js-api.git
git clone https://github.com/Alfresco/dev-platform-webcomponents.git git clone https://github.com/Alfresco/dev-platform-webcomponents.git
cd dev-platform-webcomponents cd dev-platform-webcomponents
./start.sh ./start.sh
@@ -26,7 +27,9 @@ cd dev-platform-webcomponents
##### Manual setup ##### Manual setup
```sh ```sh
git clone https://github.com/Alfresco/dev-platform-js-api.git
git clone https://github.com/Alfresco/dev-platform-webcomponents.git git clone https://github.com/Alfresco/dev-platform-webcomponents.git
cd dev-platform-webcomponents/demo-shell-ng2 cd dev-platform-webcomponents/demo-shell-ng2
npm install npm install
@@ -34,6 +37,7 @@ npm install ../ng2-components/ng2-alfresco-core
npm install ../ng2-components/ng2-alfresco-login npm install ../ng2-components/ng2-alfresco-login
npm install ../ng2-components/ng2-alfresco-documentlist npm install ../ng2-components/ng2-alfresco-documentlist
npm install ../ng2-components/ng2-alfresco-upload npm install ../ng2-components/ng2-alfresco-upload
npm install ../../dev-platform-js-api
npm run build.dev npm run build.dev
``` ```
+19 -1
View File
@@ -13,7 +13,19 @@
## Prerequisites ## Prerequisites
- [Alfresco Docker image with CORS support](https://github.com/wabson/alfresco-docker-cors) Docker machine with latest `platform-distribution:api-latest` image.
```
docker login dockerreg.alfresco.com
docker pull dockerreg.alfresco.com/platform-distribution:api-latest
docker-compose up
```
to clean up afterwards
```
docker-compose rm
```
### Configuring development environment ### Configuring development environment
@@ -48,6 +60,12 @@ cd ../../demo-shell-ng
npm link ng2-alfresco-login npm link ng2-alfresco-login
``` ```
*dev-platform-js-api client:*
```sh
npm link ../../dev-platform-js-api
```
Please refer to [this article](https://docs.npmjs.com/cli/link) for more details on npm link. Please refer to [this article](https://docs.npmjs.com/cli/link) for more details on npm link.
### Building and running ### Building and running
@@ -4,7 +4,7 @@
<content-column source="$thumbnail"></content-column> <content-column source="$thumbnail"></content-column>
<content-column <content-column
title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}" title="{{'DOCUMENT_LIST.COLUMNS.DISPLAY_NAME' | translate}}"
source="displayName" source="name"
class="full-width name-column"> class="full-width name-column">
</content-column> </content-column>
<content-column <content-column
@@ -13,11 +13,11 @@
</content-column> </content-column>
<content-column <content-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}" title="{{'DOCUMENT_LIST.COLUMNS.CREATED_BY' | translate}}"
source="createdBy"> source="createdByUser.displayName">
</content-column> </content-column>
<content-column <content-column
title="{{'DOCUMENT_LIST.COLUMNS.CREATED_ON' | translate}}" title="{{'DOCUMENT_LIST.COLUMNS.CREATED_ON' | translate}}"
source="createdOn"> source="createdAt">
</content-column> </content-column>
</content-columns> </content-columns>
+1
View File
@@ -29,6 +29,7 @@
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script> <script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="/app/js/xml2json.js"></script> <script src="/app/js/xml2json.js"></script>
<script src="node_modules/alfresco-core-rest-api/bundle.js"></script>
<!-- 2. Configure SystemJS --> <!-- 2. Configure SystemJS -->
<script> <script>
+4
View File
@@ -0,0 +1,4 @@
alfresco:
image: dockerreg.alfresco.com/platform-distribution:api-latest
ports:
- "8080:8080"
@@ -16,7 +16,7 @@
*/ */
import { OnInit, EventEmitter, AfterContentInit, AfterViewChecked } from 'angular2/core'; import { OnInit, EventEmitter, AfterContentInit, AfterViewChecked } from 'angular2/core';
import { AlfrescoService } from './../services/alfresco.service'; import { AlfrescoService } from './../services/alfresco.service';
import { FolderEntity, DocumentEntity } from './../models/document-library.model'; import { MinimalNodeEntity, NodePaging } from './../models/document-library.model';
import { ContentActionModel } from './../models/content-action.model'; import { ContentActionModel } from './../models/content-action.model';
import { ContentColumnModel } from './../models/content-column.model'; import { ContentColumnModel } from './../models/content-column.model';
export declare class DocumentList implements OnInit, AfterViewChecked, AfterContentInit { export declare class DocumentList implements OnInit, AfterViewChecked, AfterContentInit {
@@ -30,7 +30,7 @@ export declare class DocumentList implements OnInit, AfterViewChecked, AfterCont
path: string; path: string;
}; };
currentFolderPath: string; currentFolderPath: string;
folder: FolderEntity; folder: NodePaging;
errorMessage: any; errorMessage: any;
route: any[]; route: any[];
actions: ContentActionModel[]; actions: ContentActionModel[];
@@ -61,7 +61,7 @@ export declare class DocumentList implements OnInit, AfterViewChecked, AfterCont
* @param item Underlying node item * @param item Underlying node item
* @param e DOM event (optional) * @param e DOM event (optional)
*/ */
onItemClick(item: DocumentEntity, e?: any): void; onItemClick(item: MinimalNodeEntity, e?: any): void;
/** /**
* Invoked when a breadcrumb route is clicked. * Invoked when a breadcrumb route is clicked.
* @param r Route to navigate to * @param r Route to navigate to
@@ -73,19 +73,19 @@ export declare class DocumentList implements OnInit, AfterViewChecked, AfterCont
* @param node Node to get URL for. * @param node Node to get URL for.
* @returns {string} URL address. * @returns {string} URL address.
*/ */
getContentUrl(node: DocumentEntity): string; getContentUrl(node: MinimalNodeEntity): string;
/** /**
* Gets thumbnail URL for the given document node. * Gets thumbnail URL for the given document node.
* @param node Node to get URL for. * @param node Node to get URL for.
* @returns {string} URL address. * @returns {string} URL address.
*/ */
getDocumentThumbnailUrl(node: DocumentEntity): string; getDocumentThumbnailUrl(node: MinimalNodeEntity): string;
/** /**
* Invoked when executing content action for a document or folder. * Invoked when executing content action for a document or folder.
* @param node Node to be the context of the execution. * @param node Node to be the context of the execution.
* @param action Action to be executed against the context. * @param action Action to be executed against the context.
*/ */
executeContentAction(node: DocumentEntity, action: ContentActionModel): void; executeContentAction(node: MinimalNodeEntity, action: ContentActionModel): void;
/** /**
* Loads and displays folder content * Loads and displays folder content
* @param path Node path * @param path Node path
@@ -96,7 +96,7 @@ export declare class DocumentList implements OnInit, AfterViewChecked, AfterCont
* @param node * @param node
* @returns {string} * @returns {string}
*/ */
getNodePath(node: DocumentEntity): string; getNodePath(node: MinimalNodeEntity): string;
/** /**
* Gets a value from an object by composed key * Gets a value from an object by composed key
* documentList.getObjectValue({ item: { nodeType: 'cm:folder' }}, 'item.nodeType') ==> 'cm:folder' * documentList.getObjectValue({ item: { nodeType: 'cm:folder' }}, 'item.nodeType') ==> 'cm:folder'
@@ -28,26 +28,26 @@
</td> </td>
</tr> </tr>
<tr *ngFor="#content of folder.items; #idx = index"> <tr *ngFor="#content of folder.list.entries; #idx = index">
<!-- Columns --> <!-- Columns -->
<td *ngFor="#col of columns" [ngSwitch]="col.source" <td *ngFor="#col of columns" [ngSwitch]="col.source"
class="mdl-data-table__cell--non-numeric {{content.isFolder ? 'folder-row-cell' : 'document-row-cell'}} {{col.cssClass}}" class="mdl-data-table__cell--non-numeric {{content.entry.isFolder ? 'folder-row-cell' : 'document-row-cell'}} {{col.cssClass}}"
(click)="onItemClick(content, $event)"> (click)="onItemClick(content, $event)">
<div *ngSwitchWhen="'$thumbnail'"> <div *ngSwitchWhen="'$thumbnail'">
<div *ngIf="content.isFolder"> <div *ngIf="content.entry.isFolder">
<i class="material-icons folder-thumbnail">{{folderIcon || 'folder_open'}}</i> <i class="material-icons folder-thumbnail">{{folderIcon || 'folder_open'}}</i>
</div> </div>
<div *ngIf="!content.isFolder"> <div *ngIf="!content.entry.isFolder">
<img class="document-thumbnail" alt="" src="{{getDocumentThumbnailUrl(content)}}"> <img class="document-thumbnail" alt="" src="{{getDocumentThumbnailUrl(content)}}">
</div> </div>
</div> </div>
<span *ngSwitchDefault> <span *ngSwitchDefault>
{{getObjectValue(content, col.source)}} {{getObjectValue(content.entry, col.source)}}
</span> </span>
</td> </td>
<!-- Actions: folder --> <!-- Actions: folder -->
<td *ngIf="content.isFolder"> <td *ngIf="content.entry.isFolder">
<!-- action buttons --> <!-- action buttons -->
<button class="mdl-button mdl-js-button mdl-button--icon" <button class="mdl-button mdl-js-button mdl-button--icon"
*ngFor="#action of getContentActions('folder', 'button')" *ngFor="#action of getContentActions('folder', 'button')"
@@ -69,7 +69,7 @@
</ul> </ul>
</td> </td>
<!-- Actions: document --> <!-- Actions: document -->
<td *ngIf="!content.isFolder"> <td *ngIf="!content.entry.isFolder">
<!-- action buttons --> <!-- action buttons -->
<button class="mdl-button mdl-js-button mdl-button--icon" <button class="mdl-button mdl-js-button mdl-button--icon"
*ngFor="#action of getContentActions('document', 'button')" *ngFor="#action of getContentActions('document', 'button')"
@@ -48,7 +48,7 @@ System.register(['angular2/core', './../services/alfresco.service', './../models
this.itemClick = new core_1.EventEmitter(); this.itemClick = new core_1.EventEmitter();
this.rootFolder = { this.rootFolder = {
name: 'Document Library', name: 'Document Library',
path: 'swsdp/documentLibrary' path: 'Sites/swsdp/documentLibrary'
}; };
this.currentFolderPath = 'swsdp/documentLibrary'; this.currentFolderPath = 'swsdp/documentLibrary';
this.route = []; this.route = [];
@@ -125,10 +125,10 @@ System.register(['angular2/core', './../services/alfresco.service', './../models
value: item value: item
}); });
if (this.navigate && item) { if (this.navigate && item) {
if (item.isFolder) { if (item.entry.isFolder) {
var path = this.getNodePath(item); var path = this.getNodePath(item);
this.route.push({ this.route.push({
name: item.displayName, name: item.entry.name,
path: path path: path
}); });
this.displayFolderContent(path); this.displayFolderContent(path);
@@ -204,10 +204,8 @@ System.register(['angular2/core', './../services/alfresco.service', './../models
*/ */
DocumentList.prototype.getNodePath = function (node) { DocumentList.prototype.getNodePath = function (node) {
if (node) { if (node) {
var container = node.location.container; var pathWithCompanyHome = item.entry.path.name;
var path = node.location.path !== '/' ? (node.location.path + '/') : '/'; return pathWithCompanyHome.replace('/Company Home', '') + '/' + item.entry.name;
var relativePath = container + path + node.fileName;
return node.location.site + '/' + relativePath;
} }
return null; return null;
}; };
File diff suppressed because one or more lines are too long
@@ -25,7 +25,7 @@ import {
AfterViewChecked AfterViewChecked
} from 'angular2/core'; } from 'angular2/core';
import {AlfrescoService} from './../services/alfresco.service'; import {AlfrescoService} from './../services/alfresco.service';
import {FolderEntity, DocumentEntity} from './../models/document-library.model'; import {MinimalNodeEntity,NodePaging} from './../models/document-library.model';
import {ContentActionModel} from './../models/content-action.model'; import {ContentActionModel} from './../models/content-action.model';
import {ContentColumnModel} from './../models/content-column.model'; import {ContentColumnModel} from './../models/content-column.model';
@@ -55,10 +55,10 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
rootFolder = { rootFolder = {
name: 'Document Library', name: 'Document Library',
path: 'swsdp/documentLibrary' path: 'Sites/swsdp/documentLibrary'
}; };
currentFolderPath: string = 'swsdp/documentLibrary'; currentFolderPath: string = 'swsdp/documentLibrary';
folder: FolderEntity; folder: NodePaging;
errorMessage; errorMessage;
route: any[] = []; route: any[] = [];
@@ -140,7 +140,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
* @param item Underlying node item * @param item Underlying node item
* @param e DOM event (optional) * @param e DOM event (optional)
*/ */
onItemClick(item: DocumentEntity, e = null) { onItemClick(item: MinimalNodeEntity, e = null) {
if (e) { if (e) {
e.preventDefault(); e.preventDefault();
} }
@@ -150,10 +150,10 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
}); });
if (this.navigate && item) { if (this.navigate && item) {
if (item.isFolder) { if (item.entry.isFolder) {
let path = this.getNodePath(item); let path = this.getNodePath(item);
this.route.push({ this.route.push({
name: item.displayName, name: item.entry.name,
path: path path: path
}); });
this.displayFolderContent(path); this.displayFolderContent(path);
@@ -185,7 +185,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
* @param node Node to get URL for. * @param node Node to get URL for.
* @returns {string} URL address. * @returns {string} URL address.
*/ */
getContentUrl(node: DocumentEntity): string { getContentUrl(node: MinimalNodeEntity): string {
if (this._alfrescoService) { if (this._alfrescoService) {
return this._alfrescoService.getContentUrl(node); return this._alfrescoService.getContentUrl(node);
} }
@@ -197,7 +197,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
* @param node Node to get URL for. * @param node Node to get URL for.
* @returns {string} URL address. * @returns {string} URL address.
*/ */
getDocumentThumbnailUrl(node: DocumentEntity): string { getDocumentThumbnailUrl(node: MinimalNodeEntity): string {
if (this._alfrescoService) { if (this._alfrescoService) {
return this._alfrescoService.getDocumentThumbnailUrl(node); return this._alfrescoService.getDocumentThumbnailUrl(node);
} }
@@ -209,7 +209,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
* @param node Node to be the context of the execution. * @param node Node to be the context of the execution.
* @param action Action to be executed against the context. * @param action Action to be executed against the context.
*/ */
executeContentAction(node: DocumentEntity, action: ContentActionModel) { executeContentAction(node: MinimalNodeEntity, action: ContentActionModel) {
if (action) { if (action) {
action.handler(node); action.handler(node);
} }
@@ -220,7 +220,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
* @param path Node path * @param path Node path
*/ */
displayFolderContent(path) { displayFolderContent(path) {
if (path) { if (path !== null) {
this.currentFolderPath = path; this.currentFolderPath = path;
this._alfrescoService this._alfrescoService
.getFolder(path) .getFolder(path)
@@ -236,12 +236,10 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
* @param node * @param node
* @returns {string} * @returns {string}
*/ */
getNodePath(node: DocumentEntity): string { getNodePath(node: MinimalNodeEntity): string {
if (node) { if (node) {
let container = node.location.container; let pathWithCompanyHome = item.entry.path.name;
let path = node.location.path !== '/' ? (node.location.path + '/' ) : '/'; return pathWithCompanyHome.replace('/Company Home', '') + '/' + item.entry.name;
let relativePath = container + path + node.fileName;
return node.location.site + '/' + relativePath;
} }
return null; return null;
} }
@@ -17,7 +17,7 @@
System.register([], function(exports_1, context_1) { System.register([], function(exports_1, context_1) {
"use strict"; "use strict";
var __moduleName = context_1 && context_1.id; var __moduleName = context_1 && context_1.id;
var FolderEntity, DocumentEntity, LocationEntity, LocationParentEntity; var FolderEntity, DocumentEntity, LocationEntity, LocationParentEntity, NodePaging, NodePagingList, MinimalNodeEntity, MinimalNodeEntryEntity, UserInfo, ContentInfo, PathInfoEntity, PathElementEntity;
return { return {
setters:[], setters:[],
execute: function() { execute: function() {
@@ -46,6 +46,54 @@ System.register([], function(exports_1, context_1) {
return LocationParentEntity; return LocationParentEntity;
}()); }());
exports_1("LocationParentEntity", LocationParentEntity); exports_1("LocationParentEntity", LocationParentEntity);
NodePaging = (function () {
function NodePaging() {
}
return NodePaging;
}());
exports_1("NodePaging", NodePaging);
NodePagingList = (function () {
function NodePagingList() {
}
return NodePagingList;
}());
exports_1("NodePagingList", NodePagingList);
MinimalNodeEntity = (function () {
function MinimalNodeEntity() {
}
return MinimalNodeEntity;
}());
exports_1("MinimalNodeEntity", MinimalNodeEntity);
MinimalNodeEntryEntity = (function () {
function MinimalNodeEntryEntity() {
}
return MinimalNodeEntryEntity;
}());
exports_1("MinimalNodeEntryEntity", MinimalNodeEntryEntity);
UserInfo = (function () {
function UserInfo() {
}
return UserInfo;
}());
exports_1("UserInfo", UserInfo);
ContentInfo = (function () {
function ContentInfo() {
}
return ContentInfo;
}());
exports_1("ContentInfo", ContentInfo);
PathInfoEntity = (function () {
function PathInfoEntity() {
}
return PathInfoEntity;
}());
exports_1("PathInfoEntity", PathInfoEntity);
PathElementEntity = (function () {
function PathElementEntity() {
}
return PathElementEntity;
}());
exports_1("PathElementEntity", PathElementEntity);
} }
} }
}); });
@@ -1 +1 @@
{"version":3,"file":"document-library.model.js","sourceRoot":"","sources":["document-library.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;YAEH,yDAAyD;YAEzD;gBAAA;gBAEA,CAAC;gBAAD,mBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,uCAEC,CAAA;YAED;gBAAA;gBA6BA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AA7BD,IA6BC;YA7BD,2CA6BC,CAAA;YAED;gBAAA;gBAQA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AARD,IAQC;YARD,2CAQC,CAAA;YAED;gBAAA;gBAEA,CAAC;gBAAD,2BAAC;YAAD,CAAC,AAFD,IAEC;YAFD,uDAEC,CAAA"} {"version":3,"file":"document-library.model.js","sourceRoot":"","sources":["document-library.model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;YAEH,yDAAyD;YAEzD;gBAAA;gBAEA,CAAC;gBAAD,mBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,uCAEC,CAAA;YAED;gBAAA;gBA6BA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AA7BD,IA6BC;YA7BD,2CA6BC,CAAA;YAED;gBAAA;gBAQA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AARD,IAQC;YARD,2CAQC,CAAA;YAED;gBAAA;gBAEA,CAAC;gBAAD,2BAAC;YAAD,CAAC,AAFD,IAEC;YAFD,uDAEC,CAAA;YAED;gBAAA;gBAEA,CAAC;gBAAD,iBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,mCAEC,CAAA;YAED;gBAAA;gBAEA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,2CAEC,CAAA;YAED;gBAAA;gBAEA,CAAC;gBAAD,wBAAC;YAAD,CAAC,AAFD,IAEC;YAFD,iDAEC,CAAA;YAED;gBAAA;gBAaA,CAAC;gBAAD,6BAAC;YAAD,CAAC,AAbD,IAaC;YAbD,2DAaC,CAAA;YAED;gBAAA;gBAGA,CAAC;gBAAD,eAAC;YAAD,CAAC,AAHD,IAGC;YAHD,+BAGC,CAAA;YAED;gBAAA;gBAKA,CAAC;gBAAD,kBAAC;YAAD,CAAC,AALD,IAKC;YALD,qCAKC,CAAA;YAED;gBAAA;gBAIA,CAAC;gBAAD,qBAAC;YAAD,CAAC,AAJD,IAIC;YAJD,2CAIC,CAAA;YAED;gBAAA;gBAGA,CAAC;gBAAD,wBAAC;YAAD,CAAC,AAHD,IAGC;YAHD,iDAGC,CAAA"}
@@ -65,3 +65,53 @@ export class LocationEntity {
export class LocationParentEntity { export class LocationParentEntity {
nodeRef: string; nodeRef: string;
} }
export class NodePaging {
list: NodePagingList;
}
export class NodePagingList {
entries: MinimalNodeEntity[];
}
export class MinimalNodeEntity {
entry: MinimalNodeEntryEntity;
}
export class MinimalNodeEntryEntity {
id: string;
parentId: string;
name: string;
nodeType: string;
isFolder: boolean;
isFile: boolean;
modifiedAt: string;
modifiedByUser: UserInfo;
createdAt: string;
createdByUser: UserInfo;
content: ContentInfo;
path: PathInfoEntity
}
export class UserInfo {
displayName: string;
id: string;
}
export class ContentInfo {
mimeType: string;
mimeTypeName: string;
sizeInBytes: number;
encoding: string;
}
export class PathInfoEntity {
elements: PathElementEntity;
isComplete: boolean;
name: string
}
export class PathElementEntity {
id: string;
name: string;
}
@@ -1,6 +1,6 @@
import { Http } from 'angular2/http'; import { Http } from 'angular2/http';
import { Observable } from 'rxjs/Observable'; import { Observable } from 'rxjs/Observable';
import { FolderEntity, DocumentEntity } from './../models/document-library.model'; import { NodePaging, MinimalNodeEntity } from './../models/document-library.model';
import { AlfrescoSettingsService } from '../../../ng2-alfresco-core/services'; import { AlfrescoSettingsService } from '../../../ng2-alfresco-core/services';
/** /**
* Internal service used by Document List component. * Internal service used by Document List component.
@@ -16,20 +16,20 @@ export declare class AlfrescoService {
/** /**
* Gets the folder node with the content. * Gets the folder node with the content.
* @param folder Path to folder. * @param folder Path to folder.
* @returns {Observable<FolderEntity>} Folder entity. * @returns {Observable<NodePaging>} Folder entity.
*/ */
getFolder(folder: string): Observable<FolderEntity>; getFolder(folder: string): Observable<NodePaging>;
/** /**
* Get thumbnail URL for the given document node. * Get thumbnail URL for the given document node.
* @param document Node to get URL for. * @param document Node to get URL for.
* @returns {string} URL address. * @returns {string} URL address.
*/ */
getDocumentThumbnailUrl(document: DocumentEntity): string; getDocumentThumbnailUrl(document: MinimalNodeEntity): string;
/** /**
* Get content URL for the given node. * Get content URL for the given node.
* @param document Node to get URL for. * @param document Node to get URL for.
* @returns {string} URL address. * @returns {string} URL address.
*/ */
getContentUrl(document: DocumentEntity): string; getContentUrl(document: MinimalNodeEntity): string;
private handleError(error); private handleError(error);
} }
@@ -51,7 +51,7 @@ System.register(['angular2/core', 'angular2/http', 'rxjs/Observable', '../../../
this.http = http; this.http = http;
this.settings = settings; this.settings = settings;
this._host = 'http://127.0.0.1:8080'; this._host = 'http://127.0.0.1:8080';
this._baseUrlPath = '/alfresco/service/slingshot/doclib/doclist/all/site/'; this._baseUrlPath = '/alfresco/api/-default-/public/alfresco/versions/1';
if (settings) { if (settings) {
this._host = settings.host; this._host = settings.host;
} }
@@ -69,21 +69,49 @@ System.register(['angular2/core', 'angular2/http', 'rxjs/Observable', '../../../
AlfrescoService.prototype.getBaseUrl = function () { AlfrescoService.prototype.getBaseUrl = function () {
return this.host + this._baseUrlPath; return this.host + this._baseUrlPath;
}; };
AlfrescoService.prototype.getAlfrescoTicket = function () {
return localStorage.getItem('token');
};
AlfrescoService.prototype.getAlfrescoClient = function () {
var defaultClient = new AlfrescoApi.ApiClient();
defaultClient.basePath = this.getBaseUrl();
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'ROLE_TICKET';
basicAuth.password = this.getAlfrescoTicket();
return defaultClient;
};
AlfrescoService.prototype.getNodesPromise = function (folder) {
var alfrescoClient = this.getAlfrescoClient();
return new Promise(function (resolve, reject) {
var apiInstance = new AlfrescoApi.NodesApi(alfrescoClient);
var nodeId = '-root-';
var opts = {
relativePath: folder,
include: ['path']
};
var callback = function (error, data /*, response*/) {
if (error) {
console.error(error);
reject(error);
}
else {
console.log('API returned data', data);
resolve(data);
}
};
apiInstance.getNodeChildren(nodeId, opts, callback);
});
};
/** /**
* Gets the folder node with the content. * Gets the folder node with the content.
* @param folder Path to folder. * @param folder Path to folder.
* @returns {Observable<FolderEntity>} Folder entity. * @returns {Observable<NodePaging>} Folder entity.
*/ */
AlfrescoService.prototype.getFolder = function (folder) { AlfrescoService.prototype.getFolder = function (folder) {
var headers = new http_1.Headers({ return Observable_1.Observable.fromPromise(this.getNodesPromise(folder))
'Content-Type': 'application/json', .map(function (res) { return res; })
'Authorization': this.settings.getAuthToken() .do(function (data) { return console.log('Node data', data); }) // eyeball results in the console
});
var options = new http_1.RequestOptions({ headers: headers });
return this.http
.get(this.getBaseUrl() + folder, options)
.map(function (res) { return res.json(); })
.do(function (data) { return console.log(data); }) // eyeball results in the console
.catch(this.handleError); .catch(this.handleError);
}; };
/** /**
@@ -92,9 +120,7 @@ System.register(['angular2/core', 'angular2/http', 'rxjs/Observable', '../../../
* @returns {string} URL address. * @returns {string} URL address.
*/ */
AlfrescoService.prototype.getDocumentThumbnailUrl = function (document) { AlfrescoService.prototype.getDocumentThumbnailUrl = function (document) {
return this._host + return this.getContentUrl(document) + '/thumbnails/doclib?c=queue&ph=true&lastModified=1';
'/alfresco/service/api/node/' +
document.nodeRef.replace('://', '/') + '/content/thumbnails/doclib?c=queue&amp;ph=true&amp;lastModified=1';
}; };
/** /**
* Get content URL for the given node. * Get content URL for the given node.
@@ -102,13 +128,15 @@ System.register(['angular2/core', 'angular2/http', 'rxjs/Observable', '../../../
* @returns {string} URL address. * @returns {string} URL address.
*/ */
AlfrescoService.prototype.getContentUrl = function (document) { AlfrescoService.prototype.getContentUrl = function (document) {
return this._host + '/alfresco/service/' + document.contentUrl; return this._host +
'/alfresco/service/api/node/workspace/SpacesStore/' +
document.entry.id + '/content';
}; };
AlfrescoService.prototype.handleError = function (error) { AlfrescoService.prototype.handleError = function (error) {
// in a real world app, we may send the error to some remote logging infrastructure // in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console // instead of just logging it to the console
console.error(error); console.error(error);
return Observable_1.Observable.throw(error.json().error || 'Server error'); return Observable_1.Observable.throw(error || 'Server error');
}; };
AlfrescoService = __decorate([ AlfrescoService = __decorate([
core_1.Injectable(), core_1.Injectable(),
@@ -1 +1 @@
{"version":3,"file":"alfresco.service.js","sourceRoot":"","sources":["alfresco.service.ts"],"names":[],"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AAK,IAAI,cAAc,CAAC,CAAC;gBACrD,CAAC;gBAvGL;oBAAC,iBAAU,EAAE;;mCAAA;gBAwGb,sBAAC;YAAD,CAAC,AAvGD,IAuGC;YAvGD,6CAuGC,CAAA"}
@@ -18,9 +18,11 @@
import {Injectable} from 'angular2/core'; import {Injectable} from 'angular2/core';
import {Http, Response, RequestOptions, Headers} from 'angular2/http'; import {Http, Response, RequestOptions, Headers} from 'angular2/http';
import {Observable} from 'rxjs/Observable'; import {Observable} from 'rxjs/Observable';
import {FolderEntity, DocumentEntity} from './../models/document-library.model'; import {NodePaging, MinimalNodeEntity} from './../models/document-library.model';
import {AlfrescoSettingsService} from '../../../ng2-alfresco-core/services'; import {AlfrescoSettingsService} from '../../../ng2-alfresco-core/services';
declare var AlfrescoApi: any;
/** /**
* Internal service used by Document List component. * Internal service used by Document List component.
*/ */
@@ -37,7 +39,7 @@ export class AlfrescoService {
} }
private _host: string = 'http://127.0.0.1:8080'; private _host: string = 'http://127.0.0.1:8080';
private _baseUrlPath: string = '/alfresco/service/slingshot/doclib/doclist/all/site/'; private _baseUrlPath: string = '/alfresco/api/-default-/public/alfresco/versions/1';
public get host():string { public get host():string {
return this._host; return this._host;
@@ -51,21 +53,54 @@ export class AlfrescoService {
return this.host + this._baseUrlPath; return this.host + this._baseUrlPath;
} }
private getAlfrescoTicket() {
return localStorage.getItem('token');
}
private getAlfrescoClient() {
var defaultClient = new AlfrescoApi.ApiClient();
defaultClient.basePath = this.getBaseUrl();
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'ROLE_TICKET';
basicAuth.password = this.getAlfrescoTicket();
return defaultClient;
}
private getNodesPromise(folder: string) {
var alfrescoClient = this.getAlfrescoClient();
return new Promise(function(resolve, reject) {
var apiInstance = new AlfrescoApi.NodesApi(alfrescoClient);
var nodeId = '-root-';
var opts = {
relativePath: folder,
include: ['path']
};
var callback = function(error, data /*, response*/) {
if (error) {
console.error(error);
reject(error);
} else {
console.log('API returned data', data);
resolve(data);
}
};
apiInstance.getNodeChildren(nodeId, opts, callback);
});
}
/** /**
* Gets the folder node with the content. * Gets the folder node with the content.
* @param folder Path to folder. * @param folder Path to folder.
* @returns {Observable<FolderEntity>} Folder entity. * @returns {Observable<NodePaging>} Folder entity.
*/ */
getFolder(folder: string) { getFolder(folder: string) {
let headers = new Headers({ return Observable.fromPromise(this.getNodesPromise(folder))
'Content-Type': 'application/json', .map(res => <NodePaging> res)
'Authorization': this.settings.getAuthToken() .do(data => console.log('Node data', data)) // eyeball results in the console
});
let options = new RequestOptions({ headers: headers });
return this.http
.get(this.getBaseUrl() + folder, options)
.map(res => <FolderEntity> res.json())
.do(data => console.log(data)) // eyeball results in the console
.catch(this.handleError); .catch(this.handleError);
} }
@@ -74,10 +109,8 @@ export class AlfrescoService {
* @param document Node to get URL for. * @param document Node to get URL for.
* @returns {string} URL address. * @returns {string} URL address.
*/ */
getDocumentThumbnailUrl(document: DocumentEntity): string { getDocumentThumbnailUrl(document: MinimalNodeEntity) {
return this._host + return this.getContentUrl(document) + '/thumbnails/doclib?c=queue&ph=true&lastModified=1';
'/alfresco/service/api/node/' +
document.nodeRef.replace('://', '/') + '/content/thumbnails/doclib?c=queue&amp;ph=true&amp;lastModified=1';
} }
/** /**
@@ -85,14 +118,16 @@ export class AlfrescoService {
* @param document Node to get URL for. * @param document Node to get URL for.
* @returns {string} URL address. * @returns {string} URL address.
*/ */
getContentUrl(document: DocumentEntity): string { getContentUrl(document: MinimalNodeEntity) {
return this._host + '/alfresco/service/' + document.contentUrl; return this._host +
'/alfresco/service/api/node/workspace/SpacesStore/' +
document.entry.id + '/content';
} }
private handleError (error: Response) { private handleError (error: Response) {
// in a real world app, we may send the error to some remote logging infrastructure // in a real world app, we may send the error to some remote logging infrastructure
// instead of just logging it to the console // instead of just logging it to the console
console.error(error); console.error(error);
return Observable.throw(error.json().error || 'Server error'); return Observable.throw(error || 'Server error');
} }
} }
@@ -67,7 +67,7 @@ System.register(['angular2/core', '../services/upload.service', './file-uploadin
this.el = el; this.el = el;
this.showUploadDialog = true; this.showUploadDialog = true;
this.showUdoNotificationBar = true; this.showUdoNotificationBar = true;
this.uploadFolders = true; this.uploadFolders = false;
this.multipleFiles = false; this.multipleFiles = false;
this.acceptedFilesType = '*'; this.acceptedFilesType = '*';
this.filesUploadingList = []; this.filesUploadingList = [];
@@ -1 +1 @@
{"version":3,"file":"upload-button.component.js","sourceRoot":"","sources":["upload-button.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAYH;;;;;;;;;;;;;;;;;;eAkBG;YASH;gBA6BI,+BAAmB,EAAc,EACrB,SAA2B;oBADpB,OAAE,GAAF,EAAE,CAAY;oBAlBjC,qBAAgB,GAAY,IAAI,CAAC;oBAGjC,2BAAsB,GAAY,IAAI,CAAC;oBAGvC,kBAAa,GAAY,IAAI,CAAC;oBAG9B,kBAAa,GAAY,KAAK,CAAC;oBAG/B,sBAAiB,GAAW,GAAG,CAAC;oBAEhC,uBAAkB,GAAiB,EAAE,CAAC;oBAMlC,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;oBAE/C,IAAI,CAAC,gBAAgB,GAAG,IAAI,8BAAa,CAAC;wBACtC,GAAG,EAAE,wDAAwD;wBAC7D,eAAe,EAAE,IAAI;wBACrB,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC;wBAC9B,eAAe,EAAE,OAAO;wBACxB,SAAS,EAAE,UAAU;wBACrB,UAAU,EAAE;4BACR,MAAM,EAAE,OAAO;4BACf,WAAW,EAAE,iBAAiB;yBACjC;qBACJ,CAAC,CAAC;oBAEH,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;gBACpC,CAAC;gBAED;;;;mBAIG;gBACH,4CAAY,GAAZ,UAAa,MAAM;oBACf,IAAI,KAAK,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;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;2FAAA;gBAGjC;oBAAC,YAAK,EAAE;;+EAAA;gBAGR;oBAAC,YAAK,EAAE;;qFAAA;gBAGR;oBAAC,YAAK,EAAE;;4EAAA;gBAGR;oBAAC,YAAK,EAAE;;4EAAA;gBAGR;oBAAC,YAAK,EAAE;;gFAAA;gBA9BZ;oBAAC,gBAAS,CAAC;wBACP,QAAQ,EAAE,wBAAwB;wBAClC,QAAQ,EAAE,YAAY;wBACtB,UAAU,EAAE,CAAC,8DAA4B,CAAC;wBAC1C,WAAW,EAAE,gCAAgC;wBAC7C,SAAS,EAAE,CAAC,+BAA+B,CAAC;wBAC5C,KAAK,EAAE,CAAC,6BAAa,CAAC;qBACzB,CAAC;;yCAAA;gBA8GF,4BAAC;YAAD,CAAC,AA7GD,IA6GC;YA7GD,yDA6GC,CAAA"}
+1
View File
@@ -6,5 +6,6 @@ npm install ../ng2-components/ng2-alfresco-core
npm install ../ng2-components/ng2-alfresco-documentlist npm install ../ng2-components/ng2-alfresco-documentlist
npm install ../ng2-components/ng2-alfresco-login npm install ../ng2-components/ng2-alfresco-login
npm install ../ng2-components/ng2-alfresco-upload npm install ../ng2-components/ng2-alfresco-upload
npm install ../../dev-platform-js-api
npm run build.dev npm run build.dev