aml

Agreement Management Library is a library that provides the basic infrastructure to manage Service Level Agreements.

License

License

GroupId

GroupId

es.us.isa
ArtifactId

ArtifactId

aml
Last Version

Last Version

0.9.6
Release Date

Release Date

Type

Type

jar
Description

Description

aml
Agreement Management Library is a library that provides the basic infrastructure to manage Service Level Agreements.
Project URL

Project URL

http://isa-group.github.io/aml/
Project Organization

Project Organization

ISA Research Group
Source Code Management

Source Code Management

http://github.com/isa-group/aml

Download aml

How to add to project

<!-- https://jarcasting.com/artifacts/es.us.isa/aml/ -->
<dependency>
    <groupId>es.us.isa</groupId>
    <artifactId>aml</artifactId>
    <version>0.9.6</version>
</dependency>
// https://jarcasting.com/artifacts/es.us.isa/aml/
implementation 'es.us.isa:aml:0.9.6'
// https://jarcasting.com/artifacts/es.us.isa/aml/
implementation ("es.us.isa:aml:0.9.6")
'es.us.isa:aml:jar:0.9.6'
<dependency org="es.us.isa" name="aml" rev="0.9.6">
  <artifact name="aml" type="jar" />
</dependency>
@Grapes(
@Grab(group='es.us.isa', module='aml', version='0.9.6')
)
libraryDependencies += "es.us.isa" % "aml" % "0.9.6"
[es.us.isa/aml "0.9.6"]

Dependencies

compile (7)

Group / Artifact Type Version
org.antlr : antlr4-runtime jar 4.5
choco » choco-solver jar 2.1.5
junit : junit jar 4.11
com.google.code.gson : gson jar 2.3.1
org.yaml : snakeyaml jar 1.16
com.fasterxml.jackson.core : jackson-core jar 2.2.3
com.fasterxml.jackson.core : jackson-databind jar 2.2.3

Project Modules

There are no modules declared in this project.

Agreement Management Library

AML is a library that provides the basic infrastructure to manage Service Level Agreements. It offers support to analyze SLAs, providing a variety of document operations as consistency, compliance, dead terms, etc.

Gitter Code Climate release

Requirements

Mandatory requirements:

Recommended:

Documentation

Read the following user guide to know how to use this library properly. See the Javadoc for more information.

Document creation

First of all, you need to declare and initialize an AgreementManager:

AgreementManager manager = new AgreementManager();

You can pass a configuration file to the manager as a parameter. This file has to be written in JSON format.

{
    "defaultInputFormat": "IAGREE",
    "CSPReasoner": "CPLEX",
    "CSPWebReasonerEndpoint": "http://150.214.188.130:8080/CSPWebReasoner",
    "DLReasoner": "none",
    "ANDConstraintsBreaking" : "true" 
}

To create a template, an offer or an agreement, use the manager as follow:

AgreementModel model = manager.createAgreementTemplate("Template's content");
AgreementModel model = manager.createAgreementOffer("Offer's content");
AgreementModel model = manager.createAgreement("Agreement's content");

To create a template, an offer or an agreement from a file, use these methods instead:

AgreementModel model = manager.createAgreementTemplateFromFile("path/to/file.at");
AgreementModel model = manager.createAgreementOfferFromFile("path/to/file.ao");
AgreementModel model = manager.createAgreementFromFile("path/to/file.ag");

AgreementModel is a superclass that contains the following subclasses: AgreementTemplate, AgreementOffer and Agreement. We can cast our model to one of these three types depending on our case.

Saving documents

Note that when we create models, we are not registering it. So if we need to use it later, we won't be able to retrieve it.
If you want that a model persists, you should use register methods.

manager.register(model);

In this case, you'll be able to retrieve your model specifying its ID. If you prefer to specify a custom name, use the following method instead:

manager.register("MyModel", model);

To create a template, an offer or an agreement from a file, use these methods instead:

manager.registerFromFile(file);
manager.registerFromFile("path/to/file");

Retrieving documents

To retrieve a model, simply use one of these three methods, depending on your case:

manager.getAgreementTemplate("MyModel");
manager.getAgreementOffer("MyModel");
manager.getAgreement("MyModel");

Derived documents

Generating offers from templates

Generate an offer from a template is as easy as use the method generateAgreementOffer from the type AgreementTemplate.

AgreementTemplate myTemplate = manager.createAgreementTemplateFromFile("path/to/file.at");
AgreementOffer myOffer = myTemplate.generateAgreementOffer("Consumer name");
Generating agreements from offers

In the same way, we can generate an agreement from an offer using the method generateAgreement:

AgreementOffer myOffer = manager.createAgreementOfferFromFile("path/to/file.ao");
Agreement myAgreement = myOffer.generateAgreement("Consumer name");

Contributing

To contribute to this project, read our development policies


es.us.isa

ISA Group

Applied Software Engineering research group at the University of Seville

Versions

Version
0.9.6
0.9.5
0.9.4
0.9.3
0.9.2
0.9.1
0.9
0.8
0.7