-
Notifications
You must be signed in to change notification settings - Fork 9
/
Environment.groovy
51 lines (44 loc) · 973 Bytes
/
Environment.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import com.movilizer.maf.scripting.MAFContext
/**
* Clase para controlar los system IDs
* desde el propio context de MAF
*/
public class Environment
{
// Properties
private MAFContext context
// Constructor
public Environment()
{
throw new Exception("No uses éste constructor: "+ this.getClass().getSimpleName() );
}
public Environment(MAFContext context)
{
this.context = context
}
// Métodos
/**
* Devuelve el systemID usado para MAF
* @return
*/
public long getScriptingSystemID()
{
return this.context.getSystemID()
}
/**
* Devuelve el systemID para el webservice
* @return
*/
public long getWebserviceSystemID()
{
return this.context.getSystemID() + 1
}
/**
* Devuelve el systemID usado para el EPCIS
* @return
*/
public getEpcisSystemID()
{
return this.context.getSystemID() + 2
}
}