Skip navigation links

Package com.orchestranetworks.addon.dama.ext.componentcontroller

Provides the interface to perform actions on media fields using Digital Asset Component services.

See: Description

Package com.orchestranetworks.addon.dama.ext.componentcontroller Description

Provides the interface to perform actions on media fields using Digital Asset Component services.

  1. Get an instance of DigitalAssetComponentServices:

            //Provides component context with the information referring to a specific digital asset component.
            DigitalAssetComponentContext componentContext = new DigitalAssetComponentContext(
                    aUserRecord,
                    aMediaPath,
                    aSession);
    
            DriveFactory driveFactory = DriveFactoryProvider.getDriveFactory();
    
            //Get an instance of DigitalAssetComponentServices from 'componentContext'.
            DigitalAssetComponentServices componentController = driveFactory
                    .getDigitalAssetComponentServices(componentContext);
    
  2. Upload, attach, detach assets and get keys of digital assets attached to a media field:

                                                    
            //Upload and attach assets to records
            File uploadFile = new File("sampleFile.png");
            FileResource fileResource = new FileResource(uploadFile);
            List<FileResource> fileResources = new ArrayList<FileResource>();
            fileResources.add(fileResource);
            componentController.upload(fileResources, Action.ATTACH);
    
            //Attach digital assets to the media field of a record
            DigitalAssetKey assetKey = new DigitalAssetKey(PrimaryKey.parseString("assetKey"));
            List<DigitalAssetKey> assetKeys = new ArrayList<DigitalAssetKey>();
            assetKeys.add(assetKey);
            componentController.attach(assetKeys);
    
            //Detach digital asset
            componentController.detach(assetKeys);
            
            //Get digital asset keys, which are attached in media field of a user record
            componentController.getDigitalAssetKeys();
    
Skip navigation links

Add-ons Version 4.5.22.

Copyright 2001-2025. Cloud Software Group, Inc. All rights reserved.
All third party product and company names and third party marks mentioned in this document are the property of their respective owners and are mentioned for identification.