File

platform-components-ng/projects/platform-components-lib/src/lib/components/collection/service/collection-browser.service.ts

Description

Collection browsing service

Index

Methods

Constructor

constructor(http: HttpClient, backgroundTasksService: BackgroundTasksService, applicationConfigService: ApplicationConfigService, dialogService: QppDialogService)
Parameters :
Name Type Optional
http HttpClient No
backgroundTasksService BackgroundTasksService No
applicationConfigService ApplicationConfigService No
dialogService QppDialogService No

Methods

contentTypeRevisionControls
contentTypeRevisionControls(collectionId: number, contentTypeId: number)

Content type revision controls

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

contentTypeId number No

Content Type Id

Observable

convertToCollectionEntity
convertToCollectionEntity(collectionObj: any)

Convert to collection entity

Parameters :
Name Type Optional Description
collectionObj any No

Collection object

Returns : Entity

Entity

createCollection
createCollection(collectionInfo)

Create collection

Parameters :
Name Optional Description
collectionInfo No

Collection Info

Promise

Async deleteCollection
deleteCollection(collectionId: number)

Delete collection

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

Returns : any

Promise

duplicateCollection
duplicateCollection(collectionId, duplicateInfo)

Duplicate collection

Parameters :
Name Optional Description
collectionId No

The ID of the collection to be duplicated

duplicateInfo No

Duplication config object with collectionName and parentCollectionId keys and flags for duplicateHierarchy, duplicateWorkflows, duplicateMembers, duplicateStatusRoutings, duplicateJobJackets, duplicateRevisionControls. Default value for duplicateHierarchy is set to false, and all other flags are set to true. parentCollectionId and collectionName are mandatory values.

Returns : Promise<any>

Promise A promise resolving to an object with new collection id.

Async duplicateCollectionWithAssets
duplicateCollectionWithAssets(collection, duplicateInfo)

Duplicate collection with assets

Parameters :
Name Optional Description
collection No
duplicateInfo No

Duplication config object collectionName and parentCollectionId and flag for createAssetsMinorVersion. Default value for createAssetsMinorVersion is set to false. parentCollectionId and collectionName are mandatory values.

Promise<Observable> A promise resolving to an object with new collection id.

Async getAllAccessiblecollections
getAllAccessiblecollections(refresh)

Get all root level accessible collections.

Parameters :
Name Optional Default value
refresh No false

Promise<Observable<Collection[]>>

getAllCollectionAssetCount
getAllCollectionAssetCount(collectionId)

Get all collection asset count

Parameters :
Name Optional Description
collectionId No

Collection Id

Returns : Observable<string>

Observable

getAllCollectionAttributes
getAllCollectionAttributes(collectionId: number)

Get collection attributes

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

Returns : Observable<any>

Observable

getAllNotifications
getAllNotifications()

Get all notifications

Returns : BehaviorSubject<any>

BehaviorSubject

getAllRoutingUsersAndGroups
getAllRoutingUsersAndGroups(collectionId: number, workflowId: number, statusId: number)

Get all routing users and groups

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

workflowId number No

Workflow Id

statusId number No

Status Id

Returns : Observable<any>

Observable

getAllRoutingUsersAndGroupsForAssets
getAllRoutingUsersAndGroupsForAssets(routingTrusteesRequest: RoutingTrusteeRequest[])

Get all routing users and groups for assets

Parameters :
Name Type Optional Description
routingTrusteesRequest RoutingTrusteeRequest[] No

Routing Truestees Request

Returns : Promise<any>

Promise

getAllRoutingUsersAndGroupsForMultiple
getAllRoutingUsersAndGroupsForMultiple(routingRequestParams: RoutingTrusteeRequest[])

Get all routing users and groups for multiple routing requests

Parameters :
Name Type Optional Description
routingRequestParams RoutingTrusteeRequest[] No

Routing Trustee Request array

Returns : Observable<literal type[]>

Observable<{users: User[], groups: Group[]}[]>

getAllWorkflowsInfo
getAllWorkflowsInfo()

Specifically for loading workflows in order to facilitate addition and removal of workflows from the collection detail blade.

Returns : Observable<any>

Observable

getApplicableStatusTransitions
getApplicableStatusTransitions(collectionId: number, workflowId: number, statusId: number)

Get applicable status transitions

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

workflowId number No

Workflow Id

statusId number No

Status Id

Returns : Observable<any>

Observable

getApplicableStatusTransitionsForAssets
getApplicableStatusTransitionsForAssets(applicableStatusesRequest: ApplicableStatusesRequest[])

Get applicable status transitions for assets

Parameters :
Name Type Optional Description
applicableStatusesRequest ApplicableStatusesRequest[] No

Applicable statuses request

Returns : any

Promise

getApplicableWorkflowInitialStatuses
getApplicableWorkflowInitialStatuses(collectionId: number, workflowId: number)

Get applicable workflow initial statuses

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

workflowId number No

