Class StorageLocationMapping
- All Implemented Interfaces:
Serializable
Certain StorageProvider
implementations may store data at a different location than the
original path/'URL' provided to them. This entity can be used by those providers to keep track of
the mappings between the original location and the real path/location used to store binary data.
Each mapping record corresponds to one file.
As mentioned above, this entity is expected to be managed/used internally by the system and is not intended to be exposed to outside callers.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
getId()
Unique identifier for this record.The original location that a caller gave to theStorageProvider
to associate with the binary data.The actual location within theStorageProvider
backing datastore that holds the binary data of the file.EachStorageProvider
implementation should correspond to a different type value here.int
hashCode()
void
Unique identifier for this record.void
setOriginalLocation
(String originalLocation) The original location that a caller gave to theStorageProvider
to associate with the binary data.void
setStorageProviderLocation
(String storageProviderLocation) The actual location within theStorageProvider
backing datastore that holds the binary data of the file.void
setStorageProviderType
(String storageProviderType) EachStorageProvider
implementation should correspond to a different type value here.toString()
-
Constructor Details
-
StorageLocationMapping
public StorageLocationMapping()
-
-
Method Details
-
getId
Unique identifier for this record. -
getStorageProviderType
EachStorageProvider
implementation should correspond to a different type value here. There is currently no support for any more than one activeStorageProvider
implementation at a time, but tracking which provider this mapping is for may be useful in the event of a migration (or auditing in general). -
getOriginalLocation
The original location that a caller gave to the
StorageProvider
to associate with the binary data. Typically, this is a 'URL' value obtained by prepending context-specific information to theAsset.getUrl()
, as done inAssetStorageUtils.getContextAwareUrl(Asset, ContextInfo)
.This is the value callers will give to the
StorageProvider
to store/read/delete the resource.This is already expected to be globally unique, but for correctness, queries should be done against a combination of
getOriginalLocation()
andgetStorageProviderType()
. -
getStorageProviderLocation
The actual location within the
StorageProvider
backing datastore that holds the binary data of the file.The contained value here may look different depending on the
StorageProvider
. For example, in the case ofFilesystemStorageProvider
, this will just be another file path. In other cases, it may be a cloud object identifier, or something else. Ultimately, it should be something that theStorageProvider
can use to reliably resolve/manage the file. -
setId
Unique identifier for this record. -
setStorageProviderType
EachStorageProvider
implementation should correspond to a different type value here. There is currently no support for any more than one activeStorageProvider
implementation at a time, but tracking which provider this mapping is for may be useful in the event of a migration (or auditing in general). -
setOriginalLocation
The original location that a caller gave to the
StorageProvider
to associate with the binary data. Typically, this is a 'URL' value obtained by prepending context-specific information to theAsset.getUrl()
, as done inAssetStorageUtils.getContextAwareUrl(Asset, ContextInfo)
.This is the value callers will give to the
StorageProvider
to store/read/delete the resource.This is already expected to be globally unique, but for correctness, queries should be done against a combination of
getOriginalLocation()
andgetStorageProviderType()
. -
setStorageProviderLocation
The actual location within the
StorageProvider
backing datastore that holds the binary data of the file.The contained value here may look different depending on the
StorageProvider
. For example, in the case ofFilesystemStorageProvider
, this will just be another file path. In other cases, it may be a cloud object identifier, or something else. Ultimately, it should be something that theStorageProvider
can use to reliably resolve/manage the file. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-