public interface StaticAssetService extends SandBoxItemListener
| Modifier and Type | Method and Description |
|---|---|
StaticAsset |
addStaticAsset(StaticAsset staticAsset,
SandBox destinationSandbox)
This method is intended to be called from within the CMS
admin only.
|
java.lang.String |
convertAssetPath(java.lang.String assetPath,
java.lang.String contextPath,
boolean secureRequest)
This method will take in an assetPath (think image url) and convert it if
the value contains the asseturlprefix.
|
java.lang.Long |
countAssets(SandBox sandbox,
org.hibernate.Criteria criteria) |
StaticAsset |
createStaticAssetFromFile(org.springframework.web.multipart.MultipartFile file,
java.util.Map<java.lang.String,java.lang.String> properties)
Used when uploading a file to Broadleaf.
|
void |
deleteStaticAsset(StaticAsset staticAsset,
SandBox destinationSandbox)
If deleting and item where page.originalPageId != null
then the item is deleted from the database.
|
java.util.List<StaticAsset> |
findAssets(SandBox sandbox,
org.hibernate.Criteria criteria) |
StaticAsset |
findStaticAssetByFullUrl(java.lang.String fullUrl,
SandBox targetSandBox) |
StaticAsset |
findStaticAssetById(java.lang.Long id) |
boolean |
getAutomaticallyApproveAndPromoteStaticAssets()
If set to true, then this service will not use the SandBox concept
and will instead automatically promote images to production
as they are entered into the system.
|
java.lang.String |
getStaticAssetEnvironmentSecureUrlPrefix()
Returns the secure value of the environment url prefix (e.g.
|
java.lang.String |
getStaticAssetEnvironmentUrlPrefix()
Returns the value configured for the current environment
for the static asset url prefix.
|
java.lang.String |
getStaticAssetUrlPrefix()
Returns the value configured to mark an item as a static URL.
|
java.util.List<StaticAsset> |
readAllStaticAssets() |
void |
setAutomaticallyApproveAndPromoteStaticAssets(boolean setting)
If set to true, then this service will not use the SandBox concept
and will instead automatically promote images to production
as they are entered into the system.
|
void |
setStaticAssetEnvironmentUrlPrefix(java.lang.String prefix)
Sets the environment url prefix.
|
void |
setStaticAssetUrlPrefix(java.lang.String prefix) |
StaticAsset |
updateStaticAsset(StaticAsset staticAsset,
SandBox sandbox)
This method is intended to be called from within the CMS
admin only.
|
itemPromoted, itemRejected, itemRevertedStaticAsset findStaticAssetById(java.lang.Long id)
java.util.List<StaticAsset> readAllStaticAssets()
StaticAsset findStaticAssetByFullUrl(java.lang.String fullUrl, SandBox targetSandBox)
StaticAsset createStaticAssetFromFile(org.springframework.web.multipart.MultipartFile file, java.util.Map<java.lang.String,java.lang.String> properties)
StaticAssetServiceImpl has a
environment properties that determine this behavior asset.use.filesystem.storage, and
asset.server.file.system.path.
The properties allows for implementors to update other Asset properties at the
same time they are uploading a file. The default implementation uses this for an optional URL to
be specified.file - - the file being uploadedproperties - - additional meta-data propertiesjava.io.IOExceptionStaticAssetServiceImplStaticAsset addStaticAsset(StaticAsset staticAsset, SandBox destinationSandbox)
StaticAsset updateStaticAsset(StaticAsset staticAsset, SandBox sandbox)
void deleteStaticAsset(StaticAsset staticAsset, SandBox destinationSandbox)
staticAsset - destinationSandbox - java.lang.Long countAssets(SandBox sandbox, org.hibernate.Criteria criteria)
java.util.List<StaticAsset> findAssets(SandBox sandbox, org.hibernate.Criteria criteria)
java.lang.String getStaticAssetUrlPrefix()
void setStaticAssetUrlPrefix(java.lang.String prefix)
java.lang.String getStaticAssetEnvironmentUrlPrefix()
java.lang.String getStaticAssetEnvironmentSecureUrlPrefix()
void setStaticAssetEnvironmentUrlPrefix(java.lang.String prefix)
prefix - boolean getAutomaticallyApproveAndPromoteStaticAssets()
void setAutomaticallyApproveAndPromoteStaticAssets(boolean setting)
java.lang.String convertAssetPath(java.lang.String assetPath,
java.lang.String contextPath,
boolean secureRequest)
assetPath - - The path to rewrite if it is a cms managed assetcontextPath - - The context path of the web application (if applicable)secureRequest - - True if the request is being served over httpsgetStaticAssetUrlPrefix(),
getStaticAssetEnvironmentUrlPrefix()Copyright © 2018. All Rights Reserved.