Package de.xima.fc.workflow.model.nodes
Class MultiAttachment
- java.lang.Object
-
- de.xima.fc.workflow.model.nodes.MultiAttachment
-
- All Implemented Interfaces:
IMultiAttachmentProviding
,IReferencedAttachmentList
,Serializable
@NotEmptyIf(field="searchFilenamePattern", dependants="attachments", target=MultiAttachment.class, payload=searchFilenamePattern.class) public final class MultiAttachment extends Object implements Serializable, IMultiAttachmentProviding
Models a list of attachments that may come from multiple sources, such as uploads, creates by another action, or with a specific name.- Since:
- 8.1.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
MultiAttachment.attachments
Custom label for thegetAttachments()
property.static interface
MultiAttachment.searchFilenamePattern
Custom label for thegetSearchFilenamePattern()
property.
-
Constructor Summary
Constructors Constructor Description MultiAttachment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AttachmentItem>
getAttachments()
Gets all attachment items pointing to the selected attachments.String
getSearchFilenamePattern()
Gets the pattern for searching for an attachment.List<EAttachmentSource>
getSearchSourceTypes()
Gets the attachment sources to which to restrict the search for attachments.boolean
isAttachmentItemTypeSelected(EAttachmentItemType attachmentItemType)
void
setAttachments(List<AttachmentItem> attachments)
Sets all attachment items pointing to the selected attachments.void
setSearchFilenamePattern(String searchFilenamePattern)
Sets the pattern for searching for an attachment, if anattachment item
of type *SEARCH
exists.void
setSearchSourceTypes(List<EAttachmentSource> searchSourceTypes)
Sets the attachment source types to which to limit the search for attachments when anattachment item
of typeSEARCH
is selected.
-
-
-
Method Detail
-
getAttachments
public List<AttachmentItem> getAttachments()
Description copied from interface:IReferencedAttachmentList
Gets all attachment items pointing to the selected attachments.- Specified by:
getAttachments
in interfaceIReferencedAttachmentList
- Returns:
- All attachment items.
-
setAttachments
public void setAttachments(List<AttachmentItem> attachments)
Sets all attachment items pointing to the selected attachments.- Parameters:
attachments
- All attachment items.
-
getSearchFilenamePattern
public String getSearchFilenamePattern()
Description copied from interface:IReferencedAttachmentList
Gets the pattern for searching for an attachment. Applies only if anattachment item
of typeSEARCH
exists.null
or empty when no such attachment item exists.- Specified by:
getSearchFilenamePattern
in interfaceIReferencedAttachmentList
- Returns:
- Pattern for searching for an attachment.
-
setSearchFilenamePattern
public void setSearchFilenamePattern(String searchFilenamePattern)
Sets the pattern for searching for an attachment, if anattachment item
of type *SEARCH
exists.null
or empty when no such attachment item exists.- Parameters:
searchFilenamePattern
- Search pattern for the attachment search.
-
getSearchSourceTypes
@Nonnull public List<EAttachmentSource> getSearchSourceTypes()
Description copied from interface:IReferencedAttachmentList
Gets the attachment sources to which to restrict the search for attachments. Applies only if anattachment item
of typeSEARCH
exists.- Specified by:
getSearchSourceTypes
in interfaceIReferencedAttachmentList
- Returns:
- The attachment types to which to limit the search for attachments.
-
setSearchSourceTypes
public void setSearchSourceTypes(List<EAttachmentSource> searchSourceTypes)
Sets the attachment source types to which to limit the search for attachments when anattachment item
of typeSEARCH
is selected.- Parameters:
searchSourceTypes
- Attachment sources to which to limit the search.
-
isAttachmentItemTypeSelected
public boolean isAttachmentItemTypeSelected(EAttachmentItemType attachmentItemType)
- Specified by:
isAttachmentItemTypeSelected
in interfaceIMultiAttachmentProviding
- Parameters:
attachmentItemType
- A string that can be converted into aEAttachmentItemType
.- Returns:
true
if there is at least one element with the specified attachment item type in the list of attachments. Otherwise, returnsfalse
.
-
-