Skip to main content
Skip table of contents

Create Collection Component [VF IG]

Add this tag "<pf-create-collection>" to html to use this component. Create collection component is used to create a Vidispine Collection and attach metadata to the collection. External metadata can be passed as input into Create Collection Component (similar to Booking Component), then a collection is created with metadata specified in the Create Collection Component layout. External metadata will also be included in the created collection. In this component, the save button and reset button are removed from the layout. Saving and resetting layout is done via an actionEvent sent as an input into Create 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 does not directly access Vidispine or ConfigPortal api. Instead, requests are made to a proxy "metadata editor host" installed with VidiFlow which are 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

Create Collection
#


Output

Description

Sample

saveClicked

Triggered when the save button is clicked.


collectionCreated

When creating collection, this 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

The external metadata and actionEvent must be provided via web component property instead of attribute, because any input provided via attribute will be converted to string. Below an example of how to provide External Metadata and actionEvent into Create Collection Component. Note: If a metadata field exists in the Create 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-create-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-create-collection>


In .ts file

CODE
// reference the booking component
@ViewChild('editor') editor: ElementRef;
...
 
// to provide metadata and create 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',
   };


JavaScript errors detected

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

If this problem persists, please contact our support.