Workflow Id

Returns : any

Observable

getApplicableWorkflows
getApplicableWorkflows(collectionId: number, contentTypeId: number)

Get applicable workflows

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

contentTypeId number No

Content Type Id

Returns : Observable<CollectionWorkflow[]>

Observable<CollectionWorkflow[]>

getCollectionAssetCount
getCollectionAssetCount(collectionId: number, recursive)

Get collection asset count

Parameters :
Name Type Optional Default value Description
collectionId number No

Collection Id

recursive No false

Find all assets in sub-collections

Returns : Observable<string>

Observable

getCollectionAssets
getCollectionAssets(collectionId: number, filterName?: string, sortAttributeId?: number, sortType?: string)

Get collection assets

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

filterName string Yes

Filter name

sortAttributeId number Yes

Sort attribute Id

sortType string Yes

Sort Type

Returns : Promise<Observable<any>>

Promise<Observable>

getCollectionAssetsMetaData
getCollectionAssetsMetaData(collectionId: number, attributeIds: any[], filterName?: string)

Get collection assets meta data

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

attributeIds any[] No

Attribute Id list

filterName string Yes

Filter name

Returns : Observable<any>

Observable

getCollectionBrowsingInfo
getCollectionBrowsingInfo(contentTypeId: number, collectionId: number)

Get all the required info to check in an asset. All info including previliges, permissions and version info should be fetched here.

Parameters :
Name Type Optional Description
contentTypeId number No

content type id of the asset

collectionId number No

the id of the collection in which the asset is to be checked in.

Returns : Observable<any>

Observable

Async getCollectionChildren
getCollectionChildren(collectionId, refresh)

Get array of collection children.

Parameters :
Name Optional Default value
collectionId No
refresh No false

Promise<Observable<Collection[]>>

getCollectionChildrenCount
getCollectionChildrenCount(collectionId)

Get collection children count

Parameters :
Name Optional Description
collectionId No

Collection Id

Returns : Promise<Observable<any>>

Promise<Observable>

getCollectionChildrenMetaData
getCollectionChildrenMetaData(parentCollectionId, attributeIds: any[])

Get collection children meta data

Parameters :
Name Type Optional Description
parentCollectionId No

Parent collection Id

attributeIds any[] No

Attribute Id list

Returns : Observable<any>

Observable

getCollectionContentTypes
getCollectionContentTypes()

Get collection content types

Returns : any

Observable

getCollectionGroups
getCollectionGroups(collectionId)

Get collection groups

Parameters :
Name Optional Description
collectionId No

Collection Id

Returns : any

Observable

Async getCollectionHierarchy
getCollectionHierarchy(collectionId)

Get hierarchy of a collection.

Parameters :
Name Optional Description
collectionId No

ID of the collection whose hierarchy is required.

Promise<Observable<Collection[]>>

getCollectionHierarchyState
getCollectionHierarchyState()

Get collection hierarchy state

Returns : any

any

getCollectionIdFromPath
getCollectionIdFromPath(path: string)

Get collection id from path

Parameters :
Name Type Optional Description
path string No

Path

Returns : Observable<number>

Observable

getCollectionInfo
getCollectionInfo(collectionId: number)

Get Collection info by collection id

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

Returns : Observable<any>

Observable

getCollectionMetaState
getCollectionMetaState()

Get collection meta state

Map<number, Collection>

getCollectionObject
getCollectionObject(collectionId)

Returns Promise of type Observable that will emit meta of collection. Observable will emit new value of object only if collection meta updated.

Parameters :
Name Optional Description
collectionId No

Collection Id

Promise<Observable>

getCollectionParents
getCollectionParents(collectionId, filterHiddenCollection)

Get collection parents

Parameters :
Name Optional Default value Description
collectionId No

Collection Id

filterHiddenCollection No false

Filter hidden collection

Returns : Observable<any>

Observable

getCollectionRevisionInfo
getCollectionRevisionInfo(contentTypeId, collectionId: number)

Get collection revision info

Parameters :
Name Type Optional Description
contentTypeId No

Content Type Id

collectionId number No

Collection Id

Returns : any

Observable

Async getCollectionTemplates
getCollectionTemplates()

Get collection templates.

Returns : Promise<any>

Promise

getCollectionUsers
getCollectionUsers(collectionId)

Get collection users

Parameters :
Name Optional Description
collectionId No

Collection Id

Returns : any

Observable

getCollectionWorkflows
getCollectionWorkflows(collectionId: number)

Get collection workflows

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

Returns : Observable<CollectionWorkflow[]>

Observable<CollectionWorkflow[]>

getRevisionControls
getRevisionControls(collectionId: number)

Get revision control

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

Observable

Async getUniqueCollectionName
getUniqueCollectionName(parentCollectionId: number, currentName: string)

This method returns a unique collection name by checking the names of all the other collections in the given parent collection. If the current name is not unique, a number is appended to the current name to make it unique, else the current name is returned.

