@ProviderType
public interface ContentFragmentManager
Actions available from this interface:
Modifier and Type | Method and Description |
---|---|
ContentFragment |
create(Resource parent,
Resource template,
java.lang.String name,
java.lang.String title)
Deprecated.
|
java.util.Map<Resource,java.util.List<Resource>> |
resolveAssociatedContent(ContentFragment fragment)
Resolves the associated content of the specified content fragment.
|
java.util.List<Resource> |
resolveAssociatedContentFlat(ContentFragment fragment)
Resolves the associated content of the specified content fragment.
|
@Deprecated ContentFragment create(Resource parent, Resource template, java.lang.String name, java.lang.String title) throws ContentFragmentException
Transactional behavior: The caller is responsible for committing the respective
ResourceResolver
after the content fragment
was created by this method.
This method is deprecated since 1.1. Instead, use the following pattern:
template.adaptTo(FragmentTemplate.class).createFragment(parent, name, title)
parent
- The parent for the new content fragmenttemplate
- The template to be usedname
- The (technical) name of the fragment to be createdtitle
- The (human-readable) title of the fragment to be createdContentFragmentException
- if the fragment could not be createdjava.util.Map<Resource,java.util.List<Resource>> resolveAssociatedContent(ContentFragment fragment)
This means that references to collections are resolved to their content, whereas non-collections are simply taken over.
The method returns a table, which contains a list of resolved resources (value) per collection (key). Assets (like linked assets) are also added to this table, with the asset being both the key and the only member of the value's list.
fragment
- The content fragmentjava.util.List<Resource> resolveAssociatedContentFlat(ContentFragment fragment)
This means that references to collections are resolved to their content, whereas non-collections are simply taken over.
This method returns a "flat" list of all resources that are either referenced (collection) or part of the associated content themselves (asset).
If a resource is part of multiple associated collection, it appears only once in this list.
fragment
- The content fragmentCopyright © 2010 - 2020 Adobe. All Rights Reserved