summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/utils')
-rw-r--r--src/main/java/com/c2kernel/utils/ActDefCache.java2
-rw-r--r--src/main/java/com/c2kernel/utils/DescriptionObject.java2
-rw-r--r--src/main/java/com/c2kernel/utils/DescriptionObjectCache.java4
-rw-r--r--src/main/java/com/c2kernel/utils/LocalObjectLoader.java4
-rw-r--r--src/main/java/com/c2kernel/utils/StateMachineCache.java2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/com/c2kernel/utils/ActDefCache.java b/src/main/java/com/c2kernel/utils/ActDefCache.java
index 23d8988..ab2bd90 100644
--- a/src/main/java/com/c2kernel/utils/ActDefCache.java
+++ b/src/main/java/com/c2kernel/utils/ActDefCache.java
@@ -21,7 +21,7 @@ public class ActDefCache extends DescriptionObjectCache<ActivityDef> {
}
@Override
- public ActivityDef loadObject(String name, String version, ItemProxy proxy) throws ObjectNotFoundException, InvalidDataException {
+ public ActivityDef loadObject(String name, int version, ItemProxy proxy) throws ObjectNotFoundException, InvalidDataException {
ActivityDef thisActDef;
String actType = proxy.getProperty("Complexity");
Viewpoint actView = (Viewpoint)proxy.getObject(ClusterStorage.VIEWPOINT + "/" + actType + "ActivityDef/" + version);
diff --git a/src/main/java/com/c2kernel/utils/DescriptionObject.java b/src/main/java/com/c2kernel/utils/DescriptionObject.java
index eff0a57..4d7d108 100644
--- a/src/main/java/com/c2kernel/utils/DescriptionObject.java
+++ b/src/main/java/com/c2kernel/utils/DescriptionObject.java
@@ -3,6 +3,6 @@ package com.c2kernel.utils;
public interface DescriptionObject {
public String getName();
- public String getVersion();
+ public int getVersion();
}
diff --git a/src/main/java/com/c2kernel/utils/DescriptionObjectCache.java b/src/main/java/com/c2kernel/utils/DescriptionObjectCache.java
index a8cd197..d5382da 100644
--- a/src/main/java/com/c2kernel/utils/DescriptionObjectCache.java
+++ b/src/main/java/com/c2kernel/utils/DescriptionObjectCache.java
@@ -15,7 +15,7 @@ public abstract class DescriptionObjectCache<D extends DescriptionObject> {
SoftCache<String, CacheEntry<D>> cache = new SoftCache<String, CacheEntry<D>>();
- public D get(String name, String version) throws ObjectNotFoundException, InvalidDataException {
+ public D get(String name, int version) throws ObjectNotFoundException, InvalidDataException {
D thisDef;
synchronized(cache) {
CacheEntry<D> thisDefEntry = cache.get(name+"_"+version);
@@ -35,7 +35,7 @@ public abstract class DescriptionObjectCache<D extends DescriptionObject> {
public abstract String getDefRoot();
- public abstract D loadObject(String name, String version, ItemProxy proxy) throws ObjectNotFoundException, InvalidDataException;
+ public abstract D loadObject(String name, int version, ItemProxy proxy) throws ObjectNotFoundException, InvalidDataException;
public void removeAct(String id) {
synchronized(cache) {
diff --git a/src/main/java/com/c2kernel/utils/LocalObjectLoader.java b/src/main/java/com/c2kernel/utils/LocalObjectLoader.java
index f139b84..c17db40 100644
--- a/src/main/java/com/c2kernel/utils/LocalObjectLoader.java
+++ b/src/main/java/com/c2kernel/utils/LocalObjectLoader.java
@@ -67,12 +67,12 @@ public class LocalObjectLoader {
* @return ActivityDef
* @throws ObjectNotFoundException - When activity or version does not exist
*/
- static public ActivityDef getActDef(String actName, String actVersion) throws ObjectNotFoundException, InvalidDataException {
+ static public ActivityDef getActDef(String actName, int actVersion) throws ObjectNotFoundException, InvalidDataException {
Logger.msg(5, "Loading activity def "+actName+" v"+actVersion);
return actCache.get(actName, actVersion);
}
- static public StateMachine getStateMachine(String smName, String smVersion) throws ObjectNotFoundException, InvalidDataException {
+ static public StateMachine getStateMachine(String smName, int smVersion) throws ObjectNotFoundException, InvalidDataException {
Logger.msg(5, "Loading activity def "+smName+" v"+smVersion);
return smCache.get(smName, smVersion);
}
diff --git a/src/main/java/com/c2kernel/utils/StateMachineCache.java b/src/main/java/com/c2kernel/utils/StateMachineCache.java
index 0088efd..371df4d 100644
--- a/src/main/java/com/c2kernel/utils/StateMachineCache.java
+++ b/src/main/java/com/c2kernel/utils/StateMachineCache.java
@@ -21,7 +21,7 @@ public class StateMachineCache extends DescriptionObjectCache<StateMachine> {
}
@Override
- public StateMachine loadObject(String name, String version, ItemProxy proxy) throws ObjectNotFoundException, InvalidDataException {
+ public StateMachine loadObject(String name, int version, ItemProxy proxy) throws ObjectNotFoundException, InvalidDataException {
StateMachine thisStateMachine;
Viewpoint smView = (Viewpoint)proxy.getObject(ClusterStorage.VIEWPOINT + "/StateMachine/" + version);
String marshalledSM;