Skip to main content
Skip table of contents

Edit Collection Component [VF 21.4 IG]

Add this tag "<pf-edit-collection>" to html to use this component. The Edit Collection Component is used to edit an existing Vidispine Collection metadata. External metadata can be pass as input into Edit Collection Component (similar to Booking Component), then the collection will be updated with the metadata specified in the Edit Collection Component layout. External metadata will also be used to update the collection metadata. In this component, save button and reset button is removed from the layout. Saving and resetting layout is done via an actionEvent sent as an input into Edit Collection Component. Below are input and output of this component.

Input

Description

Sample Input

auth-service-url

The url to the identity server authentication service.

http://localhost:19081/Authentication/Core

auth-redirect-url

When the authentication service authenticated the user, the auth service will redirect to this url. Note: this url must be configured as "redirect url" of auth service

http:// localhost:19081/MetadataEditor/

auth-logout-url

Logout redirect url of auth service

http:// localhost:19081 /MetadataEditor/

auth-silent-refresh-url

The silent refresh html that oidc client use to refresh the auth token

http:// localhost:19081/silent-refresh.html

metadata-editor-uri

Currently the metadata editor do not directly access Vidispine or ConfigPortal api. Instead request are made to a proxy "metadata editor host" installed with VidiFlow which then routed to Vidispine or ConfigPortal api. So this is the url of that proxy service.

http://localhost:19081/Platform.Clients/MetadataEditor/ (backslash needed.)

header-text

Text to be shown in header of MetadataEditor

Edit Collection
#

object-id

The collection id of collection to be edited.

pf://systemname/collection /VX-110


Output

Description

Sample

saveClicked

Triggered when the save button is clicked.


collectionUpdated

When updating collection, this event will emit the result whether success or failed. The structure of the emitted event look like this

{
success: boolean;
errorMessage: string;
}

{

success:: true

}


{

success: false

errorMessage: "some error"
}


Sending External Metadata input and actionEvent


External metadata and actionEvent must be provided via web component property instead of an attribute because any input provided via attribute will be converted to string. Below, an example of how to provide external metadata and actionEvent into Edit Collection Component. Please note that if a metadata field exists in the Edit Collection Component's layout, but also exists in the external metadata input, external metadata will take precedence and overwrite the value defined in the layout.

In template or .html

CODE
<pf-edit-collection #editor
        [attr.auth-service-url]="authServiceUrl"
        [attr.auth-redirect-url]="authRedirectUrl"
        [attr.auth-logout-url]="authLogoutUrl"
        [attr.auth-silent-refresh-url]="authSilentRefreshUrl"
        [attr.metadata-editor-uri]="metadataEditorUri" 

...        
></pf-edit-collection>


In .ts file

CODE
// reference the edit collection component
@ViewChild('editor') editor: ElementRef;
...
 
// to provide metadata for the collection
// provide external metadata to externalMetadata property
    this.editor.nativeElement.externalMetadata = [
      {
        name: 'V3_bookingType',
        value: [{
          value: 'type1',
        }],
      }
    ];

    // insert save event for actionEvent to trigger saving
    this.editor.nativeElement.actionEvent =  {
       name: 'save',
   };

   // insert reset event for actionEvent to reset value in Create Collection component lay-out
    this.editor.nativeElement.actionEvent =  {
       name: 'resetMetadata',
   };

Clone and Copy Metadata from Existing Item / Collection


The clone from existing item metadata feature is supported only for "pf-booking" and "pf-create-collection".
By simply providing the clone-object-id in platform uri standard, it will load the metadata from the provided item/collection into the Metadata Editor Layout.

In template or .html

CODE
<pf-booking  #editor
            [attr.clone-object-id]="'pf://system/item/VX-123'" 
….
<pf-booking>
CODE
<pf-create-collection #editor
            [attr.clone-object-id]="'pf://system/collection/VX-123'" 
….
<pf-create-collection>

MetadataInitialized Event

The MetadataInitialized event is introduced for the used when metadata is loaded and ready for editing.

In template or .html

CODE
<pf-booking  #editor
            (metadataInitialized)="metadataInitialized()" 
….
<pf-booking>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.