Class SingleFileMergeStrategy
java.lang.Object
org.craftercms.core.xml.mergers.impl.strategies.SingleFileMergeStrategy
- All Implemented Interfaces:
DescriptorMergeStrategy
DescriptorMergeStrategy
that returns the same specified descriptor URL.
This means there's no need for
merging.- Author:
- Sumer Jabri, Alfonso Vásquez
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDescriptors
(Context context, CachingOptions cachingOptions, String mainDescriptorUrl, org.dom4j.Document mainDescriptorDom) Returns the list of descriptors in the order they should be merged, given the URI of the primary descriptor.getDescriptors
(Context context, CachingOptions cachingOptions, String mainDescriptorUrl, org.dom4j.Document mainDescriptorDom, boolean mainDescriptorOptional) Returns the list of descriptors in the order they should be merged, given the URI of the primary descriptor.
-
Constructor Details
-
SingleFileMergeStrategy
public SingleFileMergeStrategy()
-
-
Method Details
-
getDescriptors
public List<MergeableDescriptor> getDescriptors(Context context, CachingOptions cachingOptions, String mainDescriptorUrl, org.dom4j.Document mainDescriptorDom) throws XmlMergeException Description copied from interface:DescriptorMergeStrategy
Returns the list of descriptors in the order they should be merged, given the URI of the primary descriptor.- Specified by:
getDescriptors
in interfaceDescriptorMergeStrategy
- Parameters:
context
- the current contextcachingOptions
- caching options in case you need access to itemsmainDescriptorUrl
- the URL of the main descriptormainDescriptorDom
- the DOM of the main descriptor- Returns:
- a list of
MergeableDescriptor
s representing the descriptors to merge - Throws:
XmlMergeException
-
getDescriptors
public List<MergeableDescriptor> getDescriptors(Context context, CachingOptions cachingOptions, String mainDescriptorUrl, org.dom4j.Document mainDescriptorDom, boolean mainDescriptorOptional) throws XmlMergeException Description copied from interface:DescriptorMergeStrategy
Returns the list of descriptors in the order they should be merged, given the URI of the primary descriptor.- Specified by:
getDescriptors
in interfaceDescriptorMergeStrategy
- Parameters:
context
- the current contextcachingOptions
- caching options in case you need access to itemsmainDescriptorUrl
- the URL of the primary descriptormainDescriptorDom
- the DOM of the main descriptormainDescriptorOptional
- if the primary descriptor should be marked as optional- Returns:
- a list of
MergeableDescriptor
s representing the descriptors to merge - Throws:
XmlMergeException
-