Package com.xwiki.macros.confluence
Class FilterAttachmentsScriptService
- java.lang.Object
-
- com.xwiki.macros.confluence.FilterAttachmentsScriptService
-
- All Implemented Interfaces:
org.xwiki.script.service.ScriptService
@Component @Singleton @Named("filterAttachments") @Unstable public class FilterAttachmentsScriptService extends Object implements org.xwiki.script.service.ScriptServiceScript service for filtering attachments using regex expressions.- Since:
- 1.26.18
- Version:
- $Id$
-
-
Constructor Summary
Constructors Constructor Description FilterAttachmentsScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.xwiki.model.reference.AttachmentReference>filterAttachmentResults(List<org.xwiki.model.reference.AttachmentReference> attachments, List<String> regexes)Filters a list of AttachmentReferences by checking if their names match any of the given regex patterns.
-
-
-
Method Detail
-
filterAttachmentResults
public List<org.xwiki.model.reference.AttachmentReference> filterAttachmentResults(List<org.xwiki.model.reference.AttachmentReference> attachments, List<String> regexes)
Filters a list of AttachmentReferences by checking if their names match any of the given regex patterns.- Parameters:
attachments- the list of AttachmentReference objects to filterregexes- the list of regex patterns to match against attachment names- Returns:
- a list of AttachmentReferences whose names match at least one regex
-
-