Serves the account-wide "assets" folder that holds every uploaded asset, providing upload, search and asset-delivery child lookup. Mounted in the root folder as "assets" and reached via CurrentRootFolderService, so most callers get hold of it with rf.child("assets"). A POST with a file uploads a new binary asset and creates it via AssetManager; a GET with a "q" parameter runs a search and returns the results as JSON. Looking up a child by an asset's unique id returns the asset's read/delivery resource rather than a real WebDAV child, since assets are not listed as children of this folder.
Group: Resources
Extends: AbstractCollectionResource
Implements: GetableResource, PostableResource, TitledPage, ContentPermissionsResource, PutableResource
Properties
| Property | Returns | Description |
|---|---|---|
| accessControlList | Map<Principal,List<Priviledge>> | Explicit per-principal access control list for this folder. Always null, since access is instead governed by content-managed permissions. |
| assetTypes | List<AssetType> | All asset types registered for the current account, including both content types and simple tag-like types. |
| children | List<? extends Resource> | WebDAV children of this folder. Always empty, since assets are addressed directly by unique id via child() rather than being listed here. |
| contentManagedPermissions | boolean | Whether access to this folder is governed by content-managed permissions rather than an explicit access control list. Always true. |
| contentTypes | List<ContentType> | The subset of the account's registered asset types that are content types, ie types for structured content items rather than plain files. |
| name | String | Name this folder is addressed by in its parent collection. Always "assets". |
| parent | CommonCollectionResource | The collection this folder is mounted under, ie the root folder. |
| title | String | Page title for this folder. Always "Assets". |
Methods
getTitle() · assetResource(Asset asset) · getChildren() · getParent() · getName() · getAccessControlList() · search(String query, String type) · search(String query, List<String> includedTypeNames, List<String> excludedTypeNames) · getContentTypes() · getAssetTypes() · isContentManagedPermissions()
getTitle()
Returns: String
Page title for this folder. Always "Assets".
assetResource(Asset asset)
Returns: AbstractAssetResource
Builds the read/delivery resource for an asset, addressed by the asset's own unique id under this folder.
| Parameter | Description |
|---|---|
asset | the asset to build a delivery resource for |
getChildren()
Returns: List<? extends Resource>
WebDAV children of this folder. Always empty, since assets are addressed directly by unique id via child() rather than being listed here.
getParent()
Returns: CommonCollectionResource
The collection this folder is mounted under, ie the root folder.
getName()
Returns: String
Name this folder is addressed by in its parent collection. Always "assets".
getAccessControlList()
Returns: Map<Principal,List<Priviledge>>
Explicit per-principal access control list for this folder. Always null, since access is instead governed by content-managed permissions.
search(String query, String type)
Returns: List<Asset>
Finds assets whose content matches the given query, optionally restricted to a single asset type name. Involves a search index lookup.
| Parameter | Description |
|---|---|
query | the search text to match against |
type | the asset type name to restrict results to, or null to search all types |
search(String query, List<String> includedTypeNames, List<String> excludedTypeNames)
Returns: List<Asset>
Finds assets whose content matches the given query, restricted to the given included asset type names and excluding the given excluded asset type names. Involves a search index lookup.
| Parameter | Description |
|---|---|
query | the search text to match against |
includedTypeNames | asset type names to restrict results to, or empty to search all types |
excludedTypeNames | asset type names to exclude from the results |
getContentTypes()
Returns: List<ContentType>
The subset of the account's registered asset types that are content types, ie types for structured content items rather than plain files.
getAssetTypes()
Returns: List<AssetType>
All asset types registered for the current account, including both content types and simple tag-like types.
isContentManagedPermissions()
Returns: boolean
Whether access to this folder is governed by content-managed permissions rather than an explicit access control list. Always true.