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 booleanbooleangetId()Unique identifier for this record.The original location that a caller gave to theStorageProviderto associate with the binary data.The actual location within theStorageProviderbacking datastore that holds the binary data of the file.EachStorageProviderimplementation should correspond to a different type value here.inthashCode()voidUnique identifier for this record.voidsetOriginalLocation(String originalLocation) The original location that a caller gave to theStorageProviderto associate with the binary data.voidsetStorageProviderLocation(String storageProviderLocation) The actual location within theStorageProviderbacking datastore that holds the binary data of the file.voidsetStorageProviderType(String storageProviderType) EachStorageProviderimplementation should correspond to a different type value here.toString()
-
Constructor Details
-
StorageLocationMapping
public StorageLocationMapping()
-
-
Method Details
-
getId
Unique identifier for this record. -
getStorageProviderType
EachStorageProviderimplementation should correspond to a different type value here. There is currently no support for any more than one activeStorageProviderimplementation 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
StorageProviderto 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
StorageProviderto 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
StorageProviderbacking 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 theStorageProvidercan use to reliably resolve/manage the file. -
setId
Unique identifier for this record. -
setStorageProviderType
EachStorageProviderimplementation should correspond to a different type value here. There is currently no support for any more than one activeStorageProviderimplementation 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
StorageProviderto 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
StorageProviderto 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
StorageProviderbacking 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 theStorageProvidercan use to reliably resolve/manage the file. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-