]> SALOME platform Git repositories - modules/gde.git/commitdiff
Salome HOME
Added missing sources
authorBojnourdi <kavoos.bojnourdi@edf.fr>
Tue, 18 Aug 2015 07:13:40 +0000 (09:13 +0200)
committerBojnourdi <kavoos.bojnourdi@edf.fr>
Tue, 18 Aug 2015 07:13:40 +0000 (09:13 +0200)
13 files changed:
projects/GDE-transferables/src/com/edf/gde/transferables/AttributeGroupTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/AttributeTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/ChunkTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/CommandTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/FileTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/GroupTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/LongListTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/ProfileAttributeTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/ProfileTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/StudyTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/UserTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/responses/CommandResultTO.java [new file with mode: 0644]
projects/GDE-transferables/src/com/edf/gde/transferables/responses/ObjectCreationResponseTO.java [new file with mode: 0644]

diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/AttributeGroupTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/AttributeGroupTO.java
new file mode 100644 (file)
index 0000000..bd78f8a
--- /dev/null
@@ -0,0 +1,40 @@
+package com.edf.gde.transferables;
+
+import java.io.Serializable;
+import java.util.Collection;
+
+/**
+ *
+ * @author F62173
+ */
+public class AttributeGroupTO implements Serializable {
+    
+    private static final long serialVersionUID = 1L;
+    private long id;
+    private Collection<AttributeTO> attributeCollection;
+
+    public AttributeGroupTO() {
+    }
+
+    public AttributeGroupTO(long id, Collection<AttributeTO> attributeCollection) {
+        this.id = id;
+        this.attributeCollection = attributeCollection;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public Collection<AttributeTO> getAttributeCollection() {
+        return attributeCollection;
+    }
+
+    public void setAttributeCollection(Collection<AttributeTO> attributeCollection) {
+        this.attributeCollection = attributeCollection;
+    }
+    
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/AttributeTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/AttributeTO.java
new file mode 100644 (file)
index 0000000..4cfd511
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * (C) 2015 EDF
+ */
+package com.edf.gde.transferables;
+
+import java.io.Serializable;
+import java.util.Objects;
+
+/**
+ *
+ * @author F62173
+ */
+public class AttributeTO implements Serializable {
+    
+    private static final long serialVersionUID = 1L;
+    private long id;
+    private String name;
+    private String type;
+    private String value;
+    private long groupId;
+    private boolean mandatory;
+
+    public AttributeTO() {
+    }
+
+    public AttributeTO(long id, String name, String type, String value, long groupId, boolean mandatory) {
+        this.id = id;
+        this.name = name;
+        this.type = type;
+        this.value = value;
+        this.groupId = groupId;
+        this.mandatory = mandatory;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public long getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(long groupId) {
+        this.groupId = groupId;
+    }
+
+    public boolean getMandatory() {
+        return mandatory;
+    }
+
+    public void setMandatory(boolean mandatory) {
+        this.mandatory = mandatory;
+    }
+
+    @Override
+    public int hashCode() {
+        int hash = 3;
+        hash = 67 * hash + (int) (this.id ^ (this.id >>> 32));
+        hash = 67 * hash + Objects.hashCode(this.name);
+        hash = 67 * hash + Objects.hashCode(this.type);
+        hash = 67 * hash + Objects.hashCode(this.value);
+        hash = 67 * hash + (int) (this.groupId ^ (this.groupId >>> 32));
+        hash = 67 * hash + (this.mandatory ? 1 : 0);
+        return hash;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final AttributeTO other = (AttributeTO) obj;
+        if (this.id != other.id) {
+            return false;
+        }
+        return true;
+    }
+    
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/ChunkTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/ChunkTO.java
new file mode 100644 (file)
index 0000000..40b3d7b
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * (C) 2015 EDF
+ */
+package com.edf.gde.transferables;
+
+import java.io.Serializable;
+
+/**
+ *
+ * @author F62173
+ */
+public class ChunkTO implements Serializable {
+    
+    private static final long serialVersionUID = 1L;
+    private long id;
+    private long fileId;
+    private long rank;
+    private String checksum;
+    private long size;
+    private byte data[];
+
+    public ChunkTO() {
+    }
+
+    public ChunkTO(long id, long fileId, long rank, String checksum, long size, byte[] data) {
+        this.id = id;
+        this.fileId = fileId;
+        this.rank = rank;
+        this.checksum = checksum;
+        this.size = size;
+        this.data = data;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getFileId() {
+        return fileId;
+    }
+
+    public void setFileId(long fileId) {
+        this.fileId = fileId;
+    }
+
+    public long getRank() {
+        return rank;
+    }
+
+    public void setRank(long rank) {
+        this.rank = rank;
+    }
+
+    public String getChecksum() {
+        return checksum;
+    }
+
+    public void setChecksum(String checksum) {
+        this.checksum = checksum;
+    }
+
+    public long getSize() {
+        return size;
+    }
+
+    public void setSize(long size) {
+        this.size = size;
+    }
+
+    public byte[] getData() {
+        return data;
+    }
+
+    public void setData(byte[] data) {
+        this.data = data;
+    }
+    
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/CommandTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/CommandTO.java
new file mode 100644 (file)
index 0000000..a2b3531
--- /dev/null
@@ -0,0 +1,99 @@
+package com.edf.gde.transferables;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * @author kavoos
+ */
+public class CommandTO {
+
+    private int method;
+    private Map<String, String> parameters;
+    private String data;
+
+    public CommandTO() {
+        parameters = new HashMap<>();
+    }
+
+    public int getMethod() {
+        return method;
+    }
+
+    public void setMethod(int method) {
+        this.method = method;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+
+    public Map<String, String> getParameters() {
+        return parameters;
+    }
+
+    public void setParameters(Map<String, String> parameters) {
+        this.parameters = parameters;
+    }
+
+    public String getParameter(String name) {
+        String ret = parameters.get(name);
+        if (ret == null) {
+            throw new RuntimeException("Parameter " + name + " not found");
+        }
+        return ret;
+    }
+
+    public long getLong(String name) {
+        return Long.parseLong(parameters.get(name));
+    }
+
+    public void setLong(String name, long value) {
+        parameters.put(name, Long.toString(value));
+    }
+    
+    public int getInt(String name) {
+        return Integer.parseInt(parameters.get(name));
+    }
+    
+    public void setInt(String name, int value) {
+        parameters.put(name, Integer.toString(value));
+    }
+
+    public float getFloat(String name) {
+        return Float.parseFloat(parameters.get(name));
+    }
+    
+    public void setFloat(String name, float value) {
+        parameters.put(name, Float.toString(value));
+    }
+
+    public boolean getBoolean(String name) {
+        return Boolean.parseBoolean(parameters.get(name));
+    }
+
+    public void setBoolean(String name, boolean value) {
+        parameters.put(name, Boolean.toString(value));
+    }
+    
+    public double getDouble(String name) {
+        return Double.parseDouble(parameters.get(name));
+    }
+    
+    public void setDouble(String name, double value) {
+        parameters.put(name, Double.toString(value));
+    }
+    
+    public String getString(String name) {
+        return parameters.get(name);
+    }
+    
+    public void setString(String name, String value) {
+        parameters.put(name, value);
+    }
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/FileTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/FileTO.java
new file mode 100644 (file)
index 0000000..e7cb272
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.edf.gde.transferables;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+
+/**
+ *
+ * @author F62173
+ */
+public class FileTO implements Serializable {
+    
+    private static final long serialVersionUID = 1L;
+    private long id;
+    private String name;
+    private long length;
+    private String checksum;
+    private Date creationDate;
+    private Date updateDate;
+    private Boolean valid;
+    private Boolean deleted;
+    private Date deletionDate;
+    private long attributeGroupId;
+    private Collection<ChunkTO> chunkCollection;
+    private long dataProfileId;
+
+    public FileTO() {
+    }
+
+    public FileTO(long id, String name, long length, String checksum, Date creationDate, Date updateDate, Boolean valid, Boolean deleted, Date deletionDate, long attributeGroupId, Collection<ChunkTO> chunkCollection, long dataProfileId) {
+        this.id = id;
+        this.name = name;
+        this.length = length;
+        this.checksum = checksum;
+        this.creationDate = creationDate;
+        this.updateDate = updateDate;
+        this.valid = valid;
+        this.deleted = deleted;
+        this.deletionDate = deletionDate;
+        this.attributeGroupId = attributeGroupId;
+        this.chunkCollection = chunkCollection;
+        this.dataProfileId = dataProfileId;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public long getLength() {
+        return length;
+    }
+
+    public void setLength(long length) {
+        this.length = length;
+    }
+
+    public String getChecksum() {
+        return checksum;
+    }
+
+    public void setChecksum(String checksum) {
+        this.checksum = checksum;
+    }
+
+    public Date getCreationDate() {
+        return creationDate;
+    }
+
+    public void setCreationDate(Date creationDate) {
+        this.creationDate = creationDate;
+    }
+
+    public Date getUpdateDate() {
+        return updateDate;
+    }
+
+    public void setUpdateDate(Date updateDate) {
+        this.updateDate = updateDate;
+    }
+
+    public Boolean getValid() {
+        return valid;
+    }
+
+    public void setValid(Boolean valid) {
+        this.valid = valid;
+    }
+
+    public Boolean getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(Boolean deleted) {
+        this.deleted = deleted;
+    }
+
+    public Date getDeletionDate() {
+        return deletionDate;
+    }
+
+    public void setDeletionDate(Date deletionDate) {
+        this.deletionDate = deletionDate;
+    }
+
+    public long getAttributeGroupId() {
+        return attributeGroupId;
+    }
+
+    public void setAttributeGroupId(long attributeGroupId) {
+        this.attributeGroupId = attributeGroupId;
+    }
+
+    public Collection<ChunkTO> getChunkCollection() {
+        return chunkCollection;
+    }
+
+    public void setChunkCollection(Collection<ChunkTO> chunkCollection) {
+        this.chunkCollection = chunkCollection;
+    }
+
+    public long getDataProfileId() {
+        return dataProfileId;
+    }
+
+    public void setDataProfileId(long dataProfileId) {
+        this.dataProfileId = dataProfileId;
+    }
+
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/GroupTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/GroupTO.java
new file mode 100644 (file)
index 0000000..3b8d47d
--- /dev/null
@@ -0,0 +1,29 @@
+package com.edf.gde.transferables;
+
+/**
+ *
+ * @author kavoos
+ */
+public class GroupTO {
+    private long id;
+    private String name;
+
+    public GroupTO() {
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/LongListTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/LongListTO.java
new file mode 100644 (file)
index 0000000..8c029a0
--- /dev/null
@@ -0,0 +1,24 @@
+package com.edf.gde.transferables;
+
+import java.util.List;
+
+/**
+ * Collection of long
+ * @author kavoos
+ */
+
+public class LongListTO {
+    private List<Long> list;
+
+    public LongListTO() {
+    }
+
+    public List<Long> getList() {
+        return list;
+    }
+
+    public void setList(List<Long> list) {
+        this.list = list;
+    }
+    
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/ProfileAttributeTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/ProfileAttributeTO.java
new file mode 100644 (file)
index 0000000..b8f46e7
--- /dev/null
@@ -0,0 +1,62 @@
+package com.edf.gde.transferables;
+
+import java.io.Serializable;
+
+/*
+ * (C) 2015 EDF
+ */
+/**
+ *
+ * @author Kavoos
+ */
+public class ProfileAttributeTO implements Serializable {
+
+    private long id;
+    private String name;
+    private String type;
+    private boolean mandatory;
+    private long profileId;
+
+    public ProfileAttributeTO() {
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public boolean isMandatory() {
+        return mandatory;
+    }
+
+    public void setMandatory(boolean mandatory) {
+        this.mandatory = mandatory;
+    }
+
+    public long getProfileId() {
+        return profileId;
+    }
+
+    public void setProfileId(long profileId) {
+        this.profileId = profileId;
+    }
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/ProfileTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/ProfileTO.java
new file mode 100644 (file)
index 0000000..c9aae13
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * (C) 2015 EDF
+ */
+package com.edf.gde.transferables;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ *
+ * @author Kavoos
+ */
+public class ProfileTO implements Serializable {
+    private long id;
+    private String name;
+    List<ProfileAttributeTO> attributes;
+
+    public ProfileTO() {
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<ProfileAttributeTO> getAttributes() {
+        return attributes;
+    }
+
+    public void setAttributes(List<ProfileAttributeTO> attributes) {
+        this.attributes = attributes;
+    }
+    
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/StudyTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/StudyTO.java
new file mode 100644 (file)
index 0000000..36436ab
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ * (C) 2015 EDF
+ */
+package com.edf.gde.transferables;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ *
+ * @author F62173
+ */
+public class StudyTO implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    private long id;
+    private String name;
+    private Date creationDate;
+    private Date updateDate;
+    private boolean valid;
+    private boolean deleted;
+    private Date deletionDate;
+    private long attributeGroupId;
+    private long profileId;
+    private boolean locked;
+
+    public StudyTO() {
+    }
+
+    public StudyTO(long id, String name, Date creationDate, Date updateDate, boolean valid, boolean deleted, Date deletionDate, long attributeGroupId, long profileId) {
+        this.id = id;
+        this.name = name;
+        this.creationDate = creationDate;
+        this.updateDate = updateDate;
+        this.valid = valid;
+        this.deleted = deleted;
+        this.deletionDate = deletionDate;
+        this.attributeGroupId = attributeGroupId;
+        this.profileId = profileId;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Date getCreationDate() {
+        return creationDate;
+    }
+
+    public void setCreationDate(Date creationDate) {
+        this.creationDate = creationDate;
+    }
+
+    public Date getUpdateDate() {
+        return updateDate;
+    }
+
+    public void setUpdateDate(Date updateDate) {
+        this.updateDate = updateDate;
+    }
+
+    public boolean getValid() {
+        return valid;
+    }
+
+    public void setValid(boolean valid) {
+        this.valid = valid;
+    }
+
+    public boolean getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(boolean deleted) {
+        this.deleted = deleted;
+    }
+
+    public Date getDeletionDate() {
+        return deletionDate;
+    }
+
+    public void setDeletionDate(Date deletionDate) {
+        this.deletionDate = deletionDate;
+    }
+
+    public long getAttributeGroupId() {
+        return attributeGroupId;
+    }
+
+    public void setAttributeGroupId(long attributeGroupId) {
+        this.attributeGroupId = attributeGroupId;
+    }
+
+    public long getProfileId() {
+        return profileId;
+    }
+
+    public void setProfileId(long profileId) {
+        this.profileId = profileId;
+    }
+
+    public boolean isLocked() {
+        return locked;
+    }
+
+    public void setLocked(boolean locked) {
+        this.locked = locked;
+    }
+
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/UserTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/UserTO.java
new file mode 100644 (file)
index 0000000..0370855
--- /dev/null
@@ -0,0 +1,40 @@
+package com.edf.gde.transferables;
+
+/**
+ *
+ * @author Kavoos
+ */
+public class UserTO {
+    private Long id;
+    private String name;
+    private String password;
+
+    public UserTO() {
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/responses/CommandResultTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/responses/CommandResultTO.java
new file mode 100644 (file)
index 0000000..642177e
--- /dev/null
@@ -0,0 +1,43 @@
+package com.edf.gde.transferables.responses;
+
+/**
+ *
+ * @author Kavoos
+ */
+public class CommandResultTO {
+    public static final int OK = 1;
+    public static final int ERROR = 2;
+    
+    private int code;
+    private String msg;
+    private String data;
+    
+    public CommandResultTO() {
+        code = OK;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public String getData() {
+        return data;
+    }
+
+    public void setData(String data) {
+        this.data = data;
+    }
+    
+}
diff --git a/projects/GDE-transferables/src/com/edf/gde/transferables/responses/ObjectCreationResponseTO.java b/projects/GDE-transferables/src/com/edf/gde/transferables/responses/ObjectCreationResponseTO.java
new file mode 100644 (file)
index 0000000..ebd02ab
--- /dev/null
@@ -0,0 +1,22 @@
+package com.edf.gde.transferables.responses;
+
+/**
+ *
+ * @author kavoos
+ */
+public class ObjectCreationResponseTO extends CommandResultTO {
+    long id;
+
+    public ObjectCreationResponseTO() {
+        super();
+        id = -1;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+}