{"id":20682714,"url":"https://github.com/josdem/java-workshop","last_synced_at":"2025-04-22T12:21:13.174Z","repository":{"id":142524486,"uuid":"62338928","full_name":"josdem/java-workshop","owner":"josdem","description":"Coding examples showing solutions to common Java project applications","archived":false,"fork":false,"pushed_at":"2024-09-23T17:38:30.000Z","size":435,"stargazers_count":4,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T15:04:55.541Z","etag":null,"topics":["functional-interfaces","junit5-framework","lambda-expressions","spock-framework"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/josdem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-30T20:02:31.000Z","updated_at":"2024-10-15T10:43:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"0bd8ce47-b1d3-4cb0-b3da-e98ce466ad14","html_url":"https://github.com/josdem/java-workshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josdem%2Fjava-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josdem%2Fjava-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josdem%2Fjava-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josdem%2Fjava-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josdem","download_url":"https://codeload.github.com/josdem/java-workshop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237851,"owners_count":21397403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["functional-interfaces","junit5-framework","lambda-expressions","spock-framework"],"created_at":"2024-11-16T22:14:24.563Z","updated_at":"2025-04-22T12:21:13.156Z","avatar_url":"https://github.com/josdem.png","language":"Java","readme":"CSV Transformer\n----------------------------\n\nHow to read and write a CSV file using Apache Commons CSV\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/csv_apache_commons/\n\n#### To run the project\n\n```bash\ngradle test\n```\n\nDate And Time\n-----------------------------\n\nA quick review to the `java.util.Date` API in Java 8\n\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/java_time_api/\n\n#### To run the project\n\n```bash\njavac BetweenDays.java\njava BetweenDays\n\njavac DateOperations.java\njava DateOperations\n```\n\nExcel Reader\n-----------------------------------------------\n\nHow to read an Excel file using Apache POI\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/apache_poi_excel/\n\n#### To run the project\n\n```bash\ngradle test\n```\n\nExcel Filter Reader\n-----------------------------------------------\n\nHow to read filtered rows in Excel file using Apache POI\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/apache_poi_excel_filter_reader/\n\n#### To run the project\n\n```bash\ngradle test\n```\n\nHello AWS Lambda\n--------------------------------------------\n\nHello World using AWS Lambda\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/hello_aws_lambda/\n\n#### To build the project\n\n```bash\ngradle buildJar\n```\n\nJava NIO Copy\n--------------------------------------------\n\nSince Java 7 we can copy files in a easy way\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/java_nio_copy/\n\n#### To build the project\n\n```bash\njavac FileCopier.java\njava FileCopier\n```\n\nProperties Apache Commons\n--------------------------------------------\n\nGeneric configuration interface which enables a Java application to read configuration data\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/configuration_apache_commons/\n\n#### To build the project\n\n```bash\ngradle buildJar\n```\n\n#### To run the project\n\n```bash\njava -jar properties-apache-commons-all-0.0.1.jar\n```\n\nS3 AWS Lambda\n--------------------------------------------\n\nRead and copy files using AWS Lambda\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/s3_aws_lambda/\n\n#### To build the project\n\n```bash\ngradle buildZip\n```\n\n#### To invoke the project\n\n```bash\naws lambda invoke \\\n--invocation-type Event \\\n--function-name s3-aws-lambda \\\n--region us-west-1 \\\n--payload file://inputfile.txt \\\noutputfile.txt\n```\n\nMailbox Reader\n------------------------------------\n\n#### Configuration\n\nIn your computer's home directory: `${home}`, create a directory called: `.mailbox-reader` then inside create a file called `application.properties` with this content\n\n```properties\nusername=user@gmail.com\npassword=secret\npop3.server=pop.gmail.com\npop3.port=995\nimap.server=imap.gmail.com\nimap.port=993\news.username=user@outlook.com\news.password=secret\news.server=https://exchange/EWS/Exchange.asmx\news.protocol=https://\n```\n\n#### Build\n\n```bash\ngradle build\n```\n\n#### Run\n\n```bash\n java -jar mailbox-reader-0.0.1-SNAPSHOT.jar\n```\n\n#### Features\n\n* This approach is using Gmail account with IMAP enabled (Settings \u003e Forwarding and POP/IMAP)\n* Using Exchange Web Services [EWS Java API](https://github.com/OfficeDev/ews-java-api)\n* Read body email usgin text/plain as ContentType\n* Read body email using  multipart/mixed as ContenType\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/camel/mailbox_reader/\n* http://josdem.io/techtalk/java/mailbox_reader_pop3/\n* http://josdem.io/techtalk/java/mailbox_reader_imap/\n* http://josdem.io/techtalk/java/mailbox_reader_exchange/\n* http://josdem.io/techtalk/spring/spring_unit_testing_spock/\n* http://josdem.io/techtalk/spring/spring_boot/\n* http://josdem.io/techtalk/spring/spring_gradle/\n\nStream\n--------------------------------------------\n\nStream interface is defined in `java.util.stream package`. In Java 8, collections will start having methods that return Stream. Streams support Aggregate Operations. The common aggregate operations are filter, map, reduce, find, match and sort.\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/streams/\n\n#### To build the project\n\n```bash\njavac ${JAVA_PROGRAM}.java\njava -ea ${JAVA_PROGRAM}\n```\n\nStream Filters\n--------------------------------------------\n\nA stream represents a sequence of elements and supports different operations to perform calculations in those elements, here we review the filters:\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/stream_filters/\n\n#### To build the project\n\n```bash\njavac ${JAVA_PROGRAM}.java\njava -ea ${JAVA_PROGRAM}\n```\n\nStream Collectors\n--------------------------------------------\n\nHow use collectors over streams to group by, concatenate, map and list.\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/stream_collectors/\n\n#### To run the project\n\n```bash\njavac ${JAVA_PROGRAM}.java\njava -ea ${JAVA_PROGRAM}\n```\n\nExecutors\n--------------------------------------------\n\nHow use Executors, Callable and Futures\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/executors/\n\n#### To run the project\n\n```bash\njavac ${JAVA_PROGRAM}.java\njava ${JAVA_PROGRAM}\n```\n\nGenerics\n--------------------------------------------\n\nHow we can use Generics in Java.\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/generics/\n\nTo run the code:\n\n```bash\njavac ${JAVA_PROGRAM}.java\njava -ea ${JAVA_PROGRAM}\n```\n\nTo test the code:\n\n```bash\ngradle test\n```\n\nFunctional Interfaces\n--------------------------------------------\n\nA functional interface in Java is any with @FunctionalInterface annotation and with SAM(Single Abstract Method). It was introduced to facilitate [Lambda expressions](http://josdem.io/techtalk/java/lambda_expressions/). Since a lambda function can only provide the implementation for one method, it is mandatory for the functional interfaces to have only one abstract method.\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/functional_interfaces/\n\n#### To run the code\n\n```bash\njavac ConsumerExample.java\njava ConsumerExample\n```\n\n#### To test the code using Gradle\n\n```bash\ngradle test\n```\n\n#### To test the code using Maven\n\n```bash\nmvn test\n```\n\n\nLambda Expressions\n--------------------------------------------\n\nSince Java 8 we have Lambda expressions which is a function defined under some interface contract and the main purpose is to implement functional programming in Java.\n\n#### Read this as reference\n\n* http://josdem.io/techtalk/java/lambda_expressions/\n\n#### To test the code using Gradle\n\n```bash\ngradle test\n```\n\n#### To test the code using Maven\n\n```bash\nmvn test\n```\n\nUsing Optional\n--------------------------------------------\n\nOnce called a Billion-dollar mistake. NullPointerException is by far one of the most frequent exceptions in Java and since version 8 we can use it as a way to avoid this exception. Optional is a container that can has a value or not.\n\n#### Read this as reference\n\n* https://josdem.io/techtalk/java/optional/\n\n#### To test\n\n```bash\ngradle test\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosdem%2Fjava-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosdem%2Fjava-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosdem%2Fjava-workshop/lists"}