diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-09-09 12:13:21 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-09-09 12:13:21 +0200 |
| commit | da731d2bb81666b9c697d9099da632e7dfcdc0f7 (patch) | |
| tree | 567693c3c48f3d15ecbb2dac4f9db03bb6e58c72 /src/main/java/com/c2kernel/process/module/ModuleImport.java | |
| parent | ae1e79e33fd30e3d8bcedbef8891a14a048276d7 (diff) | |
Replaced int sysKey Item identifier with UUID, which is now portable.
ItemPath objects are now used to identify Items throughout the kernel,
replacing ints and Integers.
Diffstat (limited to 'src/main/java/com/c2kernel/process/module/ModuleImport.java')
| -rw-r--r-- | src/main/java/com/c2kernel/process/module/ModuleImport.java | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/src/main/java/com/c2kernel/process/module/ModuleImport.java b/src/main/java/com/c2kernel/process/module/ModuleImport.java index 1f5b16d..f54b47d 100644 --- a/src/main/java/com/c2kernel/process/module/ModuleImport.java +++ b/src/main/java/com/c2kernel/process/module/ModuleImport.java @@ -1,10 +1,66 @@ 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.ItemPath;
public abstract class ModuleImport {
- public String name;
- public DomainPath path;
+ protected String ns;
+ protected String name;
+ protected DomainPath domainPath;
+ protected ItemPath itemPath;
+
+ public ModuleImport() {
+ }
+
+ public abstract void create(AgentPath agentPath, boolean reset) throws ObjectNotFoundException,
+ ObjectCannotBeUpdated, CannotManageException, ObjectAlreadyExistsException;
+
+ public void setID( String uuid )
+ {
+ if (uuid != null) itemPath = new ItemPath(UUID.fromString(uuid));
+ }
+
+ public String getID() {
+ return itemPath==null?null:itemPath.getUUID().toString();
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void setNamespace(String ns) {
+ this.ns = ns;
+ }
+ public String getNamespace() {
+ return ns;
+ }
+
+ public DomainPath getDomainPath() {
+ return domainPath;
+ }
+
+ public void setDomainPath(DomainPath domainPath) {
+ this.domainPath = domainPath;
+ }
+
+ public ItemPath getItemPath() {
+ return itemPath;
+ }
+
+ public void setItemPath(ItemPath itemPath) {
+ this.itemPath = itemPath;
+ }
}
\ No newline at end of file |
