This is a library aimed at providing a collection of re-usable Contargo objects.
Using the contargo-types
as a library in your project, means simply including
it as a Maven dependency. We recommend using the Jitpack
repository:
<dependency>
<!-- From Jitpack-repo -->
<groupId>com.github.Contargo</groupId>
<artifactId>contargo-types</artifactId>
<version>${SOME-TAG}</version>
</dependency>
ContainerNumber containerNumber = ContainerNumber.forValue(string);
The built container number instance provides various information, such as the
validity on isValid()
or the formatted value on toString()
.
public class Container {
@ContainerNumber
public String containerNumber;
...
}
Bean validation for container numbers via @ContainerNumber
based on the ISO6346
Provide validation.unit.number.error.message
in your message.properties to set the validators error message.
ContainerType.FORTY_HC
The ContainerType
enum provides the known container types.
LoadingState.EMPTY
LoadingState.FULL
The LoadingState
enum provides the possible container loading states.
LicensePlate licensePlate = LicensePlate.forValue(string).withCountry(LicensePlateCountry.GERMANY);
The built license plate instance provides various information depending on the
bound country, such as the validity on isValid()
or the formatted value on
toString()
.
To find out which countries are supported, take a look at the
LicensePlateCountry
enum.
Direction.TURN_IN
Direction.TURN_OUT
The Direction
enum describes the direction of a unit movement regarding one location.
PhoneNumber phoneNumber = new PhoneNumber(string);
The built phone number instance provides various information about the phone number, such as the country code or country calling code or the regional phone number.
The phone number instance can return the phone number in a international phone number formate.
This is a pretty straight-forward Java-project, use mvn
to build, test and
deploy.
The project use the Jitpack to be build. Steps before you can create an release:
- update the
CHANGE.md
- update the project version in
pom.xml
to the version which should be released - check the
README.md
if it is still correct else make an update
If the steps are done an release can be done by a Contargo-User on GitHub (release -> draft a new release)
This project is distributed under the Apache 2.0 License. The full set of terms and conditions can be seen in the LICENSE file.
Happy hacking!