Class: UU::OS::Attachment::AttachmentCheckIn
- Inherits:
-
REST::DTO
- Object
- REST::DTO
- UU::OS::Attachment::AttachmentCheckIn
- Defined in:
- uu_os_client-0.10.6/lib/uu/os/attachment/attachment_check_in.rb
Instance Attribute Summary (collapse)
-
- (Object) code
The new code of the attachment.
-
- (Object) data
Attachment data.
-
- (Object) description
The new description of the attachment.
-
- (Object) name
The new name of the attachment.
-
- (Object) version_label
The version label of the new attachment version.
-
- (Object) version_strategy
Specifies how to work with versions.
Instance Method Summary (collapse)
Methods inherited from REST::DTO
Constructor Details
This class inherits a constructor from UU::OS::REST::DTO
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class UU::OS::REST::DTO
Instance Attribute Details
- (Object) code
The new code of the attachment. When nil is set, the code is not modified. The code must be unique in a given artifact, otherwise the checkIn command fails.
18 19 20 |
# File 'uu_os_client-0.10.6/lib/uu/os/attachment/attachment_check_in.rb', line 18 def code @code end |
- (Object) data
Attachment data. When nil is set, the create command fails. Accepted values
are String, IO, File or instance of
BinaryValue. If use BinaryValue attachment file
name can be set by attribute :name of it.
26 27 28 |
# File 'uu_os_client-0.10.6/lib/uu/os/attachment/attachment_check_in.rb', line 26 def data @data end |
- (Object) description
The new description of the attachment. When nil is set, the description is not modified.
21 22 23 |
# File 'uu_os_client-0.10.6/lib/uu/os/attachment/attachment_check_in.rb', line 21 def description @description end |
- (Object) name
The new name of the attachment. When nil is set, the name is taken from the attachment file name. The name must be unique in a given artifact, otherwise the checkIn command fails.
14 15 16 |
# File 'uu_os_client-0.10.6/lib/uu/os/attachment/attachment_check_in.rb', line 14 def name @name end |
- (Object) version_label
The version label of the new attachment version. When nil is set, it is left empty.
29 30 31 |
# File 'uu_os_client-0.10.6/lib/uu/os/attachment/attachment_check_in.rb', line 29 def version_label @version_label end |
- (Object) version_strategy
Specifies how to work with versions. When nil is set, the CREATE_NEW_VERSION strategy is used, therefore the new version is created and data are published (the attachment is unlocked).
33 34 35 |
# File 'uu_os_client-0.10.6/lib/uu/os/attachment/attachment_check_in.rb', line 33 def version_strategy @version_strategy end |
Instance Method Details
- (Object) to_hash
83 84 85 86 87 88 89 |
# File 'uu_os_client-0.10.6/lib/uu/os/attachment/attachment_check_in.rb', line 83 def to_hash hash = super() if hash[:versionStrategy].nil? hash[:versionStrategy] = UU::OS::Env::VersionStrategy::OVERWRITE_VERSION end hash end |