Cloud Software Group, Inc. EBX®
Digital Asset Manager Add-on Documentation > Developer Guide > Alternative storage locations
Navigation modeDigital Asset Manager Add-on Documentation > Developer Guide > Alternative storage locations

Connecting to alternative storage locations

Overview

The add-on's API allows you to access alternative asset storage locations. An "alternative" storage location could be one which requires credentials and a third-party API to access. For example, assets might be stored in the cloud on Google Drive or AWS. Alternatively, you may already use a third-party tool to manage digital assets but, you want to enable data model access to these assets. Since these types of locations and use cases require management outside of EBX®, we refer to these as externally managed storage locations.

The headings below outline high-level implementation steps. See Example Implementation for an example implementation.

High-level flow

Several steps are require to implement access to an externally managed storage location. Those in a developer role perform most steps; as noted below, EBX® administrators complete others:

Implementing registration and definition classes

The following sections describe how to implement:

Custom Connectors

As shown below, the class you write to specify Drive options for an externally managed location must extend the StorageManager abstract class. The methods in this class enable operations on assets stored in an external location.

import com.orchestranetworks.addon.dama.common.util.*;
import com.orchestranetworks.addon.dama.ext.*;
import com.orchestranetworks.addon.dama.ext.bean.*;
import com.orchestranetworks.addon.dama.ext.exception.*;
import com.orchestranetworks.addon.dama.ext.resource.*;
import com.orchestranetworks.addon.dama.i18n.*;
   
public class ExternalStorageManager extends StorageManager
{
    // TODO populate with required methods.
    public ResourceIdentifier upload(Resource resource, ResourceIdentifier target) throws DAMException
   {
    ...
   }
}

The below definition class which extends the add-on's ConnectorManagerDefinition can be used to register your external management class. Note that in this class you can also determine whether users can upload assets to the external storage location from the add-on's Drive view.

import com.orchestranetworks.addon.dama.ext.*;
import com.orchestranetworks.addon.dama.externalmanagement.search.*;;
import com.orchestranetworks.addon.dama.i18n.*;
   
public class ExternalConnectorManagerDefinition extends ConnectorManagerDefinition
{
    // TODO populate with required methods.
    public StorageManager getStorageManager()
   {
    return new ExternalStorageManager();
   }
}

To make your Custom Connector storage location implementation available as an option in the UI, it must be registered. You can register the external storage management upon EBX® startup, or by implementing a service. For more information on module and service registration, see the EBX® documentation. To register the external storage manager, add the following code to your registration servlet or service dispatcher:

ConnectorManagerRegistry.registerConnector(new ExternalConnectorManagerDefinition());

External Manager Connectors

As shown below, the class you write to specify Drive options for an externally managed location must implement the ExternalManager interface. The methods in this interface enable operations on assets stored in an external location.

import com.orchestranetworks.addon.dama.ext.exception.*;
import com.orchestranetworks.addon.dama.ext.resource.*;
import com.orchestranetworks.addon.dama.externalmanagement.*;
import com.orchestranetworks.addon.dama.externalmanagement.bean.*;
import com.orchestranetworks.addon.dama.externalmanagement.request.*;
import com.orchestranetworks.addon.dama.externalmanagement.response.*;
 
public class ExternalStorageDrive implements ExternalManager
{
	// TODO populate with required methods.
}

The below definition class which extends the add-on's ExternalManagerDefinition can be used to register your external management class. Note that in this class you can also determine whether users can upload assets to the external storage location from the add-on's Drive view.

import com.orchestranetworks.addon.dama.externalmanagement.*;

public final class ExternalStorageDriveDefinition extends ExternalManagerDefinition
{
	// Creates a new ExternalManager based on your implementation
	public ExternalManager getExternalManager()
	{
		return new ExternalStorageDrive();
	}
	
	// Determines whether upload to the external storage location is enabled
	public boolean allowUpload()
	{
		return true;
	}
}

To make your external storage location implementation available as an option in the UI, it must be registered. You can register the external storage management upon EBX® startup, or by implementing a service. For more information on module and service registration, see the EBX® documentation. To register the external storage manager, add the following code to your registration servlet or service dispatcher:

ExternalManagerCatalog.add(new ExternalStorageDriveDefinition());