CCM NG: Some modifications to the configuration classes and first test cases
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3773 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
fd010fef1a
commit
66048bf198
|
|
@ -146,7 +146,7 @@ public class Domain extends CcmObject implements Serializable {
|
||||||
/**
|
/**
|
||||||
* A version string for the {@code Domain}.
|
* A version string for the {@code Domain}.
|
||||||
*/
|
*/
|
||||||
@Column(name = "VERSION", nullable = false)
|
@Column(name = "VERSION", nullable = true)
|
||||||
@NotBlank
|
@NotBlank
|
||||||
@XmlElement(name = "version", namespace = CAT_XML_NS)
|
@XmlElement(name = "version", namespace = CAT_XML_NS)
|
||||||
private String version;
|
private String version;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public class BigDecimalSetting
|
||||||
|
|
||||||
private static final long serialVersionUID = 1869044294174385532L;
|
private static final long serialVersionUID = 1869044294174385532L;
|
||||||
|
|
||||||
@Column(name = "entry_value")
|
@Column(name = "setting_value")
|
||||||
private BigDecimal value;
|
private BigDecimal value;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class BooleanSetting
|
||||||
|
|
||||||
private static final long serialVersionUID = -1724350134756734938L;
|
private static final long serialVersionUID = -1724350134756734938L;
|
||||||
|
|
||||||
@Column(name = "entry_value")
|
@Column(name = "setting_value")
|
||||||
private boolean value;
|
private boolean value;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ public final class ConfigurationInfo {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (obj instanceof ConfigurationInfo) {
|
if (!(obj instanceof ConfigurationInfo)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final ConfigurationInfo other = (ConfigurationInfo) obj;
|
final ConfigurationInfo other = (ConfigurationInfo) obj;
|
||||||
|
|
@ -140,6 +140,7 @@ public final class ConfigurationInfo {
|
||||||
+ "descBundle = \"%s\", "
|
+ "descBundle = \"%s\", "
|
||||||
+ "descKey = \"%s\""
|
+ "descKey = \"%s\""
|
||||||
+ " }",
|
+ " }",
|
||||||
|
super.toString(),
|
||||||
name,
|
name,
|
||||||
descBundle,
|
descBundle,
|
||||||
descKey);
|
descKey);
|
||||||
|
|
|
||||||
|
|
@ -356,20 +356,35 @@ public class ConfigurationManager {
|
||||||
*/
|
*/
|
||||||
public <T> AbstractSetting<T> findSetting(final String name,
|
public <T> AbstractSetting<T> findSetting(final String name,
|
||||||
final Class<T> clazz) {
|
final Class<T> clazz) {
|
||||||
final String[] tokens = name.split(".");
|
LOGGER.debug(String.format(
|
||||||
|
"Trying to find setting \"%s\" of type \"%s\"",
|
||||||
|
name,
|
||||||
|
clazz.getName()));
|
||||||
|
final String[] tokens = name.split("\\.");
|
||||||
|
LOGGER.debug(String.format("Setting name \"%s\" has %d tokens.",
|
||||||
|
name,
|
||||||
|
tokens.length));
|
||||||
final String[] categoryTokens = Arrays.copyOfRange(tokens,
|
final String[] categoryTokens = Arrays.copyOfRange(tokens,
|
||||||
0,
|
0,
|
||||||
tokens.length - 1);
|
tokens.length - 1);
|
||||||
final String categoryPath = String.join(".", categoryTokens);
|
final String categoryPath = String.join(".", categoryTokens);
|
||||||
|
LOGGER.debug(String.format("categoryPath for setting is \"%s\".",
|
||||||
|
categoryPath));
|
||||||
|
|
||||||
final Domain registry = domainRepository
|
final Domain registry = domainRepository
|
||||||
.findByDomainKey(REGISTRY_DOMAIN);
|
.findByDomainKey(REGISTRY_DOMAIN);
|
||||||
final Category category = categoryRepository.findByPath(registry,
|
final Category category = categoryRepository.findByPath(registry,
|
||||||
categoryPath);
|
categoryPath);
|
||||||
if (category == null) {
|
if (category == null) {
|
||||||
|
LOGGER.warn(String.format(String.format(
|
||||||
|
"Category \"%s\" for setting \"%s\" not found.",
|
||||||
|
categoryPath,
|
||||||
|
name)));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOGGER.debug(String.format("Category has %d objects. Filtering.",
|
||||||
|
category.getObjects().size()));
|
||||||
final Optional<Categorization> result = category
|
final Optional<Categorization> result = category
|
||||||
.getObjects()
|
.getObjects()
|
||||||
.stream()
|
.stream()
|
||||||
|
|
@ -391,9 +406,17 @@ public class ConfigurationManager {
|
||||||
= (AbstractSetting<T>) entry;
|
= (AbstractSetting<T>) entry;
|
||||||
return resultEntry;
|
return resultEntry;
|
||||||
} else {
|
} else {
|
||||||
|
LOGGER.warn(String.format("Setting \"%s\" found but is not of "
|
||||||
|
+ "the requested type \"%s\".",
|
||||||
|
name,
|
||||||
|
clazz.getName()));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
LOGGER.warn(String.format(
|
||||||
|
"Setting \"%s\" was not found in category \"%s\".",
|
||||||
|
name,
|
||||||
|
categoryPath));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -594,6 +617,9 @@ public class ConfigurationManager {
|
||||||
settingType);
|
settingType);
|
||||||
if (setting != null) {
|
if (setting != null) {
|
||||||
try {
|
try {
|
||||||
|
LOGGER.debug("Setting \"%s\" found. Value: %s",
|
||||||
|
settingPath,
|
||||||
|
setting.getValue().toString());
|
||||||
field.set(conf, setting.getValue());
|
field.set(conf, setting.getValue());
|
||||||
} catch (IllegalAccessException ex) {
|
} catch (IllegalAccessException ex) {
|
||||||
LOGGER.warn(String.format(
|
LOGGER.warn(String.format(
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class DoubleSetting
|
||||||
|
|
||||||
private static final long serialVersionUID = -6944518527865528160L;
|
private static final long serialVersionUID = -6944518527865528160L;
|
||||||
|
|
||||||
@Column(name = "entry_value")
|
@Column(name = "setting_value")
|
||||||
private double value;
|
private double value;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class EnumSetting
|
||||||
private static final long serialVersionUID = 8506016944203102813L;
|
private static final long serialVersionUID = 8506016944203102813L;
|
||||||
|
|
||||||
@ElementCollection
|
@ElementCollection
|
||||||
@JoinTable(name = "ENUM_CONFIGURATION_ENTRIES_VALUES",
|
@JoinTable(name = "SETTINGS_ENUM_VALUES",
|
||||||
schema = DB_SCHEMA,
|
schema = DB_SCHEMA,
|
||||||
joinColumns = {@JoinColumn(name = "ENUM_ID")})
|
joinColumns = {@JoinColumn(name = "ENUM_ID")})
|
||||||
private Set<String> value;
|
private Set<String> value;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public class LocalizedStringSetting
|
||||||
@Embedded
|
@Embedded
|
||||||
@AssociationOverride(
|
@AssociationOverride(
|
||||||
name = "values",
|
name = "values",
|
||||||
joinTable = @JoinTable(name = "CONF_ENTRIES_L10N_STR_VALUES",
|
joinTable = @JoinTable(name = "SETTINGS_L10N_STR_VALUES",
|
||||||
schema = DB_SCHEMA,
|
schema = DB_SCHEMA,
|
||||||
joinColumns = {
|
joinColumns = {
|
||||||
@JoinColumn(name = "ENTRY_ID")}))
|
@JoinColumn(name = "ENTRY_ID")}))
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class LongSetting
|
||||||
|
|
||||||
private static final long serialVersionUID = 818622372461020368L;
|
private static final long serialVersionUID = 818622372461020368L;
|
||||||
|
|
||||||
@Column(name = "entry_value")
|
@Column(name = "setting_value")
|
||||||
private long value;
|
private long value;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@ public final class SettingInfo {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (obj instanceof SettingInfo) {
|
if (!(obj instanceof SettingInfo)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final SettingInfo other = (SettingInfo) obj;
|
final SettingInfo other = (SettingInfo) obj;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public class StringSetting
|
||||||
|
|
||||||
private static final long serialVersionUID = -8564570962027541731L;
|
private static final long serialVersionUID = -8564570962027541731L;
|
||||||
|
|
||||||
@Column(name = "entry_value", length = 1024)
|
@Column(name = "setting_value", length = 1024)
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@ import javax.persistence.AttributeConverter;
|
||||||
import javax.persistence.Converter;
|
import javax.persistence.Converter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A converter for converting URI properties to String. JPA does not support
|
* A converter for converting URI properties to String. JPA does not support URI
|
||||||
* URI as type and will store them as LOBs without this converter. The converter
|
* as type and will store them as LOBs without this converter. The converter is
|
||||||
* is automatically applied to all URI properties.
|
* automatically applied to all URI properties.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
|
|
@ -37,21 +37,31 @@ public class UriConverter implements AttributeConverter<URI, String> {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
* @param attribute {@inheritDoc}
|
* @param attribute {@inheritDoc}
|
||||||
|
*
|
||||||
* @return {@inheritDoc}
|
* @return {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public String convertToDatabaseColumn(final URI attribute) {
|
public String convertToDatabaseColumn(final URI attribute) {
|
||||||
|
if (attribute == null) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
return attribute.toString();
|
return attribute.toString();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*
|
*
|
||||||
* @param dbData {@inheritDoc}
|
* @param dbData {@inheritDoc}
|
||||||
|
*
|
||||||
* @return {@inheritDoc}
|
* @return {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public URI convertToEntityAttribute(final String dbData) {
|
public URI convertToEntityAttribute(final String dbData) {
|
||||||
|
if (dbData == null || dbData.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return new URI(dbData);
|
return new URI(dbData);
|
||||||
} catch (URISyntaxException ex) {
|
} catch (URISyntaxException ex) {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
DOMAIN_KEY varchar(255) not null,
|
DOMAIN_KEY varchar(255) not null,
|
||||||
RELEASED timestamp,
|
RELEASED timestamp,
|
||||||
URI varchar(1024),
|
URI varchar(1024),
|
||||||
VERSION varchar(255) not null,
|
VERSION varchar(255),
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
ROOT_CATEGORY_ID bigint,
|
ROOT_CATEGORY_ID bigint,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
|
|
@ -81,13 +81,6 @@
|
||||||
primary key (ROLE_ID)
|
primary key (ROLE_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.CONF_ENTRIES_L10N_STR_VALUES (
|
|
||||||
ENTRY_ID bigint not null,
|
|
||||||
LOCALIZED_VALUE clob,
|
|
||||||
LOCALE varchar(255) not null,
|
|
||||||
primary key (ENTRY_ID, LOCALE)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table CCM_CORE.DIGESTS (
|
create table CCM_CORE.DIGESTS (
|
||||||
FREQUENCY integer,
|
FREQUENCY integer,
|
||||||
HEADER varchar(4096) not null,
|
HEADER varchar(4096) not null,
|
||||||
|
|
@ -124,11 +117,6 @@
|
||||||
primary key (OBJECT_ID, LOCALE)
|
primary key (OBJECT_ID, LOCALE)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.ENUM_CONFIGURATION_ENTRIES_VALUES (
|
|
||||||
ENUM_ID bigint not null,
|
|
||||||
value varchar(255)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
||||||
ACTIVE boolean,
|
ACTIVE boolean,
|
||||||
ADMIN_NAME varchar(255),
|
ADMIN_NAME varchar(255),
|
||||||
|
|
@ -479,19 +467,19 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_BIG_DECIMAL (
|
create table CCM_CORE.SETTINGS_BIG_DECIMAL (
|
||||||
entry_value decimal(19,2),
|
setting_value decimal(19,2),
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_BOOLEAN (
|
create table CCM_CORE.SETTINGS_BOOLEAN (
|
||||||
entry_value boolean,
|
setting_value boolean,
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_DOUBLE (
|
create table CCM_CORE.SETTINGS_DOUBLE (
|
||||||
entry_value double,
|
setting_value double,
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
@ -501,19 +489,31 @@
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table CCM_CORE.SETTINGS_ENUM_VALUES (
|
||||||
|
ENUM_ID bigint not null,
|
||||||
|
value varchar(255)
|
||||||
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_L10N_STRING (
|
create table CCM_CORE.SETTINGS_L10N_STRING (
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table CCM_CORE.SETTINGS_L10N_STR_VALUES (
|
||||||
|
ENTRY_ID bigint not null,
|
||||||
|
LOCALIZED_VALUE clob,
|
||||||
|
LOCALE varchar(255) not null,
|
||||||
|
primary key (ENTRY_ID, LOCALE)
|
||||||
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_LONG (
|
create table CCM_CORE.SETTINGS_LONG (
|
||||||
entry_value bigint,
|
setting_value bigint,
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_STRING (
|
create table CCM_CORE.SETTINGS_STRING (
|
||||||
entry_value varchar(1024),
|
setting_value varchar(1024),
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
@ -678,11 +678,6 @@
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.CATEGORIES;
|
references CCM_CORE.CATEGORIES;
|
||||||
|
|
||||||
alter table CCM_CORE.CONF_ENTRIES_L10N_STR_VALUES
|
|
||||||
add constraint FK_ftb5yqeoli1m932yp3p8ho74g
|
|
||||||
foreign key (ENTRY_ID)
|
|
||||||
references CCM_CORE.SETTINGS_L10N_STRING;
|
|
||||||
|
|
||||||
alter table CCM_CORE.DIGESTS
|
alter table CCM_CORE.DIGESTS
|
||||||
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
||||||
foreign key (FROM_PARTY_ID)
|
foreign key (FROM_PARTY_ID)
|
||||||
|
|
@ -713,11 +708,6 @@
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.CATEGORY_DOMAINS;
|
references CCM_CORE.CATEGORY_DOMAINS;
|
||||||
|
|
||||||
alter table CCM_CORE.ENUM_CONFIGURATION_ENTRIES_VALUES
|
|
||||||
add constraint FK_ao3evxajxd8y4gy5a6e8ua49j
|
|
||||||
foreign key (ENUM_ID)
|
|
||||||
references CCM_CORE.SETTINGS_ENUM;
|
|
||||||
|
|
||||||
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
||||||
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
||||||
foreign key (parentComponent_OBJECT_ID)
|
foreign key (parentComponent_OBJECT_ID)
|
||||||
|
|
@ -1033,11 +1023,21 @@
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.SETTINGS;
|
references CCM_CORE.SETTINGS;
|
||||||
|
|
||||||
|
alter table CCM_CORE.SETTINGS_ENUM_VALUES
|
||||||
|
add constraint FK_sq653hqyeeklci0y7pvoxf5ha
|
||||||
|
foreign key (ENUM_ID)
|
||||||
|
references CCM_CORE.SETTINGS_ENUM;
|
||||||
|
|
||||||
alter table CCM_CORE.SETTINGS_L10N_STRING
|
alter table CCM_CORE.SETTINGS_L10N_STRING
|
||||||
add constraint FK_evnyfg9udprxmbginhc4o0is9
|
add constraint FK_evnyfg9udprxmbginhc4o0is9
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.SETTINGS;
|
references CCM_CORE.SETTINGS;
|
||||||
|
|
||||||
|
alter table CCM_CORE.SETTINGS_L10N_STR_VALUES
|
||||||
|
add constraint FK_t21obt5do2tjhskjxgxd5143r
|
||||||
|
foreign key (ENTRY_ID)
|
||||||
|
references CCM_CORE.SETTINGS_L10N_STRING;
|
||||||
|
|
||||||
alter table CCM_CORE.SETTINGS_LONG
|
alter table CCM_CORE.SETTINGS_LONG
|
||||||
add constraint FK_2l4bw7pbq3koj81cjyoqpenjj
|
add constraint FK_2l4bw7pbq3koj81cjyoqpenjj
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
DOMAIN_KEY varchar(255) not null,
|
DOMAIN_KEY varchar(255) not null,
|
||||||
RELEASED timestamp,
|
RELEASED timestamp,
|
||||||
URI varchar(1024),
|
URI varchar(1024),
|
||||||
VERSION varchar(255) not null,
|
VERSION varchar(255),
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
ROOT_CATEGORY_ID int8,
|
ROOT_CATEGORY_ID int8,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
|
|
@ -81,13 +81,6 @@
|
||||||
primary key (ROLE_ID)
|
primary key (ROLE_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.CONF_ENTRIES_L10N_STR_VALUES (
|
|
||||||
ENTRY_ID int8 not null,
|
|
||||||
LOCALIZED_VALUE text,
|
|
||||||
LOCALE varchar(255) not null,
|
|
||||||
primary key (ENTRY_ID, LOCALE)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table CCM_CORE.DIGESTS (
|
create table CCM_CORE.DIGESTS (
|
||||||
FREQUENCY int4,
|
FREQUENCY int4,
|
||||||
HEADER varchar(4096) not null,
|
HEADER varchar(4096) not null,
|
||||||
|
|
@ -124,11 +117,6 @@
|
||||||
primary key (OBJECT_ID, LOCALE)
|
primary key (OBJECT_ID, LOCALE)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.ENUM_CONFIGURATION_ENTRIES_VALUES (
|
|
||||||
ENUM_ID int8 not null,
|
|
||||||
value varchar(255)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
||||||
ACTIVE boolean,
|
ACTIVE boolean,
|
||||||
ADMIN_NAME varchar(255),
|
ADMIN_NAME varchar(255),
|
||||||
|
|
@ -479,19 +467,19 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_BIG_DECIMAL (
|
create table CCM_CORE.SETTINGS_BIG_DECIMAL (
|
||||||
entry_value numeric(19, 2),
|
setting_value numeric(19, 2),
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_BOOLEAN (
|
create table CCM_CORE.SETTINGS_BOOLEAN (
|
||||||
entry_value boolean,
|
setting_value boolean,
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_DOUBLE (
|
create table CCM_CORE.SETTINGS_DOUBLE (
|
||||||
entry_value float8,
|
setting_value float8,
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
@ -501,19 +489,31 @@
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table CCM_CORE.SETTINGS_ENUM_VALUES (
|
||||||
|
ENUM_ID int8 not null,
|
||||||
|
value varchar(255)
|
||||||
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_L10N_STRING (
|
create table CCM_CORE.SETTINGS_L10N_STRING (
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table CCM_CORE.SETTINGS_L10N_STR_VALUES (
|
||||||
|
ENTRY_ID int8 not null,
|
||||||
|
LOCALIZED_VALUE text,
|
||||||
|
LOCALE varchar(255) not null,
|
||||||
|
primary key (ENTRY_ID, LOCALE)
|
||||||
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_LONG (
|
create table CCM_CORE.SETTINGS_LONG (
|
||||||
entry_value int8,
|
setting_value int8,
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_STRING (
|
create table CCM_CORE.SETTINGS_STRING (
|
||||||
entry_value varchar(1024),
|
setting_value varchar(1024),
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
@ -678,11 +678,6 @@
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.CATEGORIES;
|
references CCM_CORE.CATEGORIES;
|
||||||
|
|
||||||
alter table CCM_CORE.CONF_ENTRIES_L10N_STR_VALUES
|
|
||||||
add constraint FK_ftb5yqeoli1m932yp3p8ho74g
|
|
||||||
foreign key (ENTRY_ID)
|
|
||||||
references CCM_CORE.SETTINGS_L10N_STRING;
|
|
||||||
|
|
||||||
alter table CCM_CORE.DIGESTS
|
alter table CCM_CORE.DIGESTS
|
||||||
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
||||||
foreign key (FROM_PARTY_ID)
|
foreign key (FROM_PARTY_ID)
|
||||||
|
|
@ -713,11 +708,6 @@
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.CATEGORY_DOMAINS;
|
references CCM_CORE.CATEGORY_DOMAINS;
|
||||||
|
|
||||||
alter table CCM_CORE.ENUM_CONFIGURATION_ENTRIES_VALUES
|
|
||||||
add constraint FK_ao3evxajxd8y4gy5a6e8ua49j
|
|
||||||
foreign key (ENUM_ID)
|
|
||||||
references CCM_CORE.SETTINGS_ENUM;
|
|
||||||
|
|
||||||
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
||||||
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
||||||
foreign key (parentComponent_OBJECT_ID)
|
foreign key (parentComponent_OBJECT_ID)
|
||||||
|
|
@ -1033,11 +1023,21 @@
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.SETTINGS;
|
references CCM_CORE.SETTINGS;
|
||||||
|
|
||||||
|
alter table CCM_CORE.SETTINGS_ENUM_VALUES
|
||||||
|
add constraint FK_sq653hqyeeklci0y7pvoxf5ha
|
||||||
|
foreign key (ENUM_ID)
|
||||||
|
references CCM_CORE.SETTINGS_ENUM;
|
||||||
|
|
||||||
alter table CCM_CORE.SETTINGS_L10N_STRING
|
alter table CCM_CORE.SETTINGS_L10N_STRING
|
||||||
add constraint FK_evnyfg9udprxmbginhc4o0is9
|
add constraint FK_evnyfg9udprxmbginhc4o0is9
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.SETTINGS;
|
references CCM_CORE.SETTINGS;
|
||||||
|
|
||||||
|
alter table CCM_CORE.SETTINGS_L10N_STR_VALUES
|
||||||
|
add constraint FK_t21obt5do2tjhskjxgxd5143r
|
||||||
|
foreign key (ENTRY_ID)
|
||||||
|
references CCM_CORE.SETTINGS_L10N_STRING;
|
||||||
|
|
||||||
alter table CCM_CORE.SETTINGS_LONG
|
alter table CCM_CORE.SETTINGS_LONG
|
||||||
add constraint FK_2l4bw7pbq3koj81cjyoqpenjj
|
add constraint FK_2l4bw7pbq3koj81cjyoqpenjj
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,162 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.configuration;
|
||||||
|
|
||||||
|
import org.jboss.arquillian.container.test.api.Deployment;
|
||||||
|
import org.jboss.arquillian.junit.Arquillian;
|
||||||
|
import org.jboss.arquillian.junit.InSequence;
|
||||||
|
import org.jboss.arquillian.persistence.CreateSchema;
|
||||||
|
import org.jboss.arquillian.persistence.PersistenceTest;
|
||||||
|
import org.jboss.arquillian.persistence.UsingDataSet;
|
||||||
|
import org.jboss.arquillian.transaction.api.annotation.TransactionMode;
|
||||||
|
import org.jboss.arquillian.transaction.api.annotation.Transactional;
|
||||||
|
import org.jboss.shrinkwrap.api.ShrinkWrap;
|
||||||
|
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
|
||||||
|
import org.jboss.shrinkwrap.api.spec.WebArchive;
|
||||||
|
import org.jboss.shrinkwrap.resolver.api.maven.Maven;
|
||||||
|
import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage;
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.AfterClass;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.libreccm.categorization.Categorization;
|
||||||
|
import org.libreccm.core.CcmObject;
|
||||||
|
import org.libreccm.jpa.EntityManagerProducer;
|
||||||
|
import org.libreccm.jpa.utils.MimeTypeConverter;
|
||||||
|
import org.libreccm.l10n.LocalizedString;
|
||||||
|
import org.libreccm.security.Permission;
|
||||||
|
import org.libreccm.tests.categories.IntegrationTest;
|
||||||
|
import org.libreccm.testutils.EqualsVerifier;
|
||||||
|
import org.libreccm.web.CcmApplication;
|
||||||
|
import org.libreccm.workflow.Workflow;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import static org.hamcrest.Matchers.*;
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@org.junit.experimental.categories.Category(IntegrationTest.class)
|
||||||
|
@RunWith(Arquillian.class)
|
||||||
|
@PersistenceTest
|
||||||
|
@Transactional(TransactionMode.COMMIT)
|
||||||
|
@CreateSchema({"create_ccm_core_schema.sql"})
|
||||||
|
public class ConfigurationManagerTest {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
private ConfigurationManager configurationManager;
|
||||||
|
|
||||||
|
public ConfigurationManagerTest() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void setUpClass() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void tearDownClass() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void tearDown() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deployment
|
||||||
|
public static WebArchive createDeployment() {
|
||||||
|
final PomEquippedResolveStage pom = Maven
|
||||||
|
.resolver()
|
||||||
|
.loadPomFromFile("pom.xml");
|
||||||
|
final PomEquippedResolveStage dependencies = pom
|
||||||
|
.importCompileAndRuntimeDependencies();
|
||||||
|
final File[] libs = dependencies.resolve().withTransitivity().asFile();
|
||||||
|
|
||||||
|
for (File lib : libs) {
|
||||||
|
System.err.printf("Adding file '%s' to test archive...%n",
|
||||||
|
lib.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ShrinkWrap
|
||||||
|
.create(WebArchive.class,
|
||||||
|
"LibreCCM-org.libreccm.categorization.CategoryManagerTest.war")
|
||||||
|
.addPackage(CcmObject.class.getPackage())
|
||||||
|
.addPackage(Permission.class.getPackage())
|
||||||
|
.addPackage(CcmApplication.class.getPackage())
|
||||||
|
.addPackage(Categorization.class.getPackage())
|
||||||
|
.addPackage(Configuration.class.getPackage())
|
||||||
|
.addPackage(LocalizedString.class.getPackage())
|
||||||
|
.addPackage(Workflow.class.getPackage())
|
||||||
|
.addPackage(EntityManagerProducer.class.getPackage())
|
||||||
|
.addPackage(MimeTypeConverter.class.getPackage())
|
||||||
|
.addPackage(EqualsVerifier.class.getPackage())
|
||||||
|
.addPackage(IntegrationTest.class.getPackage())
|
||||||
|
.addAsLibraries(libs)
|
||||||
|
.addAsResource("test-persistence.xml",
|
||||||
|
"META-INF/persistence.xml")
|
||||||
|
.addAsResource(
|
||||||
|
"configs/org/libreccm/configuration/ConfigurationManagerTest/"
|
||||||
|
+ "log4j2.xml",
|
||||||
|
"log4j2.xml")
|
||||||
|
.addAsWebInfResource("test-web.xml", "WEB-INF/web.xml")
|
||||||
|
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@InSequence(1)
|
||||||
|
public void managerIsInjected() {
|
||||||
|
assertThat(configurationManager, is(not(nullValue())));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@UsingDataSet(
|
||||||
|
"datasets/org/libreccm/configuration/ConfigurationManagerTest/data.yml")
|
||||||
|
@InSequence(2)
|
||||||
|
public void datasetOnly() {
|
||||||
|
System.out.println("Dataset loaded successfully.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@UsingDataSet(
|
||||||
|
"datasets/org/libreccm/configuration/ConfigurationManagerTest/data.yml")
|
||||||
|
@InSequence(1100)
|
||||||
|
public void loadConfiguration() {
|
||||||
|
final ExampleConfiguration configuration = configurationManager
|
||||||
|
.findConfiguration(ExampleConfiguration.class);
|
||||||
|
|
||||||
|
assertThat(configuration.getPrice(),
|
||||||
|
is(equalTo(new BigDecimal("98.99"))));
|
||||||
|
assertThat(configuration.isEnabled(), is(true));
|
||||||
|
assertThat(configuration.getMinTemperature(), is(23.5));
|
||||||
|
assertThat(configuration.getItemsPerPage(), is(20L));
|
||||||
|
assertThat(configuration.getHelpUrl(),
|
||||||
|
is(equalTo("http://www.example.org")));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,81 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.configuration;
|
||||||
|
|
||||||
|
import static org.libreccm.testutils.DatasetType.*;
|
||||||
|
|
||||||
|
import org.junit.After;
|
||||||
|
import org.junit.AfterClass;
|
||||||
|
import org.junit.Before;
|
||||||
|
import org.junit.BeforeClass;
|
||||||
|
import org.junit.experimental.categories.Category;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.junit.runners.Parameterized;
|
||||||
|
import org.libreccm.tests.categories.UnitTest;
|
||||||
|
import org.libreccm.testutils.DatasetType;
|
||||||
|
import org.libreccm.testutils.DatasetsVerifier;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@RunWith(Parameterized.class)
|
||||||
|
@Category(UnitTest.class)
|
||||||
|
public class DatasetsTest extends DatasetsVerifier {
|
||||||
|
|
||||||
|
@Parameterized.Parameters(name = "Dataset {0}")
|
||||||
|
public static Collection<String> data() {
|
||||||
|
return Arrays.asList(new String[]{
|
||||||
|
"/datasets/org/libreccm/configuration/ConfigurationManagerTest/data.yml"});
|
||||||
|
}
|
||||||
|
|
||||||
|
public DatasetsTest(final String datasetPath) {
|
||||||
|
super(datasetPath);;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getSchemas() {
|
||||||
|
return new String[]{"ccm_core"};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DatasetType getDatasetType() {
|
||||||
|
return YAML;
|
||||||
|
}
|
||||||
|
|
||||||
|
@BeforeClass
|
||||||
|
public static void setUpClass() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@AfterClass
|
||||||
|
public static void tearDownClass() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Before
|
||||||
|
public void setUp() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@After
|
||||||
|
public void tearDown() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -41,10 +41,12 @@ public class EqualsAndHashCodeTest extends EqualsVerifier {
|
||||||
return Arrays.asList(new Class<?>[]{
|
return Arrays.asList(new Class<?>[]{
|
||||||
BigDecimalSetting.class,
|
BigDecimalSetting.class,
|
||||||
BooleanSetting.class,
|
BooleanSetting.class,
|
||||||
|
ConfigurationInfo.class,
|
||||||
DoubleSetting.class,
|
DoubleSetting.class,
|
||||||
EnumSetting.class,
|
EnumSetting.class,
|
||||||
LocalizedStringSetting.class,
|
LocalizedStringSetting.class,
|
||||||
LongSetting.class,
|
LongSetting.class,
|
||||||
|
SettingInfo.class,
|
||||||
StringSetting.class
|
StringSetting.class
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.configuration;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
public class ExampleConfiguration {
|
||||||
|
|
||||||
|
@Setting
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
@Setting
|
||||||
|
private Boolean enabled;
|
||||||
|
|
||||||
|
@Setting
|
||||||
|
private Double minTemperature;
|
||||||
|
|
||||||
|
@Setting
|
||||||
|
private Long itemsPerPage;
|
||||||
|
|
||||||
|
@Setting
|
||||||
|
private String helpUrl;
|
||||||
|
|
||||||
|
public BigDecimal getPrice() {
|
||||||
|
return price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrice(final BigDecimal price) {
|
||||||
|
this.price = price;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnabled(final boolean enabled) {
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public double getMinTemperature() {
|
||||||
|
return minTemperature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMinTemperature(final double minTemperature) {
|
||||||
|
this.minTemperature = minTemperature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getItemsPerPage() {
|
||||||
|
return itemsPerPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setItemsPerPage(final long itemsPerPage) {
|
||||||
|
this.itemsPerPage = itemsPerPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHelpUrl() {
|
||||||
|
return helpUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHelpUrl(final String helpUrl) {
|
||||||
|
this.helpUrl = helpUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -40,10 +40,12 @@ public class ToStringTest extends ToStringVerifier {
|
||||||
return Arrays.asList(new Class<?>[]{
|
return Arrays.asList(new Class<?>[]{
|
||||||
BigDecimalSetting.class,
|
BigDecimalSetting.class,
|
||||||
BooleanSetting.class,
|
BooleanSetting.class,
|
||||||
|
ConfigurationInfo.class,
|
||||||
DoubleSetting.class,
|
DoubleSetting.class,
|
||||||
EnumSetting.class,
|
EnumSetting.class,
|
||||||
LocalizedStringSetting.class,
|
LocalizedStringSetting.class,
|
||||||
LongSetting.class,
|
LongSetting.class,
|
||||||
|
SettingInfo.class,
|
||||||
StringSetting.class
|
StringSetting.class
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,38 +42,10 @@ public class DatasetsTest extends DatasetsVerifier {
|
||||||
@Parameterized.Parameters(name = "Dataset {0}")
|
@Parameterized.Parameters(name = "Dataset {0}")
|
||||||
public static Collection<String> data() {
|
public static Collection<String> data() {
|
||||||
return Arrays.asList(new String[]{
|
return Arrays.asList(new String[]{
|
||||||
// "/datasets/org/libreccm/core/authentication/LoginManagerTest/data.json",
|
|
||||||
"/datasets/org/libreccm/core/CcmObjectRepositoryTest/data.json",
|
"/datasets/org/libreccm/core/CcmObjectRepositoryTest/data.json",
|
||||||
"/datasets/org/libreccm/core/CcmObjectRepositoryTest/after-delete.json",
|
"/datasets/org/libreccm/core/CcmObjectRepositoryTest/after-delete.json",
|
||||||
"/datasets/org/libreccm/core/CcmObjectRepositoryTest/after-save-changed.json",
|
"/datasets/org/libreccm/core/CcmObjectRepositoryTest/after-save-changed.json",
|
||||||
"/datasets/org/libreccm/core/CcmObjectRepositoryTest/after-save-new.json",
|
"/datasets/org/libreccm/core/CcmObjectRepositoryTest/after-save-new.json",
|
||||||
// "/datasets/org/libreccm/core/GroupManagerTest/after-add-to-group.json",
|
|
||||||
// "/datasets/org/libreccm/core/GroupManagerTest/after-remove-from-group.json",
|
|
||||||
// "/datasets/org/libreccm/core/GroupManagerTest/users-groups.json",
|
|
||||||
// "/datasets/org/libreccm/core/GroupRepositoryTest/data.json",
|
|
||||||
// "/datasets/org/libreccm/core/GroupRepositoryTest/after-delete.json",
|
|
||||||
// "/datasets/org/libreccm/core/GroupRepositoryTest/after-save-changed.json",
|
|
||||||
// "/datasets/org/libreccm/core/GroupRepositoryTest/after-save-new.json",
|
|
||||||
// "/datasets/org/libreccm/core/PermissionManagerTest/after-grant.json",
|
|
||||||
// "/datasets/org/libreccm/core/PermissionManagerTest/after-grant-wildcard.json",
|
|
||||||
// "/datasets/org/libreccm/core/PermissionManagerTest/after-revoke.json",
|
|
||||||
// "/datasets/org/libreccm/core/PermissionManagerTest/data.json",
|
|
||||||
// "/datasets/org/libreccm/core/PermissionRepositoryTest/after-save-changed.json",
|
|
||||||
// "/datasets/org/libreccm/core/PermissionRepositoryTest/after-save-new.json",
|
|
||||||
// "/datasets/org/libreccm/core/PermissionRepositoryTest/after-delete.json",
|
|
||||||
// "/datasets/org/libreccm/core/PermissionRepositoryTest/data.json",
|
|
||||||
// "/datasets/org/libreccm/core/PrivilegeRepositoryTest/after-create.json",
|
|
||||||
// "/datasets/org/libreccm/core/PrivilegeRepositoryTest/after-delete.json",
|
|
||||||
// "/datasets/org/libreccm/core/PrivilegeRepositoryTest/data.json",
|
|
||||||
// "/datasets/org/libreccm/core/RoleRepositoryTest/data.json",
|
|
||||||
// "/datasets/org/libreccm/core/RoleRepositoryTest/after-delete.json",
|
|
||||||
// "/datasets/org/libreccm/core/RoleRepositoryTest/after-save-changed.json",
|
|
||||||
// "/datasets/org/libreccm/core/RoleRepositoryTest/after-save-new.json",
|
|
||||||
// "/datasets/org/libreccm/core/UserManagerTest/verify-password.json",
|
|
||||||
// "/datasets/org/libreccm/core/UserRepositoryTest/data.json",
|
|
||||||
// "/datasets/org/libreccm/core/UserRepositoryTest/after-delete.json",
|
|
||||||
// "/datasets/org/libreccm/core/UserRepositoryTest/after-save-changed.json",
|
|
||||||
// "/datasets/org/libreccm/core/UserRepositoryTest/after-save-new.json"
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ CREATE SCHEMA ccm_core;
|
||||||
DOMAIN_KEY varchar(255) not null,
|
DOMAIN_KEY varchar(255) not null,
|
||||||
RELEASED timestamp,
|
RELEASED timestamp,
|
||||||
URI varchar(1024),
|
URI varchar(1024),
|
||||||
VERSION varchar(255) not null,
|
VERSION varchar(255),
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
ROOT_CATEGORY_ID bigint,
|
ROOT_CATEGORY_ID bigint,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
|
|
@ -87,13 +87,6 @@ CREATE SCHEMA ccm_core;
|
||||||
primary key (ROLE_ID)
|
primary key (ROLE_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.CONF_ENTRIES_L10N_STR_VALUES (
|
|
||||||
ENTRY_ID bigint not null,
|
|
||||||
LOCALIZED_VALUE clob,
|
|
||||||
LOCALE varchar(255) not null,
|
|
||||||
primary key (ENTRY_ID, LOCALE)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table CCM_CORE.DIGESTS (
|
create table CCM_CORE.DIGESTS (
|
||||||
FREQUENCY integer,
|
FREQUENCY integer,
|
||||||
HEADER varchar(4096) not null,
|
HEADER varchar(4096) not null,
|
||||||
|
|
@ -130,11 +123,6 @@ CREATE SCHEMA ccm_core;
|
||||||
primary key (OBJECT_ID, LOCALE)
|
primary key (OBJECT_ID, LOCALE)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.ENUM_CONFIGURATION_ENTRIES_VALUES (
|
|
||||||
ENUM_ID bigint not null,
|
|
||||||
value varchar(255)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
||||||
ACTIVE boolean,
|
ACTIVE boolean,
|
||||||
ADMIN_NAME varchar(255),
|
ADMIN_NAME varchar(255),
|
||||||
|
|
@ -485,19 +473,19 @@ CREATE SCHEMA ccm_core;
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_BIG_DECIMAL (
|
create table CCM_CORE.SETTINGS_BIG_DECIMAL (
|
||||||
entry_value decimal(19,2),
|
setting_value decimal(19,2),
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_BOOLEAN (
|
create table CCM_CORE.SETTINGS_BOOLEAN (
|
||||||
entry_value boolean,
|
setting_value boolean,
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_DOUBLE (
|
create table CCM_CORE.SETTINGS_DOUBLE (
|
||||||
entry_value double,
|
setting_value double,
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
@ -507,19 +495,31 @@ CREATE SCHEMA ccm_core;
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table CCM_CORE.SETTINGS_ENUM_VALUES (
|
||||||
|
ENUM_ID bigint not null,
|
||||||
|
value varchar(255)
|
||||||
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_L10N_STRING (
|
create table CCM_CORE.SETTINGS_L10N_STRING (
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table CCM_CORE.SETTINGS_L10N_STR_VALUES (
|
||||||
|
ENTRY_ID bigint not null,
|
||||||
|
LOCALIZED_VALUE clob,
|
||||||
|
LOCALE varchar(255) not null,
|
||||||
|
primary key (ENTRY_ID, LOCALE)
|
||||||
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_LONG (
|
create table CCM_CORE.SETTINGS_LONG (
|
||||||
entry_value bigint,
|
setting_value bigint,
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_STRING (
|
create table CCM_CORE.SETTINGS_STRING (
|
||||||
entry_value varchar(1024),
|
setting_value varchar(1024),
|
||||||
OBJECT_ID bigint not null,
|
OBJECT_ID bigint not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
@ -684,11 +684,6 @@ CREATE SCHEMA ccm_core;
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.CATEGORIES;
|
references CCM_CORE.CATEGORIES;
|
||||||
|
|
||||||
alter table CCM_CORE.CONF_ENTRIES_L10N_STR_VALUES
|
|
||||||
add constraint FK_ftb5yqeoli1m932yp3p8ho74g
|
|
||||||
foreign key (ENTRY_ID)
|
|
||||||
references CCM_CORE.SETTINGS_L10N_STRING;
|
|
||||||
|
|
||||||
alter table CCM_CORE.DIGESTS
|
alter table CCM_CORE.DIGESTS
|
||||||
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
||||||
foreign key (FROM_PARTY_ID)
|
foreign key (FROM_PARTY_ID)
|
||||||
|
|
@ -719,11 +714,6 @@ CREATE SCHEMA ccm_core;
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.CATEGORY_DOMAINS;
|
references CCM_CORE.CATEGORY_DOMAINS;
|
||||||
|
|
||||||
alter table CCM_CORE.ENUM_CONFIGURATION_ENTRIES_VALUES
|
|
||||||
add constraint FK_ao3evxajxd8y4gy5a6e8ua49j
|
|
||||||
foreign key (ENUM_ID)
|
|
||||||
references CCM_CORE.SETTINGS_ENUM;
|
|
||||||
|
|
||||||
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
||||||
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
||||||
foreign key (parentComponent_OBJECT_ID)
|
foreign key (parentComponent_OBJECT_ID)
|
||||||
|
|
@ -1039,11 +1029,21 @@ CREATE SCHEMA ccm_core;
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.SETTINGS;
|
references CCM_CORE.SETTINGS;
|
||||||
|
|
||||||
|
alter table CCM_CORE.SETTINGS_ENUM_VALUES
|
||||||
|
add constraint FK_sq653hqyeeklci0y7pvoxf5ha
|
||||||
|
foreign key (ENUM_ID)
|
||||||
|
references CCM_CORE.SETTINGS_ENUM;
|
||||||
|
|
||||||
alter table CCM_CORE.SETTINGS_L10N_STRING
|
alter table CCM_CORE.SETTINGS_L10N_STRING
|
||||||
add constraint FK_evnyfg9udprxmbginhc4o0is9
|
add constraint FK_evnyfg9udprxmbginhc4o0is9
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.SETTINGS;
|
references CCM_CORE.SETTINGS;
|
||||||
|
|
||||||
|
alter table CCM_CORE.SETTINGS_L10N_STR_VALUES
|
||||||
|
add constraint FK_t21obt5do2tjhskjxgxd5143r
|
||||||
|
foreign key (ENTRY_ID)
|
||||||
|
references CCM_CORE.SETTINGS_L10N_STRING;
|
||||||
|
|
||||||
alter table CCM_CORE.SETTINGS_LONG
|
alter table CCM_CORE.SETTINGS_LONG
|
||||||
add constraint FK_2l4bw7pbq3koj81cjyoqpenjj
|
add constraint FK_2l4bw7pbq3koj81cjyoqpenjj
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ DROP SEQUENCE IF EXISTS hibernate_sequence;
|
||||||
CREATE SCHEMA ccm_core;
|
CREATE SCHEMA ccm_core;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create table CCM_CORE.APPLICATIONS (
|
create table CCM_CORE.APPLICATIONS (
|
||||||
APPLICATION_TYPE varchar(1024) not null,
|
APPLICATION_TYPE varchar(1024) not null,
|
||||||
PRIMARY_URL varchar(1024) not null,
|
PRIMARY_URL varchar(1024) not null,
|
||||||
|
|
@ -56,7 +55,7 @@ CREATE SCHEMA ccm_core;
|
||||||
DOMAIN_KEY varchar(255) not null,
|
DOMAIN_KEY varchar(255) not null,
|
||||||
RELEASED timestamp,
|
RELEASED timestamp,
|
||||||
URI varchar(1024),
|
URI varchar(1024),
|
||||||
VERSION varchar(255) not null,
|
VERSION varchar(255),
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
ROOT_CATEGORY_ID int8,
|
ROOT_CATEGORY_ID int8,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
|
|
@ -88,13 +87,6 @@ CREATE SCHEMA ccm_core;
|
||||||
primary key (ROLE_ID)
|
primary key (ROLE_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.CONF_ENTRIES_L10N_STR_VALUES (
|
|
||||||
ENTRY_ID int8 not null,
|
|
||||||
LOCALIZED_VALUE text,
|
|
||||||
LOCALE varchar(255) not null,
|
|
||||||
primary key (ENTRY_ID, LOCALE)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table CCM_CORE.DIGESTS (
|
create table CCM_CORE.DIGESTS (
|
||||||
FREQUENCY int4,
|
FREQUENCY int4,
|
||||||
HEADER varchar(4096) not null,
|
HEADER varchar(4096) not null,
|
||||||
|
|
@ -131,11 +123,6 @@ CREATE SCHEMA ccm_core;
|
||||||
primary key (OBJECT_ID, LOCALE)
|
primary key (OBJECT_ID, LOCALE)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.ENUM_CONFIGURATION_ENTRIES_VALUES (
|
|
||||||
ENUM_ID int8 not null,
|
|
||||||
value varchar(255)
|
|
||||||
);
|
|
||||||
|
|
||||||
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
||||||
ACTIVE boolean,
|
ACTIVE boolean,
|
||||||
ADMIN_NAME varchar(255),
|
ADMIN_NAME varchar(255),
|
||||||
|
|
@ -486,19 +473,19 @@ CREATE SCHEMA ccm_core;
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_BIG_DECIMAL (
|
create table CCM_CORE.SETTINGS_BIG_DECIMAL (
|
||||||
entry_value numeric(19, 2),
|
setting_value numeric(19, 2),
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_BOOLEAN (
|
create table CCM_CORE.SETTINGS_BOOLEAN (
|
||||||
entry_value boolean,
|
setting_value boolean,
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_DOUBLE (
|
create table CCM_CORE.SETTINGS_DOUBLE (
|
||||||
entry_value float8,
|
setting_value float8,
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
@ -508,19 +495,31 @@ CREATE SCHEMA ccm_core;
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table CCM_CORE.SETTINGS_ENUM_VALUES (
|
||||||
|
ENUM_ID int8 not null,
|
||||||
|
value varchar(255)
|
||||||
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_L10N_STRING (
|
create table CCM_CORE.SETTINGS_L10N_STRING (
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
create table CCM_CORE.SETTINGS_L10N_STR_VALUES (
|
||||||
|
ENTRY_ID int8 not null,
|
||||||
|
LOCALIZED_VALUE text,
|
||||||
|
LOCALE varchar(255) not null,
|
||||||
|
primary key (ENTRY_ID, LOCALE)
|
||||||
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_LONG (
|
create table CCM_CORE.SETTINGS_LONG (
|
||||||
entry_value int8,
|
setting_value int8,
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table CCM_CORE.SETTINGS_STRING (
|
create table CCM_CORE.SETTINGS_STRING (
|
||||||
entry_value varchar(1024),
|
setting_value varchar(1024),
|
||||||
OBJECT_ID int8 not null,
|
OBJECT_ID int8 not null,
|
||||||
primary key (OBJECT_ID)
|
primary key (OBJECT_ID)
|
||||||
);
|
);
|
||||||
|
|
@ -685,11 +684,6 @@ CREATE SCHEMA ccm_core;
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.CATEGORIES;
|
references CCM_CORE.CATEGORIES;
|
||||||
|
|
||||||
alter table CCM_CORE.CONF_ENTRIES_L10N_STR_VALUES
|
|
||||||
add constraint FK_ftb5yqeoli1m932yp3p8ho74g
|
|
||||||
foreign key (ENTRY_ID)
|
|
||||||
references CCM_CORE.SETTINGS_L10N_STRING;
|
|
||||||
|
|
||||||
alter table CCM_CORE.DIGESTS
|
alter table CCM_CORE.DIGESTS
|
||||||
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
||||||
foreign key (FROM_PARTY_ID)
|
foreign key (FROM_PARTY_ID)
|
||||||
|
|
@ -720,11 +714,6 @@ CREATE SCHEMA ccm_core;
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.CATEGORY_DOMAINS;
|
references CCM_CORE.CATEGORY_DOMAINS;
|
||||||
|
|
||||||
alter table CCM_CORE.ENUM_CONFIGURATION_ENTRIES_VALUES
|
|
||||||
add constraint FK_ao3evxajxd8y4gy5a6e8ua49j
|
|
||||||
foreign key (ENUM_ID)
|
|
||||||
references CCM_CORE.SETTINGS_ENUM;
|
|
||||||
|
|
||||||
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
||||||
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
||||||
foreign key (parentComponent_OBJECT_ID)
|
foreign key (parentComponent_OBJECT_ID)
|
||||||
|
|
@ -1040,11 +1029,21 @@ CREATE SCHEMA ccm_core;
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.SETTINGS;
|
references CCM_CORE.SETTINGS;
|
||||||
|
|
||||||
|
alter table CCM_CORE.SETTINGS_ENUM_VALUES
|
||||||
|
add constraint FK_sq653hqyeeklci0y7pvoxf5ha
|
||||||
|
foreign key (ENUM_ID)
|
||||||
|
references CCM_CORE.SETTINGS_ENUM;
|
||||||
|
|
||||||
alter table CCM_CORE.SETTINGS_L10N_STRING
|
alter table CCM_CORE.SETTINGS_L10N_STRING
|
||||||
add constraint FK_evnyfg9udprxmbginhc4o0is9
|
add constraint FK_evnyfg9udprxmbginhc4o0is9
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
references CCM_CORE.SETTINGS;
|
references CCM_CORE.SETTINGS;
|
||||||
|
|
||||||
|
alter table CCM_CORE.SETTINGS_L10N_STR_VALUES
|
||||||
|
add constraint FK_t21obt5do2tjhskjxgxd5143r
|
||||||
|
foreign key (ENTRY_ID)
|
||||||
|
references CCM_CORE.SETTINGS_L10N_STRING;
|
||||||
|
|
||||||
alter table CCM_CORE.SETTINGS_LONG
|
alter table CCM_CORE.SETTINGS_LONG
|
||||||
add constraint FK_2l4bw7pbq3koj81cjyoqpenjj
|
add constraint FK_2l4bw7pbq3koj81cjyoqpenjj
|
||||||
foreign key (OBJECT_ID)
|
foreign key (OBJECT_ID)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration status="DEBUG">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
|
||||||
|
</Console>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<Root level="error">
|
||||||
|
<AppenderRef ref="Console"/>
|
||||||
|
</Root>
|
||||||
|
<Logger name="org.libreccm.configuration.ConfigurationManager"
|
||||||
|
level="debug">
|
||||||
|
<AppenderRef ref="Console"/>
|
||||||
|
</Logger>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
||||||
|
|
@ -0,0 +1,134 @@
|
||||||
|
ccm_core.ccm_objects:
|
||||||
|
- object_id: -1000
|
||||||
|
display_name: registry
|
||||||
|
- object_id: -2000
|
||||||
|
display_name: registry_root
|
||||||
|
- object_id: -2100
|
||||||
|
display_name: org
|
||||||
|
- object_id: -2200
|
||||||
|
display_name: libreccm
|
||||||
|
- object_id: -2300
|
||||||
|
display_name: configuration
|
||||||
|
- object_id: -2400
|
||||||
|
display_name: ExampleConfiguration
|
||||||
|
- object_id: -3100
|
||||||
|
display_name: price
|
||||||
|
- object_id: -3200
|
||||||
|
display_name: enabled
|
||||||
|
- object_id: -3300
|
||||||
|
display_name: minTemperature
|
||||||
|
- object_id: -3400
|
||||||
|
display_name: itemsPerPage
|
||||||
|
- object_id: -3500
|
||||||
|
display_name: helpUri
|
||||||
|
|
||||||
|
ccm_core.categories:
|
||||||
|
- object_id: -2000
|
||||||
|
unique_id: bb93a964-bf66-424c-a22d-074d001db3b8
|
||||||
|
name: registry-root
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
abstract_category: false
|
||||||
|
category_order: 0
|
||||||
|
- object_id: -2100
|
||||||
|
unique_id: 62c22973-a078-47bc-8267-bef879c7566e
|
||||||
|
name: org
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
abstract_category: false
|
||||||
|
parent_category_id: -2000
|
||||||
|
category_order: 1
|
||||||
|
- object_id: -2200
|
||||||
|
unique_id: a8fbf310-7cb9-47dd-81d5-a16b80e96446
|
||||||
|
name: libreccm
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
abstract_category: false
|
||||||
|
parent_category_id: -2100
|
||||||
|
category_order: 1
|
||||||
|
- object_id: -2300
|
||||||
|
unique_id: 61c30c73-857a-49ff-8272-c9fb038d3e35
|
||||||
|
name: configuration
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
abstract_category: false
|
||||||
|
parent_category_id: -2200
|
||||||
|
category_order: 1
|
||||||
|
- object_id: -2400
|
||||||
|
unique_id: bf5d295c-6ad3-4484-a1e6-5641cea037b3
|
||||||
|
name: ExampleConfiguration
|
||||||
|
enabled: true
|
||||||
|
visible: true
|
||||||
|
abstract_category: false
|
||||||
|
parent_category_id: -2300
|
||||||
|
category_order: 1
|
||||||
|
|
||||||
|
ccm_core.category_domains:
|
||||||
|
- object_id: -1000
|
||||||
|
domain_key: registry
|
||||||
|
root_category_id: -2000
|
||||||
|
version: 1.0
|
||||||
|
|
||||||
|
ccm_core.categorizations:
|
||||||
|
- categorization_id: -10100
|
||||||
|
category_id: -2400
|
||||||
|
object_id: -3100
|
||||||
|
category_order: 1
|
||||||
|
object_order: 1
|
||||||
|
category_index: false
|
||||||
|
- categorization_id: -10200
|
||||||
|
category_id: -2400
|
||||||
|
object_id: -3200
|
||||||
|
category_order: 1
|
||||||
|
object_order: 2
|
||||||
|
category_index: false
|
||||||
|
- categorization_id: -10300
|
||||||
|
category_id: -2400
|
||||||
|
object_id: -3300
|
||||||
|
category_order: 1
|
||||||
|
object_order: 3
|
||||||
|
category_index: false
|
||||||
|
- categorization_id: -10400
|
||||||
|
category_id: -2400
|
||||||
|
object_id: -3400
|
||||||
|
category_order: 1
|
||||||
|
object_order: 4
|
||||||
|
category_index: false
|
||||||
|
- categorization_id: -10500
|
||||||
|
category_id: -2400
|
||||||
|
object_id: -3500
|
||||||
|
category_order: 1
|
||||||
|
object_order: 5
|
||||||
|
category_index: false
|
||||||
|
|
||||||
|
ccm_core.settings:
|
||||||
|
- object_id: -3100
|
||||||
|
name: price
|
||||||
|
- object_id: -3200
|
||||||
|
name: enabled
|
||||||
|
- object_id: -3300
|
||||||
|
name: minTemperature
|
||||||
|
- object_id: -3400
|
||||||
|
name: itemsPerPage
|
||||||
|
- object_id: -3500
|
||||||
|
name: helpUrl
|
||||||
|
|
||||||
|
ccm_core.settings_big_decimal:
|
||||||
|
- object_id: -3100
|
||||||
|
setting_value: 98.99
|
||||||
|
|
||||||
|
ccm_core.settings_boolean:
|
||||||
|
- object_id: -3200
|
||||||
|
setting_value: true
|
||||||
|
|
||||||
|
ccm_core.settings_double:
|
||||||
|
- object_id: -3300
|
||||||
|
setting_value: 23.5
|
||||||
|
|
||||||
|
ccm_core.settings_long:
|
||||||
|
- object_id: -3400
|
||||||
|
setting_value: 20
|
||||||
|
|
||||||
|
ccm_core.settings_string:
|
||||||
|
- object_id: -3500
|
||||||
|
setting_value: http://www.example.org
|
||||||
|
|
@ -1,3 +1,23 @@
|
||||||
|
DELETE FROM ccm_core.settings_big_decimal;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_boolean;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_double;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_enum_values;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_enum;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_l10n_string;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_l10n_str_values;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_long;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings_string;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.settings;
|
||||||
|
|
||||||
DELETE FROM ccm_core.categorizations;
|
DELETE FROM ccm_core.categorizations;
|
||||||
|
|
||||||
DELETE FROM ccm_core.category_domains;
|
DELETE FROM ccm_core.category_domains;
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,43 @@
|
||||||
-- DELETE FROM ccm_core.categorizations;
|
DELETE FROM ccm_core.settings_big_decimal;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.category_domains;
|
DELETE FROM ccm_core.settings_boolean;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.categories;
|
DELETE FROM ccm_core.settings_double;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.permissions;
|
DELETE FROM ccm_core.settings_enum_values;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.ccm_objects;
|
DELETE FROM ccm_core.settings_enum;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.role_memberships;
|
DELETE FROM ccm_core.settings_l10n_string;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.group_memberships;
|
DELETE FROM ccm_core.settings_l10n_str_values;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.groups;
|
DELETE FROM ccm_core.settings_long;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.users;
|
DELETE FROM ccm_core.settings_string;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.user_email_addresses;
|
DELETE FROM ccm_core.settings;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.parties;
|
DELETE FROM ccm_core.categorizations;
|
||||||
--
|
|
||||||
-- DELETE FROM ccm_core.ccm_roles;
|
DELETE FROM ccm_core.category_domains;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.categories;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.permissions;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.ccm_objects;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.role_memberships;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.group_memberships;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.groups;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.users;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.user_email_addresses;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.parties;
|
||||||
|
|
||||||
|
DELETE FROM ccm_core.ccm_roles;
|
||||||
Loading…
Reference in New Issue