mirror of
https://gitee.com/jmix/cuba.git
synced 2024-11-29 17:57:38 +08:00
PL-9982 Convert line endings
This commit is contained in:
parent
e3ff5781c4
commit
d4290d9b5a
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -1,4 +1,4 @@
|
||||
* text=auto
|
||||
* text eol=auto
|
||||
|
||||
*.png binary
|
||||
*.ico binary
|
||||
|
@ -1,385 +1,385 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client;
|
||||
|
||||
import com.haulmont.cuba.core.config.Config;
|
||||
import com.haulmont.cuba.core.config.Property;
|
||||
import com.haulmont.cuba.core.config.Source;
|
||||
import com.haulmont.cuba.core.config.SourceType;
|
||||
import com.haulmont.cuba.core.config.defaults.*;
|
||||
import com.haulmont.cuba.core.config.type.CommaSeparatedStringListTypeFactory;
|
||||
import com.haulmont.cuba.core.config.type.Factory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Configuration parameters interface used by the WEB and DESKTOP layers.
|
||||
*/
|
||||
@Source(type = SourceType.APP)
|
||||
public interface ClientConfig extends Config {
|
||||
|
||||
/**
|
||||
* @return middleware connection URL list
|
||||
*/
|
||||
@Property("cuba.connectionUrlList")
|
||||
@Factory(factory = CommaSeparatedStringListTypeFactory.class)
|
||||
List<String> getConnectionUrlList();
|
||||
|
||||
/**
|
||||
* @return Context of the middleware file download controller.
|
||||
*/
|
||||
@Property("cuba.fileDownloadContext")
|
||||
@DefaultString("/download")
|
||||
String getFileDownloadContext();
|
||||
|
||||
/**
|
||||
* @return Context of the middleware file upload controller.
|
||||
*/
|
||||
@Property("cuba.fileUploadContext")
|
||||
@DefaultString("/upload")
|
||||
String getFileUploadContext();
|
||||
|
||||
/**
|
||||
* @return Maximum size of uploaded file in megabytes.
|
||||
*/
|
||||
@Property("cuba.maxUploadSizeMb")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(20)
|
||||
int getMaxUploadSizeMb();
|
||||
void setMaxUploadSizeMb(int value);
|
||||
|
||||
@Factory(factory = UniqueConstraintViolationPatternFactory.class)
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@Property("cuba.uniqueConstraintViolationPattern")
|
||||
Pattern getUniqueConstraintViolationPattern();
|
||||
|
||||
/**
|
||||
* @return Whether to enable sorting of datasource data on DB (using separate SELECT with ORDER BY clause).
|
||||
*/
|
||||
@Property("cuba.collectionDatasourceDbSortEnabled")
|
||||
@DefaultBoolean(true)
|
||||
boolean getCollectionDatasourceDbSortEnabled();
|
||||
|
||||
/**
|
||||
* @return If true, client will try to find missing localized messages on the server.
|
||||
*/
|
||||
@Property("cuba.remoteMessagesSearchEnabled")
|
||||
@DefaultBoolean(false)
|
||||
boolean getRemoteMessagesSearchEnabled();
|
||||
|
||||
/**
|
||||
* List of screen aliases for which saving screen history is enabled.
|
||||
* <p>Obsolete. Recommended way to specify this information is entity annotations
|
||||
* in {@code *-metadata.xml}</p>
|
||||
* @return comma-separated list of screen aliases
|
||||
*/
|
||||
@Property("cuba.screenIdsToSaveHistory")
|
||||
String getScreenIdsToSaveHistory();
|
||||
|
||||
/**
|
||||
* @return Whether to enable password policy. If true, all new passwords will be checked for the compliance with
|
||||
* {@code cuba.passwordPolicyRegExp}
|
||||
*/
|
||||
@Property("cuba.passwordPolicyEnabled")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getPasswordPolicyEnabled();
|
||||
|
||||
/**
|
||||
* @return The regular expression which is used by password policy (see also {@code cuba.passwordPolicyEnabled}).
|
||||
*/
|
||||
@Property("cuba.passwordPolicyRegExp")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("((?=.*\\d)(?=.*\\p{javaLowerCase})(?=.*\\p{javaUpperCase}).{6,20})")
|
||||
String getPasswordPolicyRegExp();
|
||||
|
||||
/**
|
||||
* @return If true, all generic filters will require explicit Apply after screen opening. Empty connected table
|
||||
* is shown.<br>
|
||||
* If false, the filter will be applied automatically, refreshing the table immediately after the screen opening.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterManualApplyRequired")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getGenericFilterManualApplyRequired();
|
||||
|
||||
/**
|
||||
* @return If true, then check filter conditions (empty or not) before applying filter. If all conditions are empty
|
||||
* (no parameters entered), the filter doesn't apply and special message to user is shown.<br>
|
||||
* If false, no checks are performed and the filter applyes, refreshing connected table.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterChecking")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getGenericFilterChecking();
|
||||
|
||||
/**
|
||||
* @return If true, all generic text filters will trim value.<br>
|
||||
* If false, the text filter will not be trim value.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterTrimParamValues")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getGenericFilterTrimParamValues();
|
||||
|
||||
/**
|
||||
* @return Number of columns with conditions in generic filter UI component.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterColumnsCount")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(3)
|
||||
int getGenericFilterColumnsCount();
|
||||
|
||||
/**
|
||||
* @return location of panel with conditions in generic filter component.
|
||||
* If {@code top} then conditions will be placed above filter control elements
|
||||
* or below them if {@code bottom}.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterConditionsLocation")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@Default("top")
|
||||
String getGenericFilterConditionsLocation();
|
||||
|
||||
/**
|
||||
* Returns a number of items to be displayed in popup list near the 'Search' button. If number of filter
|
||||
* entities exceeds this value then 'Show more..' action is added to the popup list. The action
|
||||
* will show new dialog window with all possible filter entities for selecting a desired one.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterPopupListSize")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(10)
|
||||
int getGenericFilterPopupListSize();
|
||||
|
||||
/**
|
||||
* Returns a template for filter controls layout. Each component has the following format:
|
||||
* [<i>component_name</i> | <i>options-comma-separated</i>], e.g. [pin | no-caption, no-icon].
|
||||
* <p>Available component names:</p>
|
||||
* <ul>
|
||||
* <li>{@code filters_popup} - popup button for selecting a filter entity combined with Search button.
|
||||
* When using this component there is no need to add a separate Search button</li>
|
||||
* <li>{@code filters_lookup} - lookup field for selecting a filter entity. Search button should be added as
|
||||
* a separate component</li>
|
||||
* <li>{@code search} - search button. Do not add if use {@code filters_popup}</li>
|
||||
* <li>{@code add_condition} - button for adding a new condition</li>
|
||||
* <li>{@code spacer} - space between component groups </li>
|
||||
* <li>{@code settings} - settings button. Specify actions names that should be displayed in Settings popup
|
||||
* as component options </li>
|
||||
* <li>{@code max_results} - group of components for setting max number of records to be displayed</li>
|
||||
* <li>{@code fts_switch} - checkbox for switching to FTS mode</li>
|
||||
* </ul>
|
||||
* The following components can be used as options for {@code settings} component. They also can be used as
|
||||
* independent components if for example you want to display a Pin button:
|
||||
* <ul>
|
||||
* <li>{@code save}</li>
|
||||
* <li>{@code save_as}</li>
|
||||
* <li>{@code edit}</li>
|
||||
* <li>{@code remove}</li>
|
||||
* <li>{@code pin}</li>
|
||||
* <li>{@code make_default}</li>
|
||||
* <li>{@code save_search_folder}</li>
|
||||
* <li>{@code save_app_folder}</li>
|
||||
* </ul>
|
||||
* Action components can have the following options:
|
||||
* <ul>
|
||||
* <li>{@code no-icon} - if an icon shouldn't be displayed on action button. For example: [save | no-icon]</li>
|
||||
* <li>{@code no-caption} - if a caption shouldn't be displayed on action button. For example: [pin | no-caption]</li>
|
||||
* </ul>
|
||||
* @return a template for filter controls layout
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterControlsLayout")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@Default("[filters_popup] [add_condition] [spacer] [settings | save, save_as, edit, remove, make_default, pin, save_search_folder, save_app_folder] [max_results] [fts_switch]")
|
||||
String getGenericFilterControlsLayout();
|
||||
|
||||
/**
|
||||
* Returns a comma-separated list of values that are used as options for "Show rows" lookup field
|
||||
* of generic filter component. Add NULL option to the list if the lookup field should contain an empty value.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterMaxResultsOptions")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@Default("NULL, 20, 50, 100, 500, 1000, 5000")
|
||||
String getGenericFilterMaxResultsOptions();
|
||||
|
||||
/**
|
||||
* Support e-mail. Exception report emails are sent to this address.
|
||||
*/
|
||||
@Property("cuba.supportEmail")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
String getSupportEmail();
|
||||
|
||||
/**
|
||||
* @return System ID. Use for identification (support emails).
|
||||
*/
|
||||
@Property("cuba.systemId")
|
||||
@DefaultString("CUBA")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
String getSystemID();
|
||||
|
||||
@Property("cuba.gui.tableShortcut.insert")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-BACKSLASH")
|
||||
String getTableInsertShortcut();
|
||||
|
||||
@Property("cuba.gui.tableShortcut.add")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT-BACKSLASH")
|
||||
String getTableAddShortcut();
|
||||
|
||||
@Property("cuba.gui.tableShortcut.remove")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-DELETE")
|
||||
String getTableRemoveShortcut();
|
||||
|
||||
@Property("cuba.gui.tableShortcut.edit")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("ENTER")
|
||||
String getTableEditShortcut();
|
||||
|
||||
@Property("cuba.gui.commitShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ENTER")
|
||||
String getCommitShortcut();
|
||||
|
||||
@Property("cuba.gui.closeShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("ESCAPE")
|
||||
String getCloseShortcut();
|
||||
|
||||
@Property("cuba.gui.filterApplyShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("SHIFT-ENTER")
|
||||
String getFilterApplyShortcut();
|
||||
|
||||
@Property("cuba.gui.filterSelectShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("SHIFT-BACKSPACE")
|
||||
String getFilterSelectShortcut();
|
||||
|
||||
@Property("cuba.gui.nextTabShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-SHIFT-PAGE_DOWN")
|
||||
String getNextTabShortcut();
|
||||
|
||||
@Property("cuba.gui.previousTabShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-SHIFT-PAGE_UP")
|
||||
String getPreviousTabShortcut();
|
||||
|
||||
@Property("cuba.gui.pickerShortcut.modifiers")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT")
|
||||
String getPickerShortcutModifiers();
|
||||
|
||||
@Property("cuba.gui.pickerShortcut.lookup")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT-L")
|
||||
String getPickerLookupShortcut();
|
||||
|
||||
@Property("cuba.gui.pickerShortcut.open")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT-O")
|
||||
String getPickerOpenShortcut();
|
||||
|
||||
@Property("cuba.gui.pickerShortcut.clear")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT-C")
|
||||
String getPickerClearShortcut();
|
||||
|
||||
@Property("cuba.gui.useSaveConfirmation")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getUseSaveConfirmation();
|
||||
|
||||
@Property("cuba.gui.loadObsoleteSettingsForTable")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getLoadObsoleteSettingsForTable();
|
||||
|
||||
@Property("cuba.gui.layoutAnalyzerEnabled")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getLayoutAnalyzerEnabled();
|
||||
|
||||
@Property("cuba.gui.systemInfoScriptsEnabled")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getSystemInfoScriptsEnabled();
|
||||
void setSystemInfoScriptsEnabled(boolean enabled);
|
||||
|
||||
@Property("cuba.gui.manualScreenSettingsSaving")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getManualScreenSettingsSaving();
|
||||
|
||||
@Property("cuba.gui.showIconsForPopupMenuActions")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getShowIconsForPopupMenuActions();
|
||||
|
||||
@Property("cuba.gui.lookupFieldPageLength")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(10)
|
||||
int getLookupFieldPageLength();
|
||||
void setLookupFieldPageLength(int pageLength);
|
||||
|
||||
/**
|
||||
* Interval for checking timeout of a BackgroundTask.
|
||||
*
|
||||
* @return Timeout in ms
|
||||
*/
|
||||
@Property("cuba.backgroundWorker.timeoutCheckInterval")
|
||||
@DefaultInteger(5000)
|
||||
Integer getBackgroundTaskTimeoutCheckInterval();
|
||||
|
||||
/**
|
||||
* @return true if Table will ignore unfetched attribute read errors
|
||||
*/
|
||||
@Property("cuba.gui.ignoreUnfetchedAttributesInTable")
|
||||
@DefaultBoolean(false)
|
||||
boolean getIgnoreUnfetchedAttributesInTable();
|
||||
|
||||
@Property("cuba.gui.dynamicAttributesTableColumnMaxTextLength")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(50)
|
||||
int getDynamicAttributesTableColumnMaxTextLength();
|
||||
void setDynamicAttributesTableColumnMaxTextLength(int maxTextLength);
|
||||
|
||||
/**
|
||||
* Defines default behaviour of {@code CreateAction}: whether it will add a new item to the beginning or to the
|
||||
* end of datasource's collection. Affects only standalone datasources, for nested datasources new items are always
|
||||
* added to the end.
|
||||
*/
|
||||
@Property("cuba.gui.createActionAddsFirst")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getCreateActionAddsFirst();
|
||||
|
||||
@Property("cuba.gui.suggestionField.asyncSearchDelayMs")
|
||||
@DefaultInt(300)
|
||||
int getSuggestionFieldAsyncSearchDelayMs();
|
||||
|
||||
/**
|
||||
* Standard Window validation error notification type.
|
||||
*
|
||||
* @return one of com.haulmont.cuba.gui.components.Frame.NotificationType values
|
||||
*/
|
||||
@Property("cuba.gui.validationNotificationType")
|
||||
@Default("TRAY")
|
||||
String getValidationNotificationType();
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client;
|
||||
|
||||
import com.haulmont.cuba.core.config.Config;
|
||||
import com.haulmont.cuba.core.config.Property;
|
||||
import com.haulmont.cuba.core.config.Source;
|
||||
import com.haulmont.cuba.core.config.SourceType;
|
||||
import com.haulmont.cuba.core.config.defaults.*;
|
||||
import com.haulmont.cuba.core.config.type.CommaSeparatedStringListTypeFactory;
|
||||
import com.haulmont.cuba.core.config.type.Factory;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Configuration parameters interface used by the WEB and DESKTOP layers.
|
||||
*/
|
||||
@Source(type = SourceType.APP)
|
||||
public interface ClientConfig extends Config {
|
||||
|
||||
/**
|
||||
* @return middleware connection URL list
|
||||
*/
|
||||
@Property("cuba.connectionUrlList")
|
||||
@Factory(factory = CommaSeparatedStringListTypeFactory.class)
|
||||
List<String> getConnectionUrlList();
|
||||
|
||||
/**
|
||||
* @return Context of the middleware file download controller.
|
||||
*/
|
||||
@Property("cuba.fileDownloadContext")
|
||||
@DefaultString("/download")
|
||||
String getFileDownloadContext();
|
||||
|
||||
/**
|
||||
* @return Context of the middleware file upload controller.
|
||||
*/
|
||||
@Property("cuba.fileUploadContext")
|
||||
@DefaultString("/upload")
|
||||
String getFileUploadContext();
|
||||
|
||||
/**
|
||||
* @return Maximum size of uploaded file in megabytes.
|
||||
*/
|
||||
@Property("cuba.maxUploadSizeMb")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(20)
|
||||
int getMaxUploadSizeMb();
|
||||
void setMaxUploadSizeMb(int value);
|
||||
|
||||
@Factory(factory = UniqueConstraintViolationPatternFactory.class)
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@Property("cuba.uniqueConstraintViolationPattern")
|
||||
Pattern getUniqueConstraintViolationPattern();
|
||||
|
||||
/**
|
||||
* @return Whether to enable sorting of datasource data on DB (using separate SELECT with ORDER BY clause).
|
||||
*/
|
||||
@Property("cuba.collectionDatasourceDbSortEnabled")
|
||||
@DefaultBoolean(true)
|
||||
boolean getCollectionDatasourceDbSortEnabled();
|
||||
|
||||
/**
|
||||
* @return If true, client will try to find missing localized messages on the server.
|
||||
*/
|
||||
@Property("cuba.remoteMessagesSearchEnabled")
|
||||
@DefaultBoolean(false)
|
||||
boolean getRemoteMessagesSearchEnabled();
|
||||
|
||||
/**
|
||||
* List of screen aliases for which saving screen history is enabled.
|
||||
* <p>Obsolete. Recommended way to specify this information is entity annotations
|
||||
* in {@code *-metadata.xml}</p>
|
||||
* @return comma-separated list of screen aliases
|
||||
*/
|
||||
@Property("cuba.screenIdsToSaveHistory")
|
||||
String getScreenIdsToSaveHistory();
|
||||
|
||||
/**
|
||||
* @return Whether to enable password policy. If true, all new passwords will be checked for the compliance with
|
||||
* {@code cuba.passwordPolicyRegExp}
|
||||
*/
|
||||
@Property("cuba.passwordPolicyEnabled")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getPasswordPolicyEnabled();
|
||||
|
||||
/**
|
||||
* @return The regular expression which is used by password policy (see also {@code cuba.passwordPolicyEnabled}).
|
||||
*/
|
||||
@Property("cuba.passwordPolicyRegExp")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("((?=.*\\d)(?=.*\\p{javaLowerCase})(?=.*\\p{javaUpperCase}).{6,20})")
|
||||
String getPasswordPolicyRegExp();
|
||||
|
||||
/**
|
||||
* @return If true, all generic filters will require explicit Apply after screen opening. Empty connected table
|
||||
* is shown.<br>
|
||||
* If false, the filter will be applied automatically, refreshing the table immediately after the screen opening.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterManualApplyRequired")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getGenericFilterManualApplyRequired();
|
||||
|
||||
/**
|
||||
* @return If true, then check filter conditions (empty or not) before applying filter. If all conditions are empty
|
||||
* (no parameters entered), the filter doesn't apply and special message to user is shown.<br>
|
||||
* If false, no checks are performed and the filter applyes, refreshing connected table.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterChecking")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getGenericFilterChecking();
|
||||
|
||||
/**
|
||||
* @return If true, all generic text filters will trim value.<br>
|
||||
* If false, the text filter will not be trim value.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterTrimParamValues")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getGenericFilterTrimParamValues();
|
||||
|
||||
/**
|
||||
* @return Number of columns with conditions in generic filter UI component.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterColumnsCount")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(3)
|
||||
int getGenericFilterColumnsCount();
|
||||
|
||||
/**
|
||||
* @return location of panel with conditions in generic filter component.
|
||||
* If {@code top} then conditions will be placed above filter control elements
|
||||
* or below them if {@code bottom}.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterConditionsLocation")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@Default("top")
|
||||
String getGenericFilterConditionsLocation();
|
||||
|
||||
/**
|
||||
* Returns a number of items to be displayed in popup list near the 'Search' button. If number of filter
|
||||
* entities exceeds this value then 'Show more..' action is added to the popup list. The action
|
||||
* will show new dialog window with all possible filter entities for selecting a desired one.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterPopupListSize")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(10)
|
||||
int getGenericFilterPopupListSize();
|
||||
|
||||
/**
|
||||
* Returns a template for filter controls layout. Each component has the following format:
|
||||
* [<i>component_name</i> | <i>options-comma-separated</i>], e.g. [pin | no-caption, no-icon].
|
||||
* <p>Available component names:</p>
|
||||
* <ul>
|
||||
* <li>{@code filters_popup} - popup button for selecting a filter entity combined with Search button.
|
||||
* When using this component there is no need to add a separate Search button</li>
|
||||
* <li>{@code filters_lookup} - lookup field for selecting a filter entity. Search button should be added as
|
||||
* a separate component</li>
|
||||
* <li>{@code search} - search button. Do not add if use {@code filters_popup}</li>
|
||||
* <li>{@code add_condition} - button for adding a new condition</li>
|
||||
* <li>{@code spacer} - space between component groups </li>
|
||||
* <li>{@code settings} - settings button. Specify actions names that should be displayed in Settings popup
|
||||
* as component options </li>
|
||||
* <li>{@code max_results} - group of components for setting max number of records to be displayed</li>
|
||||
* <li>{@code fts_switch} - checkbox for switching to FTS mode</li>
|
||||
* </ul>
|
||||
* The following components can be used as options for {@code settings} component. They also can be used as
|
||||
* independent components if for example you want to display a Pin button:
|
||||
* <ul>
|
||||
* <li>{@code save}</li>
|
||||
* <li>{@code save_as}</li>
|
||||
* <li>{@code edit}</li>
|
||||
* <li>{@code remove}</li>
|
||||
* <li>{@code pin}</li>
|
||||
* <li>{@code make_default}</li>
|
||||
* <li>{@code save_search_folder}</li>
|
||||
* <li>{@code save_app_folder}</li>
|
||||
* </ul>
|
||||
* Action components can have the following options:
|
||||
* <ul>
|
||||
* <li>{@code no-icon} - if an icon shouldn't be displayed on action button. For example: [save | no-icon]</li>
|
||||
* <li>{@code no-caption} - if a caption shouldn't be displayed on action button. For example: [pin | no-caption]</li>
|
||||
* </ul>
|
||||
* @return a template for filter controls layout
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterControlsLayout")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@Default("[filters_popup] [add_condition] [spacer] [settings | save, save_as, edit, remove, make_default, pin, save_search_folder, save_app_folder] [max_results] [fts_switch]")
|
||||
String getGenericFilterControlsLayout();
|
||||
|
||||
/**
|
||||
* Returns a comma-separated list of values that are used as options for "Show rows" lookup field
|
||||
* of generic filter component. Add NULL option to the list if the lookup field should contain an empty value.
|
||||
*/
|
||||
@Property("cuba.gui.genericFilterMaxResultsOptions")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@Default("NULL, 20, 50, 100, 500, 1000, 5000")
|
||||
String getGenericFilterMaxResultsOptions();
|
||||
|
||||
/**
|
||||
* Support e-mail. Exception report emails are sent to this address.
|
||||
*/
|
||||
@Property("cuba.supportEmail")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
String getSupportEmail();
|
||||
|
||||
/**
|
||||
* @return System ID. Use for identification (support emails).
|
||||
*/
|
||||
@Property("cuba.systemId")
|
||||
@DefaultString("CUBA")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
String getSystemID();
|
||||
|
||||
@Property("cuba.gui.tableShortcut.insert")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-BACKSLASH")
|
||||
String getTableInsertShortcut();
|
||||
|
||||
@Property("cuba.gui.tableShortcut.add")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT-BACKSLASH")
|
||||
String getTableAddShortcut();
|
||||
|
||||
@Property("cuba.gui.tableShortcut.remove")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-DELETE")
|
||||
String getTableRemoveShortcut();
|
||||
|
||||
@Property("cuba.gui.tableShortcut.edit")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("ENTER")
|
||||
String getTableEditShortcut();
|
||||
|
||||
@Property("cuba.gui.commitShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ENTER")
|
||||
String getCommitShortcut();
|
||||
|
||||
@Property("cuba.gui.closeShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("ESCAPE")
|
||||
String getCloseShortcut();
|
||||
|
||||
@Property("cuba.gui.filterApplyShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("SHIFT-ENTER")
|
||||
String getFilterApplyShortcut();
|
||||
|
||||
@Property("cuba.gui.filterSelectShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("SHIFT-BACKSPACE")
|
||||
String getFilterSelectShortcut();
|
||||
|
||||
@Property("cuba.gui.nextTabShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-SHIFT-PAGE_DOWN")
|
||||
String getNextTabShortcut();
|
||||
|
||||
@Property("cuba.gui.previousTabShortcut")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-SHIFT-PAGE_UP")
|
||||
String getPreviousTabShortcut();
|
||||
|
||||
@Property("cuba.gui.pickerShortcut.modifiers")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT")
|
||||
String getPickerShortcutModifiers();
|
||||
|
||||
@Property("cuba.gui.pickerShortcut.lookup")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT-L")
|
||||
String getPickerLookupShortcut();
|
||||
|
||||
@Property("cuba.gui.pickerShortcut.open")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT-O")
|
||||
String getPickerOpenShortcut();
|
||||
|
||||
@Property("cuba.gui.pickerShortcut.clear")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultString("CTRL-ALT-C")
|
||||
String getPickerClearShortcut();
|
||||
|
||||
@Property("cuba.gui.useSaveConfirmation")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getUseSaveConfirmation();
|
||||
|
||||
@Property("cuba.gui.loadObsoleteSettingsForTable")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getLoadObsoleteSettingsForTable();
|
||||
|
||||
@Property("cuba.gui.layoutAnalyzerEnabled")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getLayoutAnalyzerEnabled();
|
||||
|
||||
@Property("cuba.gui.systemInfoScriptsEnabled")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getSystemInfoScriptsEnabled();
|
||||
void setSystemInfoScriptsEnabled(boolean enabled);
|
||||
|
||||
@Property("cuba.gui.manualScreenSettingsSaving")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getManualScreenSettingsSaving();
|
||||
|
||||
@Property("cuba.gui.showIconsForPopupMenuActions")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(false)
|
||||
boolean getShowIconsForPopupMenuActions();
|
||||
|
||||
@Property("cuba.gui.lookupFieldPageLength")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(10)
|
||||
int getLookupFieldPageLength();
|
||||
void setLookupFieldPageLength(int pageLength);
|
||||
|
||||
/**
|
||||
* Interval for checking timeout of a BackgroundTask.
|
||||
*
|
||||
* @return Timeout in ms
|
||||
*/
|
||||
@Property("cuba.backgroundWorker.timeoutCheckInterval")
|
||||
@DefaultInteger(5000)
|
||||
Integer getBackgroundTaskTimeoutCheckInterval();
|
||||
|
||||
/**
|
||||
* @return true if Table will ignore unfetched attribute read errors
|
||||
*/
|
||||
@Property("cuba.gui.ignoreUnfetchedAttributesInTable")
|
||||
@DefaultBoolean(false)
|
||||
boolean getIgnoreUnfetchedAttributesInTable();
|
||||
|
||||
@Property("cuba.gui.dynamicAttributesTableColumnMaxTextLength")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultInt(50)
|
||||
int getDynamicAttributesTableColumnMaxTextLength();
|
||||
void setDynamicAttributesTableColumnMaxTextLength(int maxTextLength);
|
||||
|
||||
/**
|
||||
* Defines default behaviour of {@code CreateAction}: whether it will add a new item to the beginning or to the
|
||||
* end of datasource's collection. Affects only standalone datasources, for nested datasources new items are always
|
||||
* added to the end.
|
||||
*/
|
||||
@Property("cuba.gui.createActionAddsFirst")
|
||||
@Source(type = SourceType.DATABASE)
|
||||
@DefaultBoolean(true)
|
||||
boolean getCreateActionAddsFirst();
|
||||
|
||||
@Property("cuba.gui.suggestionField.asyncSearchDelayMs")
|
||||
@DefaultInt(300)
|
||||
int getSuggestionFieldAsyncSearchDelayMs();
|
||||
|
||||
/**
|
||||
* Standard Window validation error notification type.
|
||||
*
|
||||
* @return one of com.haulmont.cuba.gui.components.Frame.NotificationType values
|
||||
*/
|
||||
@Property("cuba.gui.validationNotificationType")
|
||||
@Default("TRAY")
|
||||
String getValidationNotificationType();
|
||||
}
|
@ -1,52 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.sys.cache;
|
||||
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
|
||||
/**
|
||||
* Describes cache storage and invalidation policy
|
||||
*/
|
||||
public interface CachingStrategy {
|
||||
/**
|
||||
* Method for strategy initialization
|
||||
* Invoked at first login, so security context is available
|
||||
*/
|
||||
default void init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return cached object
|
||||
*/
|
||||
Object getObject();
|
||||
|
||||
/**
|
||||
* Refresh cached object
|
||||
*/
|
||||
Object loadObject();
|
||||
|
||||
/**
|
||||
* Return lock used to provide caching thread safety
|
||||
*/
|
||||
ReadWriteLock lock();
|
||||
|
||||
/**
|
||||
* Indicate whether cached object should be refreshed or not
|
||||
*/
|
||||
boolean needToReload();
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.sys.cache;
|
||||
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
|
||||
/**
|
||||
* Describes cache storage and invalidation policy
|
||||
*/
|
||||
public interface CachingStrategy {
|
||||
/**
|
||||
* Method for strategy initialization
|
||||
* Invoked at first login, so security context is available
|
||||
*/
|
||||
default void init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return cached object
|
||||
*/
|
||||
Object getObject();
|
||||
|
||||
/**
|
||||
* Refresh cached object
|
||||
*/
|
||||
Object loadObject();
|
||||
|
||||
/**
|
||||
* Return lock used to provide caching thread safety
|
||||
*/
|
||||
ReadWriteLock lock();
|
||||
|
||||
/**
|
||||
* Indicate whether cached object should be refreshed or not
|
||||
*/
|
||||
boolean needToReload();
|
||||
}
|
@ -1,166 +1,166 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.sys.cache;
|
||||
|
||||
import com.haulmont.cuba.core.global.AppBeans;
|
||||
import com.haulmont.cuba.core.sys.AppContext;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
/**
|
||||
* Provides ability to cache any abstract object in client application
|
||||
*/
|
||||
@Component(ClientCacheManager.NAME)
|
||||
public class ClientCacheManager implements AppContext.Listener, Ordered {
|
||||
|
||||
public static final String NAME = "cuba_ClientCacheManager";
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ClientCacheManager.class);
|
||||
|
||||
protected final Object initializationLock = new Object();
|
||||
protected volatile boolean initialized = false;
|
||||
|
||||
protected ConcurrentHashMap<String, CachingStrategy> cache = new ConcurrentHashMap<>();
|
||||
protected ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1, new ThreadFactory() {
|
||||
final ThreadFactory defaultFactory = Executors.defaultThreadFactory();
|
||||
|
||||
@Override
|
||||
public Thread newThread(@Nonnull Runnable r) {
|
||||
Thread thread = defaultFactory.newThread(r);
|
||||
thread.setName("ClientCacheManager-" + thread.getName());
|
||||
thread.setUncaughtExceptionHandler((t, e) ->
|
||||
log.error("Unhandled exception", t)
|
||||
);
|
||||
return thread;
|
||||
}
|
||||
});
|
||||
|
||||
public ClientCacheManager() {
|
||||
AppContext.addListener(this);
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
if (!initialized) {
|
||||
synchronized (initializationLock) {
|
||||
Map<String, CachingStrategy> cachingStrategyMap = AppBeans.getAll(CachingStrategy.class);
|
||||
for (Map.Entry<String, CachingStrategy> entry : cachingStrategyMap.entrySet()) {
|
||||
addCachedObject(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cached object by its name
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getCached(String name) {
|
||||
CachingStrategy cachingStrategy = cache.get(name);
|
||||
if (cachingStrategy != null) {
|
||||
Lock readLock = cachingStrategy.lock().readLock();
|
||||
Lock writeLock = cachingStrategy.lock().writeLock();
|
||||
try {
|
||||
readLock.lock();
|
||||
if (!cachingStrategy.needToReload()) {
|
||||
return (T) cachingStrategy.getObject();
|
||||
} else {
|
||||
try {
|
||||
readLock.unlock();
|
||||
writeLock.lock();
|
||||
if (cachingStrategy.needToReload()) {//re-check condition
|
||||
return (T) cachingStrategy.loadObject();
|
||||
} else {
|
||||
return (T) cachingStrategy.getObject();
|
||||
}
|
||||
} finally {
|
||||
readLock.lock();//downgrade lock to read-only
|
||||
writeLock.unlock();
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
readLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void refreshCached(String name) {
|
||||
CachingStrategy cachingStrategy = cache.get(name);
|
||||
if (cachingStrategy != null) {
|
||||
Lock writeLock = cachingStrategy.lock().writeLock();
|
||||
try {
|
||||
writeLock.lock();
|
||||
cachingStrategy.loadObject();
|
||||
} finally {
|
||||
writeLock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new cached object (described in cachingStrategy)
|
||||
*/
|
||||
public void addCachedObject(String key, CachingStrategy cachingStrategy) {
|
||||
Lock writeLock = cachingStrategy.lock().writeLock();
|
||||
try {
|
||||
writeLock.lock();
|
||||
cachingStrategy.init();
|
||||
} finally {
|
||||
writeLock.unlock();
|
||||
}
|
||||
|
||||
cache.put(key, cachingStrategy);
|
||||
}
|
||||
|
||||
public ScheduledExecutorService getExecutorService() {
|
||||
return executorService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applicationStarted() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applicationStopped() {
|
||||
try {
|
||||
executorService.shutdownNow();
|
||||
} catch (Exception e) {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return LOWEST_PLATFORM_PRECEDENCE - 120;
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.sys.cache;
|
||||
|
||||
import com.haulmont.cuba.core.global.AppBeans;
|
||||
import com.haulmont.cuba.core.sys.AppContext;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
|
||||
/**
|
||||
* Provides ability to cache any abstract object in client application
|
||||
*/
|
||||
@Component(ClientCacheManager.NAME)
|
||||
public class ClientCacheManager implements AppContext.Listener, Ordered {
|
||||
|
||||
public static final String NAME = "cuba_ClientCacheManager";
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ClientCacheManager.class);
|
||||
|
||||
protected final Object initializationLock = new Object();
|
||||
protected volatile boolean initialized = false;
|
||||
|
||||
protected ConcurrentHashMap<String, CachingStrategy> cache = new ConcurrentHashMap<>();
|
||||
protected ScheduledExecutorService executorService = Executors.newScheduledThreadPool(1, new ThreadFactory() {
|
||||
final ThreadFactory defaultFactory = Executors.defaultThreadFactory();
|
||||
|
||||
@Override
|
||||
public Thread newThread(@Nonnull Runnable r) {
|
||||
Thread thread = defaultFactory.newThread(r);
|
||||
thread.setName("ClientCacheManager-" + thread.getName());
|
||||
thread.setUncaughtExceptionHandler((t, e) ->
|
||||
log.error("Unhandled exception", t)
|
||||
);
|
||||
return thread;
|
||||
}
|
||||
});
|
||||
|
||||
public ClientCacheManager() {
|
||||
AppContext.addListener(this);
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
if (!initialized) {
|
||||
synchronized (initializationLock) {
|
||||
Map<String, CachingStrategy> cachingStrategyMap = AppBeans.getAll(CachingStrategy.class);
|
||||
for (Map.Entry<String, CachingStrategy> entry : cachingStrategyMap.entrySet()) {
|
||||
addCachedObject(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
initialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get cached object by its name
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T getCached(String name) {
|
||||
CachingStrategy cachingStrategy = cache.get(name);
|
||||
if (cachingStrategy != null) {
|
||||
Lock readLock = cachingStrategy.lock().readLock();
|
||||
Lock writeLock = cachingStrategy.lock().writeLock();
|
||||
try {
|
||||
readLock.lock();
|
||||
if (!cachingStrategy.needToReload()) {
|
||||
return (T) cachingStrategy.getObject();
|
||||
} else {
|
||||
try {
|
||||
readLock.unlock();
|
||||
writeLock.lock();
|
||||
if (cachingStrategy.needToReload()) {//re-check condition
|
||||
return (T) cachingStrategy.loadObject();
|
||||
} else {
|
||||
return (T) cachingStrategy.getObject();
|
||||
}
|
||||
} finally {
|
||||
readLock.lock();//downgrade lock to read-only
|
||||
writeLock.unlock();
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
readLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void refreshCached(String name) {
|
||||
CachingStrategy cachingStrategy = cache.get(name);
|
||||
if (cachingStrategy != null) {
|
||||
Lock writeLock = cachingStrategy.lock().writeLock();
|
||||
try {
|
||||
writeLock.lock();
|
||||
cachingStrategy.loadObject();
|
||||
} finally {
|
||||
writeLock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add new cached object (described in cachingStrategy)
|
||||
*/
|
||||
public void addCachedObject(String key, CachingStrategy cachingStrategy) {
|
||||
Lock writeLock = cachingStrategy.lock().writeLock();
|
||||
try {
|
||||
writeLock.lock();
|
||||
cachingStrategy.init();
|
||||
} finally {
|
||||
writeLock.unlock();
|
||||
}
|
||||
|
||||
cache.put(key, cachingStrategy);
|
||||
}
|
||||
|
||||
public ScheduledExecutorService getExecutorService() {
|
||||
return executorService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applicationStarted() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applicationStopped() {
|
||||
try {
|
||||
executorService.shutdownNow();
|
||||
} catch (Exception e) {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return LOWEST_PLATFORM_PRECEDENCE - 120;
|
||||
}
|
||||
}
|
@ -1,108 +1,108 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.sys.cache;
|
||||
|
||||
import com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributesCache;
|
||||
import com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributesCacheService;
|
||||
import com.haulmont.cuba.core.global.AppBeans;
|
||||
import com.haulmont.cuba.core.sys.AppContext;
|
||||
import com.haulmont.cuba.core.sys.SecurityContext;
|
||||
import com.haulmont.cuba.security.global.NoUserSessionException;
|
||||
import com.haulmont.cuba.security.global.UserSession;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
/**
|
||||
* Each time dynamic attributes cache is used, the strategy initiate check of cache validity
|
||||
* The check is performed in separate thread
|
||||
* So applied changes in dynamic attributes structure will be visible after 10 seconds
|
||||
*/
|
||||
@Component(DynamicAttributesCacheStrategy.NAME)
|
||||
public class DynamicAttributesCacheStrategy implements CachingStrategy {
|
||||
public static final String NAME = "cuba_DynamicAttributesCacheStrategy";
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(DynamicAttributesCacheStrategy.class);
|
||||
|
||||
@Inject
|
||||
protected ClientCacheManager clientCacheManager;
|
||||
@Inject
|
||||
protected CacheUserSessionProvider cacheUserSessionProvider;
|
||||
|
||||
protected ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
|
||||
protected DynamicAttributesCache dynamicAttributesCache;
|
||||
|
||||
//there is no need for atomicity when change needToValidateCache or lastRequestedSessionId
|
||||
protected volatile boolean needToValidateCache;
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
clientCacheManager.getExecutorService().scheduleWithFixedDelay(() -> {
|
||||
if (needToValidateCache) {
|
||||
UserSession userSession = cacheUserSessionProvider.getUserSession();
|
||||
if (userSession == null) {
|
||||
// cache user session unavailable
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
AppContext.setSecurityContext(new SecurityContext(userSession));
|
||||
|
||||
loadObject();
|
||||
} catch (NoUserSessionException e) {
|
||||
log.warn("Cache user session expired", e);
|
||||
} catch (Exception e) {
|
||||
log.error("Unable to update dynamic attributes cache", e);
|
||||
}
|
||||
}
|
||||
}, 0, 10, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject() {
|
||||
needToValidateCache = true;
|
||||
return dynamicAttributesCache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object loadObject() {
|
||||
DynamicAttributesCache cacheFromServer = AppBeans.get(DynamicAttributesCacheService.NAME, DynamicAttributesCacheService.class)
|
||||
.getCacheIfNewer(dynamicAttributesCache != null ? dynamicAttributesCache.getCreationDate() : null);
|
||||
if (cacheFromServer != null) {
|
||||
dynamicAttributesCache = cacheFromServer;
|
||||
}
|
||||
|
||||
needToValidateCache = false;
|
||||
return dynamicAttributesCache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needToReload() {
|
||||
return dynamicAttributesCache == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadWriteLock lock() {
|
||||
return readWriteLock;
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.sys.cache;
|
||||
|
||||
import com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributesCache;
|
||||
import com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributesCacheService;
|
||||
import com.haulmont.cuba.core.global.AppBeans;
|
||||
import com.haulmont.cuba.core.sys.AppContext;
|
||||
import com.haulmont.cuba.core.sys.SecurityContext;
|
||||
import com.haulmont.cuba.security.global.NoUserSessionException;
|
||||
import com.haulmont.cuba.security.global.UserSession;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.ReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
/**
|
||||
* Each time dynamic attributes cache is used, the strategy initiate check of cache validity
|
||||
* The check is performed in separate thread
|
||||
* So applied changes in dynamic attributes structure will be visible after 10 seconds
|
||||
*/
|
||||
@Component(DynamicAttributesCacheStrategy.NAME)
|
||||
public class DynamicAttributesCacheStrategy implements CachingStrategy {
|
||||
public static final String NAME = "cuba_DynamicAttributesCacheStrategy";
|
||||
|
||||
private final Logger log = LoggerFactory.getLogger(DynamicAttributesCacheStrategy.class);
|
||||
|
||||
@Inject
|
||||
protected ClientCacheManager clientCacheManager;
|
||||
@Inject
|
||||
protected CacheUserSessionProvider cacheUserSessionProvider;
|
||||
|
||||
protected ReadWriteLock readWriteLock = new ReentrantReadWriteLock();
|
||||
protected DynamicAttributesCache dynamicAttributesCache;
|
||||
|
||||
//there is no need for atomicity when change needToValidateCache or lastRequestedSessionId
|
||||
protected volatile boolean needToValidateCache;
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
clientCacheManager.getExecutorService().scheduleWithFixedDelay(() -> {
|
||||
if (needToValidateCache) {
|
||||
UserSession userSession = cacheUserSessionProvider.getUserSession();
|
||||
if (userSession == null) {
|
||||
// cache user session unavailable
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
AppContext.setSecurityContext(new SecurityContext(userSession));
|
||||
|
||||
loadObject();
|
||||
} catch (NoUserSessionException e) {
|
||||
log.warn("Cache user session expired", e);
|
||||
} catch (Exception e) {
|
||||
log.error("Unable to update dynamic attributes cache", e);
|
||||
}
|
||||
}
|
||||
}, 0, 10, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject() {
|
||||
needToValidateCache = true;
|
||||
return dynamicAttributesCache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object loadObject() {
|
||||
DynamicAttributesCache cacheFromServer = AppBeans.get(DynamicAttributesCacheService.NAME, DynamicAttributesCacheService.class)
|
||||
.getCacheIfNewer(dynamicAttributesCache != null ? dynamicAttributesCache.getCreationDate() : null);
|
||||
if (cacheFromServer != null) {
|
||||
dynamicAttributesCache = cacheFromServer;
|
||||
}
|
||||
|
||||
needToValidateCache = false;
|
||||
return dynamicAttributesCache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean needToReload() {
|
||||
return dynamicAttributesCache == null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReadWriteLock lock() {
|
||||
return readWriteLock;
|
||||
}
|
||||
}
|
@ -1,58 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.sys.cache;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.haulmont.chile.core.model.MetaClass;
|
||||
import com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributesCache;
|
||||
import com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributes;
|
||||
import com.haulmont.cuba.core.entity.Category;
|
||||
import com.haulmont.cuba.core.entity.CategoryAttribute;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import java.util.Collection;
|
||||
|
||||
@Component(DynamicAttributes.NAME)
|
||||
public class DynamicAttributesClientImpl implements DynamicAttributes {
|
||||
@Inject
|
||||
protected ClientCacheManager clientCacheManager;
|
||||
|
||||
@Override
|
||||
public Collection<Category> getCategoriesForMetaClass(MetaClass metaClass) {
|
||||
return cache().getCategoriesForMetaClass(metaClass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<CategoryAttribute> getAttributesForMetaClass(MetaClass metaClass) {
|
||||
return cache().getAttributesForMetaClass(metaClass);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CategoryAttribute getAttributeForMetaClass(MetaClass metaClass, String code) {
|
||||
return cache().getAttributeForMetaClass(metaClass, code);
|
||||
}
|
||||
|
||||
protected DynamicAttributesCache cache() {
|
||||
DynamicAttributesCache cache = clientCacheManager.getCached(DynamicAttributesCacheStrategy.NAME);
|
||||
Preconditions.checkState(cache != null, "Dynamic attributes cache is not available");
|
||||
return cache;
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.sys.cache;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.haulmont.chile.core.model.MetaClass;
|
||||
import com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributesCache;
|
||||
import com.haulmont.cuba.core.app.dynamicattributes.DynamicAttributes;
|
||||
import com.haulmont.cuba.core.entity.Category;
|
||||
import com.haulmont.cuba.core.entity.CategoryAttribute;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.inject.Inject;
|
||||
import java.util.Collection;
|
||||
|
||||
@Component(DynamicAttributes.NAME)
|
||||
public class DynamicAttributesClientImpl implements DynamicAttributes {
|
||||
@Inject
|
||||
protected ClientCacheManager clientCacheManager;
|
||||
|
||||
@Override
|
||||
public Collection<Category> getCategoriesForMetaClass(MetaClass metaClass) {
|
||||
return cache().getCategoriesForMetaClass(metaClass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<CategoryAttribute> getAttributesForMetaClass(MetaClass metaClass) {
|
||||
return cache().getAttributesForMetaClass(metaClass);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CategoryAttribute getAttributeForMetaClass(MetaClass metaClass, String code) {
|
||||
return cache().getAttributeForMetaClass(metaClass, code);
|
||||
}
|
||||
|
||||
protected DynamicAttributesCache cache() {
|
||||
DynamicAttributesCache cache = clientCacheManager.getCached(DynamicAttributesCacheStrategy.NAME);
|
||||
Preconditions.checkState(cache != null, "Dynamic attributes cache is not available");
|
||||
return cache;
|
||||
}
|
||||
}
|
@ -1,112 +1,112 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.haulmont.cuba.client.sys.config;
|
||||
|
||||
import com.haulmont.cuba.core.app.ConfigStorageService;
|
||||
import com.haulmont.cuba.core.config.ConfigPersister;
|
||||
import com.haulmont.cuba.core.config.SourceType;
|
||||
import com.haulmont.cuba.core.sys.AppContext;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ConfigPersisterClientImpl implements ConfigPersister {
|
||||
private static final Logger log = LoggerFactory.getLogger(ConfigPersisterClientImpl.class);
|
||||
|
||||
protected Map<String, String> cache = new ConcurrentHashMap<>();
|
||||
|
||||
protected volatile boolean cacheLoaded;
|
||||
protected boolean caching;
|
||||
|
||||
protected ConfigStorageService configStorageService;
|
||||
|
||||
public ConfigPersisterClientImpl(ConfigStorageService configStorageService, boolean caching) {
|
||||
this.caching = caching;
|
||||
this.configStorageService = configStorageService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProperty(SourceType sourceType, String name) {
|
||||
log.trace("Getting property '{}', source={}", name, sourceType.name());
|
||||
String value;
|
||||
switch (sourceType) {
|
||||
case SYSTEM:
|
||||
value = System.getProperty(name);
|
||||
break;
|
||||
case APP:
|
||||
value = AppContext.getProperty(name);
|
||||
break;
|
||||
case DATABASE:
|
||||
value = AppContext.getProperty(name);
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
if (caching) {
|
||||
loadCache();
|
||||
value = cache.get(name);
|
||||
} else {
|
||||
return getConfigStorage().getDbProperty(name);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new UnsupportedOperationException("Unsupported config source type: " + sourceType);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
protected void loadCache() {
|
||||
if (!cacheLoaded) {
|
||||
synchronized (this) {
|
||||
if (!cacheLoaded) {
|
||||
Map<String, String> properties = getConfigStorage().getDbProperties();
|
||||
cache.clear();
|
||||
cache.putAll(properties);
|
||||
cacheLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(SourceType sourceType, String name, String value) {
|
||||
log.debug("Setting property '{}' to '{}', source={}", name, value, sourceType.name());
|
||||
switch (sourceType) {
|
||||
case SYSTEM:
|
||||
System.setProperty(name, value);
|
||||
break;
|
||||
case APP:
|
||||
AppContext.setProperty(name, value);
|
||||
break;
|
||||
case DATABASE:
|
||||
if (value != null) {
|
||||
cache.put(name, value);
|
||||
} else {
|
||||
cache.remove(name);
|
||||
}
|
||||
getConfigStorage().setDbProperty(name, value);
|
||||
break;
|
||||
default:
|
||||
throw new UnsupportedOperationException("Unsupported config source type: " + sourceType);
|
||||
}
|
||||
}
|
||||
|
||||
protected ConfigStorageService getConfigStorage() {
|
||||
return configStorageService;
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package com.haulmont.cuba.client.sys.config;
|
||||
|
||||
import com.haulmont.cuba.core.app.ConfigStorageService;
|
||||
import com.haulmont.cuba.core.config.ConfigPersister;
|
||||
import com.haulmont.cuba.core.config.SourceType;
|
||||
import com.haulmont.cuba.core.sys.AppContext;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class ConfigPersisterClientImpl implements ConfigPersister {
|
||||
private static final Logger log = LoggerFactory.getLogger(ConfigPersisterClientImpl.class);
|
||||
|
||||
protected Map<String, String> cache = new ConcurrentHashMap<>();
|
||||
|
||||
protected volatile boolean cacheLoaded;
|
||||
protected boolean caching;
|
||||
|
||||
protected ConfigStorageService configStorageService;
|
||||
|
||||
public ConfigPersisterClientImpl(ConfigStorageService configStorageService, boolean caching) {
|
||||
this.caching = caching;
|
||||
this.configStorageService = configStorageService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getProperty(SourceType sourceType, String name) {
|
||||
log.trace("Getting property '{}', source={}", name, sourceType.name());
|
||||
String value;
|
||||
switch (sourceType) {
|
||||
case SYSTEM:
|
||||
value = System.getProperty(name);
|
||||
break;
|
||||
case APP:
|
||||
value = AppContext.getProperty(name);
|
||||
break;
|
||||
case DATABASE:
|
||||
value = AppContext.getProperty(name);
|
||||
if (StringUtils.isEmpty(value)) {
|
||||
if (caching) {
|
||||
loadCache();
|
||||
value = cache.get(name);
|
||||
} else {
|
||||
return getConfigStorage().getDbProperty(name);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new UnsupportedOperationException("Unsupported config source type: " + sourceType);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
protected void loadCache() {
|
||||
if (!cacheLoaded) {
|
||||
synchronized (this) {
|
||||
if (!cacheLoaded) {
|
||||
Map<String, String> properties = getConfigStorage().getDbProperties();
|
||||
cache.clear();
|
||||
cache.putAll(properties);
|
||||
cacheLoaded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(SourceType sourceType, String name, String value) {
|
||||
log.debug("Setting property '{}' to '{}', source={}", name, value, sourceType.name());
|
||||
switch (sourceType) {
|
||||
case SYSTEM:
|
||||
System.setProperty(name, value);
|
||||
break;
|
||||
case APP:
|
||||
AppContext.setProperty(name, value);
|
||||
break;
|
||||
case DATABASE:
|
||||
if (value != null) {
|
||||
cache.put(name, value);
|
||||
} else {
|
||||
cache.remove(name);
|
||||
}
|
||||
getConfigStorage().setDbProperty(name, value);
|
||||
break;
|
||||
default:
|
||||
throw new UnsupportedOperationException("Unsupported config source type: " + sourceType);
|
||||
}
|
||||
}
|
||||
|
||||
protected ConfigStorageService getConfigStorage() {
|
||||
return configStorageService;
|
||||
}
|
||||
}
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.testsupport;
|
||||
|
||||
import com.haulmont.cuba.core.global.UuidSource;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class TestUuidSource implements UuidSource {
|
||||
@Override
|
||||
public UUID createUuid() {
|
||||
return UUID.randomUUID();
|
||||
}
|
||||
/*
|
||||
* Copyright (c) 2008-2016 Haulmont.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.haulmont.cuba.client.testsupport;
|
||||
|
||||
import com.haulmont.cuba.core.global.UuidSource;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class TestUuidSource implements UuidSource {
|
||||
@Override
|
||||
public UUID createUuid() {
|
||||
return UUID.randomUUID();
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,43 +1,43 @@
|
||||
insert into SEC_USER (ID, CREATE_TS, VERSION, LOGIN, LOGIN_LC, PASSWORD, NAME, GROUP_ID)
|
||||
values ('40288137-1ef4-11c8-011e-f41247370001', current_timestamp, 0, 'abramov', 'abramov', '402881371ef411c8011ef411c8c50000', 'Dmitry Abramov', '0fa2b1a5-1d68-4d69-9fbd-dff348347f93');
|
||||
|
||||
insert into SEC_USER (ID, CREATE_TS, VERSION, LOGIN, LOGIN_LC, PASSWORD, NAME, GROUP_ID)
|
||||
values ('01e37691-1a9b-11de-b900-da881aea47a6', current_timestamp, 0, 'krivopustov', 'krivopustov', null, 'Konstantin Krivopustov', '0fa2b1a5-1d68-4d69-9fbd-dff348347f93');
|
||||
|
||||
insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, TYPE)
|
||||
values ('40288137-1ef4-11c8-011e-f416e4150005', current_timestamp, 0, 'Users', 10);
|
||||
|
||||
insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID)
|
||||
values ('40288137-1ef4-11c8-011e-f41aaa740006', current_timestamp, 0, '40288137-1ef4-11c8-011e-f41247370001', '40288137-1ef4-11c8-011e-f416e4150005');
|
||||
|
||||
insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID)
|
||||
values ('40288137-1ef4-11c8-011e-f41aaa740007', current_timestamp, 0, '40288137-1ef4-11c8-011e-f41247370001', '0c018061-b26f-4de2-a5be-dff348347f93');
|
||||
|
||||
|
||||
-- AppFolders
|
||||
|
||||
insert into SYS_FOLDER (ID, CREATE_TS, VERSION, TYPE, PARENT_ID, NAME)
|
||||
values ('2ce5dc9a-e628-11de-849e-4f2ee1f9724a', current_timestamp, 0, 'A', null, 'Haulmont employees');
|
||||
|
||||
insert into SYS_APP_FOLDER (FOLDER_ID, FILTER_COMPONENT, FILTER_XML, VISIBILITY_SCRIPT, QUANTITY_SCRIPT)
|
||||
values ('2ce5dc9a-e628-11de-849e-4f2ee1f9724a', '[sec$User.browse].genericFilter', '<?xml version="1.0" encoding="UTF-8"?><filter><and><c name="email" class="java.lang.String" caption="msg://com.haulmont.cuba.security.entity/User.email" type="PROPERTY">u.email like :component$genericFilter.email90138<param name="component$genericFilter.email90138">@haulmont.com</param></c><c name="group" class="com.haulmont.cuba.security.entity.Group" caption="msg://com.haulmont.cuba.security.entity/User.group" type="PROPERTY">u.group.id = :component$genericFilter.group46166<param name="component$genericFilter.group46166">0fa2b1a5-1d68-4d69-9fbd-dff348347f93</param></c></and></filter>', 'cuba/test/appfolders/IAmAdmin.groovy', 'cuba/test/appfolders/AppFolder1Qty.groovy');
|
||||
|
||||
--insert into SYS_FOLDER (ID, CREATE_TS, VERSION, TYPE, PARENT_ID, NAME)
|
||||
--values ('5a5ac474-e628-11de-b314-ab16b614416f', current_timestamp, 0, 'A', null, 'App Folder 2');
|
||||
--
|
||||
--insert into SYS_APP_FOLDER (FOLDER_ID, FILTER_COMPONENT, FILTER_XML, VISIBILITY_SCRIPT, QUANTITY_SCRIPT)
|
||||
--values ('5a5ac474-e628-11de-b314-ab16b614416f', null, null, null, null);
|
||||
--
|
||||
--insert into SYS_FOLDER (ID, CREATE_TS, VERSION, TYPE, PARENT_ID, NAME)
|
||||
--values ('6e8c5a0c-e628-11de-8e1e-37fa218351d5', current_timestamp, 0, 'A', '2ce5dc9a-e628-11de-849e-4f2ee1f9724a', 'App Folder 3');
|
||||
--
|
||||
--insert into SYS_APP_FOLDER (FOLDER_ID, FILTER_COMPONENT, FILTER_XML, VISIBILITY_SCRIPT, QUANTITY_SCRIPT)
|
||||
--values ('6e8c5a0c-e628-11de-8e1e-37fa218351d5', null, null, null, null);
|
||||
|
||||
-- SearchFolders
|
||||
|
||||
insert into SYS_FOLDER (ID, CREATE_TS, VERSION, TYPE, PARENT_ID, NAME)
|
||||
values ('6904a2ac-e62c-11de-8571-c79ad48b2687', current_timestamp, 0, 'S', null, 'Search Folder 1');
|
||||
|
||||
insert into SEC_SEARCH_FOLDER (FOLDER_ID, FILTER_COMPONENT, FILTER_XML, USER_ID)
|
||||
values ('6904a2ac-e62c-11de-8571-c79ad48b2687', null, null, '60885987-1b61-4247-94c7-dff348347f93');
|
||||
insert into SEC_USER (ID, CREATE_TS, VERSION, LOGIN, LOGIN_LC, PASSWORD, NAME, GROUP_ID)
|
||||
values ('40288137-1ef4-11c8-011e-f41247370001', current_timestamp, 0, 'abramov', 'abramov', '402881371ef411c8011ef411c8c50000', 'Dmitry Abramov', '0fa2b1a5-1d68-4d69-9fbd-dff348347f93');
|
||||
|
||||
insert into SEC_USER (ID, CREATE_TS, VERSION, LOGIN, LOGIN_LC, PASSWORD, NAME, GROUP_ID)
|
||||
values ('01e37691-1a9b-11de-b900-da881aea47a6', current_timestamp, 0, 'krivopustov', 'krivopustov', null, 'Konstantin Krivopustov', '0fa2b1a5-1d68-4d69-9fbd-dff348347f93');
|
||||
|
||||
insert into SEC_ROLE (ID, CREATE_TS, VERSION, NAME, TYPE)
|
||||
values ('40288137-1ef4-11c8-011e-f416e4150005', current_timestamp, 0, 'Users', 10);
|
||||
|
||||
insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID)
|
||||
values ('40288137-1ef4-11c8-011e-f41aaa740006', current_timestamp, 0, '40288137-1ef4-11c8-011e-f41247370001', '40288137-1ef4-11c8-011e-f416e4150005');
|
||||
|
||||
insert into SEC_USER_ROLE (ID, CREATE_TS, VERSION, USER_ID, ROLE_ID)
|
||||
values ('40288137-1ef4-11c8-011e-f41aaa740007', current_timestamp, 0, '40288137-1ef4-11c8-011e-f41247370001', '0c018061-b26f-4de2-a5be-dff348347f93');
|
||||
|
||||
|
||||
-- AppFolders
|
||||
|
||||
insert into SYS_FOLDER (ID, CREATE_TS, VERSION, TYPE, PARENT_ID, NAME)
|
||||
values ('2ce5dc9a-e628-11de-849e-4f2ee1f9724a', current_timestamp, 0, 'A', null, 'Haulmont employees');
|
||||
|
||||
insert into SYS_APP_FOLDER (FOLDER_ID, FILTER_COMPONENT, FILTER_XML, VISIBILITY_SCRIPT, QUANTITY_SCRIPT)
|
||||
values ('2ce5dc9a-e628-11de-849e-4f2ee1f9724a', '[sec$User.browse].genericFilter', '<?xml version="1.0" encoding="UTF-8"?><filter><and><c name="email" class="java.lang.String" caption="msg://com.haulmont.cuba.security.entity/User.email" type="PROPERTY">u.email like :component$genericFilter.email90138<param name="component$genericFilter.email90138">@haulmont.com</param></c><c name="group" class="com.haulmont.cuba.security.entity.Group" caption="msg://com.haulmont.cuba.security.entity/User.group" type="PROPERTY">u.group.id = :component$genericFilter.group46166<param name="component$genericFilter.group46166">0fa2b1a5-1d68-4d69-9fbd-dff348347f93</param></c></and></filter>', 'cuba/test/appfolders/IAmAdmin.groovy', 'cuba/test/appfolders/AppFolder1Qty.groovy');
|
||||
|
||||
--insert into SYS_FOLDER (ID, CREATE_TS, VERSION, TYPE, PARENT_ID, NAME)
|
||||
--values ('5a5ac474-e628-11de-b314-ab16b614416f', current_timestamp, 0, 'A', null, 'App Folder 2');
|
||||
--
|
||||
--insert into SYS_APP_FOLDER (FOLDER_ID, FILTER_COMPONENT, FILTER_XML, VISIBILITY_SCRIPT, QUANTITY_SCRIPT)
|
||||
--values ('5a5ac474-e628-11de-b314-ab16b614416f', null, null, null, null);
|
||||
--
|
||||
--insert into SYS_FOLDER (ID, CREATE_TS, VERSION, TYPE, PARENT_ID, NAME)
|
||||
--values ('6e8c5a0c-e628-11de-8e1e-37fa218351d5', current_timestamp, 0, 'A', '2ce5dc9a-e628-11de-849e-4f2ee1f9724a', 'App Folder 3');
|
||||
--
|
||||
--insert into SYS_APP_FOLDER (FOLDER_ID, FILTER_COMPONENT, FILTER_XML, VISIBILITY_SCRIPT, QUANTITY_SCRIPT)
|
||||
--values ('6e8c5a0c-e628-11de-8e1e-37fa218351d5', null, null, null, null);
|
||||
|
||||
-- SearchFolders
|
||||
|
||||
insert into SYS_FOLDER (ID, CREATE_TS, VERSION, TYPE, PARENT_ID, NAME)
|
||||
values ('6904a2ac-e62c-11de-8571-c79ad48b2687', current_timestamp, 0, 'S', null, 'Search Folder 1');
|
||||
|
||||
insert into SEC_SEARCH_FOLDER (FOLDER_ID, FILTER_COMPONENT, FILTER_XML, USER_ID)
|
||||
values ('6904a2ac-e62c-11de-8571-c79ad48b2687', null, null, '60885987-1b61-4247-94c7-dff348347f93');
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,19 @@
|
||||
-- Useful SQL functions
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
CREATE OR REPLACE FUNCTION FirstDateOfMonth(date) RETURNS date AS '
|
||||
SELECT CAST(date_trunc(''month'', $1) as date);
|
||||
' LANGUAGE sql^
|
||||
|
||||
CREATE OR REPLACE FUNCTION LastDateOfMonth(date) RETURNS date AS '
|
||||
SELECT CAST(date_trunc(''month'', $1) + interval ''1 month''
|
||||
- interval ''1 day'' as date);
|
||||
' LANGUAGE sql^
|
||||
|
||||
--This function allows to concat text columns
|
||||
CREATE AGGREGATE concat (
|
||||
BASETYPE = text,
|
||||
SFUNC = textcat,
|
||||
STYPE = text,
|
||||
INITCOND = ''
|
||||
)^
|
||||
-- Useful SQL functions
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
CREATE OR REPLACE FUNCTION FirstDateOfMonth(date) RETURNS date AS '
|
||||
SELECT CAST(date_trunc(''month'', $1) as date);
|
||||
' LANGUAGE sql^
|
||||
|
||||
CREATE OR REPLACE FUNCTION LastDateOfMonth(date) RETURNS date AS '
|
||||
SELECT CAST(date_trunc(''month'', $1) + interval ''1 month''
|
||||
- interval ''1 day'' as date);
|
||||
' LANGUAGE sql^
|
||||
|
||||
--This function allows to concat text columns
|
||||
CREATE AGGREGATE concat (
|
||||
BASETYPE = text,
|
||||
SFUNC = textcat,
|
||||
STYPE = text,
|
||||
INITCOND = ''
|
||||
)^
|
||||
------------------------------------------------------------------------------------------------------------------------
|
@ -1,2 +1,2 @@
|
||||
java -cp %1 org.hsqldb.server.Server --database.0 file:%2 --dbname.0 %2
|
||||
exit
|
||||
java -cp %1 org.hsqldb.server.Server --database.0 file:%2 --dbname.0 %2
|
||||
exit
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Add SYS_SENDING_MESSAGE.EMAIL_HEADERS
|
||||
|
||||
-- Add SYS_SENDING_MESSAGE.EMAIL_HEADERS
|
||||
|
||||
alter table SYS_SENDING_MESSAGE add EMAIL_HEADERS varchar(500)^
|
@ -1,4 +1,4 @@
|
||||
-- Description:
|
||||
|
||||
alter table sec_screen_history add substituted_user_id varchar(36)^
|
||||
-- Description:
|
||||
|
||||
alter table sec_screen_history add substituted_user_id varchar(36)^
|
||||
alter table sec_screen_history add constraint FK_SEC_HISTORY_SUBSTITUTED_USER foreign key (SUBSTITUTED_USER_ID) references SEC_USER (ID)^
|
@ -1,3 +1,3 @@
|
||||
-- Description:
|
||||
|
||||
-- Description:
|
||||
|
||||
create index IDX_SEC_SCREEN_HIST_SUB_USER on SEC_SCREEN_HISTORY (SUBSTITUTED_USER_ID);
|
@ -1 +1 @@
|
||||
alter table SYS_FTS_QUEUE add FAKE boolean^
|
||||
alter table SYS_FTS_QUEUE add FAKE boolean^
|
||||
|
@ -1,7 +1,7 @@
|
||||
alter table sec_constraint add column CODE varchar(255)^
|
||||
alter table sec_constraint add column CHECK_TYPE varchar(50) default 'db'^
|
||||
alter table sec_constraint add column OPERATION_TYPE varchar(50) default 'read'^
|
||||
alter table sec_constraint add column GROOVY_SCRIPT varchar(500)^
|
||||
alter table sec_constraint add column FILTER_XML varchar(1000)^
|
||||
update sec_constraint set CHECK_TYPE = 'db' where CHECK_TYPE is null^
|
||||
update sec_constraint set OPERATION_TYPE = 'read' where OPERATION_TYPE is null^
|
||||
alter table sec_constraint add column CODE varchar(255)^
|
||||
alter table sec_constraint add column CHECK_TYPE varchar(50) default 'db'^
|
||||
alter table sec_constraint add column OPERATION_TYPE varchar(50) default 'read'^
|
||||
alter table sec_constraint add column GROOVY_SCRIPT varchar(500)^
|
||||
alter table sec_constraint add column FILTER_XML varchar(1000)^
|
||||
update sec_constraint set CHECK_TYPE = 'db' where CHECK_TYPE is null^
|
||||
update sec_constraint set OPERATION_TYPE = 'read' where OPERATION_TYPE is null^
|
||||
|
@ -1,3 +1,3 @@
|
||||
alter table SYS_SENDING_MESSAGE alter column ADDRESS_TO longvarchar^
|
||||
alter table SYS_SENDING_MESSAGE alter column ATTACHMENTS_NAME longvarchar^
|
||||
|
||||
alter table SYS_SENDING_MESSAGE alter column ADDRESS_TO longvarchar^
|
||||
alter table SYS_SENDING_MESSAGE alter column ATTACHMENTS_NAME longvarchar^
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
alter table SEC_CONSTRAINT add IS_ACTIVE boolean default true^
|
||||
|
||||
alter table SEC_CONSTRAINT add IS_ACTIVE boolean default true^
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
-- Description: core$EntitySnapshot.author attribute added
|
||||
|
||||
alter table SYS_ENTITY_SNAPSHOT add AUTHOR_ID uniqueidentifier^
|
||||
|
||||
alter table SYS_ENTITY_SNAPSHOT
|
||||
-- Description: core$EntitySnapshot.author attribute added
|
||||
|
||||
alter table SYS_ENTITY_SNAPSHOT add AUTHOR_ID uniqueidentifier^
|
||||
|
||||
alter table SYS_ENTITY_SNAPSHOT
|
||||
add constraint FK_SYS_ENTITY_SNAPSHOT_AUTHOR_ID foreign key (AUTHOR_ID) references SEC_USER(ID)^
|
@ -1,4 +1,4 @@
|
||||
|
||||
alter table SEC_USER add TYPE varchar(1)^
|
||||
|
||||
|
||||
alter table SEC_USER add TYPE varchar(1)^
|
||||
|
||||
update SEC_USER set TYPE = 'C'^
|
@ -1,13 +1,13 @@
|
||||
-- Description: DDL for QueryResult entity
|
||||
|
||||
create table SYS_QUERY_RESULT (
|
||||
ID bigint identity not null,
|
||||
SESSION_ID uniqueidentifier not null,
|
||||
QUERY_KEY integer not null,
|
||||
ENTITY_ID uniqueidentifier,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
create index IDX_SYS_QUERY_RESULT_ENTITY_SESSION_KEY on SYS_QUERY_RESULT (ENTITY_ID, SESSION_ID, QUERY_KEY)^
|
||||
|
||||
create index IDX_SYS_QUERY_RESULT_SESSION_KEY on SYS_QUERY_RESULT (SESSION_ID, QUERY_KEY)^
|
||||
-- Description: DDL for QueryResult entity
|
||||
|
||||
create table SYS_QUERY_RESULT (
|
||||
ID bigint identity not null,
|
||||
SESSION_ID uniqueidentifier not null,
|
||||
QUERY_KEY integer not null,
|
||||
ENTITY_ID uniqueidentifier,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
create index IDX_SYS_QUERY_RESULT_ENTITY_SESSION_KEY on SYS_QUERY_RESULT (ENTITY_ID, SESSION_ID, QUERY_KEY)^
|
||||
|
||||
create index IDX_SYS_QUERY_RESULT_SESSION_KEY on SYS_QUERY_RESULT (SESSION_ID, QUERY_KEY)^
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Description: add SEC_ENTITY_LOG.CHANGES
|
||||
|
||||
alter table SEC_ENTITY_LOG add CHANGES varchar(max);
|
||||
-- Description: add SEC_ENTITY_LOG.CHANGES
|
||||
|
||||
alter table SEC_ENTITY_LOG add CHANGES varchar(max);
|
||||
|
@ -1,4 +1,4 @@
|
||||
|
||||
alter table SYS_SCHEDULED_TASK add METHOD_PARAMS varchar(1000);
|
||||
drop index IDX_SYS_SCHEDULED_TASK_UNIQ_BEAN_METHOD on SYS_SCHEDULED_TASK;
|
||||
|
||||
alter table SYS_SCHEDULED_TASK add METHOD_PARAMS varchar(1000);
|
||||
drop index IDX_SYS_SCHEDULED_TASK_UNIQ_BEAN_METHOD on SYS_SCHEDULED_TASK;
|
||||
create unique index IDX_SYS_SCHEDULED_TASK_UNIQ_BEAN_METHOD on SYS_SCHEDULED_TASK (BEAN_NAME, METHOD_NAME, METHOD_PARAMS, DELETE_TS);
|
@ -1,3 +1,3 @@
|
||||
-- Description: update screen permissions according to #1532
|
||||
|
||||
update sec_permission set target = substring(target, 3, len(target) - 2) where type = 10;
|
||||
-- Description: update screen permissions according to #1532
|
||||
|
||||
update sec_permission set target = substring(target, 3, len(target) - 2) where type = 10;
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Description: add code field to CategoryAttribute
|
||||
|
||||
-- Description: add code field to CategoryAttribute
|
||||
|
||||
alter table SYS_CATEGORY_ATTR add CODE varchar(50);
|
@ -1,9 +1,9 @@
|
||||
-- Description: add defined by, class name and script name fields to scheduled task
|
||||
-- also update all existing tasks to beans
|
||||
|
||||
if not exists(select SCRIPT_NAME from SYS_DB_CHANGELOG where SCRIPT_NAME like '%02-120-alterScheduledTask.sql')
|
||||
begin
|
||||
alter table SYS_SCHEDULED_TASK add DEFINED_BY varchar(1) default 'B';
|
||||
alter table SYS_SCHEDULED_TASK add CLASS_NAME varchar(500);
|
||||
alter table SYS_SCHEDULED_TASK add SCRIPT_NAME varchar(500);
|
||||
end
|
||||
-- Description: add defined by, class name and script name fields to scheduled task
|
||||
-- also update all existing tasks to beans
|
||||
|
||||
if not exists(select SCRIPT_NAME from SYS_DB_CHANGELOG where SCRIPT_NAME like '%02-120-alterScheduledTask.sql')
|
||||
begin
|
||||
alter table SYS_SCHEDULED_TASK add DEFINED_BY varchar(1) default 'B';
|
||||
alter table SYS_SCHEDULED_TASK add CLASS_NAME varchar(500);
|
||||
alter table SYS_SCHEDULED_TASK add SCRIPT_NAME varchar(500);
|
||||
end
|
||||
|
@ -1,16 +1,16 @@
|
||||
-- Description: add not null constraint on LOGIN and LOGIN_LC for SEC_USER
|
||||
|
||||
update SEC_USER
|
||||
set LOGIN = cast(ID as varchar(50)), LOGIN_LC = cast(ID as varchar(50))
|
||||
where (LOGIN is null) or (LOGIN_LC is null)^
|
||||
|
||||
alter table SEC_USER alter column LOGIN varchar(50) not null^
|
||||
|
||||
drop index IDX_SEC_USER_UNIQ_LOGIN on SEC_USER^
|
||||
drop index IDX_SEC_USER_LOGIN on SEC_USER^
|
||||
|
||||
alter table SEC_USER alter column LOGIN_LC varchar(50) not null^
|
||||
|
||||
create unique index IDX_SEC_USER_UNIQ_LOGIN on SEC_USER (LOGIN_LC, DELETE_TS)^
|
||||
|
||||
-- Description: add not null constraint on LOGIN and LOGIN_LC for SEC_USER
|
||||
|
||||
update SEC_USER
|
||||
set LOGIN = cast(ID as varchar(50)), LOGIN_LC = cast(ID as varchar(50))
|
||||
where (LOGIN is null) or (LOGIN_LC is null)^
|
||||
|
||||
alter table SEC_USER alter column LOGIN varchar(50) not null^
|
||||
|
||||
drop index IDX_SEC_USER_UNIQ_LOGIN on SEC_USER^
|
||||
drop index IDX_SEC_USER_LOGIN on SEC_USER^
|
||||
|
||||
alter table SEC_USER alter column LOGIN_LC varchar(50) not null^
|
||||
|
||||
create unique index IDX_SEC_USER_UNIQ_LOGIN on SEC_USER (LOGIN_LC, DELETE_TS)^
|
||||
|
||||
create clustered index IDX_SEC_USER_LOGIN on SEC_USER (LOGIN_LC)^
|
@ -1,7 +1,7 @@
|
||||
-- Description: add SALT, HASH_METHOD, CHANGE_PASSWORD_AT_LOGON fields
|
||||
|
||||
alter table SEC_USER alter column PASSWORD varchar(40)^
|
||||
|
||||
alter table SEC_USER add CHANGE_PASSWORD_AT_LOGON tinyint^
|
||||
|
||||
-- Description: add SALT, HASH_METHOD, CHANGE_PASSWORD_AT_LOGON fields
|
||||
|
||||
alter table SEC_USER alter column PASSWORD varchar(40)^
|
||||
|
||||
alter table SEC_USER add CHANGE_PASSWORD_AT_LOGON tinyint^
|
||||
|
||||
alter table SEC_USER add SALT varchar(16)^
|
@ -1,3 +1,3 @@
|
||||
-- Description: drop USER_PASSWORD column from SYS_SCHEDULED_TASK
|
||||
|
||||
-- Description: drop USER_PASSWORD column from SYS_SCHEDULED_TASK
|
||||
|
||||
alter table SYS_SCHEDULED_TASK drop column USER_PASSWORD^
|
@ -1,3 +1,3 @@
|
||||
-- Description: drop SALT column in SEC_USER
|
||||
|
||||
-- Description: drop SALT column in SEC_USER
|
||||
|
||||
alter table SEC_USER drop column SALT^
|
@ -1,2 +1,2 @@
|
||||
|
||||
|
||||
alter table SYS_SCHEDULED_TASK add DESCRIPTION varchar(1000);
|
@ -1,20 +1,20 @@
|
||||
-- Description: add SYS_JMX_INSTANCE table
|
||||
|
||||
create table SYS_JMX_INSTANCE (
|
||||
ID uniqueidentifier not null,
|
||||
CREATE_TS datetime,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS datetime,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS datetime,
|
||||
DELETED_BY varchar(50),
|
||||
--
|
||||
CLUSTER_NODE_NAME varchar(255),
|
||||
DESCRIPTION varchar(500),
|
||||
ADDRESS varchar(500) not null,
|
||||
LOGIN varchar(50) not null,
|
||||
PASSWORD varchar(255) not null,
|
||||
--
|
||||
primary key (ID)
|
||||
-- Description: add SYS_JMX_INSTANCE table
|
||||
|
||||
create table SYS_JMX_INSTANCE (
|
||||
ID uniqueidentifier not null,
|
||||
CREATE_TS datetime,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS datetime,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS datetime,
|
||||
DELETED_BY varchar(50),
|
||||
--
|
||||
CLUSTER_NODE_NAME varchar(255),
|
||||
DESCRIPTION varchar(500),
|
||||
ADDRESS varchar(500) not null,
|
||||
LOGIN varchar(50) not null,
|
||||
PASSWORD varchar(255) not null,
|
||||
--
|
||||
primary key (ID)
|
||||
)^
|
@ -1,8 +1,8 @@
|
||||
-- Description: remove column DESCRIPTION from SYS_JMX_INSTANCE table
|
||||
|
||||
if not exists(select SCRIPT_NAME from SYS_DB_CHANGELOG where SCRIPT_NAME like '%131001-removeJmxInstanceDescription.sql')
|
||||
begin
|
||||
alter table SYS_JMX_INSTANCE drop column DESCRIPTION;
|
||||
|
||||
exec sp_rename 'SYS_JMX_INSTANCE.CLUSTER_NODE_NAME', 'NODE_NAME', 'COLUMN';
|
||||
-- Description: remove column DESCRIPTION from SYS_JMX_INSTANCE table
|
||||
|
||||
if not exists(select SCRIPT_NAME from SYS_DB_CHANGELOG where SCRIPT_NAME like '%131001-removeJmxInstanceDescription.sql')
|
||||
begin
|
||||
alter table SYS_JMX_INSTANCE drop column DESCRIPTION;
|
||||
|
||||
exec sp_rename 'SYS_JMX_INSTANCE.CLUSTER_NODE_NAME', 'NODE_NAME', 'COLUMN';
|
||||
end
|
@ -1,9 +1,9 @@
|
||||
-- Add columns to store email attachment disposition and encoding
|
||||
|
||||
alter table SYS_SENDING_ATTACHMENT add VERSION integer;
|
||||
alter table SYS_SENDING_ATTACHMENT add UPDATE_TS datetime;
|
||||
alter table SYS_SENDING_ATTACHMENT add UPDATED_BY varchar(50);
|
||||
alter table SYS_SENDING_ATTACHMENT add DELETE_TS datetime;
|
||||
alter table SYS_SENDING_ATTACHMENT add DELETED_BY varchar(50);
|
||||
alter table SYS_SENDING_ATTACHMENT add DISPOSITION varchar(50);
|
||||
alter table SYS_SENDING_ATTACHMENT add TEXT_ENCODING varchar(50);
|
||||
-- Add columns to store email attachment disposition and encoding
|
||||
|
||||
alter table SYS_SENDING_ATTACHMENT add VERSION integer;
|
||||
alter table SYS_SENDING_ATTACHMENT add UPDATE_TS datetime;
|
||||
alter table SYS_SENDING_ATTACHMENT add UPDATED_BY varchar(50);
|
||||
alter table SYS_SENDING_ATTACHMENT add DELETE_TS datetime;
|
||||
alter table SYS_SENDING_ATTACHMENT add DELETED_BY varchar(50);
|
||||
alter table SYS_SENDING_ATTACHMENT add DISPOSITION varchar(50);
|
||||
alter table SYS_SENDING_ATTACHMENT add TEXT_ENCODING varchar(50);
|
||||
|
@ -1,9 +1,9 @@
|
||||
-- Add linking columns from SendingMessage and SendingAttachment to sys$File
|
||||
|
||||
alter table SYS_SENDING_MESSAGE add CONTENT_TEXT_FILE_ID uniqueidentifier^
|
||||
alter table SYS_SENDING_MESSAGE add constraint FK_SYS_SENDING_MESSAGE_CONTENT_FILE
|
||||
foreign key (CONTENT_TEXT_FILE_ID) references SYS_FILE(ID)^
|
||||
|
||||
alter table SYS_SENDING_ATTACHMENT add CONTENT_FILE_ID uniqueidentifier^
|
||||
alter table SYS_SENDING_ATTACHMENT add constraint FK_SYS_SENDING_ATTACHMENT_CONTENT_FILE
|
||||
foreign key (CONTENT_FILE_ID) references SYS_FILE (ID)^
|
||||
-- Add linking columns from SendingMessage and SendingAttachment to sys$File
|
||||
|
||||
alter table SYS_SENDING_MESSAGE add CONTENT_TEXT_FILE_ID uniqueidentifier^
|
||||
alter table SYS_SENDING_MESSAGE add constraint FK_SYS_SENDING_MESSAGE_CONTENT_FILE
|
||||
foreign key (CONTENT_TEXT_FILE_ID) references SYS_FILE(ID)^
|
||||
|
||||
alter table SYS_SENDING_ATTACHMENT add CONTENT_FILE_ID uniqueidentifier^
|
||||
alter table SYS_SENDING_ATTACHMENT add constraint FK_SYS_SENDING_ATTACHMENT_CONTENT_FILE
|
||||
foreign key (CONTENT_FILE_ID) references SYS_FILE (ID)^
|
||||
|
@ -1,9 +1,9 @@
|
||||
-- Update permissions to renamed screens
|
||||
|
||||
update SEC_PERMISSION set TARGET = 'sys$Category.browse' where PERMISSION_TYPE = 10 and TARGET = 'sys$Categories.browse';
|
||||
|
||||
update SEC_PERMISSION set TARGET = 'entityRestore' where PERMISSION_TYPE = 10 and TARGET = 'sys$Entity.restore';
|
||||
|
||||
update SEC_PERMISSION set TARGET = 'jmxConsole' where PERMISSION_TYPE = 10 and TARGET = 'jmxcontrol$DisplayMbeans';
|
||||
|
||||
update SEC_PERMISSION set TARGET = 'serverLog' where PERMISSION_TYPE = 10 and TARGET = 'logcontrol$ServerLog';
|
||||
-- Update permissions to renamed screens
|
||||
|
||||
update SEC_PERMISSION set TARGET = 'sys$Category.browse' where PERMISSION_TYPE = 10 and TARGET = 'sys$Categories.browse';
|
||||
|
||||
update SEC_PERMISSION set TARGET = 'entityRestore' where PERMISSION_TYPE = 10 and TARGET = 'sys$Entity.restore';
|
||||
|
||||
update SEC_PERMISSION set TARGET = 'jmxConsole' where PERMISSION_TYPE = 10 and TARGET = 'jmxcontrol$DisplayMbeans';
|
||||
|
||||
update SEC_PERMISSION set TARGET = 'serverLog' where PERMISSION_TYPE = 10 and TARGET = 'logcontrol$ServerLog';
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Add SYS_SENDING_MESSAGE.EMAIL_HEADERS
|
||||
|
||||
-- Add SYS_SENDING_MESSAGE.EMAIL_HEADERS
|
||||
|
||||
alter table SYS_SENDING_MESSAGE add EMAIL_HEADERS varchar(500)^
|
@ -1,4 +1,4 @@
|
||||
-- Description:
|
||||
|
||||
alter table sec_screen_history add substituted_user_id uniqueidentifier^
|
||||
-- Description:
|
||||
|
||||
alter table sec_screen_history add substituted_user_id uniqueidentifier^
|
||||
alter table sec_screen_history add constraint FK_SEC_HISTORY_SUBSTITUTED_USER foreign key (SUBSTITUTED_USER_ID) references SEC_USER (ID)^
|
@ -1,3 +1,3 @@
|
||||
-- Description:
|
||||
|
||||
-- Description:
|
||||
|
||||
create index IDX_SEC_SCREEN_HIST_SUB_USER on SEC_SCREEN_HISTORY (SUBSTITUTED_USER_ID);
|
@ -1 +1 @@
|
||||
alter table SYS_FTS_QUEUE add FAKE tinyint^
|
||||
alter table SYS_FTS_QUEUE add FAKE tinyint^
|
||||
|
@ -1,7 +1,7 @@
|
||||
alter table sec_constraint add CODE varchar(255)^
|
||||
alter table sec_constraint add CHECK_TYPE varchar(50) default 'db'^
|
||||
alter table sec_constraint add OPERATION_TYPE varchar(50) default 'read'^
|
||||
alter table sec_constraint add GROOVY_SCRIPT varchar(500)^
|
||||
alter table sec_constraint add FILTER_XML varchar(1000)^
|
||||
update sec_constraint set CHECK_TYPE = 'db' where CHECK_TYPE is null^
|
||||
update sec_constraint set OPERATION_TYPE = 'read' where OPERATION_TYPE is null^
|
||||
alter table sec_constraint add CODE varchar(255)^
|
||||
alter table sec_constraint add CHECK_TYPE varchar(50) default 'db'^
|
||||
alter table sec_constraint add OPERATION_TYPE varchar(50) default 'read'^
|
||||
alter table sec_constraint add GROOVY_SCRIPT varchar(500)^
|
||||
alter table sec_constraint add FILTER_XML varchar(1000)^
|
||||
update sec_constraint set CHECK_TYPE = 'db' where CHECK_TYPE is null^
|
||||
update sec_constraint set OPERATION_TYPE = 'read' where OPERATION_TYPE is null^
|
||||
|
@ -1,3 +1,3 @@
|
||||
alter table SYS_SENDING_MESSAGE alter column ADDRESS_TO varchar(max)^
|
||||
alter table SYS_SENDING_MESSAGE alter column ATTACHMENTS_NAME varchar(max)^
|
||||
|
||||
alter table SYS_SENDING_MESSAGE alter column ADDRESS_TO varchar(max)^
|
||||
alter table SYS_SENDING_MESSAGE alter column ATTACHMENTS_NAME varchar(max)^
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
alter table SEC_CONSTRAINT add IS_ACTIVE tinyint default 1^
|
||||
|
||||
alter table SEC_CONSTRAINT add IS_ACTIVE tinyint default 1^
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
--Description: create procedure to select current value of a sequence
|
||||
|
||||
create or replace function GET_SEQ_VAL(seqname varchar2) return NUMBER
|
||||
as
|
||||
ln number;
|
||||
ib number;
|
||||
begin
|
||||
select LAST_NUMBER, INCREMENT_BY
|
||||
into ln, ib
|
||||
from USER_SEQUENCES
|
||||
where SEQUENCE_NAME = upper(seqname);
|
||||
|
||||
return ln - ib;
|
||||
end;
|
||||
--Description: create procedure to select current value of a sequence
|
||||
|
||||
create or replace function GET_SEQ_VAL(seqname varchar2) return NUMBER
|
||||
as
|
||||
ln number;
|
||||
ib number;
|
||||
begin
|
||||
select LAST_NUMBER, INCREMENT_BY
|
||||
into ln, ib
|
||||
from USER_SEQUENCES
|
||||
where SEQUENCE_NAME = upper(seqname);
|
||||
|
||||
return ln - ib;
|
||||
end;
|
||||
^
|
@ -1,3 +1,3 @@
|
||||
-- Add SYS_SENDING_MESSAGE.EMAIL_HEADERS
|
||||
|
||||
-- Add SYS_SENDING_MESSAGE.EMAIL_HEADERS
|
||||
|
||||
alter table SYS_SENDING_MESSAGE add EMAIL_HEADERS varchar2(500)^
|
@ -1,4 +1,4 @@
|
||||
-- Description:
|
||||
|
||||
alter table sec_screen_history add substituted_user_id varchar2(32)^
|
||||
-- Description:
|
||||
|
||||
alter table sec_screen_history add substituted_user_id varchar2(32)^
|
||||
create index IDX_SEC_SCREEN_HIST_SUB_USER on SEC_SCREEN_HISTORY(SUBSTITUTED_USER_ID)^
|
@ -1,3 +1,3 @@
|
||||
-- Description:
|
||||
|
||||
-- Description:
|
||||
|
||||
alter table SEC_SCREEN_HISTORY add constraint FK_SEC_HISTORY_SUB_USER foreign key (SUBSTITUTED_USER_ID) references SEC_USER(ID);
|
@ -1,13 +1,13 @@
|
||||
|
||||
create sequence SYS_QUERY_RESULT_SEQ
|
||||
^
|
||||
|
||||
create or replace trigger SYS_QUERY_RESULT_ID_GEN
|
||||
before insert on SYS_QUERY_RESULT
|
||||
for each row
|
||||
begin
|
||||
select SYS_QUERY_RESULT_SEQ.nextval
|
||||
into :new.id
|
||||
from dual;
|
||||
end;
|
||||
^
|
||||
|
||||
create sequence SYS_QUERY_RESULT_SEQ
|
||||
^
|
||||
|
||||
create or replace trigger SYS_QUERY_RESULT_ID_GEN
|
||||
before insert on SYS_QUERY_RESULT
|
||||
for each row
|
||||
begin
|
||||
select SYS_QUERY_RESULT_SEQ.nextval
|
||||
into :new.id
|
||||
from dual;
|
||||
end;
|
||||
^
|
||||
|
@ -1 +1 @@
|
||||
alter table SYS_FTS_QUEUE add FAKE char(1)^
|
||||
alter table SYS_FTS_QUEUE add FAKE char(1)^
|
||||
|
@ -1,7 +1,7 @@
|
||||
alter table sec_constraint add CODE varchar2(255)^
|
||||
alter table sec_constraint add CHECK_TYPE varchar2(50) default 'db'^
|
||||
alter table sec_constraint add OPERATION_TYPE varchar2(50) default 'read'^
|
||||
alter table sec_constraint add GROOVY_SCRIPT varchar2(500)^
|
||||
alter table sec_constraint add FILTER_XML varchar2(1000)^
|
||||
update sec_constraint set CHECK_TYPE = 'db' where CHECK_TYPE is null^
|
||||
alter table sec_constraint add CODE varchar2(255)^
|
||||
alter table sec_constraint add CHECK_TYPE varchar2(50) default 'db'^
|
||||
alter table sec_constraint add OPERATION_TYPE varchar2(50) default 'read'^
|
||||
alter table sec_constraint add GROOVY_SCRIPT varchar2(500)^
|
||||
alter table sec_constraint add FILTER_XML varchar2(1000)^
|
||||
update sec_constraint set CHECK_TYPE = 'db' where CHECK_TYPE is null^
|
||||
update sec_constraint set OPERATION_TYPE = 'read' where OPERATION_TYPE is null^
|
@ -1,12 +1,12 @@
|
||||
alter table SYS_SENDING_MESSAGE add ADDRESS_TO_ clob^
|
||||
alter table SYS_SENDING_MESSAGE add ATTACHMENTS_NAME_ clob^
|
||||
|
||||
update SYS_SENDING_MESSAGE set ADDRESS_TO_ = ADDRESS_TO, ATTACHMENTS_NAME_ = ATTACHMENTS_NAME_^
|
||||
|
||||
alter table SYS_SENDING_MESSAGE drop column ADDRESS_TO^
|
||||
alter table SYS_SENDING_MESSAGE drop column ATTACHMENTS_NAME^
|
||||
|
||||
alter table SYS_SENDING_MESSAGE rename column ADDRESS_TO_ to ADDRESS_TO^
|
||||
alter table SYS_SENDING_MESSAGE rename column ATTACHMENTS_NAME_ to ATTACHMENTS_NAME^
|
||||
|
||||
|
||||
alter table SYS_SENDING_MESSAGE add ADDRESS_TO_ clob^
|
||||
alter table SYS_SENDING_MESSAGE add ATTACHMENTS_NAME_ clob^
|
||||
|
||||
update SYS_SENDING_MESSAGE set ADDRESS_TO_ = ADDRESS_TO, ATTACHMENTS_NAME_ = ATTACHMENTS_NAME_^
|
||||
|
||||
alter table SYS_SENDING_MESSAGE drop column ADDRESS_TO^
|
||||
alter table SYS_SENDING_MESSAGE drop column ATTACHMENTS_NAME^
|
||||
|
||||
alter table SYS_SENDING_MESSAGE rename column ADDRESS_TO_ to ADDRESS_TO^
|
||||
alter table SYS_SENDING_MESSAGE rename column ATTACHMENTS_NAME_ to ATTACHMENTS_NAME^
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
alter table SEC_CONSTRAINT add IS_ACTIVE char(1) default '1'^
|
||||
|
||||
alter table SEC_CONSTRAINT add IS_ACTIVE char(1) default '1'^
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Description:
|
||||
|
||||
-- Description:
|
||||
|
||||
alter table SEC_ENTITY_LOG_ATTR add column VALUE_ID uuid;
|
@ -1,4 +1,4 @@
|
||||
-- Description: Moving to the new update database mechanism
|
||||
|
||||
alter table SYS_DB_UPDATE drop constraint SYS_DB_UPDATE_PKEY;
|
||||
|
||||
-- Description: Moving to the new update database mechanism
|
||||
|
||||
alter table SYS_DB_UPDATE drop constraint SYS_DB_UPDATE_PKEY;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- Description: adding SEC_ENTITY_LOG_ATTR.MESSAGES_PACK field
|
||||
|
||||
alter table SEC_ENTITY_LOG_ATTR add MESSAGES_PACK varchar(200)
|
||||
^
|
||||
-- Description: adding SEC_ENTITY_LOG_ATTR.MESSAGES_PACK field
|
||||
|
||||
alter table SEC_ENTITY_LOG_ATTR add MESSAGES_PACK varchar(200)
|
||||
^
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- Description: sec_user.position field
|
||||
|
||||
alter table sec_user rename column position to position_
|
||||
^
|
||||
-- Description: sec_user.position field
|
||||
|
||||
alter table sec_user rename column position to position_
|
||||
^
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- Description: sec_user.language_ field
|
||||
|
||||
alter table SEC_USER add LANGUAGE_ varchar(10)
|
||||
^
|
||||
-- Description: sec_user.language_ field
|
||||
|
||||
alter table SEC_USER add LANGUAGE_ varchar(10)
|
||||
^
|
||||
|
@ -1,15 +1,15 @@
|
||||
-- Description: SYS_FTS_QUEUE table
|
||||
|
||||
create table SYS_FTS_QUEUE (
|
||||
ID uuid,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
ENTITY_ID uuid,
|
||||
ENTITY_NAME varchar(200),
|
||||
CHANGE_TYPE char(1),
|
||||
SOURCE_HOST varchar(100),
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
create index IDX_SYS_FTS_QUEUE_CREATE_TS on SYS_FTS_QUEUE (CREATE_TS)
|
||||
^
|
||||
-- Description: SYS_FTS_QUEUE table
|
||||
|
||||
create table SYS_FTS_QUEUE (
|
||||
ID uuid,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
ENTITY_ID uuid,
|
||||
ENTITY_NAME varchar(200),
|
||||
CHANGE_TYPE char(1),
|
||||
SOURCE_HOST varchar(100),
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
create index IDX_SYS_FTS_QUEUE_CREATE_TS on SYS_FTS_QUEUE (CREATE_TS)
|
||||
^
|
||||
|
@ -1,120 +1,120 @@
|
||||
CREATE TABLE report_band_definition
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
query character varying(255),
|
||||
parent_definition_id uuid,
|
||||
"name" character varying(255),
|
||||
orientation integer DEFAULT 0,
|
||||
"position" integer DEFAULT 0,
|
||||
CONSTRAINT report_band_definition_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_band_definition_to_report_band_definition FOREIGN KEY (parent_definition_id)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE report_report
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
"name" character varying(255),
|
||||
root_definition_id uuid,
|
||||
template_path text,
|
||||
report_output_type integer DEFAULT 0,
|
||||
is_custom boolean DEFAULT false,
|
||||
custom_class character varying,
|
||||
linked_entity character varying,
|
||||
template_file_id uuid,
|
||||
report_type integer,
|
||||
CONSTRAINT report_report_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_report_to_report_band_definition FOREIGN KEY (root_definition_id)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE report_input_parameter
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
report_id uuid,
|
||||
"type" integer,
|
||||
"name" character varying(255),
|
||||
alias character varying(100),
|
||||
screen character varying(255),
|
||||
class_name character varying,
|
||||
from_browser boolean,
|
||||
required boolean DEFAULT false,
|
||||
CONSTRAINT repor_input_parameter_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_repor_input_parameter_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE report_data_set
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
"name" character varying(255),
|
||||
"text" text,
|
||||
"type" integer,
|
||||
band_definition uuid,
|
||||
CONSTRAINT report_data_set_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_data_set_to_report_band_definition FOREIGN KEY (band_definition)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
create table REPORT_REPORTS_ROLES (
|
||||
REPORT_ID uuid not null,
|
||||
ROLE_ID uuid not null
|
||||
);
|
||||
|
||||
alter table REPORT_REPORTS_ROLES add constraint FK_REPORT_REPORTS_ROLES_TO_REPORT
|
||||
foreign key (REPORT_ID) references REPORT_REPORT(ID);
|
||||
|
||||
alter table REPORT_REPORTS_ROLES add constraint FK_REPORT_REPORTS_ROLES_TO_ROLE
|
||||
foreign key (ROLE_ID) references SEC_ROLE(ID);
|
||||
|
||||
|
||||
CREATE TABLE report_report_screen
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
report_id uuid,
|
||||
screen_id character varying(255),
|
||||
CONSTRAINT report_report_screen_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_report_screen_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE report_band_definition
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
query character varying(255),
|
||||
parent_definition_id uuid,
|
||||
"name" character varying(255),
|
||||
orientation integer DEFAULT 0,
|
||||
"position" integer DEFAULT 0,
|
||||
CONSTRAINT report_band_definition_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_band_definition_to_report_band_definition FOREIGN KEY (parent_definition_id)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE report_report
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
"name" character varying(255),
|
||||
root_definition_id uuid,
|
||||
template_path text,
|
||||
report_output_type integer DEFAULT 0,
|
||||
is_custom boolean DEFAULT false,
|
||||
custom_class character varying,
|
||||
linked_entity character varying,
|
||||
template_file_id uuid,
|
||||
report_type integer,
|
||||
CONSTRAINT report_report_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_report_to_report_band_definition FOREIGN KEY (root_definition_id)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE report_input_parameter
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
report_id uuid,
|
||||
"type" integer,
|
||||
"name" character varying(255),
|
||||
alias character varying(100),
|
||||
screen character varying(255),
|
||||
class_name character varying,
|
||||
from_browser boolean,
|
||||
required boolean DEFAULT false,
|
||||
CONSTRAINT repor_input_parameter_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_repor_input_parameter_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
CREATE TABLE report_data_set
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
"name" character varying(255),
|
||||
"text" text,
|
||||
"type" integer,
|
||||
band_definition uuid,
|
||||
CONSTRAINT report_data_set_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_data_set_to_report_band_definition FOREIGN KEY (band_definition)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
create table REPORT_REPORTS_ROLES (
|
||||
REPORT_ID uuid not null,
|
||||
ROLE_ID uuid not null
|
||||
);
|
||||
|
||||
alter table REPORT_REPORTS_ROLES add constraint FK_REPORT_REPORTS_ROLES_TO_REPORT
|
||||
foreign key (REPORT_ID) references REPORT_REPORT(ID);
|
||||
|
||||
alter table REPORT_REPORTS_ROLES add constraint FK_REPORT_REPORTS_ROLES_TO_ROLE
|
||||
foreign key (ROLE_ID) references SEC_ROLE(ID);
|
||||
|
||||
|
||||
CREATE TABLE report_report_screen
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
report_id uuid,
|
||||
screen_id character varying(255),
|
||||
CONSTRAINT report_report_screen_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_report_screen_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
alter table report_input_parameter add column position integer default 0
|
||||
^
|
||||
alter table report_input_parameter add column meta_class varchar(255)
|
||||
^
|
||||
update report_input_parameter set meta_class=screen
|
||||
^
|
||||
update report_input_parameter set screen = null
|
||||
^
|
||||
alter table report_input_parameter add column position integer default 0
|
||||
^
|
||||
alter table report_input_parameter add column meta_class varchar(255)
|
||||
^
|
||||
update report_input_parameter set meta_class=screen
|
||||
^
|
||||
update report_input_parameter set screen = null
|
||||
^
|
||||
|
@ -1,19 +1,19 @@
|
||||
-- Description: SessionAttributes functionality
|
||||
|
||||
create table SEC_SESSION_ATTR (
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
NAME varchar(50),
|
||||
STR_VALUE varchar(1000),
|
||||
DATATYPE varchar(20),
|
||||
GROUP_ID uuid,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
alter table SEC_SESSION_ATTR add constraint SEC_SESSION_ATTR_GROUP foreign key (GROUP_ID) references SEC_GROUP(ID)^
|
||||
-- Description: SessionAttributes functionality
|
||||
|
||||
create table SEC_SESSION_ATTR (
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
NAME varchar(50),
|
||||
STR_VALUE varchar(1000),
|
||||
DATATYPE varchar(20),
|
||||
GROUP_ID uuid,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
alter table SEC_SESSION_ATTR add constraint SEC_SESSION_ATTR_GROUP foreign key (GROUP_ID) references SEC_GROUP(ID)^
|
||||
|
@ -1,30 +1,30 @@
|
||||
-- Description: reports now are hard deleted
|
||||
|
||||
alter table report_band_definition drop CONSTRAINT fk_report_band_definition_to_report_band_definition^
|
||||
alter table report_band_definition add CONSTRAINT fk_report_band_definition_to_report_band_definition FOREIGN KEY (parent_definition_id)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE CASCADE^
|
||||
|
||||
alter table report_report drop CONSTRAINT fk_report_report_to_report_band_definition^
|
||||
alter table report_report add CONSTRAINT fk_report_report_to_report_band_definition FOREIGN KEY (root_definition_id)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE CASCADE^
|
||||
|
||||
ALTER table report_input_parameter drop CONSTRAINT fk_repor_input_parameter_to_report_report^
|
||||
alter table report_input_parameter add constraint fk_repor_input_parameter_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE CASCADE^
|
||||
|
||||
alter table report_data_set drop constraint fk_report_data_set_to_report_band_definition^
|
||||
alter table report_data_set add constraint fk_report_data_set_to_report_band_definition FOREIGN KEY (band_definition)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE CASCADE^
|
||||
|
||||
alter table REPORT_REPORTS_ROLES drop constraint FK_REPORT_REPORTS_ROLES_TO_REPORT^
|
||||
alter table REPORT_REPORTS_ROLES add constraint FK_REPORT_REPORTS_ROLES_TO_REPORT
|
||||
foreign key (REPORT_ID) references REPORT_REPORT(ID) on delete cascade^
|
||||
|
||||
alter table report_report_screen drop CONSTRAINT fk_report_report_screen_to_report_report^
|
||||
alter table report_report_screen add CONSTRAINT fk_report_report_screen_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
-- Description: reports now are hard deleted
|
||||
|
||||
alter table report_band_definition drop CONSTRAINT fk_report_band_definition_to_report_band_definition^
|
||||
alter table report_band_definition add CONSTRAINT fk_report_band_definition_to_report_band_definition FOREIGN KEY (parent_definition_id)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE CASCADE^
|
||||
|
||||
alter table report_report drop CONSTRAINT fk_report_report_to_report_band_definition^
|
||||
alter table report_report add CONSTRAINT fk_report_report_to_report_band_definition FOREIGN KEY (root_definition_id)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE CASCADE^
|
||||
|
||||
ALTER table report_input_parameter drop CONSTRAINT fk_repor_input_parameter_to_report_report^
|
||||
alter table report_input_parameter add constraint fk_repor_input_parameter_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE CASCADE^
|
||||
|
||||
alter table report_data_set drop constraint fk_report_data_set_to_report_band_definition^
|
||||
alter table report_data_set add constraint fk_report_data_set_to_report_band_definition FOREIGN KEY (band_definition)
|
||||
REFERENCES report_band_definition (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE CASCADE^
|
||||
|
||||
alter table REPORT_REPORTS_ROLES drop constraint FK_REPORT_REPORTS_ROLES_TO_REPORT^
|
||||
alter table REPORT_REPORTS_ROLES add constraint FK_REPORT_REPORTS_ROLES_TO_REPORT
|
||||
foreign key (REPORT_ID) references REPORT_REPORT(ID) on delete cascade^
|
||||
|
||||
alter table report_report_screen drop CONSTRAINT fk_report_report_screen_to_report_report^
|
||||
alter table report_report_screen add CONSTRAINT fk_report_report_screen_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE cascade^
|
@ -1,14 +1,14 @@
|
||||
-- Description: adding SYS_ENTITY_STATISTICS table
|
||||
|
||||
create table SYS_ENTITY_STATISTICS (
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
NAME varchar(50),
|
||||
INSTANCE_COUNT bigint,
|
||||
MAX_FETCH_UI integer,
|
||||
LAZY_COLLECTION_THRESHOLD integer,
|
||||
primary key (ID)
|
||||
)^
|
||||
-- Description: adding SYS_ENTITY_STATISTICS table
|
||||
|
||||
create table SYS_ENTITY_STATISTICS (
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
NAME varchar(50),
|
||||
INSTANCE_COUNT bigint,
|
||||
MAX_FETCH_UI integer,
|
||||
LAZY_COLLECTION_THRESHOLD integer,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
@ -1,23 +1,23 @@
|
||||
-- Description: added Presentation table and updated SearchFolder
|
||||
|
||||
create table SEC_PRESENTATION (
|
||||
ID uuid,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
COMPONENT varchar(200),
|
||||
NAME varchar(255),
|
||||
XML varchar(7000),
|
||||
USER_ID uuid,
|
||||
IS_AUTO_SAVE boolean,
|
||||
primary key (ID)
|
||||
);
|
||||
|
||||
alter table SEC_PRESENTATION add constraint SEC_PRESENTATION_USER foreign key (USER_ID) references SEC_USER(ID);
|
||||
|
||||
|
||||
alter table SEC_SEARCH_FOLDER add column PRESENTATION_ID uuid;
|
||||
|
||||
|
||||
alter table SEC_SEARCH_FOLDER add constraint FK_SEC_SEARCH_FOLDER_PRESENTATION foreign key (PRESENTATION_ID) references SEC_PRESENTATION(ID) on delete set null;
|
||||
-- Description: added Presentation table and updated SearchFolder
|
||||
|
||||
create table SEC_PRESENTATION (
|
||||
ID uuid,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
COMPONENT varchar(200),
|
||||
NAME varchar(255),
|
||||
XML varchar(7000),
|
||||
USER_ID uuid,
|
||||
IS_AUTO_SAVE boolean,
|
||||
primary key (ID)
|
||||
);
|
||||
|
||||
alter table SEC_PRESENTATION add constraint SEC_PRESENTATION_USER foreign key (USER_ID) references SEC_USER(ID);
|
||||
|
||||
|
||||
alter table SEC_SEARCH_FOLDER add column PRESENTATION_ID uuid;
|
||||
|
||||
|
||||
alter table SEC_SEARCH_FOLDER add constraint FK_SEC_SEARCH_FOLDER_PRESENTATION foreign key (PRESENTATION_ID) references SEC_PRESENTATION(ID) on delete set null;
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Description: adding field in SYS_FOLDER
|
||||
|
||||
-- Description: adding field in SYS_FOLDER
|
||||
|
||||
alter table SYS_FOLDER add column DOUBLE_NAME varchar(100);
|
@ -1,3 +1,3 @@
|
||||
-- Description: adding field in SEC_FILTER
|
||||
|
||||
-- Description: adding field in SEC_FILTER
|
||||
|
||||
alter table SEC_FILTER add column CODE varchar(200);
|
@ -1,18 +1,18 @@
|
||||
CREATE TABLE report_value_format
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
report_id uuid,
|
||||
"name" character varying(255),
|
||||
format character varying(255),
|
||||
CONSTRAINT report_value_format_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_value_format_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
CREATE TABLE report_value_format
|
||||
(
|
||||
id uuid NOT NULL,
|
||||
create_ts timestamp without time zone,
|
||||
created_by character varying(50),
|
||||
"version" integer,
|
||||
update_ts timestamp without time zone,
|
||||
updated_by character varying(50),
|
||||
delete_ts timestamp without time zone,
|
||||
deleted_by character varying(50),
|
||||
report_id uuid,
|
||||
"name" character varying(255),
|
||||
format character varying(255),
|
||||
CONSTRAINT report_value_format_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT fk_report_value_format_to_report_report FOREIGN KEY (report_id)
|
||||
REFERENCES report_report (id) MATCH SIMPLE
|
||||
ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
@ -1,12 +1,12 @@
|
||||
-- Description:
|
||||
create table SEC_TAB_HISTORY (
|
||||
ID uuid,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
CREATOR_ID uuid,
|
||||
CAPTION varchar(255),
|
||||
URL varchar(4000),
|
||||
primary key (ID)
|
||||
);
|
||||
|
||||
alter table SEC_TAB_HISTORY add constraint FK_SEC_HISTORY_USER foreign key (CREATOR_ID) references SEC_USER (ID);
|
||||
-- Description:
|
||||
create table SEC_TAB_HISTORY (
|
||||
ID uuid,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
CREATOR_ID uuid,
|
||||
CAPTION varchar(255),
|
||||
URL varchar(4000),
|
||||
primary key (ID)
|
||||
);
|
||||
|
||||
alter table SEC_TAB_HISTORY add constraint FK_SEC_HISTORY_USER foreign key (CREATOR_ID) references SEC_USER (ID);
|
||||
|
@ -1,9 +1,9 @@
|
||||
-- Description:
|
||||
|
||||
create index IDX_SEC_CONSTRAINT_GROUP on SEC_CONSTRAINT (GROUP_ID)^
|
||||
|
||||
create index IDX_SEC_SESSION_ATTR_GROUP on SEC_SESSION_ATTR (GROUP_ID)^
|
||||
|
||||
create index IDX_SEC_SEARCH_FOLDER_USER on SEC_SEARCH_FOLDER (USER_ID)^
|
||||
|
||||
create index IDX_SEC_PRESENTATION_COMPONENT_USER on SEC_PRESENTATION (COMPONENT, USER_ID)^
|
||||
-- Description:
|
||||
|
||||
create index IDX_SEC_CONSTRAINT_GROUP on SEC_CONSTRAINT (GROUP_ID)^
|
||||
|
||||
create index IDX_SEC_SESSION_ATTR_GROUP on SEC_SESSION_ATTR (GROUP_ID)^
|
||||
|
||||
create index IDX_SEC_SEARCH_FOLDER_USER on SEC_SEARCH_FOLDER (USER_ID)^
|
||||
|
||||
create index IDX_SEC_PRESENTATION_COMPONENT_USER on SEC_PRESENTATION (COMPONENT, USER_ID)^
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- Description:
|
||||
|
||||
alter table SEC_TAB_HISTORY rename to SEC_SCREEN_HISTORY^
|
||||
|
||||
-- Description:
|
||||
|
||||
alter table SEC_TAB_HISTORY rename to SEC_SCREEN_HISTORY^
|
||||
|
||||
alter table SEC_SCREEN_HISTORY rename column CREATOR_ID to USER_ID^
|
@ -1,3 +1,3 @@
|
||||
-- Description: add SYS_ENTITY_STATISTICS.FETCH_UI column
|
||||
|
||||
alter table SYS_ENTITY_STATISTICS add FETCH_UI integer^
|
||||
-- Description: add SYS_ENTITY_STATISTICS.FETCH_UI column
|
||||
|
||||
alter table SYS_ENTITY_STATISTICS add FETCH_UI integer^
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Description: change type of script columns
|
||||
ALTER TABLE sys_app_folder ALTER COLUMN visibility_script TYPE text;
|
||||
-- Description: change type of script columns
|
||||
ALTER TABLE sys_app_folder ALTER COLUMN visibility_script TYPE text;
|
||||
ALTER TABLE sys_app_folder ALTER COLUMN quantity_script TYPE text;
|
@ -1,2 +1,2 @@
|
||||
-- Description: Rename double_name column to tab_name
|
||||
-- Description: Rename double_name column to tab_name
|
||||
ALTER TABLE sys_folder RENAME COLUMN double_name to tab_name;
|
@ -1,6 +1,6 @@
|
||||
-- Description: delete code column in sys_folder
|
||||
UPDATE sys_folder as folder1
|
||||
SET name = code
|
||||
WHERE name IS NULL^
|
||||
|
||||
ALTER TABLE sys_folder DROP COLUMN code;
|
||||
-- Description: delete code column in sys_folder
|
||||
UPDATE sys_folder as folder1
|
||||
SET name = code
|
||||
WHERE name IS NULL^
|
||||
|
||||
ALTER TABLE sys_folder DROP COLUMN code;
|
||||
|
@ -1,5 +1,5 @@
|
||||
-- Description: update tab_name in sys_folder : for search folder,
|
||||
-- wich haven't tab name,put to tab name name of folder + '.tabName'
|
||||
UPDATE sys_folder
|
||||
SET tab_name = name || '.tabName'
|
||||
-- Description: update tab_name in sys_folder : for search folder,
|
||||
-- wich haven't tab name,put to tab name name of folder + '.tabName'
|
||||
UPDATE sys_folder
|
||||
SET tab_name = name || '.tabName'
|
||||
WHERE tab_name IS NULL AND type='S';
|
@ -1,9 +1,9 @@
|
||||
-- Description:
|
||||
-- * Drop column 'CLASS_NAME' in table 'REPORT_INPUT_PARAMETER'
|
||||
-- * Rename 'POSITION' to 'POSITION_'
|
||||
|
||||
alter table REPORT_INPUT_PARAMETER drop column CLASS_NAME ^
|
||||
|
||||
alter table REPORT_INPUT_PARAMETER rename column POSITION to POSITION_ ^
|
||||
|
||||
-- Description:
|
||||
-- * Drop column 'CLASS_NAME' in table 'REPORT_INPUT_PARAMETER'
|
||||
-- * Rename 'POSITION' to 'POSITION_'
|
||||
|
||||
alter table REPORT_INPUT_PARAMETER drop column CLASS_NAME ^
|
||||
|
||||
alter table REPORT_INPUT_PARAMETER rename column POSITION to POSITION_ ^
|
||||
|
||||
alter table REPORT_BAND_DEFINITION rename column POSITION to POSITION_ ^
|
@ -1,4 +1,4 @@
|
||||
-- Description:
|
||||
-- * Add to 'REPORT_INPUT_PARAMETER' column 'ENUM_CLASS'
|
||||
|
||||
-- Description:
|
||||
-- * Add to 'REPORT_INPUT_PARAMETER' column 'ENUM_CLASS'
|
||||
|
||||
alter table REPORT_INPUT_PARAMETER add column ENUM_CLASS varchar(500);
|
@ -1,3 +1,3 @@
|
||||
-- Description: adding SEC_USER.IP_MASK
|
||||
|
||||
-- Description: adding SEC_USER.IP_MASK
|
||||
|
||||
alter table SEC_USER add column IP_MASK varchar(200);
|
@ -1,3 +1,3 @@
|
||||
-- Description: adding SYS_ENTITY_STATISTICS.LOOKUP_SCREEN_THRESHOLD
|
||||
|
||||
-- Description: adding SYS_ENTITY_STATISTICS.LOOKUP_SCREEN_THRESHOLD
|
||||
|
||||
alter table SYS_ENTITY_STATISTICS add column LOOKUP_SCREEN_THRESHOLD integer;
|
@ -1,79 +1,79 @@
|
||||
-- Description: add REPORT_TEMPLATE table, drop obsolete columns in REPORT_REPORT
|
||||
|
||||
create table REPORT_TEMPLATE
|
||||
(
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp without time zone,
|
||||
CREATED_BY character varying(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp without time zone,
|
||||
UPDATED_BY character varying(50),
|
||||
|
||||
REPORT_ID uuid,
|
||||
CODE varchar(50),
|
||||
TEMPLATE_FILE_ID uuid,
|
||||
OUTPUT_TYPE integer default 0,
|
||||
IS_DEFAULT boolean default false,
|
||||
IS_CUSTOM boolean default false,
|
||||
CUSTOM_CLASS character varying,
|
||||
|
||||
primary key (ID),
|
||||
constraint FK_REPORT_TEMPLATE_TO_REPORT foreign key (REPORT_ID)
|
||||
references REPORT_REPORT (ID)
|
||||
)^
|
||||
|
||||
alter table REPORT_REPORT drop column DELETE_TS^
|
||||
alter table REPORT_REPORT drop column DELETED_BY^
|
||||
alter table REPORT_REPORT drop column TEMPLATE_PATH^
|
||||
|
||||
alter table REPORT_BAND_DEFINITION drop column DELETE_TS^
|
||||
alter table REPORT_BAND_DEFINITION drop column DELETED_BY^
|
||||
|
||||
alter table REPORT_INPUT_PARAMETER drop column DELETE_TS^
|
||||
alter table REPORT_INPUT_PARAMETER drop column DELETED_BY^
|
||||
|
||||
alter table REPORT_DATA_SET drop column DELETE_TS^
|
||||
alter table REPORT_DATA_SET drop column DELETED_BY^
|
||||
|
||||
alter table REPORT_REPORT_SCREEN drop column DELETE_TS^
|
||||
alter table REPORT_REPORT_SCREEN drop column DELETED_BY^
|
||||
|
||||
alter table REPORT_VALUE_FORMAT drop column DELETE_TS^
|
||||
alter table REPORT_VALUE_FORMAT drop column DELETED_BY^
|
||||
|
||||
insert into REPORT_TEMPLATE(
|
||||
ID,
|
||||
CREATE_TS,
|
||||
CREATED_BY,
|
||||
VERSION,
|
||||
UPDATE_TS,
|
||||
UPDATED_BY,
|
||||
REPORT_ID,
|
||||
IS_CUSTOM,
|
||||
CUSTOM_CLASS,
|
||||
CODE,
|
||||
IS_DEFAULT,
|
||||
TEMPLATE_FILE_ID,
|
||||
OUTPUT_TYPE
|
||||
)
|
||||
select
|
||||
newid(),
|
||||
CREATE_TS,
|
||||
CREATED_BY,
|
||||
VERSION,
|
||||
UPDATE_TS,
|
||||
UPDATED_BY,
|
||||
ID,
|
||||
IS_CUSTOM,
|
||||
CUSTOM_CLASS,
|
||||
'report$default',
|
||||
true,
|
||||
TEMPLATE_FILE_ID,
|
||||
REPORT_OUTPUT_TYPE
|
||||
from REPORT_REPORT^
|
||||
|
||||
alter table REPORT_REPORT drop column REPORT_OUTPUT_TYPE^
|
||||
alter table REPORT_REPORT drop column TEMPLATE_FILE_ID^
|
||||
alter table REPORT_REPORT drop column IS_CUSTOM^
|
||||
alter table REPORT_REPORT drop column CUSTOM_CLASS^
|
||||
-- Description: add REPORT_TEMPLATE table, drop obsolete columns in REPORT_REPORT
|
||||
|
||||
create table REPORT_TEMPLATE
|
||||
(
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp without time zone,
|
||||
CREATED_BY character varying(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp without time zone,
|
||||
UPDATED_BY character varying(50),
|
||||
|
||||
REPORT_ID uuid,
|
||||
CODE varchar(50),
|
||||
TEMPLATE_FILE_ID uuid,
|
||||
OUTPUT_TYPE integer default 0,
|
||||
IS_DEFAULT boolean default false,
|
||||
IS_CUSTOM boolean default false,
|
||||
CUSTOM_CLASS character varying,
|
||||
|
||||
primary key (ID),
|
||||
constraint FK_REPORT_TEMPLATE_TO_REPORT foreign key (REPORT_ID)
|
||||
references REPORT_REPORT (ID)
|
||||
)^
|
||||
|
||||
alter table REPORT_REPORT drop column DELETE_TS^
|
||||
alter table REPORT_REPORT drop column DELETED_BY^
|
||||
alter table REPORT_REPORT drop column TEMPLATE_PATH^
|
||||
|
||||
alter table REPORT_BAND_DEFINITION drop column DELETE_TS^
|
||||
alter table REPORT_BAND_DEFINITION drop column DELETED_BY^
|
||||
|
||||
alter table REPORT_INPUT_PARAMETER drop column DELETE_TS^
|
||||
alter table REPORT_INPUT_PARAMETER drop column DELETED_BY^
|
||||
|
||||
alter table REPORT_DATA_SET drop column DELETE_TS^
|
||||
alter table REPORT_DATA_SET drop column DELETED_BY^
|
||||
|
||||
alter table REPORT_REPORT_SCREEN drop column DELETE_TS^
|
||||
alter table REPORT_REPORT_SCREEN drop column DELETED_BY^
|
||||
|
||||
alter table REPORT_VALUE_FORMAT drop column DELETE_TS^
|
||||
alter table REPORT_VALUE_FORMAT drop column DELETED_BY^
|
||||
|
||||
insert into REPORT_TEMPLATE(
|
||||
ID,
|
||||
CREATE_TS,
|
||||
CREATED_BY,
|
||||
VERSION,
|
||||
UPDATE_TS,
|
||||
UPDATED_BY,
|
||||
REPORT_ID,
|
||||
IS_CUSTOM,
|
||||
CUSTOM_CLASS,
|
||||
CODE,
|
||||
IS_DEFAULT,
|
||||
TEMPLATE_FILE_ID,
|
||||
OUTPUT_TYPE
|
||||
)
|
||||
select
|
||||
newid(),
|
||||
CREATE_TS,
|
||||
CREATED_BY,
|
||||
VERSION,
|
||||
UPDATE_TS,
|
||||
UPDATED_BY,
|
||||
ID,
|
||||
IS_CUSTOM,
|
||||
CUSTOM_CLASS,
|
||||
'report$default',
|
||||
true,
|
||||
TEMPLATE_FILE_ID,
|
||||
REPORT_OUTPUT_TYPE
|
||||
from REPORT_REPORT^
|
||||
|
||||
alter table REPORT_REPORT drop column REPORT_OUTPUT_TYPE^
|
||||
alter table REPORT_REPORT drop column TEMPLATE_FILE_ID^
|
||||
alter table REPORT_REPORT drop column IS_CUSTOM^
|
||||
alter table REPORT_REPORT drop column CUSTOM_CLASS^
|
||||
alter table REPORT_REPORT drop column LINKED_ENTITY^
|
@ -1,42 +1,42 @@
|
||||
-- Description:
|
||||
|
||||
create table SYS_SENDING_MESSAGE (
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
ADDRESS_TO varchar(500),
|
||||
ADDRESS_FROM varchar(100),
|
||||
CAPTION varchar(500),
|
||||
CONTENT_TEXT text,
|
||||
DEADLINE timestamp,
|
||||
STATUS int,
|
||||
DATE_SENT timestamp,
|
||||
ATTEMPTS_COUNT int,
|
||||
ATTEMPTS_MADE int,
|
||||
ATTACHMENTS_NAME varchar(500),
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
create table SYS_SENDING_ATTACHMENT(
|
||||
ID uuid,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
MESSAGE_ID uuid,
|
||||
CONTENT bytea,
|
||||
CONTENT_ID varchar(50),
|
||||
NAME varchar(500),
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
alter table SYS_SENDING_ATTACHMENT add constraint FK_SYS_SENDING_ATTACHMENT_SENDING_MESSAGE foreign key (MESSAGE_ID) references SYS_SENDING_MESSAGE (ID)^
|
||||
|
||||
CREATE INDEX SYS_SENDING_ATTACHMENT_MESSAGE_IDX
|
||||
ON SYS_SENDING_ATTACHMENT(MESSAGE_ID )^
|
||||
|
||||
insert into SEC_USER (ID, CREATE_TS, VERSION, LOGIN, LOGIN_LC, PASSWORD, NAME, GROUP_ID, ACTIVE)
|
||||
values ('60885987-1b61-4247-94c7-dff348347f94', now(), 0, 'emailer', 'emailer', '2f22cf032e4be87de59e4e8bfd066ed1', 'User for Email sending', '0fa2b1a5-1d68-4d69-9fbd-dff348347f93', true)^
|
||||
-- Description:
|
||||
|
||||
create table SYS_SENDING_MESSAGE (
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
ADDRESS_TO varchar(500),
|
||||
ADDRESS_FROM varchar(100),
|
||||
CAPTION varchar(500),
|
||||
CONTENT_TEXT text,
|
||||
DEADLINE timestamp,
|
||||
STATUS int,
|
||||
DATE_SENT timestamp,
|
||||
ATTEMPTS_COUNT int,
|
||||
ATTEMPTS_MADE int,
|
||||
ATTACHMENTS_NAME varchar(500),
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
create table SYS_SENDING_ATTACHMENT(
|
||||
ID uuid,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
MESSAGE_ID uuid,
|
||||
CONTENT bytea,
|
||||
CONTENT_ID varchar(50),
|
||||
NAME varchar(500),
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
alter table SYS_SENDING_ATTACHMENT add constraint FK_SYS_SENDING_ATTACHMENT_SENDING_MESSAGE foreign key (MESSAGE_ID) references SYS_SENDING_MESSAGE (ID)^
|
||||
|
||||
CREATE INDEX SYS_SENDING_ATTACHMENT_MESSAGE_IDX
|
||||
ON SYS_SENDING_ATTACHMENT(MESSAGE_ID )^
|
||||
|
||||
insert into SEC_USER (ID, CREATE_TS, VERSION, LOGIN, LOGIN_LC, PASSWORD, NAME, GROUP_ID, ACTIVE)
|
||||
values ('60885987-1b61-4247-94c7-dff348347f94', now(), 0, 'emailer', 'emailer', '2f22cf032e4be87de59e4e8bfd066ed1', 'User for Email sending', '0fa2b1a5-1d68-4d69-9fbd-dff348347f93', true)^
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Description:
|
||||
alter table SYS_APP_FOLDER add column APPLY_DEFAULT boolean;
|
||||
alter table SEC_SEARCH_FOLDER add column APPLY_DEFAULT boolean;
|
||||
-- Description:
|
||||
alter table SYS_APP_FOLDER add column APPLY_DEFAULT boolean;
|
||||
alter table SEC_SEARCH_FOLDER add column APPLY_DEFAULT boolean;
|
||||
|
@ -1,3 +1,3 @@
|
||||
-- Description
|
||||
alter table SEC_SEARCH_FOLDER add column IS_SET boolean;
|
||||
alter table SEC_SEARCH_FOLDER add column ENTITY_TYPE varchar(50);
|
||||
-- Description
|
||||
alter table SEC_SEARCH_FOLDER add column IS_SET boolean;
|
||||
alter table SEC_SEARCH_FOLDER add column ENTITY_TYPE varchar(50);
|
||||
|
@ -1,12 +1,12 @@
|
||||
-- Description: add table SYS_ENTITY_SNAPSHOT
|
||||
|
||||
create table SYS_ENTITY_SNAPSHOT (
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
ENTITY_META_CLASS varchar(50),
|
||||
ENTITY_ID uuid,
|
||||
VIEW_XML text,
|
||||
SNAPSHOT_XML text,
|
||||
primary key (ID)
|
||||
)^
|
||||
-- Description: add table SYS_ENTITY_SNAPSHOT
|
||||
|
||||
create table SYS_ENTITY_SNAPSHOT (
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
ENTITY_META_CLASS varchar(50),
|
||||
ENTITY_ID uuid,
|
||||
VIEW_XML text,
|
||||
SNAPSHOT_XML text,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
@ -1,57 +1,57 @@
|
||||
-- Description:
|
||||
|
||||
create table SYS_CATEGORY(
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
NAME varchar(255),
|
||||
SPECIAL varchar(50),
|
||||
ENTITY_TYPE varchar(50),
|
||||
IS_DEFAULT boolean,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
create table SYS_CATEGORY_ATTR(
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
ACTIVE boolean,
|
||||
NAME varchar(255),
|
||||
CATEGORY_ID uuid,
|
||||
IS_ENTITY boolean,
|
||||
DATA_TYPE varchar(20),
|
||||
DEFAULT_VALUE varchar,
|
||||
DEFAULT_ENTITY_VALUE uuid,
|
||||
ENUMERATION varchar(500),
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
alter table SYS_CATEGORY_ATTR add constraint SYS_CATEGORY_ATTR_CATEGORY_ID foreign key (CATEGORY_ID) references SYS_CATEGORY(ID)^
|
||||
|
||||
create table SYS_ATTR_VALUE(
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
CATEGORY_ATTR_ID uuid,
|
||||
ENTITY_ID uuid,
|
||||
VALUE varchar(255),
|
||||
ENTITY_VALUE uuid,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
-- Description:
|
||||
|
||||
create table SYS_CATEGORY(
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
NAME varchar(255),
|
||||
SPECIAL varchar(50),
|
||||
ENTITY_TYPE varchar(50),
|
||||
IS_DEFAULT boolean,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
create table SYS_CATEGORY_ATTR(
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
ACTIVE boolean,
|
||||
NAME varchar(255),
|
||||
CATEGORY_ID uuid,
|
||||
IS_ENTITY boolean,
|
||||
DATA_TYPE varchar(20),
|
||||
DEFAULT_VALUE varchar,
|
||||
DEFAULT_ENTITY_VALUE uuid,
|
||||
ENUMERATION varchar(500),
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
alter table SYS_CATEGORY_ATTR add constraint SYS_CATEGORY_ATTR_CATEGORY_ID foreign key (CATEGORY_ID) references SYS_CATEGORY(ID)^
|
||||
|
||||
create table SYS_ATTR_VALUE(
|
||||
ID uuid not null,
|
||||
CREATE_TS timestamp,
|
||||
CREATED_BY varchar(50),
|
||||
VERSION integer,
|
||||
UPDATE_TS timestamp,
|
||||
UPDATED_BY varchar(50),
|
||||
DELETE_TS timestamp,
|
||||
DELETED_BY varchar(50),
|
||||
CATEGORY_ATTR_ID uuid,
|
||||
ENTITY_ID uuid,
|
||||
VALUE varchar(255),
|
||||
ENTITY_VALUE uuid,
|
||||
primary key (ID)
|
||||
)^
|
||||
|
||||
alter table SYS_ATTR_VALUE add constraint SYS_ATTR_VALUE_CATEGORY_ATTR_ID foreign key (CATEGORY_ATTR_ID) references SYS_CATEGORY_ATTR(ID)^
|
@ -1,14 +1,14 @@
|
||||
-- Description:
|
||||
alter table SYS_CATEGORY_ATTR drop column DEFAULT_VALUE^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_STRING varchar^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_INT integer^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_DOUBLE real^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_DATE date^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_BOOLEAN boolean^
|
||||
|
||||
alter table SYS_ATTR_VALUE drop column VALUE^
|
||||
alter table SYS_ATTR_VALUE add column STRING_VALUE varchar^
|
||||
alter table SYS_ATTR_VALUE add column INTEGER_VALUE integer^
|
||||
alter table SYS_ATTR_VALUE add column DOUBLE_VALUE real^
|
||||
alter table SYS_ATTR_VALUE add column DATE_VALUE date^
|
||||
-- Description:
|
||||
alter table SYS_CATEGORY_ATTR drop column DEFAULT_VALUE^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_STRING varchar^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_INT integer^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_DOUBLE real^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_DATE date^
|
||||
alter table SYS_CATEGORY_ATTR add column DEFAULT_BOOLEAN boolean^
|
||||
|
||||
alter table SYS_ATTR_VALUE drop column VALUE^
|
||||
alter table SYS_ATTR_VALUE add column STRING_VALUE varchar^
|
||||
alter table SYS_ATTR_VALUE add column INTEGER_VALUE integer^
|
||||
alter table SYS_ATTR_VALUE add column DOUBLE_VALUE real^
|
||||
alter table SYS_ATTR_VALUE add column DATE_VALUE date^
|
||||
alter table SYS_ATTR_VALUE add column BOOLEAN_VALUE boolean^
|
@ -1,2 +1,2 @@
|
||||
-- Description:
|
||||
-- Description:
|
||||
alter table SYS_CATEGORY_ATTR alter column DATA_TYPE type varchar(200);
|
@ -1,3 +1,3 @@
|
||||
-- Description:
|
||||
|
||||
-- Description:
|
||||
|
||||
alter table SYS_CATEGORY add DISCRIMINATOR integer;
|
@ -1,2 +1,2 @@
|
||||
-- Description:
|
||||
-- Description:
|
||||
alter table SYS_CATEGORY_ATTR add ORDER_NO integer;
|
@ -1,2 +1,2 @@
|
||||
|
||||
|
||||
alter table SYS_CATEGORY_ATTR add SCREEN varchar(255);
|
@ -1,3 +1,3 @@
|
||||
|
||||
alter table SYS_CATEGORY_ATTR add REQUIRED boolean;
|
||||
|
||||
alter table SYS_CATEGORY_ATTR add REQUIRED boolean;
|
||||
update SYS_CATEGORY_ATTR set REQUIRED = false;
|
@ -1,2 +1,2 @@
|
||||
-- Description:
|
||||
-- Description:
|
||||
ALTER TABLE SEC_SCREEN_HISTORY ALTER column URL type TEXT;
|
@ -1,2 +1,2 @@
|
||||
-- Description:
|
||||
-- Description:
|
||||
ALTER TABLE SYS_CATEGORY_ATTR ALTER COLUMN DEFAULT_DATE TYPE timestamp;
|
@ -1,2 +1,2 @@
|
||||
-- Description:
|
||||
-- Description:
|
||||
ALTER TABLE SYS_ATTR_VALUE ALTER COLUMN DATE_VALUE TYPE timestamp;
|
@ -1,7 +1,7 @@
|
||||
--Add fields for specify parameters in Entity/EntityList/Filter loaders
|
||||
|
||||
alter table REPORT_DATA_SET add ENTITY_PARAM_NAME varchar(255) ^
|
||||
alter table REPORT_DATA_SET add LIST_ENTITIES_PARAM_NAME varchar(255) ^
|
||||
|
||||
update REPORT_DATA_SET set ENTITY_PARAM_NAME = 'entity' ^
|
||||
--Add fields for specify parameters in Entity/EntityList/Filter loaders
|
||||
|
||||
alter table REPORT_DATA_SET add ENTITY_PARAM_NAME varchar(255) ^
|
||||
alter table REPORT_DATA_SET add LIST_ENTITIES_PARAM_NAME varchar(255) ^
|
||||
|
||||
update REPORT_DATA_SET set ENTITY_PARAM_NAME = 'entity' ^
|
||||
update REPORT_DATA_SET set LIST_ENTITIES_PARAM_NAME = 'entities' ^
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user