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.
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:
Implement the following:
A class that provides add-on functionality for external storage locations. This class can also specify asset tags and search functionality.
A definition of the class that implements the add-on's API. EBX® must register this definition class on repository startup or from a user-run service.
Any classes required by third-party tools. For example, helper classes that contain connection credential and error handling information.
Ensure that any required libraries are deployed in the same location as your ebx.jar
file. This would include any JAR files containing your classes that implement the add-on's API. See the EBX® Development Guide for more information on deployment requirements.
Steps an EBX® administrator must complete in the UI:
If required, run the service that registers the external storage management class.
Create an add-on Drive and configure it to use external storage. Ensure proper settings for user permissions.
Create a D.A.C. to link the data model field and Drive. Ensure proper settings for user permissions.
For instructions, see Configuring an external Drive.
The following sections describe how to implement:
Custom Connectors
External Manager 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());
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());