Skip to content
Snippets Groups Projects
Commit a1b36d9a authored by pkupczyk's avatar pkupczyk
Browse files

SSDM-2783

SVN: 35225
parent 798c11b1
No related branches found
No related tags found
No related merge requests found
Showing
with 315 additions and 21 deletions
...@@ -6,7 +6,7 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) { ...@@ -6,7 +6,7 @@ define([ "stjs", "util/Exceptions" ], function(stjs, exceptions) {
var Attachment = function() { var Attachment = function() {
}; };
stjs.extend(Attachment, null, [], function(constructor, prototype) { stjs.extend(Attachment, null, [], function(constructor, prototype) {
prototype['@type'] = 'dto.entity.attachment.Attachment'; prototype['@type'] = 'dto.attachment.Attachment';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.fetchOptions = null; prototype.fetchOptions = null;
prototype.fileName = null; prototype.fileName = null;
......
...@@ -5,7 +5,7 @@ define([ "stjs" ], function(stjs) { ...@@ -5,7 +5,7 @@ define([ "stjs" ], function(stjs) {
var AttachmentCreation = function() { var AttachmentCreation = function() {
}; };
stjs.extend(AttachmentCreation, null, [], function(constructor, prototype) { stjs.extend(AttachmentCreation, null, [], function(constructor, prototype) {
prototype['@type'] = 'dto.entity.attachment.AttachmentCreation'; prototype['@type'] = 'dto.attachment.create.AttachmentCreation';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.fileName = null; prototype.fileName = null;
prototype.title = null; prototype.title = null;
......
/**
* Class automatically generated with
* {@link ch.ethz.sis.openbis.generic.shared.api.v3.dto.generators.DtoGenerator}
*/
define([ "require", "stjs", "dto/common/fetchoptions/FetchOptions", "dto/person/fetchoptions/PersonFetchOptions", "dto/common/fetchoptions/EmptyFetchOptions",
"dto/attachment/fetchoptions/AttachmentSortOptions" ], function(require, stjs, FetchOptions) {
var AttachmentFetchOptions = function() {
};
stjs.extend(AttachmentFetchOptions, FetchOptions, [ FetchOptions ], function(constructor, prototype) {
prototype['@type'] = 'dto.attachment.fetchoptions.AttachmentFetchOptions';
constructor.serialVersionUID = 1;
prototype.registrator = null;
prototype.previousVersion = null;
prototype.content = null;
prototype.sort = null;
prototype.withRegistrator = function() {
if (this.registrator == null) {
var PersonFetchOptions = require("dto/person/fetchoptions/PersonFetchOptions");
this.registrator = new PersonFetchOptions();
}
return this.registrator;
};
prototype.withRegistratorUsing = function(fetchOptions) {
return this.registrator = fetchOptions;
};
prototype.hasRegistrator = function() {
return this.registrator != null;
};
prototype.withPreviousVersion = function() {
if (this.previousVersion == null) {
this.previousVersion = new AttachmentFetchOptions();
}
return this.previousVersion;
};
prototype.withPreviousVersionUsing = function(fetchOptions) {
return this.previousVersion = fetchOptions;
};
prototype.hasPreviousVersion = function() {
return this.previousVersion != null;
};
prototype.withContent = function() {
if (this.content == null) {
var EmptyFetchOptions = require("dto/common/fetchoptions/EmptyFetchOptions");
this.content = new EmptyFetchOptions();
}
return this.content;
};
prototype.withContentUsing = function(fetchOptions) {
return this.content = fetchOptions;
};
prototype.hasContent = function() {
return this.content != null;
};
prototype.sortBy = function() {
if (this.sort == null) {
var AttachmentSortOptions = require("dto/attachment/fetchoptions/AttachmentSortOptions");
this.sort = new AttachmentSortOptions();
}
return this.sort;
};
prototype.getSortBy = function() {
return this.sort;
};
}, {
registrator : "PersonFetchOptions",
previousVersion : "AttachmentFetchOptions",
content : "EmptyFetchOptions",
sort : "AttachmentSortOptions"
});
return AttachmentFetchOptions;
})
\ No newline at end of file
define([ "require", "stjs", "dto/fetchoptions/sort/SortOptions" ], function(require, stjs, SortOptions) { define([ "require", "stjs", "dto/common/fetchoptions/SortOptions" ], function(require, stjs, SortOptions) {
var AttachmentSortOptions = function() { var AttachmentSortOptions = function() {
SortOptions.call(this); SortOptions.call(this);
}; };
stjs.extend(AttachmentSortOptions, SortOptions, [ SortOptions ], function(constructor, prototype) { stjs.extend(AttachmentSortOptions, SortOptions, [ SortOptions ], function(constructor, prototype) {
prototype['@type'] = 'dto.fetchoptions.attachment.AttachmentSortOptions'; prototype['@type'] = 'dto.attachment.fetchoptions.AttachmentSortOptions';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
}, {}); }, {});
return AttachmentSortOptions; return AttachmentSortOptions;
......
/**
* Attachment file name.
*
* @author pkupczyk
*/
define([ "stjs", "util/Exceptions", "dto/attachment/id/IAttachmentId" ], function(stjs, exceptions, IAttachmentId) {
/**
* @param fileName
* Attachment file name, e.g. "my_file.txt".
*/
var AttachmentFileName = function(fileName) {
this.setFileName(fileName);
};
stjs.extend(AttachmentFileName, null, [ IAttachmentId ], function(constructor, prototype) {
prototype['@type'] = 'dto.id.attachment.AttachmentFileName';
constructor.serialVersionUID = 1;
prototype.fileName = null;
prototype.getFileName = function() {
return this.fileName;
};
prototype.setFileName = function(fileName) {
if (fileName == null) {
throw new exceptions.IllegalArgumentException("File name cannot be null");
}
this.fileName = fileName;
};
prototype.toString = function() {
return this.getFileName();
};
prototype.hashCode = function() {
return ((this.getFileName() == null) ? 0 : this.getFileName().hashCode());
};
prototype.equals = function(obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (this.getClass() != obj.getClass()) {
return false;
}
var other = obj;
return this.getFileName() == null ? this.getFileName() == other.getFileName() : this.getFileName().equals(other.getFileName());
};
}, {});
return AttachmentFileName;
})
\ No newline at end of file
/**
* Holds information that uniquely identifies an attachment in openBIS.
*
* @author pkupczyk
*/
define([ "stjs", "dto/common/id/IObjectId" ], function(stjs, IObjectId) {
var IAttachmentId = function() {
};
stjs.extend(IAttachmentId, null, [ IObjectId ], null, {});
return IAttachmentId;
})
\ No newline at end of file
/** /**
* @author pkupczyk * @author pkupczyk
*/ */
define([ "stjs", "dto/entity/ListUpdateValue" ], function(stjs, ListUpdateValue) { define([ "stjs", "dto/common/update/ListUpdateValue" ], function(stjs, ListUpdateValue) {
var AttachmentListUpdateValue = function() { var AttachmentListUpdateValue = function() {
ListUpdateValue.call(this); ListUpdateValue.call(this);
}; };
stjs.extend(AttachmentListUpdateValue, ListUpdateValue, [ ListUpdateValue ], function(constructor, prototype) { stjs.extend(AttachmentListUpdateValue, ListUpdateValue, [ ListUpdateValue ], function(constructor, prototype) {
prototype['@type'] = 'dto.entity.AttachmentListUpdateValue'; prototype['@type'] = 'dto.attachment.update.AttachmentListUpdateValue';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
}, { }, {
actions : { actions : {
......
define([ "stjs", "dto/fetchoptions/FetchOptions" ], function(stjs, FetchOptions) { define([ "stjs", "dto/common/fetchoptions/FetchOptions" ], function(stjs, FetchOptions) {
var EmptyFetchOptions = function() { var EmptyFetchOptions = function() {
FetchOptions.call(this); FetchOptions.call(this);
}; };
stjs.extend(EmptyFetchOptions, FetchOptions, [ FetchOptions ], function(constructor, prototype) { stjs.extend(EmptyFetchOptions, FetchOptions, [ FetchOptions ], function(constructor, prototype) {
prototype['@type'] = 'dto.fetchoptions.EmptyFetchOptions'; prototype['@type'] = 'dto.common.fetchoptions.EmptyFetchOptions';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
}, {}); }, {});
return EmptyFetchOptions; return EmptyFetchOptions;
......
define([ "require", "stjs", "dto/fetchoptions/sort/SortOptions" ], function(require, stjs, SortOptions) { define([ "require", "stjs", "dto/common/fetchoptions/SortOptions" ], function(require, stjs, SortOptions) {
var EntitySortOptions = function() { var EntitySortOptions = function() {
SortOptions.call(this); SortOptions.call(this);
}; };
...@@ -10,7 +10,7 @@ define([ "require", "stjs", "dto/fetchoptions/sort/SortOptions" ], function(requ ...@@ -10,7 +10,7 @@ define([ "require", "stjs", "dto/fetchoptions/sort/SortOptions" ], function(requ
}; };
stjs.extend(EntitySortOptions, SortOptions, [ SortOptions ], function(constructor, prototype) { stjs.extend(EntitySortOptions, SortOptions, [ SortOptions ], function(constructor, prototype) {
prototype['@type'] = 'dto.fetchoptions.sort.EntitySortOptions'; prototype['@type'] = 'dto.common.fetchoptions.EntitySortOptions';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.code = function() { prototype.code = function() {
return this.getOrCreateSorting(fields.CODE); return this.getOrCreateSorting(fields.CODE);
......
define([ "require", "stjs", "dto/fetchoptions/sort/EntitySortOptions" ], function(require, stjs, EntitySortOptions) { define([ "require", "stjs", "dto/common/fetchoptions/EntitySortOptions" ], function(require, stjs, EntitySortOptions) {
var EntityWithPropertiesSortOptions = function() { var EntityWithPropertiesSortOptions = function() {
EntitySortOptions.call(this); EntitySortOptions.call(this);
}; };
...@@ -8,7 +8,7 @@ define([ "require", "stjs", "dto/fetchoptions/sort/EntitySortOptions" ], functio ...@@ -8,7 +8,7 @@ define([ "require", "stjs", "dto/fetchoptions/sort/EntitySortOptions" ], functio
}; };
stjs.extend(EntityWithPropertiesSortOptions, EntitySortOptions, [ EntitySortOptions ], function(constructor, prototype) { stjs.extend(EntityWithPropertiesSortOptions, EntitySortOptions, [ EntitySortOptions ], function(constructor, prototype) {
prototype['@type'] = 'dto.fetchoptions.sort.EntityWithPropertiesSortOptions'; prototype['@type'] = 'dto.common.fetchoptions.EntityWithPropertiesSortOptions';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.property = function(propertyName) { prototype.property = function(propertyName) {
......
define([ "stjs", "dto/fetchoptions/CacheMode" ], function(stjs, CacheMode) { define([ "stjs", "dto/common/fetchoptions/CacheMode" ], function(stjs, CacheMode) {
var FetchOptions = function() { var FetchOptions = function() {
this._count = null; this._count = null;
this._from = null; this._from = null;
this._cacheMode = CacheMode.NO_CACHE; this._cacheMode = CacheMode.NO_CACHE;
}; };
stjs.extend(FetchOptions, null, [], function(constructor, prototype) { stjs.extend(FetchOptions, null, [], function(constructor, prototype) {
prototype['@type'] = 'dto.fetchoptions.FetchOptions'; prototype['@type'] = 'dto.common.fetchoptions.FetchOptions';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.count = function(count) { prototype.count = function(count) {
this._count = count; this._count = count;
......
define([ "require", "stjs", "dto/fetchoptions/sort/SortOrder", "dto/fetchoptions/sort/Sorting" ], function(require, stjs, SortOrder, Sorting) { define([ "require", "stjs", "dto/common/fetchoptions/SortOrder", "dto/common/fetchoptions/Sorting" ], function(require, stjs, SortOrder, Sorting) {
var SortOptions = function() { var SortOptions = function() {
this.sortings = []; this.sortings = [];
}; };
stjs.extend(SortOptions, null, [], function(constructor, prototype) { stjs.extend(SortOptions, null, [], function(constructor, prototype) {
prototype['@type'] = 'dto.fetchoptions.sort.SortOptions'; prototype['@type'] = 'dto.common.fetchoptions.SortOptions';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.getOrCreateSorting = function(field) { prototype.getOrCreateSorting = function(field) {
var order = this.getSorting(field); var order = this.getSorting(field);
......
...@@ -4,7 +4,7 @@ define([ "require", "stjs" ], function(require, stjs) { ...@@ -4,7 +4,7 @@ define([ "require", "stjs" ], function(require, stjs) {
}; };
stjs.extend(SortOrder, null, [], function(constructor, prototype) { stjs.extend(SortOrder, null, [], function(constructor, prototype) {
prototype['@type'] = 'dto.fetchoptions.sort.SortOrder'; prototype['@type'] = 'dto.common.fetchoptions.SortOrder';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.asc = function() { prototype.asc = function() {
this._asc = true; this._asc = true;
......
...@@ -5,7 +5,7 @@ define([ "require", "stjs" ], function(require, stjs) { ...@@ -5,7 +5,7 @@ define([ "require", "stjs" ], function(require, stjs) {
}; };
stjs.extend(Sorting, null, [], function(constructor, prototype) { stjs.extend(Sorting, null, [], function(constructor, prototype) {
prototype['@type'] = 'dto.fetchoptions.sort.Sorting'; prototype['@type'] = 'dto.common.fetchoptions.Sorting';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.getField = function() { prototype.getField = function() {
return this.field; return this.field;
......
/**
* @author Jakub Straszewski
*/
define([ "stjs", "dto/sample/id/ISampleId", "dto/dataset/id/IDataSetId", "dto/experiment/id/IExperimentId", "dto/project/id/IProjectId", "dto/space/id/ISpaceId", "dto/material/id/IMaterialId" ],
function(stjs, ISampleId, IDataSetId, IExperimentId, IProjectId, ISpaceId, IMaterialId) {
var CreationId = function(creationId) {
this.creationId = creationId;
};
stjs.extend(CreationId, null, [ ISampleId, IDataSetId, IExperimentId, IProjectId, ISpaceId, IMaterialId ], function(constructor, prototype) {
prototype['@type'] = 'dto.common.id.CreationId';
constructor.serialVersionUID = 1;
prototype.creationId = null;
prototype.getCreationId = function() {
return this.creationId;
};
prototype.setCreationId = function(creationId) {
this.creationId = creationId;
};
prototype.toString = function() {
return this.getCreationId();
};
prototype.hashCode = function() {
return ((this.getCreationId() == null) ? 0 : this.getCreationId().hashCode());
};
prototype.equals = function(obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (this.getClass() != obj.getClass()) {
return false;
}
var other = obj;
if (this.getCreationId() == null) {
if (other.getCreationId() != null) {
return false;
}
} else if (!this.getCreationId().equals(other.getCreationId())) {
return false;
}
return true;
};
}, {});
return CreationId;
})
\ No newline at end of file
/**
* Holds information that uniquely identifies an object in openBIS.
*
* @author pkupczyk
*/
define([ "stjs" ], function(stjs) {
var IObjectId = function() {
};
stjs.extend(IObjectId, null, [], null, {});
return IObjectId;
})
\ No newline at end of file
/**
* Base class for ids that identify objects by identifiers. An identifier is a
* mutable user-defined string. An identifier is assigned to an object during
* the object creation but can change afterwards. An object's identifier is not
* guaranteed to be always the same, e.g. a sample identifier changes when the
* sample is moved to a different space.
*
* @author pkupczyk
*/
define([ "stjs", "util/Exceptions", "dto/common/id/IObjectId" ], function(stjs, exceptions, IObjectId) {
var ObjectIdentifier = function(identifier) {
this.setIdentifier(identifier);
};
stjs.extend(ObjectIdentifier, null, [ IObjectId ], function(constructor, prototype) {
prototype['@type'] = 'dto.common.id.ObjectIdentifier';
constructor.serialVersionUID = 1;
prototype.identifier = null;
prototype.getIdentifier = function() {
return this.identifier;
};
prototype.setIdentifier = function(identifier) {
if (identifier == null) {
// throw new exceptions.IllegalArgumentException("Identifier id
// cannot be null");
}
this.identifier = identifier;
};
prototype.toString = function() {
return this.getIdentifier();
};
prototype.hashCode = function() {
return ((this.getIdentifier() == null) ? 0 : this.getIdentifier().hashCode());
};
prototype.equals = function(obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (this.getClass() != obj.getClass()) {
return false;
}
var other = obj;
return this.getIdentifier() == null ? this.getIdentifier() == other.getIdentifier() : this.getIdentifier().equals(other.getIdentifier());
};
}, {});
return ObjectIdentifier;
})
\ No newline at end of file
/**
* Base class for ids that identify objects by a perm id. A perm id is an
* immutable system-generated string. A perm id is assigned to an object during
* the object creation and cannot be changed afterwards. An object's perm id is
* guaranteed to be always the same, e.g. a sample perm id remains the same even
* if the sample is moved to a different space.
*
* @author pkupczyk
*/
define([ "stjs", "util/Exceptions", "dto/common/id/IObjectId" ], function(stjs, exceptions, IObjectId) {
var ObjectPermId = function(permId) {
this.setPermId(permId);
};
stjs.extend(ObjectPermId, null, [ IObjectId ], function(constructor, prototype) {
prototype['@type'] = 'dto.common.id.ObjectPermId';
constructor.serialVersionUID = 1;
prototype.permId = null;
prototype.getPermId = function() {
return this.permId;
};
prototype.setPermId = function(permId) {
if (permId == null) {
// TODO throw new exceptions.IllegalArgumentException("PermId
// cannot be null");
}
this.permId = permId;
};
prototype.toString = function() {
return this.getPermId();
};
prototype.hashCode = function() {
return ((this.getPermId() == null) ? 0 : this.getPermId().hashCode());
};
prototype.equals = function(obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (this.getClass() != obj.getClass()) {
return false;
}
var other = obj;
if (this.getPermId() == null) {
if (other.getPermId() != null) {
return false;
}
} else if (!this.getPermId().equals(other.getPermId())) {
return false;
}
return true;
};
}, {});
return ObjectPermId;
})
\ No newline at end of file
/** /**
* @author pkupczyk * @author pkupczyk
*/ */
define([ "stjs", "util/Exceptions", "dto/id/IObjectId" ], function(stjs, exceptions, IObjectId) { define([ "stjs", "util/Exceptions", "dto/common/id/IObjectId" ], function(stjs, exceptions, IObjectId) {
var ObjectTechId = function(techId) { var ObjectTechId = function(techId) {
this.setTechId(techId); this.setTechId(techId);
}; };
stjs.extend(ObjectTechId, null, [ IObjectId ], function(constructor, prototype) { stjs.extend(ObjectTechId, null, [ IObjectId ], function(constructor, prototype) {
prototype['@type'] = 'dto.id.ObjectTechId'; prototype['@type'] = 'dto.common.id.ObjectTechId';
constructor.serialVersionUID = 1; constructor.serialVersionUID = 1;
prototype.techId = null; prototype.techId = null;
prototype.getTechId = function() { prototype.getTechId = function() {
...@@ -14,7 +14,8 @@ define([ "stjs", "util/Exceptions", "dto/id/IObjectId" ], function(stjs, excepti ...@@ -14,7 +14,8 @@ define([ "stjs", "util/Exceptions", "dto/id/IObjectId" ], function(stjs, excepti
}; };
prototype.setTechId = function(techId) { prototype.setTechId = function(techId) {
if (techId == null) { if (techId == null) {
// throw new exceptions.IllegalArgumentException("TechId cannot be null"); // throw new exceptions.IllegalArgumentException("TechId cannot
// be null");
} }
this.techId = techId; this.techId = techId;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment