Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

61 use code formatter plugins to ensure formatting of src files #281

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text eol=lf
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@ these snippets to a single process execution, it makes refactoring and testing o
error-prone and challenging.

This library helps you to overcome these difficulties and make access, manipulation and testing process variables really
easy and convenient. We leverage the Camunda Platform 7 API and offer you not only a better API but also some [additional features](https://www.holunda.io/camunda-bpm-data/snapshot/user-guide/features.html).
easy and convenient. We leverage the Camunda Platform 7 API and offer you not only a better API but also
some [additional features](https://www.holunda.io/camunda-bpm-data/snapshot/user-guide/features.html).

If you want to read more about data in Camunda processes, have a look on those articles:

* [Camunda Nation Podcast - Managing Data in Processes, with Simon Zambrovski](https://podcasts.apple.com/us/podcast/managing-data-in-processes-with-simon-zambrovski/id1478382505?i=1000547023972)
* [Data in Process (Part 1)](https://medium.com/holisticon-consultants/data-in-process-part-1-2620bf9abd76)
* [Data in Process (Part 2)](https://medium.com/holisticon-consultants/data-in-process-part-2-7c6a109e6ee2)
* [Camunda Nation Podcast - Managing Data in Processes, with Simon Zambrovski](https://podcasts.apple.com/us/podcast/managing-data-in-processes-with-simon-zambrovski/id1478382505?i=1000547023972)
* [Data in Process (Part 1)](https://medium.com/holisticon-consultants/data-in-process-part-1-2620bf9abd76)
* [Data in Process (Part 2)](https://medium.com/holisticon-consultants/data-in-process-part-2-7c6a109e6ee2)

## Quick Introduction

Expand All @@ -56,7 +57,9 @@ For Gradle Groovy DSL add to your `build.gradle`:
``` groovy
implementation 'io.holunda.data:camunda-bpm-data:1.2.6'
```

### Variable declaration

Now your setup is completed, and you can declare your variables like this:

``` java
Expand All @@ -71,6 +74,7 @@ public class OrderApproval {
public static final VariableFactory<OrderPosition> ORDER_POSITION = customVariable("orderPosition", OrderPosition.class);
}
```

### Variable access from Java Delegate

Finally, you want to access them from your Java delegates, Execution or Task Listeners or simple Java components:
Expand Down Expand Up @@ -206,12 +210,22 @@ See our [Examples](https://www.holunda.io/camunda-bpm-data/snapshot/user-guide/e

This library is developed under Apache 2.0 License.

## Development

This code base is formatted using [spotless](https://github.com/diffplug/spotless),
with [google-java-format](https://github.com/google/google-java-format) for java and [ktfmt](https://github.com/facebook/ktfmt) for kotlin.

To get it working with IntelliJ IDE install **and activate**
the [google-java-format plugin](https://plugins.jetbrains.com/plugin/8527-google-java-format/)
and the [ktfmt plugin](https://plugins.jetbrains.com/plugin/14912-ktfmt).

## Contribution

If you want to contribute to this project, feel free to do so. Start with [Contributing guide](http://holunda.io/camunda-bpm-data/snapshot/developer-guide/contribution.html).
If you want to contribute to this project, feel free to do so. Start
with [Contributing guide](http://holunda.io/camunda-bpm-data/snapshot/developer-guide/contribution.html).

## Maintainer

[<img alt="zambrovski" src="https://avatars.githubusercontent.com/u/673128?v=4&s=117 width=117">](https://github.com/zambrovski) |[<img alt="jangalinski" src="https://avatars.githubusercontent.com/u/814032?v=4&s=117 width=117">](https://github.com/jangalinski) |[<img alt="christian-maschmann" src="https://avatars.githubusercontent.com/u/44058891?v=4&s=117 width=117">](https://github.com/christian-maschmann) |[<img alt="stefanzilske" src="https://avatars.githubusercontent.com/u/10954564?v=4&s=117 width=117">](https://github.com/stefanzilske) |[<img alt="nernsting" src="https://avatars.githubusercontent.com/u/1822388?v=4&s=117 width=117">](https://github.com/nernsting) |[<img alt="pschalk" src="https://avatars.githubusercontent.com/u/8512329?v=4&s=117 width=117">](https://github.com/pschalk) |[<img alt="srsp" src="https://avatars.githubusercontent.com/u/1210541?v=4&s=117 width=117">](https://github.com/srsp) |
:---:|:---:|:---:|:---:|:---:|:---:|:---:|
[zambrovski](https://github.com/zambrovski)|[jangalinski](https://github.com/jangalinski)|[christian-maschmann](https://github.com/christian-maschmann)|[stefanzilske](https://github.com/stefanzilske)|[nernsting](https://github.com/nernsting)|[pschalk](https://github.com/pschalk)|[srsp](https://github.com/srsp)|
| [<img alt="zambrovski" src="https://avatars.githubusercontent.com/u/673128?v=4&s=117 width=117">](https://github.com/zambrovski) | [<img alt="jangalinski" src="https://avatars.githubusercontent.com/u/814032?v=4&s=117 width=117">](https://github.com/jangalinski) | [<img alt="christian-maschmann" src="https://avatars.githubusercontent.com/u/44058891?v=4&s=117 width=117">](https://github.com/christian-maschmann) | [<img alt="stefanzilske" src="https://avatars.githubusercontent.com/u/10954564?v=4&s=117 width=117">](https://github.com/stefanzilske) | [<img alt="nernsting" src="https://avatars.githubusercontent.com/u/1822388?v=4&s=117 width=117">](https://github.com/nernsting) | [<img alt="pschalk" src="https://avatars.githubusercontent.com/u/8512329?v=4&s=117 width=117">](https://github.com/pschalk) | [<img alt="srsp" src="https://avatars.githubusercontent.com/u/1210541?v=4&s=117 width=117">](https://github.com/srsp) |
|:--------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------:|:-------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------------------------------:|
| [zambrovski](https://github.com/zambrovski) | [jangalinski](https://github.com/jangalinski) | [christian-maschmann](https://github.com/christian-maschmann) | [stefanzilske](https://github.com/stefanzilske) | [nernsting](https://github.com/nernsting) | [pschalk](https://github.com/pschalk) | [srsp](https://github.com/srsp) |
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
@EnableProcessApplication
public class CamundaBpmDataProcessApplication {

@Autowired
private OrderApprovalInstanceFactory orderApprovalInstanceFactory;
@Autowired private OrderApprovalInstanceFactory orderApprovalInstanceFactory;

@EventListener
public void onDeploy(PostDeployEvent event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,25 @@
import java.util.Date;
import java.util.List;

/**
* Order business entity.
*/
/** Order business entity. */
public class Order {
/**
* Id of the order.
*/
/** Id of the order. */
private String orderId;
/**
* Order create date.
*/
/** Order create date. */
private Date created;
/**
* List of order positions.
*/
/** List of order positions. */
private List<OrderPosition> positions;

/**
* Constructor.
*/
/** Constructor. */
public Order() {
this.positions = new ArrayList<>();
}

/**
* Constructor to pass all member attributes.
*
* @param orderId order id
* @param created creation date
* @param orderId order id
* @param created creation date
* @param positions list of positions.
*/
public Order(String orderId, Date created, List<OrderPosition> positions) {
Expand Down Expand Up @@ -125,10 +115,14 @@ public int hashCode() {

@Override
public String toString() {
return "Order{" +
"orderId='" + orderId + '\'' +
", created=" + created +
", positions=" + positions +
'}';
return "Order{"
+ "orderId='"
+ orderId
+ '\''
+ ", created="
+ created
+ ", positions="
+ positions
+ '}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,24 @@

import java.math.BigDecimal;

/**
* Represents order position business entity.
*/
/** Represents order position business entity. */
public class OrderPosition {
/**
* Position title.
*/
/** Position title. */
private String title;
/**
* Position net cost per unit.
*/
/** Position net cost per unit. */
private BigDecimal netCost;
/**
* amount of units.
*/
/** amount of units. */
private Long amount;

/**
* Empty constructor.
*/
public OrderPosition() {

}
/** Empty constructor. */
public OrderPosition() {}

/**
* Constructor setting fields.
*
* @param title title of position.
* @param title title of position.
* @param netCost net cost per unit.
* @param amount amount of units.
* @param amount amount of units.
*/
public OrderPosition(String title, BigDecimal netCost, Long amount) {
this.title = title;
Expand Down Expand Up @@ -123,10 +111,14 @@ public int hashCode() {

@Override
public String toString() {
return "OrderPosition{" +
"title='" + title + '\'' +
", netCost=" + netCost +
", amount=" + amount +
'}';
return "OrderPosition{"
+ "title='"
+ title
+ '\''
+ ", netCost="
+ netCost
+ ", amount="
+ amount
+ '}';
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
package io.holunda.camunda.bpm.data.example.domain;

import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.sql.Date;
import java.time.Instant;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Component;

/**
* Repository to load orders.
*/
/** Repository to load orders. */
@Component
public class OrderRepository {

/**
* Internal representation for storage.
*/
/** Internal representation for storage. */
private final Map<String, Order> orders = new HashMap<>();

public OrderRepository() {
Expand All @@ -28,7 +23,6 @@ public OrderRepository() {
orders.put("1", new Order("1", Date.from(Instant.now()), positions));
}


/**
* Loads order by id.
*
Expand All @@ -38,5 +32,4 @@ public OrderRepository() {
public Order loadOrder(String orderId) {
return orders.get(orderId);
}

}
Loading