The objective of this project is to create a Java-based file processing system for Laserfiche, a California-based company. The system will exhibit robustness by efficiently handling diverse scenarios, including sorting, filtering, and transforming files based on user-defined conditions.
Entries Each entry refers to a file or directory. There are two types of entries: Local Entry: which is represented by a string value and refers to a file or a directory on the local file system. Some examples: A local entry with the value βc:\sample\txt\addresses.txtβ, refers to a single file on the local file system. A local entry with the value βc:\sample\txtβ, refers to a single directory on the local file system. Remote Entry: which refers to a file or a directory on a Laserfiche Repository on the cloud. Each remote entry is determined by a pair of values (repoId, entryId) where repoId is the id of the Laserfiche Repository where the entry resides. This is a string with a maximum length of 20 characters, e.g. βr-34w6β entryId is the id of the entry. This is an integer greater than 0. Note that simply by looking at the value of an entryId, we cannot say whether it belongs to a file or a directory.
Processing Elements Each processing element is responsible for a unit of processing in the scenario. Each processing element takes a list of entries as input, performs some operation on them, and then generates a list of entries as output. A scenario includes a sequence of processing elements, so that the output of a processing element is the input of its successor processing element.
Element | Description | Input | Output |
---|---|---|---|
Name Filter | Filters entries based on the presence of a given string in their name. | List of entries, String Key | Sub-list of entries with the given string Key in their name |
Length Filter | Filters files based on their length and a specified condition. | List of entries, Long Length, String Operator | Sub-list of entries satisfying the given length condition |
Content Filter | Filters files based on the presence of a given string in their content. | List of entries, String Key | Sub-list of entries with the given string Key in their content |
Count Filter | Filters files based on the count of a given string in their content. | List of entries, String Key, Integer Min | Sub-list of entries with at least Min occurrences of the given string Key |
Split Processing Element | Splits files into smaller parts based on the specified number of lines. | List of entries, Integer Lines | List of created entries resulted from splitting the input |
List Processing Element | Selects a list of entries from directories based on a specified maximum count. | List of entries, Integer Max | List of entries selected from the directories |
Rename Processing Element | Appends a given suffix to the name of each entry in the input list. | List of entries, String Suffix | List of entries with updated names |
Print Processing Element | Prints information about each entry, including name, length, and absolute path. | List of entries | No change to the list of entries |