summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/process/module
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@cern.ch>2014-09-19 15:40:50 +0200
committerAndrew Branson <andrew.branson@cern.ch>2014-09-19 15:40:50 +0200
commit482b98e869d07802310e249d09d784c63f9a86b6 (patch)
treebd6c55d5d5ebf967fb22b5cf1ceb9f3f6a7bbdd9 /src/main/java/com/c2kernel/process/module
parent3743d182d99dbed9d2be84dc357f6839ffe4d2ec (diff)
Introduced static method ItemPath.fromUUIDString and made the UUID
constructor protected to better handle ItemPath and AgentPath construction with String UUIDs, throwing the right exceptions.
Diffstat (limited to 'src/main/java/com/c2kernel/process/module')
-rw-r--r--src/main/java/com/c2kernel/process/module/ModuleImport.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/process/module/ModuleImport.java b/src/main/java/com/c2kernel/process/module/ModuleImport.java
index f54b47d..346488b 100644
--- a/src/main/java/com/c2kernel/process/module/ModuleImport.java
+++ b/src/main/java/com/c2kernel/process/module/ModuleImport.java
@@ -1,13 +1,12 @@
package com.c2kernel.process.module;
-import java.util.UUID;
-
import com.c2kernel.common.CannotManageException;
import com.c2kernel.common.ObjectAlreadyExistsException;
import com.c2kernel.common.ObjectCannotBeUpdated;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.lookup.AgentPath;
import com.c2kernel.lookup.DomainPath;
+import com.c2kernel.lookup.InvalidItemPathException;
import com.c2kernel.lookup.ItemPath;
public abstract class ModuleImport {
@@ -23,9 +22,9 @@ public abstract class ModuleImport {
public abstract void create(AgentPath agentPath, boolean reset) throws ObjectNotFoundException,
ObjectCannotBeUpdated, CannotManageException, ObjectAlreadyExistsException;
- public void setID( String uuid )
+ public void setID( String uuid ) throws InvalidItemPathException
{
- if (uuid != null) itemPath = new ItemPath(UUID.fromString(uuid));
+ if (uuid != null) itemPath = ItemPath.fromUUIDString(uuid);
}
public String getID() {