src/lib/model/upload-target.model.ts
Properties |
Methods |
|
constructor(id: string, type: string, title?: string, iconId?: string, context?: string)
|
Defined in src/lib/model/upload-target.model.ts:49
|
Creates a new instance of UploadTarget |
Static AGENT |
AGENT:
|
Type : string
|
Default value : 'agent'
|
Defined in src/lib/model/upload-target.model.ts:35
|
add file(s) to last opened folders |
Public Optional context |
context:
|
Type : string
|
Defined in src/lib/model/upload-target.model.ts:64
|
Static CONTEXT |
CONTEXT:
|
Type : string
|
Default value : 'context'
|
Defined in src/lib/model/upload-target.model.ts:13
|
add file(s) to context folder |
Static CONTEXT_TREE |
CONTEXT_TREE:
|
Type : string
|
Default value : 'contexttree'
|
Defined in src/lib/model/upload-target.model.ts:17
|
add file(s) to context folders dynamic structure |
Static CUSTOM |
CUSTOM:
|
Type : string
|
Default value : 'custom'
|
Defined in src/lib/model/upload-target.model.ts:25
|
custom targets (e.g. for plugin development) |
Public description |
description:
|
Type : string
|
Defined in src/lib/model/upload-target.model.ts:38
|
Static FAVORITE |
FAVORITE:
|
Type : string
|
Default value : 'favorite'
|
Defined in src/lib/model/upload-target.model.ts:30
|
add file(s) to favorite folders |
Public Optional iconId |
iconId:
|
Type : string
|
Defined in src/lib/model/upload-target.model.ts:63
|
Public id |
id:
|
Type : string
|
Defined in src/lib/model/upload-target.model.ts:60
|
Upload targets unique id
|
Public name |
name:
|
Type : string
|
Defined in src/lib/model/upload-target.model.ts:37
|
Static OBJECT |
OBJECT:
|
Type : string
|
Default value : 'object'
|
Defined in src/lib/model/upload-target.model.ts:21
|
set/replace content file of a dms object |
Public referenceObject |
referenceObject:
|
Type : DmsObject
|
Defined in src/lib/model/upload-target.model.ts:44
|
based on the upload targets type this is the dms object to add/replace content file for (type: OBJECT) or the context folder to add the files to (type: CONTEXT) |
Static ROOT |
ROOT:
|
Type : string
|
Default value : 'root'
|
Defined in src/lib/model/upload-target.model.ts:9
|
general filing target |
Public subFolder |
subFolder:
|
Type : StructureTreeNode
|
Defined in src/lib/model/upload-target.model.ts:49
|
node from the structure service tree that may hold additional data to be provide to the prepare service |
Public Optional title |
title:
|
Type : string
|
Defined in src/lib/model/upload-target.model.ts:62
|
Public type |
type:
|
Type : string
|
Defined in src/lib/model/upload-target.model.ts:61
|
Upload targets type
|
Public onUploadFail |
onUploadFail()
|
Defined in src/lib/model/upload-target.model.ts:84
|
Return method if the Upload fails
Returns :
literal type
an empty Object if the Upload fails |
Public onUploadSuccess | ||||||
onUploadSuccess(target: any)
|
||||||
Defined in src/lib/model/upload-target.model.ts:75
|
||||||
Return Method if the Upload is Successfull
Parameters :
Returns :
any
the provided UploadTarget if the Upload was Successfull. |
import {DmsObject} from './dms-object.model';
import {StructureTreeNode} from '../interface/tree-node.interface';
export class UploadTarget {
/**
* general filing target
*/
public static ROOT = 'root';
/**
* add file(s) to context folder
*/
public static CONTEXT = 'context';
/**
* add file(s) to context folders dynamic structure
*/
public static CONTEXT_TREE = 'contexttree';
/**
* set/replace content file of a dms object
*/
public static OBJECT = 'object';
/**
* custom targets (e.g. for plugin development)
*/
public static CUSTOM = 'custom';
/**
* add file(s) to favorite folders
*/
public static FAVORITE = 'favorite';
/**
* add file(s) to last opened folders
*/
public static AGENT = 'agent';
public name: string;
public description: string;
/**
* based on the upload targets type this is the dms object to
* add/replace content file for (type: OBJECT) or the context folder
* to add the files to (type: CONTEXT)
*/
public referenceObject: DmsObject;
/**
* node from the structure service tree that may hold additional
* data to be provide to the prepare service
*/
public subFolder: StructureTreeNode;
/**
* Creates a new instance of UploadTarget
*
* @param id Upload targets unique id
* @param type Upload targets type
* @param title
* @param iconId
* @param context
*/
constructor(public id: string,
public type: string,
public title?: string,
public iconId?: string,
public context?: string,
) {
}
/**
* Return Method if the Upload is Successfull
*
* @param target
* @returns the provided UploadTarget if the Upload was Successfull.
*/
public onUploadSuccess(target: any): any {
return target;
}
/**
* Return method if the Upload fails
*
* @returns an empty Object if the Upload fails
*/
public onUploadFail(): {} {
return {};
}
}