...
In some cases, after changing the property of an object, additional action must be taken to persist the change. This is required for Layout, as the method
LayoutService.update(Layout layout)
must be invoked to persist any change to a layout. This is specified in the above code, passing a lambda argument topersistingPostOp()
.A way to convert from the type of the property internal value to the String that will be exported in the XML and back must be provided. This is specified by the
typeValueConverter(TypeValueConverter<W> typeValueConverter)
method, whereW
is the type of the internal value. Several predefinedTypeValueConverter
instances are provided by the factorycom.awnaba.projectconfigurator.extensionpoints.customentities.converters.ConverterFactory
converts between different classes and String, and from a String to the original value of the class.A
Property
must also specify if it will be set during object creation. Looking at the methodLayoutEntity.createNew(ObjectDescriptor<Layout> objectDescriptor)
above, it is clear that the layout description is set when aLayout
is created. This is the default assumption used byPropertyBuilder
, so no special action is needed in this case. Otherwise, you would invokesetInCreation(false)
on the builder.
A property for the associated
...
Profield
ReferenceProperty
Often, a Property of an object consists of a reference to another object or a collection of objects in Jira. These referred objects might be built-in Jira objects (issue types, statuses, filters, etc) or other objects that are supported by a PCJ extension. This is relevant for the migration, so there is a specific sub-interface, ReferenceProperty,
that must be implemented for any Property
that references other objects.
...