Class: UU::OS::Property::PropertyCreate

Inherits:
REST::DTO
  • Object
show all
Defined in:
uu_os-0.29.16/lib/uu/os/property/property_create.rb

Instance Attribute Summary (collapse)

Method Summary

Methods inherited from REST::DTO

#initialize, #to_hash, #to_json

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

Code of the new property. When nil is set, the code is generated automatically using the system sequence. The code must be unique in a given artifact, otherwise the create command fails.



18
19
20
# File 'uu_os-0.29.16/lib/uu/os/property/property_create.rb', line 18

def code
  @code
end

- (Object) description

Description of the new property. When nil is set, the description is taken from the template tDescription. When the template does not define a tDescription, it is left empty.



22
23
24
# File 'uu_os-0.29.16/lib/uu/os/property/property_create.rb', line 22

def description
  @description
end

- (Object) name

Name of the new property. When nil is set and the templateUri parameter is not nil, the name is taken from the template tName. When the template does not define a tName, the create command fails. When nil is set the template has to be specified (the template_uri parameter can't be nil), otherwise the create command fails.



14
15
16
# File 'uu_os-0.29.16/lib/uu/os/property/property_create.rb', line 14

def name
  @name
end

- (Object) template_uri

UESURI of the new property template. The template determines the type of the new property. When nil is set, the template is determined by the type attribute (which cannot be nil in that case).



26
27
28
# File 'uu_os-0.29.16/lib/uu/os/property/property_create.rb', line 26

def template_uri
  @template_uri
end

- (Object) type

Specifies the type of the new property. When nil is set, the property type is determined by the template (templateUri attribute, which cannot be nil in that case).



30
31
32
# File 'uu_os-0.29.16/lib/uu/os/property/property_create.rb', line 30

def type
  @type
end

- (Object) value

The value of the new property. Passed object type has to correspond to the type of the new property, for details. When nil is set, the new property has no value. If the property value is set as file, is highly recommended to open file in binary mode, for example: File.open("file_name.txt", "rb").



35
36
37
# File 'uu_os-0.29.16/lib/uu/os/property/property_create.rb', line 35

def value
  @value
end