Class ScriptAttachmentMetadata
java.lang.Object
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractRdcDomainObject
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractShadowableRdcDomainObject
eu.dzhw.fdz.metadatamanagement.analysispackagemanagement.domain.ScriptAttachmentMetadata
- All Implemented Interfaces:
Serializable
@AtMostOneAttachmentPerScript(message="analysis-package-management.error.script-attachment-metadata.script-uuid.not-unique") public class ScriptAttachmentMetadata extends AbstractShadowableRdcDomainObject
Metadata which will be stored with each attachment of a
Script
. There must be no more
than one attachment per script!- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private @NotEmpty(message="analysis-package-management.error.script-attachment-metadata.analysis-package-id.not-empty") String
analysisPackageId
The id of theAnalysisPackage
to which this attachment belongs.private @NotEmpty(message="analysis-package-management.error.script-attachment-metadata.project-id.not-empty") String
dataAcquisitionProjectId
The id of theDataAcquisitionProject
to which theAnalysisPackage
of this attachment belongs.private @NotEmpty(message="analysis-package-management.error.script-attachment-metadata.filename.not-empty") @Pattern(message="analysis-package-management.error.script-attachment-metadata.filename.not-valid",regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") String
fileName
The filename of the attachment.private String
id
The id of the attachment.private String
masterId
The master id of the analysis package attachment.private @NotEmpty(message="analysis-package-management.error.script-attachment-metadata.script-uuid.not-empty") String
scriptUuid
The uuid of theScript
to which this attachment belongs.private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ScriptAttachmentMetadata()
-
Method Summary
Modifier and Type Method Description void
generateId()
Generate the id of this attachment from the analysisPackageId, the scriptId and the fileName.String
getMasterId()
Returns the master id of the script attachment.protected void
setIdInternal(String id)
Set id on implementation ofAbstractShadowableRdcDomainObject
.protected void
setMasterIdInternal(String masterId)
Set masterId on implementations ofAbstractShadowableRdcDomainObject
.Methods inherited from class eu.dzhw.fdz.metadatamanagement.common.domain.AbstractShadowableRdcDomainObject
setId, setMasterId
Methods inherited from class eu.dzhw.fdz.metadatamanagement.common.domain.AbstractRdcDomainObject
getId
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
id
The id of the attachment. Holds the complete path which can be used to download the file. -
masterId
The master id of the analysis package attachment. -
analysisPackageId
@NotEmpty(message="analysis-package-management.error.script-attachment-metadata.analysis-package-id.not-empty") private @NotEmpty(message="analysis-package-management.error.script-attachment-metadata.analysis-package-id.not-empty") String analysisPackageIdThe id of theAnalysisPackage
to which this attachment belongs. Must not be empty. -
scriptUuid
@NotEmpty(message="analysis-package-management.error.script-attachment-metadata.script-uuid.not-empty") private @NotEmpty(message="analysis-package-management.error.script-attachment-metadata.script-uuid.not-empty") String scriptUuidThe uuid of theScript
to which this attachment belongs. Must not be empty. Must be unique within an analysis package (there must be at most one attachment per script). Duplicates are only possible for shadow copies. -
dataAcquisitionProjectId
@NotEmpty(message="analysis-package-management.error.script-attachment-metadata.project-id.not-empty") private @NotEmpty(message="analysis-package-management.error.script-attachment-metadata.project-id.not-empty") String dataAcquisitionProjectIdThe id of theDataAcquisitionProject
to which theAnalysisPackage
of this attachment belongs. Must not be empty. -
fileName
@NotEmpty(message="analysis-package-management.error.script-attachment-metadata.filename.not-empty") @Pattern(message="analysis-package-management.error.script-attachment-metadata.filename.not-valid", regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") private @NotEmpty(message="analysis-package-management.error.script-attachment-metadata.filename.not-empty") @Pattern(message="analysis-package-management.error.script-attachment-metadata.filename.not-valid",regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") String fileNameThe filename of the attachment. Must not be empty and must contain only (german) alphanumeric characters and "_" and "-" and ".".
-
-
Constructor Details
-
ScriptAttachmentMetadata
public ScriptAttachmentMetadata()
-
-
Method Details
-
generateId
public void generateId()Generate the id of this attachment from the analysisPackageId, the scriptId and the fileName. -
setMasterIdInternal
Description copied from class:AbstractShadowableRdcDomainObject
Set masterId on implementations ofAbstractShadowableRdcDomainObject
.- Specified by:
setMasterIdInternal
in classAbstractShadowableRdcDomainObject
- Parameters:
masterId
- Master Id
-
getMasterId
Returns the master id of the script attachment.- Specified by:
getMasterId
in classAbstractShadowableRdcDomainObject
- Returns:
- Master Id
-
setIdInternal
Description copied from class:AbstractShadowableRdcDomainObject
Set id on implementation ofAbstractShadowableRdcDomainObject
.- Specified by:
setIdInternal
in classAbstractShadowableRdcDomainObject
- Parameters:
id
- Id
-