Skip to content

Commit

Permalink
schema cleanup: SearchBoxConfigurationType.defaultValue usage removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Kateryna Honchar committed Jun 6, 2023
1 parent 510c302 commit a6f75c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 25 deletions.
Expand Up @@ -58,10 +58,6 @@ public static SearchBoxConfigurationType mergeConfigurations(SearchBoxConfigurat
mergedConfig.setDefaultMode(customizedConfig.getDefaultMode());
}

if (customizedConfig.getDefaultObjectType() != null) {
mergedConfig.setDefaultObjectType(customizedConfig.getDefaultObjectType());
}

if (customizedConfig.getObjectTypeConfiguration() != null) {
mergedConfig.setObjectTypeConfiguration(customizedConfig.getObjectTypeConfiguration());
}
Expand Down
Expand Up @@ -1882,6 +1882,12 @@
<a:operation>removed</a:operation>
<a:comment>Use scopeConfiguration.defaultValue instead</a:comment>
</a:schemaMigration>
<a:schemaMigration>
<a:element>tns:defaultObjectType</a:element>
<a:version>4.8</a:version>
<a:operation>removed</a:operation>
<a:comment>Use objectTypeConfiguration.defaultValue instead</a:comment>
</a:schemaMigration>
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
Expand Down Expand Up @@ -1977,24 +1983,7 @@
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="defaultObjectType" type="xsd:QName" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
Default type of object for search boxes that support object type selection.
E.g. UserType or RoleType. Setting it to ObjectType should display all objects.
Type selection may not be applicable to all types of lists/views.
E.g. it does not make sense for lists that only contain objects of a single type.
Therefore some views may not even display object type selection at all.
</xsd:documentation>
<xsd:appinfo>
<a:displayName>SearchBoxConfigurationType.defaultObjectType</a:displayName>
<a:since>3.9</a:since>
<a:deprecated>true</a:deprecated>
<a:deprecatedSince>4.3</a:deprecatedSince>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="searchItems" type="tns:SearchItemsType" minOccurs="0" maxOccurs="1">
<xsd:element name="searchItems" type="tns:SearchItemsType" minOccurs="0" maxOccurs="1">
<xsd:annotation>
<xsd:documentation>
The list of searchable properties which should be displayed on the search panel.
Expand Down
Expand Up @@ -611,9 +611,6 @@ private void compileSearchBox(CompiledObjectCollectionView existingView, GuiObje
SearchBoxConfigurationType oldSearchBoxConfig = existingView.getSearchBoxConfiguration();
if (oldSearchBoxConfig == null || replaceIfExist) {
if (oldSearchBoxConfig != null) {
if (newSearchBoxConfig.getDefaultObjectType() == null) {
newSearchBoxConfig.setDefaultObjectType(oldSearchBoxConfig.getDefaultObjectType());
}
if (newSearchBoxConfig.getSearchItems() == null) {
newSearchBoxConfig.setSearchItems(oldSearchBoxConfig.getSearchItems());
}
Expand Down

0 comments on commit a6f75c7

Please sign in to comment.