File

platform-components-ng/projects/platform-components-lib/src/lib/components/content-types/service/content-types.service.ts

Description

Service to get Content Types and its and its info from PS.

Index

Methods

Constructor

constructor(http: HttpClient, userService: UserService)
Parameters :
Name Type Optional
http HttpClient No
userService UserService No

Methods

createContentType
createContentType(parentContentTypeId: number, contentTypeName: string)

Create content type

Parameters :
Name Type Optional Description
parentContentTypeId number No

Parent content type Id

contentTypeName string No

Content type name

Returns : Observable<CreateContentTypeResponse>

Observable

deleteContentType
deleteContentType(contentTypeId: number)

Delete content type

Parameters :
Name Type Optional Description
contentTypeId number No

Content Type Id

Returns : Observable<any>

Observable

detectContentType
detectContentType(fileExt, file)

Delete content type

Parameters :
Name Optional Description
fileExt No

File Extension

file No

File

Returns : Promise<any>

Promise

duplicateContentType
duplicateContentType(sourceId: number, targetName: string, parentContentTypeId: number)

Duplicate content type

Parameters :
Name Type Optional Description
sourceId number No

Source Id

targetName string No
parentContentTypeId number No

Parent content type Id

Returns : Observable<CreateContentTypeResponse>

Observable

getAllDeliveryChannels
getAllDeliveryChannels()

Get all delivery channels

Returns : Observable<PublishingChannel[]>

Observable<PublishingChannel[]>

getAllPublishingChannels
getAllPublishingChannels()

Get all publishing channels

Returns : Observable<PublishingChannel[]>

Observable<PublishingChannel[]>

getAssetCount
getAssetCount(contentTypeIds: number[])

Get asset count

Parameters :
Name Type Optional Description
contentTypeIds number[] No

Content type Id list

Returns : any

Observable

getAttributeContentTypesMapping
getAttributeContentTypesMapping(attributeId: number)

Get Properties of an attribute

Parameters :
Name Type Optional Description
attributeId number No

Id of attribute

Returns : Observable<any>

Observable

getContentType
getContentType(contentTypeId: number)

Get content type info

Parameters :
Name Type Optional Description
contentTypeId number No

Content Type Id

Observable

getContentTypeByName
getContentTypeByName(contentTypeName: string)

Get content type info

Parameters :
Name Type Optional Description
contentTypeName string No

Content type name

Observable

getContentTypeDeliveryChannels
getContentTypeDeliveryChannels(contentTypeId: number)

Get content type delivery channels

Parameters :
Name Type Optional Description
contentTypeId number No

Content Type Id

Returns : Observable<any>

Observable

getContentTypeFromExtension
getContentTypeFromExtension(mimeType: string, fileExt: string)

Get content type from extension

Parameters :
Name Type Optional Description
mimeType string No

Mime type

fileExt string No

File Extension

Returns : Observable<any>

Observable

getContentTypeProperties
getContentTypeProperties(contentTypeId: number)

Get Properties of a content type

Parameters :
Name Type Optional Description
contentTypeId number No

Id of content type

Observable<Attribute[]>

getContentTypePublishingChannels
getContentTypePublishingChannels(contentTypeId: number)

Get Publishing channels of a content type

Parameters :
Name Type Optional Description
contentTypeId number No

Id of content type

Returns : Observable<PublishingChannel[]>

Observable<PublishingChannel[]>

getContentTypes
getContentTypes()

Get all content types

Promise<Observable>

getContentTypeWorkflows
getContentTypeWorkflows(contentTypeId: number, withContentTypes, withBlankStatuses)

Get Workflows of a content type

Parameters :
Name Type Optional Default value Description
contentTypeId number No

Id of content type

withContentTypes No true
withBlankStatuses No true

Observable<Workflow[]>

getSelectionNodeHierarchy
getSelectionNodeHierarchy(selectedContentTypeNode: ContentType, contentTypeOptions: ContentType[])

Get selection node hierarchy

Parameters :
Name Type Optional Description
selectedContentTypeNode ContentType No

Selected contenttype node

contentTypeOptions ContentType[] No

Content type options

Returns : ContentType[]

ContentType[]

getSpecializationContentTypes
getSpecializationContentTypes(contentTypeId)

Get specialization content types

Parameters :
Name Optional Description
contentTypeId No

Content Type Id

Returns : ContentType[]

ContentType[]

renameContentType
renameContentType(contentTypeId: number, newName: string)

Rename content type

Parameters :
Name Type Optional Description
contentTypeId number No

Content Type Id

newName string No

New Name

Returns : Observable<any>

Observable

setAttributeContentTypes
setAttributeContentTypes(attributeId: number, contentTypes: any)

Set attribute content types

Parameters :
Name Type Optional Description
attributeId number No

Attribute Id

contentTypes any No

Content Types

Observable

setContentTypeChannels
setContentTypeChannels(contentTypeId: number, channelIds: string)

Set content type channels

Parameters :
Name Type Optional Description
contentTypeId number No

Content Type Id

channelIds string No

Channel Id list

Observable

setContentTypeChannelsPreview
setContentTypeChannelsPreview(contentTypeId: number, channelIds: string, useForPreview: boolean)

Set content type channels preview

Parameters :
Name Type Optional Description
contentTypeId number No

Content Type Id

channelIds string No

Channel Id list

useForPreview boolean No

Use for preview

Returns : Observable<any>

Observable

setContentTypeProperties
setContentTypeProperties(contentTypeId: number, properties: any)

Set content type properties

Parameters :
Name Type Optional Description
contentTypeId number No

Content Type Id

properties any No

Properties

Observable

setContentTypesIntialized
setContentTypesIntialized(contentTypesIntialized)
Parameters :
Name Optional
contentTypesIntialized No
Returns : void
updateContentTypeIcon
updateContentTypeIcon(_contentTypeIconInfo: any)

Update ContentType Icon

Parameters :
Name Type Optional Description
_contentTypeIconInfo any No

Icon Info (ContentType id and icon file)

Returns : Promise<any>

Promise

result-matching ""

    No results matching ""