Parameters :
Name Type Optional Description
parentCollectionId number No

the id of the collection where new collection will be added.

currentName string No

the default current name given to the collection

Returns : Promise<string>

Promise

getUpdatedCollectionChildren
getUpdatedCollectionChildren(collectionId)

Updates the collection meta store and the collection hierarchy with the newly added collection.

Parameters :
Name Optional Description
collectionId No

Collection Id

Returns : void

Promise

Async getVisibleChildrenCollectionCount
getVisibleChildrenCollectionCount(collectionId)

Get visible count of collection children for given collection id.

Parameters :
Name Optional
collectionId No
Returns : Promise<any>

Promise

getWorkflowById
getWorkflowById(workflowId: number)

Get workflow by id

Parameters :
Name Type Optional Description
workflowId number No

Workflow Id

Returns : Observable<any>

Observable

inheritRevisionControlsFromParent
inheritRevisionControlsFromParent(collectionId: number, parentCollectionId: number)

Inherit revision controls from parent

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

parentCollectionId number No

Parent collection Id

Returns : any

Observable

isAccessibleCollection
isAccessibleCollection(collectionId)

Is accessible collection

Parameters :
Name Optional Description
collectionId No

Collection Id

Returns : Promise<boolean>

Promise

isCollectionHidden
isCollectionHidden(collectionId: number)

Is collection hidden

Parameters :
Name Type Optional
collectionId number No
Returns : Observable<boolean>

Observable

loadAccessibleCollections
loadAccessibleCollections(refresh, filterHiddenCollection)

Load accessible collections

Parameters :
Name Optional Default value Description
refresh No false

Refresh

filterHiddenCollection No false
Returns : Observable<void>

Observable

loadCollectionAttributes
loadCollectionAttributes(collectionId)

Loads Collection Meta from Backend.

Parameters :
Name Optional
collectionId No

Observable

loadCollectionChildren
loadCollectionChildren(parentCollectionId, refresh, filterHiddenCollection)

Load collection children

Parameters :
Name Optional Default value Description
parentCollectionId No

Parent collection Id

refresh No false

Refresh

filterHiddenCollection No false
Returns : Observable<void>

Observable

loadCollectionParents
loadCollectionParents(collectionId, filterHiddenCollection)

Loads Collection Parents.

Parameters :
Name Optional Default value Description
collectionId No

Collection Id

filterHiddenCollection No false
Returns : Observable<void>

Observable

moveCollection
moveCollection(collectionId: number, targetParentId: number)

Move collection

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

targetParentId number No

Target Parent Id

Returns : any

Observable

setAttributeValues
setAttributeValues(collectionId: number, attributeValues: SetAttributeValueRequest[])

Set attribute values

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

attributeValues SetAttributeValueRequest[] No

Attribute values

Observable

setCollectionGroups
setCollectionGroups(collectionId, groups: CollectionGroup[], applyToChildCollection)

Set collection groups

Parameters :
Name Type Optional Default value Description
collectionId No

Collection Id

groups CollectionGroup[] No

Groups

applyToChildCollection No APPLY_TO_CHILD_COLLECTION_STATE.NONE

APPLY_TO_CHILD_COLLECTION_STATE value. Default is APPLY_TO_CHILD_COLLECTION_STATE.NONE.

Returns : any

Observable

setCollectionUsers
setCollectionUsers(collectionId, users: CollectionUser[], applyToChildCollection)

Set collection users

Parameters :
Name Type Optional Default value Description
collectionId No

Collection Id

users CollectionUser[] No

Users

applyToChildCollection No APPLY_TO_CHILD_COLLECTION_STATE.NONE

APPLY_TO_CHILD_COLLECTION_STATE value. Default is APPLY_TO_CHILD_COLLECTION_STATE.NONE.

Returns : any

Observable

setCollectionWorkflowsAndRoutings
setCollectionWorkflowsAndRoutings(collectionId: number, workflowsData: CollectionWorkflow[], applyToChildCollection)

Set the Collection Workflows as specified by the WorkflowIds array

Parameters :
Name Type Optional Default value Description
collectionId number No

Collection Id

workflowsData CollectionWorkflow[] No

list of Workflow Ids

applyToChildCollection No APPLY_TO_CHILD_COLLECTION_STATE.NONE

APPLY_TO_CHILD_COLLECTION_STATE value. Default is APPLY_TO_CHILD_COLLECTION_STATE.NONE.

Returns : Observable<any>

Observable

setRevisionControls
setRevisionControls(collectionId: number, revisionConfig: any)

Set revision controls

Parameters :
Name Type Optional Description
collectionId number No

Collection Id

revisionConfig any No

Revision Config

Returns : any

Observable

showUnaccessibleDefaultCollectionPopup
showUnaccessibleDefaultCollectionPopup()

Show popup when user does not have access to the default collection

Returns : void

void

result-matching ""

    No results matching ""