CCM NG: Several things
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4203 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
c780d6e43b
commit
45501fedb8
|
|
@ -379,7 +379,7 @@
|
|||
<directory>src/test/resources</directory>
|
||||
</testResource>
|
||||
<testResource>
|
||||
<directory>src/test/resources-wildfly8-remote-h2-mem</directory>
|
||||
<directory>src/test/resources-wildfly-remote-h2-mem</directory>
|
||||
</testResource>
|
||||
<testResource>
|
||||
<directory>${project.build.directory}/generated-resources</directory>
|
||||
|
|
@ -465,7 +465,7 @@
|
|||
<directory>src/test/resources</directory>
|
||||
</testResource>
|
||||
<testResource>
|
||||
<directory>src/test/resources-wildfly8-remote-pgsql</directory>
|
||||
<directory>src/test/resources-wildfly-remote-pgsql</directory>
|
||||
</testResource>
|
||||
<testResource>
|
||||
<directory>${project.build.directory}/generated-resources</directory>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@
|
|||
*/
|
||||
package org.librecms.contentsection;
|
||||
|
||||
import com.arsdigita.ui.admin.applications.DefaultApplicationInstanceForm;
|
||||
import com.arsdigita.ui.admin.applications.DefaultApplicationSettingsPane;
|
||||
|
||||
import org.libreccm.categorization.Category;
|
||||
import org.libreccm.security.Role;
|
||||
import org.libreccm.web.CcmApplication;
|
||||
|
|
@ -52,7 +55,7 @@ import static org.librecms.CmsConstants.*;
|
|||
@NamedQueries(
|
||||
@NamedQuery(
|
||||
name = "ContentSection.findByLabel",
|
||||
query = "SELECT s FROM ContentSection s WHERE c.label = :label")
|
||||
query = "SELECT s FROM ContentSection s WHERE s.label = :label")
|
||||
)
|
||||
@ApplicationType(
|
||||
name = CONTENT_SECTION_APP_TYPE,
|
||||
|
|
|
|||
|
|
@ -69,6 +69,11 @@ public class ContentSectionManager {
|
|||
@RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public ContentSection createContentSection(final String name) {
|
||||
if (name == null || name.isEmpty()) {
|
||||
throw new IllegalArgumentException(
|
||||
"The name of a ContentSection can't be blank.");
|
||||
}
|
||||
|
||||
final ContentSection section = new ContentSection();
|
||||
section.setLabel(name);
|
||||
|
||||
|
|
@ -86,16 +91,16 @@ public class ContentSectionManager {
|
|||
categoryRepo.save(rootAssetFolder);
|
||||
|
||||
addRoleToContentSection(section,
|
||||
String.format("%s_" + ALERT_RECIPIENT, name));
|
||||
ALERT_RECIPIENT);
|
||||
addRoleToContentSection(section,
|
||||
String.format("%s_" + AUTHOR, name),
|
||||
AUTHOR,
|
||||
PRIVILEGE_ITEMS_CATEGORIZE,
|
||||
PRIVILEGE_ITEMS_CREATE_NEW,
|
||||
PRIVILEGE_ITEMS_EDIT,
|
||||
PRIVILEGE_ITEMS_VIEW_PUBLISHED,
|
||||
PRIVILEGE_ITEMS_PREVIEW);
|
||||
addRoleToContentSection(section,
|
||||
String.format("%s_" + EDITOR, name),
|
||||
EDITOR,
|
||||
PRIVILEGE_ITEMS_CATEGORIZE,
|
||||
PRIVILEGE_ITEMS_CREATE_NEW,
|
||||
PRIVILEGE_ITEMS_EDIT,
|
||||
|
|
@ -104,7 +109,7 @@ public class ContentSectionManager {
|
|||
PRIVILEGE_ITEMS_VIEW_PUBLISHED,
|
||||
PRIVILEGE_ITEMS_PREVIEW);
|
||||
addRoleToContentSection(section,
|
||||
String.format("%s_" + MANAGER, name),
|
||||
MANAGER, name,
|
||||
PRIVILEGE_ADMINISTER_ROLES,
|
||||
PRIVILEGE_ADMINISTER_WORKFLOW,
|
||||
PRIVILEGE_ADMINISTER_LIFECYLES,
|
||||
|
|
@ -119,7 +124,7 @@ public class ContentSectionManager {
|
|||
PRIVILEGE_ITEMS_VIEW_PUBLISHED,
|
||||
PRIVILEGE_ITEMS_PREVIEW);
|
||||
addRoleToContentSection(section,
|
||||
String.format("%s_" + PUBLISHER, name),
|
||||
PUBLISHER, name,
|
||||
PRIVILEGE_ITEMS_CATEGORIZE,
|
||||
PRIVILEGE_ITEMS_CREATE_NEW,
|
||||
PRIVILEGE_ITEMS_EDIT,
|
||||
|
|
@ -129,7 +134,7 @@ public class ContentSectionManager {
|
|||
PRIVILEGE_ITEMS_VIEW_PUBLISHED,
|
||||
PRIVILEGE_ITEMS_PREVIEW);
|
||||
addRoleToContentSection(section,
|
||||
String.format("%s_" + CONTENT_READER, name),
|
||||
CONTENT_READER, name,
|
||||
PRIVILEGE_ITEMS_VIEW_PUBLISHED);
|
||||
|
||||
return section;
|
||||
|
|
@ -209,7 +214,7 @@ public class ContentSectionManager {
|
|||
@RequiresPrivilege(CoreConstants.ADMIN_PRIVILEGE)
|
||||
@Transactional(Transactional.TxType.REQUIRED)
|
||||
public void removeTypeFromSection(final ContentType type,
|
||||
final ContentSection section) {
|
||||
final ContentSection section) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ 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.jboss.shrinkwrap.resolver.api.maven.ScopeType;
|
||||
import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependencies;
|
||||
import org.junit.After;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Before;
|
||||
|
|
@ -42,12 +44,16 @@ import org.junit.runner.RunWith;
|
|||
import org.libreccm.security.Role;
|
||||
import org.libreccm.security.RoleRepository;
|
||||
import org.libreccm.tests.categories.IntegrationTest;
|
||||
import org.librecms.Cms;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.librecms.CmsConstants.*;
|
||||
|
||||
/**
|
||||
|
|
@ -96,7 +102,26 @@ public class ContentSectionManagerTest {
|
|||
.loadPomFromFile("pom.xml");
|
||||
final PomEquippedResolveStage dependencies = pom
|
||||
.importCompileAndRuntimeDependencies();
|
||||
final File[] libs = dependencies.resolve().withTransitivity().asFile();
|
||||
dependencies.addDependency(MavenDependencies.createDependency(
|
||||
"org.libreccm:ccm-core", ScopeType.RUNTIME, false));
|
||||
dependencies.addDependency(MavenDependencies.createDependency(
|
||||
"org.libreccm:ccm-testutils", ScopeType.RUNTIME, false));
|
||||
dependencies.addDependency(MavenDependencies.createDependency(
|
||||
"net.sf.saxon:Saxon-HE", ScopeType.RUNTIME, false));
|
||||
dependencies.addDependency(MavenDependencies.createDependency(
|
||||
"org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven",
|
||||
ScopeType.RUNTIME, false));
|
||||
final File[] libsWithCcmCore = dependencies.resolve().withTransitivity()
|
||||
.asFile();
|
||||
|
||||
final List<File> libsList = new ArrayList<>(libsWithCcmCore.length - 1);
|
||||
IntStream.range(0, libsWithCcmCore.length).forEach(i -> {
|
||||
final File lib = libsWithCcmCore[i];
|
||||
if (!lib.getName().startsWith("ccm-core")) {
|
||||
libsList.add(lib);
|
||||
}
|
||||
});
|
||||
final File[] libs = libsList.toArray(new File[libsList.size()]);
|
||||
|
||||
for (File lib : libs) {
|
||||
System.err.printf("Adding file '%s' to test archive...%n",
|
||||
|
|
@ -105,8 +130,41 @@ public class ContentSectionManagerTest {
|
|||
|
||||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.cms.CmsTest.war")
|
||||
.addPackage(Cms.class.getPackage())
|
||||
"LibreCCM-org.libreccm.cms.contentsection.ContentSectionManagerTest.war")
|
||||
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage())
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||
.addPackage(org.libreccm.configuration.Configuration.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
|
||||
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.l10n.LocalizedString.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.security.Permission.class.getPackage())
|
||||
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||
.addPackage(com.arsdigita.bebop.Component.class.getPackage())
|
||||
.addPackage(com.arsdigita.bebop.util.BebopConstants.class
|
||||
.getPackage())
|
||||
.addClass(com.arsdigita.kernel.KernelConfig.class)
|
||||
.addClass(com.arsdigita.runtime.CCMResourceManager.class)
|
||||
.addClass(
|
||||
com.arsdigita.ui.admin.applications.AbstractAppInstanceForm.class)
|
||||
.addClass(
|
||||
com.arsdigita.ui.admin.applications.AbstractAppSettingsPane.class)
|
||||
.addClass(
|
||||
com.arsdigita.ui.admin.applications.DefaultApplicationInstanceForm.class)
|
||||
.addClass(
|
||||
com.arsdigita.ui.admin.applications.DefaultApplicationSettingsPane.class)
|
||||
.addPackage(com.arsdigita.util.Lockable.class.getPackage())
|
||||
.addPackage(com.arsdigita.web.BaseServlet.class.getPackage())
|
||||
.addPackage(org.librecms.Cms.class.getPackage())
|
||||
.addPackage(org.librecms.assets.Asset.class.getPackage())
|
||||
.addPackage(org.librecms.attachments.AttachmentList.class
|
||||
.getPackage())
|
||||
.addPackage(ContentSection.class.getPackage())
|
||||
.addAsLibraries(libs)
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
|
|
@ -115,13 +173,31 @@ public class ContentSectionManagerTest {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
@InSequence(10)
|
||||
public void isRepositoryInjected() {
|
||||
assertThat(repository, is(not(nullValue())));
|
||||
}
|
||||
|
||||
@Test
|
||||
@InSequence(20)
|
||||
public void isManagerInjected() {
|
||||
assertThat(manager, is(not(nullValue())));
|
||||
}
|
||||
|
||||
@Test
|
||||
@InSequence(30)
|
||||
public void isRoleRepositoryInjected() {
|
||||
assertThat(roleRepository, is(not(nullValue())));
|
||||
}
|
||||
|
||||
@Test
|
||||
@UsingDataSet("datasets/org/librecms/contentsection/"
|
||||
+ "ContentSectionManagerTest/data.xml")
|
||||
@ShouldMatchDataSet(
|
||||
value = "datasets/org/librecms/contentsection/"
|
||||
+ "ContentSectionManagerTest/after-create.xml",
|
||||
excludeColumns = {"section_id"})
|
||||
excludeColumns = {"object_id"})
|
||||
@InSequence(100)
|
||||
public void createSection() {
|
||||
manager.createContentSection("test");
|
||||
|
|
@ -133,7 +209,7 @@ public class ContentSectionManagerTest {
|
|||
@ShouldMatchDataSet(
|
||||
value = "datasets/org/librecms/contentsection/"
|
||||
+ "ContentSectionManagerTest/after-rename.xml",
|
||||
excludeColumns = {"section_id"})
|
||||
excludeColumns = {"object_id"})
|
||||
@InSequence(200)
|
||||
public void renameSection() {
|
||||
final ContentSection section = repository.findByLabel("info");
|
||||
|
|
@ -147,7 +223,7 @@ public class ContentSectionManagerTest {
|
|||
@ShouldMatchDataSet(
|
||||
value = "datasets/org/librecms/contentsection/"
|
||||
+ "ContentSectionManagerTest/after-add-role.xml",
|
||||
excludeColumns = {"section_id"})
|
||||
excludeColumns = {"object_id"})
|
||||
@InSequence(300)
|
||||
public void addRole() {
|
||||
final ContentSection section = repository.findByLabel("info");
|
||||
|
|
@ -165,7 +241,7 @@ public class ContentSectionManagerTest {
|
|||
@ShouldMatchDataSet(
|
||||
value = "datasets/org/librecms/contentsection/"
|
||||
+ "ContentSectionManagerTest/after-remove-role.xml",
|
||||
excludeColumns = {"section_id"})
|
||||
excludeColumns = {"object_id"})
|
||||
@InSequence(300)
|
||||
public void removeRole() {
|
||||
final ContentSection section = repository.findByLabel("info");
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
DROP SCHEMA IF EXISTS ccm_cms;
|
||||
DROP SCHEMA IF EXISTS ccm_core;
|
||||
|
||||
DROP SEQUENCE IF EXISTS hibernate_sequence;
|
||||
|
||||
CREATE SCHEMA ccm_core;
|
||||
CREATE SCHEMA ccm_cms;
|
||||
|
||||
create table CCM_CMS.ARTICLE_LEADS (
|
||||
OBJECT_ID bigint not null,
|
||||
|
|
@ -16,11 +23,11 @@
|
|||
create table CCM_CMS.ARTICLE_TEXTS_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.ARTICLES (
|
||||
|
|
@ -44,11 +51,11 @@
|
|||
create table CCM_CMS.ASSET_TITLES_AUD (
|
||||
REV integer not null,
|
||||
ASSET_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, ASSET_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, ASSET_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.ASSETS (
|
||||
|
|
@ -76,11 +83,11 @@
|
|||
create table CCM_CMS.ATTACHMENT_LIST_CAPTIONS_AUD (
|
||||
REV integer not null,
|
||||
LIST_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, LIST_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, LIST_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.ATTACHMENT_LISTS (
|
||||
|
|
@ -153,11 +160,11 @@
|
|||
create table CCM_CMS.BINARY_ASSET_DESCRIPTIONS_AUD (
|
||||
REV integer not null,
|
||||
ASSET_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, ASSET_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, ASSET_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.BINARY_ASSETS (
|
||||
|
|
@ -189,11 +196,11 @@
|
|||
create table CCM_CMS.BOOKMARK_DESCRIPTIONS_AUD (
|
||||
REV integer not null,
|
||||
ASSET_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, ASSET_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, ASSET_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.BOOKMARKS (
|
||||
|
|
@ -219,11 +226,11 @@
|
|||
create table CCM_CMS.CONTENT_ITEM_DESCRIPTIONS_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.CONTENT_ITEM_NAMES (
|
||||
|
|
@ -236,11 +243,11 @@
|
|||
create table CCM_CMS.CONTENT_ITEM_NAMES_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.CONTENT_ITEM_TITLES (
|
||||
|
|
@ -253,11 +260,11 @@
|
|||
create table CCM_CMS.CONTENT_ITEM_TITLES_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.CONTENT_ITEMS (
|
||||
|
|
@ -339,11 +346,11 @@
|
|||
create table CCM_CMS.EVENT_COSTS_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.EVENT_DATES (
|
||||
|
|
@ -356,11 +363,11 @@
|
|||
create table CCM_CMS.EVENT_DATES_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.EVENT_LOCATIONS (
|
||||
|
|
@ -373,11 +380,11 @@
|
|||
create table CCM_CMS.EVENT_LOCATIONS_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.EVENT_MAIN_CONTRIBUTORS (
|
||||
|
|
@ -390,11 +397,11 @@
|
|||
create table CCM_CMS.EVENT_MAIN_CONTRIBUTORS_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.EVENT_TEXTS (
|
||||
|
|
@ -407,11 +414,11 @@
|
|||
create table CCM_CMS.EVENT_TEXTS_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.EVENT_TYPES (
|
||||
|
|
@ -424,11 +431,11 @@
|
|||
create table CCM_CMS.EVENT_TYPES_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.EVENTS (
|
||||
|
|
@ -543,11 +550,11 @@
|
|||
create table CCM_CMS.LEGAL_METADATA_RIGHTS_AUD (
|
||||
REV integer not null,
|
||||
ASSET_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, ASSET_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, ASSET_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.LIFECYCLE_DEFINITION_DESCRIPTIONS (
|
||||
|
|
@ -626,11 +633,11 @@
|
|||
create table CCM_CMS.MPA_SECTION_TEXTS_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.MPA_SECTION_TITLES (
|
||||
|
|
@ -643,11 +650,11 @@
|
|||
create table CCM_CMS.MPA_SECTION_TITLES_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.MPA_SUMMARIES (
|
||||
|
|
@ -660,11 +667,11 @@
|
|||
create table CCM_CMS.MPA_SUMMARIES_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.MULTIPART_ARTICLE_SECTIONS (
|
||||
|
|
@ -730,11 +737,11 @@
|
|||
create table CCM_CMS.NEWS_TEXTS_AUD (
|
||||
REV integer not null,
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, OBJECT_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.NOTE_TEXTS (
|
||||
|
|
@ -747,11 +754,11 @@
|
|||
create table CCM_CMS.NOTE_TEXTS_AUD (
|
||||
REV integer not null,
|
||||
ASSET_ID bigint not null,
|
||||
LOCALIZED_VALUE clob not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
primary key (REV, ASSET_ID, LOCALIZED_VALUE, LOCALE)
|
||||
primary key (REV, ASSET_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CMS.NOTES (
|
||||
|
|
|
|||
|
|
@ -1,3 +1,10 @@
|
|||
DROP SCHEMA IF EXISTS ccm_shortcuts;
|
||||
DROP SCHEMA IF EXISTS ccm_cms;
|
||||
|
||||
DROP SEQUENCE IF EXISTS hibernate_sequence;
|
||||
|
||||
CREATE SCHEMA ccm_core;
|
||||
CREATE SCHEMA ccm_cms;
|
||||
|
||||
create table CCM_CMS.ARTICLE_LEADS (
|
||||
OBJECT_ID int8 not null,
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
DELETE FROM ccm_cms.content_sections;
|
||||
|
||||
DELETE FROM ccm_core.settings_string_list;
|
||||
|
||||
DELETE FROM ccm_core.settings_l10n_str_values;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import javax.persistence.Table;
|
|||
*/
|
||||
@Entity
|
||||
@Table(name = "CCM_REVISIONS", schema = DB_SCHEMA)
|
||||
@RevisionEntity()
|
||||
@RevisionEntity(CcmRevisionListener.class)
|
||||
public class CcmRevision extends DefaultRevisionEntity {
|
||||
|
||||
private static final long serialVersionUID = -3458682765535922544L;
|
||||
|
|
|
|||
|
|
@ -22,14 +22,19 @@ import com.arsdigita.ui.admin.applications.AdminApplicationCreator;
|
|||
import com.arsdigita.ui.admin.AdminServlet;
|
||||
import com.arsdigita.ui.admin.AdminUiConstants;
|
||||
import com.arsdigita.ui.admin.applications.AdminApplicationSetup;
|
||||
import com.arsdigita.ui.admin.applications.DefaultApplicationInstanceForm;
|
||||
import com.arsdigita.ui.admin.applications.DefaultApplicationSettingsPane;
|
||||
import com.arsdigita.ui.login.LoginApplicationCreator;
|
||||
import com.arsdigita.ui.login.LoginServlet;
|
||||
import com.arsdigita.ui.login.LoginApplicationSetup;
|
||||
import com.arsdigita.ui.login.LoginConstants;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
|
@ -83,23 +88,23 @@ public class CcmCore implements CcmModule {
|
|||
public void install(final InstallEvent event) {
|
||||
LOGGER.info("Setting up system users...");
|
||||
final SystemUsersSetup systemUsersSetup = new SystemUsersSetup(
|
||||
event);
|
||||
event);
|
||||
systemUsersSetup.setupSystemUsers();
|
||||
|
||||
LOGGER.info("Setting up admin application (/ccm/admin/)...");
|
||||
final AdminApplicationSetup adminSetup
|
||||
= new AdminApplicationSetup(event);
|
||||
= new AdminApplicationSetup(event);
|
||||
adminSetup.setup();
|
||||
|
||||
LOGGER.info("Setting up login application...");
|
||||
final LoginApplicationSetup loginSetup
|
||||
= new LoginApplicationSetup(event);
|
||||
= new LoginApplicationSetup(event);
|
||||
loginSetup.setup();
|
||||
|
||||
LOGGER.info("Importing category domains from bundle (if any)...");
|
||||
final Properties integrationProps = new Properties();
|
||||
try (final InputStream inputStream = getClass().getResourceAsStream(
|
||||
CoreConstants.INTEGRATION_PROPS)) {
|
||||
CoreConstants.INTEGRATION_PROPS)) {
|
||||
if (inputStream == null) {
|
||||
LOGGER.warn("Integration properties file was not found.");
|
||||
} else {
|
||||
|
|
@ -107,7 +112,7 @@ public class CcmCore implements CcmModule {
|
|||
}
|
||||
} catch (IOException ex) {
|
||||
LOGGER.warn("Failed to read integration properties. "
|
||||
+ "Using empty proeprties.");
|
||||
+ "Using empty proeprties.");
|
||||
}
|
||||
|
||||
if (integrationProps.containsKey("bundle.domains")) {
|
||||
|
|
@ -133,7 +138,7 @@ public class CcmCore implements CcmModule {
|
|||
//Nothing
|
||||
}
|
||||
|
||||
private void importDomains(final String domainFiles,
|
||||
private void importDomains(final String domainFiles,
|
||||
final EntityManager entityManager) {
|
||||
final String[] tokens = domainFiles.split(",");
|
||||
|
||||
|
|
@ -161,4 +166,5 @@ public class CcmCore implements CcmModule {
|
|||
// domainFile);
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ public class CcmObject implements Identifiable, Serializable {
|
|||
* </pre>
|
||||
*
|
||||
* The content of the curly braces should be the string representation of
|
||||
* the object. If the object is very complex it might be sufficent to
|
||||
* the object. If the object is very complex it might be sufficient to
|
||||
* include only a subset of the objects properties.
|
||||
*
|
||||
* Likewise, strings would be enclosed by quotes. The value of date
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public @interface ApplicationType {
|
|||
boolean singleton() default false;
|
||||
|
||||
/**
|
||||
* Path to the primary Servlet of the application type. If the servlet class
|
||||
* Path to the primary Servlet of the application type. If the Servlet class
|
||||
* is provided and is annotated with the {@link WebServlet} annotation the
|
||||
* path can be determined from the annotation.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@ public class CcmObjectRepositoryTest {
|
|||
return ShrinkWrap
|
||||
.create(WebArchive.class,
|
||||
"LibreCCM-org.libreccm.core.CcmObjectRepositoryTest.war")
|
||||
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage())
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.configuration.Configuration.class.
|
||||
|
|
@ -249,9 +250,10 @@ public class CcmObjectRepositoryTest {
|
|||
@Test
|
||||
@UsingDataSet(
|
||||
"datasets/org/libreccm/core/CcmObjectRepositoryTest/data.yml")
|
||||
@ShouldMatchDataSet(value
|
||||
= "datasets/org/libreccm/core/CcmObjectRepositoryTest/after-save-new.yml",
|
||||
excludeColumns = {"object_id", "uuid"})
|
||||
@ShouldMatchDataSet(
|
||||
value = "datasets/org/libreccm/core/CcmObjectRepositoryTest/"
|
||||
+ "after-save-new.yml",
|
||||
excludeColumns = {"object_id", "uuid"})
|
||||
@InSequence(300)
|
||||
public void saveNewCcmObject() {
|
||||
final CcmObject obj = new CcmObject();
|
||||
|
|
@ -263,9 +265,10 @@ public class CcmObjectRepositoryTest {
|
|||
@Test
|
||||
@UsingDataSet(
|
||||
"datasets/org/libreccm/core/CcmObjectRepositoryTest/data.yml")
|
||||
@ShouldMatchDataSet(value
|
||||
= "datasets/org/libreccm/core/CcmObjectRepositoryTest/after-save-changed.yml",
|
||||
excludeColumns = {"object_id"})
|
||||
@ShouldMatchDataSet(
|
||||
value = "datasets/org/libreccm/core/CcmObjectRepositoryTest/"
|
||||
+ "after-save-changed.yml",
|
||||
excludeColumns = {"object_id"})
|
||||
@InSequence(400)
|
||||
public void saveChangedCcmObject() {
|
||||
final CcmObject obj = ccmObjectRepository.findById(-20L);
|
||||
|
|
@ -284,9 +287,10 @@ public class CcmObjectRepositoryTest {
|
|||
@Test
|
||||
@UsingDataSet(
|
||||
"datasets/org/libreccm/core/CcmObjectRepositoryTest/data.yml")
|
||||
@ShouldMatchDataSet(value
|
||||
= "datasets/org/libreccm/core/CcmObjectRepositoryTest/after-delete.yml",
|
||||
excludeColumns = {"object_id"})
|
||||
@ShouldMatchDataSet(
|
||||
value = "datasets/org/libreccm/core/CcmObjectRepositoryTest/"
|
||||
+ "after-delete.yml",
|
||||
excludeColumns = {"object_id"})
|
||||
@InSequence(600)
|
||||
public void deleteCcmObject() {
|
||||
final CcmObject obj = ccmObjectRepository.findById(-20L);
|
||||
|
|
|
|||
|
|
@ -75,6 +75,15 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.CCM_OBJECTS_AUD (
|
||||
OBJECT_ID bigint not null,
|
||||
REV integer not null,
|
||||
REVTYPE tinyint,
|
||||
REVEND integer,
|
||||
DISPLAY_NAME varchar(255),
|
||||
primary key (OBJECT_ID, REV)
|
||||
);
|
||||
|
||||
create table CCM_CORE.CCM_REVISIONS (
|
||||
id integer not null,
|
||||
timestamp bigint not null,
|
||||
|
|
@ -124,6 +133,13 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_COMPONENT_DESCRIPTIONS (
|
||||
COMPONENT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (COMPONENT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
||||
ACTIVE boolean,
|
||||
ADMIN_NAME varchar(255),
|
||||
|
|
@ -135,13 +151,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_COMPONENT_DESCRIPTIONS (
|
||||
COMPONENT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (COMPONENT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_CONFIRM_EMAIL_LISTENER (
|
||||
BODY clob,
|
||||
FROM_EMAIL varchar(255),
|
||||
|
|
@ -213,12 +222,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_OPTIONS (
|
||||
PARAMETER_VALUE varchar(255),
|
||||
OBJECT_ID bigint not null,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_OPTION_LABELS (
|
||||
OPTION_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
|
|
@ -226,11 +229,9 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OPTION_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS (
|
||||
LISTENER_CLASS varchar(255),
|
||||
PROCESS_LISTENER_ORDER bigint,
|
||||
create table CCM_CORE.FORMBUILDER_OPTIONS (
|
||||
PARAMETER_VALUE varchar(255),
|
||||
OBJECT_ID bigint not null,
|
||||
formSection_OBJECT_ID bigint,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
|
|
@ -248,6 +249,14 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (PROCESS_LISTENER_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS (
|
||||
LISTENER_CLASS varchar(255),
|
||||
PROCESS_LISTENER_ORDER bigint,
|
||||
OBJECT_ID bigint not null,
|
||||
formSection_OBJECT_ID bigint,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_REMOTE_SERVER_POST_LISTENER (
|
||||
REMOTE_URL varchar(2048),
|
||||
OBJECT_ID bigint not null,
|
||||
|
|
@ -269,6 +278,12 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_WIDGET_LABELS (
|
||||
OBJECT_ID bigint not null,
|
||||
widget_OBJECT_ID bigint,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_WIDGETS (
|
||||
DEFAULT_VALUE varchar(255),
|
||||
PARAMETER_MODEL varchar(255),
|
||||
|
|
@ -278,12 +293,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_WIDGET_LABELS (
|
||||
OBJECT_ID bigint not null,
|
||||
widget_OBJECT_ID bigint,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_XML_EMAIL_LISTENERS (
|
||||
RECIPIENT varchar(255),
|
||||
SUBJECT varchar(255),
|
||||
|
|
@ -291,11 +300,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.GROUPS (
|
||||
PARTY_ID bigint not null,
|
||||
primary key (PARTY_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.GROUP_MEMBERSHIPS (
|
||||
MEMBERSHIP_ID bigint not null,
|
||||
GROUP_ID bigint,
|
||||
|
|
@ -303,6 +307,11 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (MEMBERSHIP_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.GROUPS (
|
||||
PARTY_ID bigint not null,
|
||||
primary key (PARTY_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.HOSTS (
|
||||
HOST_ID bigint not null,
|
||||
SERVER_NAME varchar(512),
|
||||
|
|
@ -430,14 +439,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (QUEUE_ITEM_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCES (
|
||||
CREATED timestamp,
|
||||
OBJECT_ID bigint not null,
|
||||
parent_OBJECT_ID bigint,
|
||||
resourceType_RESOURCE_TYPE_ID bigint,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCE_DESCRIPTIONS (
|
||||
OBJECT_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
|
|
@ -452,6 +453,13 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCE_TYPE_DESCRIPTIONS (
|
||||
RESOURCE_TYPE_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (RESOURCE_TYPE_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCE_TYPES (
|
||||
RESOURCE_TYPE_ID bigint not null,
|
||||
SINGLETON boolean,
|
||||
|
|
@ -462,11 +470,12 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (RESOURCE_TYPE_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCE_TYPE_DESCRIPTIONS (
|
||||
RESOURCE_TYPE_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (RESOURCE_TYPE_ID, LOCALE)
|
||||
create table CCM_CORE.RESOURCES (
|
||||
CREATED timestamp,
|
||||
OBJECT_ID bigint not null,
|
||||
parent_OBJECT_ID bigint,
|
||||
resourceType_RESOURCE_TYPE_ID bigint,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.ROLE_MEMBERSHIPS (
|
||||
|
|
@ -481,11 +490,11 @@ CREATE SCHEMA ccm_core;
|
|||
SETTING_ID bigint not null,
|
||||
CONFIGURATION_CLASS varchar(512) not null,
|
||||
NAME varchar(512) not null,
|
||||
SETTING_VALUE_LONG bigint,
|
||||
SETTING_VALUE_STRING varchar(1024),
|
||||
SETTING_VALUE_BOOLEAN boolean,
|
||||
SETTING_VALUE_BIG_DECIMAL decimal(19,2),
|
||||
SETTING_VALUE_DOUBLE double,
|
||||
SETTING_VALUE_STRING varchar(1024),
|
||||
SETTING_VALUE_BIG_DECIMAL decimal(19,2),
|
||||
SETTING_VALUE_LONG bigint,
|
||||
primary key (SETTING_ID)
|
||||
);
|
||||
|
||||
|
|
@ -519,6 +528,13 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.USER_EMAIL_ADDRESSES (
|
||||
USER_ID bigint not null,
|
||||
EMAIL_ADDRESS varchar(512) not null,
|
||||
BOUNCING boolean,
|
||||
VERIFIED boolean
|
||||
);
|
||||
|
||||
create table CCM_CORE.USERS (
|
||||
BANNED boolean,
|
||||
FAMILY_NAME varchar(512),
|
||||
|
|
@ -532,18 +548,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (PARTY_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.USER_EMAIL_ADDRESSES (
|
||||
USER_ID bigint not null,
|
||||
EMAIL_ADDRESS varchar(512) not null,
|
||||
BOUNCING boolean,
|
||||
VERIFIED boolean
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOWS (
|
||||
WORKFLOW_ID bigint not null,
|
||||
primary key (WORKFLOW_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_DESCRIPTIONS (
|
||||
WORKFLOW_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
|
|
@ -558,21 +562,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (WORKFLOW_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TASKS (
|
||||
TASK_ID bigint not null,
|
||||
ACTIVE boolean,
|
||||
TASK_STATE varchar(512),
|
||||
WORKFLOW_ID bigint,
|
||||
primary key (TASK_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TASKS_DESCRIPTIONS (
|
||||
TASK_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (TASK_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TASK_COMMENTS (
|
||||
TASK_ID bigint not null,
|
||||
COMMENT clob
|
||||
|
|
@ -590,20 +579,42 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (TASK_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_USER_TASKS (
|
||||
create table CCM_CORE.WORKFLOW_TASKS (
|
||||
TASK_ID bigint not null,
|
||||
ACTIVE boolean,
|
||||
TASK_STATE varchar(512),
|
||||
WORKFLOW_ID bigint,
|
||||
primary key (TASK_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TASKS_DESCRIPTIONS (
|
||||
TASK_ID bigint not null,
|
||||
LOCALIZED_VALUE clob,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (TASK_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TEMPLATES (
|
||||
WORKFLOW_ID bigint not null,
|
||||
primary key (WORKFLOW_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_USER_TASKS (
|
||||
DUE_DATE timestamp,
|
||||
DURATION_MINUTES bigint,
|
||||
LOCKED boolean,
|
||||
START_DATE timestamp,
|
||||
TASK_ID bigint not null,
|
||||
LOCKING_USER_ID bigint,
|
||||
NOTIFICATION_SENDER bigint,
|
||||
primary key (TASK_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOWS (
|
||||
WORKFLOW_ID bigint not null,
|
||||
primary key (WORKFLOW_ID)
|
||||
);
|
||||
|
||||
alter table CCM_CORE.CATEGORY_DOMAINS
|
||||
add constraint UK_mb1riernf8a88u3mwl0bgfj8y unique (DOMAIN_KEY);
|
||||
|
||||
|
|
@ -614,462 +625,501 @@ CREATE SCHEMA ccm_core;
|
|||
add constraint UK_1cm71jlagvyvcnkqvxqyit3wx unique (UUID);
|
||||
|
||||
alter table CCM_CORE.HOSTS
|
||||
add constraint UK_9ramlv6uxwt13v0wj7q0tucsx unique (SERVER_NAME, SERVER_PORT);
|
||||
add constraint UK9ramlv6uxwt13v0wj7q0tucsx unique (SERVER_NAME, SERVER_PORT);
|
||||
|
||||
alter table CCM_CORE.INSTALLED_MODULES
|
||||
add constraint UK_11imwgfojyi4hpr18uw9g3jvx unique (MODULE_CLASS_NAME);
|
||||
|
||||
alter table CCM_CORE.SETTINGS
|
||||
add constraint UK_5whinfxdaepqs09e5ia9y71uk unique (CONFIGURATION_CLASS, NAME);
|
||||
add constraint UK5whinfxdaepqs09e5ia9y71uk unique (CONFIGURATION_CLASS, NAME);
|
||||
create sequence hibernate_sequence start with 1 increment by 1;
|
||||
|
||||
alter table CCM_CORE.APPLICATIONS
|
||||
add constraint FK_sn1sqtx94nhxgv282ymoqiock
|
||||
add constraint FKatcp9ij6mbkx0nfeig1o6n3lm
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.ATTACHMENTS
|
||||
add constraint FK_fwm2uvhmqg8bmo1d66g0b6be9
|
||||
add constraint FK8ju9hm9baceridp803nislkwb
|
||||
foreign key (MESSAGE_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.CATEGORIES
|
||||
add constraint FK_4sghd3hxh69xgu68m8uh2axej
|
||||
add constraint FKrj3marx99nheur4fqanm0ylur
|
||||
foreign key (PARENT_CATEGORY_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CATEGORIES
|
||||
add constraint FK_pvjwyfbuwafc1mlyevgwwyg49
|
||||
add constraint FKpm291swli2musd0204phta652
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.CATEGORIZATIONS
|
||||
add constraint FK_2onruptfmyn5mu8f5j2o4h8i3
|
||||
add constraint FKejp0ubk034nfq60v1po6srkke
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.CATEGORIZATIONS
|
||||
add constraint FK_k43sltpj69u3y5eltkjhumc4p
|
||||
add constraint FKoyeipswl876wa6mqwbx0uy83h
|
||||
foreign key (CATEGORY_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CATEGORY_DESCRIPTIONS
|
||||
add constraint FK_55equbyl81ut4yyt6jms57jwr
|
||||
add constraint FKhiwjlmh5vkbu3v3vng1la1qum
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CATEGORY_DOMAINS
|
||||
add constraint FK_jyt6c67quitehuh5xe7ulhqvu
|
||||
add constraint FKf25vi73cji01w8fgo6ow1dgg
|
||||
foreign key (ROOT_CATEGORY_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CATEGORY_DOMAINS
|
||||
add constraint FK_40h1mx7tdlmjvb6x2e04jqgi7
|
||||
add constraint FK58xpmnvciohkom1c16oua4xha
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.CATEGORY_TITLES
|
||||
add constraint FK_954p2g6kwhef5h41pfcda812u
|
||||
add constraint FKka9bt9f5br0kji5bcjxcmf6ch
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CCM_OBJECTS_AUD
|
||||
add constraint FKr00eauutiyvocno8ckx6h9nw6
|
||||
foreign key (REV)
|
||||
references CCM_CORE.CCM_REVISIONS;
|
||||
|
||||
alter table CCM_CORE.CCM_OBJECTS_AUD
|
||||
add constraint FKo5s37ctcdny7tmewjwv7705h5
|
||||
foreign key (REVEND)
|
||||
references CCM_CORE.CCM_REVISIONS;
|
||||
|
||||
alter table CCM_CORE.DIGESTS
|
||||
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
||||
add constraint FKc53g09agnye3w1v4euy3e0gsi
|
||||
foreign key (FROM_PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.DIGESTS
|
||||
add constraint FK_4sxl35dvaj54ck0ikf850h58x
|
||||
add constraint FK845r9ep6xu6nbt1mvxulwybym
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.DOMAIN_DESCRIPTIONS
|
||||
add constraint FK_12rneohwyp6p66ioyoyobvkxr
|
||||
add constraint FKn4i2dxgn8cqysa62dds6eih6a
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORY_DOMAINS;
|
||||
|
||||
alter table CCM_CORE.DOMAIN_OWNERSHIPS
|
||||
add constraint FK_m53bm8ecspukj3qj99q9xa8ox
|
||||
add constraint FK47nsasr7jrdwlky5gx0u6e9py
|
||||
foreign key (domain_OBJECT_ID)
|
||||
references CCM_CORE.CATEGORY_DOMAINS;
|
||||
|
||||
alter table CCM_CORE.DOMAIN_OWNERSHIPS
|
||||
add constraint FK_ce4xhu9ilpdvjsmrsjb739t64
|
||||
add constraint FK3u4hq6yqau4m419b1xva3xpwq
|
||||
foreign key (owner_OBJECT_ID)
|
||||
references CCM_CORE.APPLICATIONS;
|
||||
|
||||
alter table CCM_CORE.DOMAIN_TITLES
|
||||
add constraint FK_98kfhafuv6lmhnpkhurwp9bgm
|
||||
add constraint FK5p526dsdwn94els6lp5w0hdn4
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORY_DOMAINS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_COMPONENT_DESCRIPTIONS
|
||||
add constraint FKfh0k9lj3pf4amfc9bbbss0tr1
|
||||
foreign key (COMPONENT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
||||
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
||||
add constraint FKpcpmvyiix023b4g5n4q8nkfca
|
||||
foreign key (parentComponent_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
||||
add constraint FK_f9xo42yrxdjxqedrk3t2upm9e
|
||||
add constraint FKt0e0uv00pp1rwhyaltrytghnm
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_COMPONENT_DESCRIPTIONS
|
||||
add constraint FK_2njuft67tbfnkxsr62r0bmhh3
|
||||
foreign key (COMPONENT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_CONFIRM_EMAIL_LISTENER
|
||||
add constraint FK_qm4q6qc2p81e349jgpoyxpq10
|
||||
add constraint FK48khrbud3xhi2gvsvnlttd8tg
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_CONFIRM_REDIRECT_LISTENERS
|
||||
add constraint FK_cq44p887dqh2ycd0htku119wf
|
||||
add constraint FKbyjjt2ufendvje2obtge2l7et
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_DATA_DRIVEN_SELECTS
|
||||
add constraint FK_qeyxu4t8aqosmoup7ho9qrtae
|
||||
add constraint FK8oriyta1957u7dvbrqk717944
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGETS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_DATA_QUERIES
|
||||
add constraint FK_6xtng7pfv18ixfpid57grfh4
|
||||
add constraint FKhhaxpeddbtmrnjr5o0fopju3a
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_DATA_QUERY_DESCRIPTIONS
|
||||
add constraint FK_2rlo453aslip0ng1fpyv022ld
|
||||
add constraint FKsmduu1opoiulkeo2gc8v7lsbn
|
||||
foreign key (DATA_QUERY_ID)
|
||||
references CCM_CORE.FORMBUILDER_DATA_QUERIES;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_DATA_QUERY_NAMES
|
||||
add constraint FK_9nqk2rpq4exw708vobkmdcr1s
|
||||
add constraint FKju1x82inrw3kguyjuxoetn6gn
|
||||
foreign key (DATA_QUERY_ID)
|
||||
references CCM_CORE.FORMBUILDER_DATA_QUERIES;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_FORMSECTIONS
|
||||
add constraint FK_anavw6ab288yo2d90axcebv1p
|
||||
add constraint FKnfhsgxp4lvigq2pm33pn4afac
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_LISTENERS
|
||||
add constraint FK_lnlrrafk9r9v072vqtmnkwkou
|
||||
add constraint FK33ilyirwoux28yowafgd5xx0o
|
||||
foreign key (widget_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGETS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_LISTENERS
|
||||
add constraint FK_2ynw5cse8kayvi9wqdgg477w0
|
||||
add constraint FKlqm76746nq5yrt8ganm474uu0
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_METAOBJECTS
|
||||
add constraint FK_9bx162hal2lqub5m5c21hh31r
|
||||
add constraint FKf963v6u9mw8pwjmasrw51w8dx
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_OBJECT_TYPES
|
||||
add constraint FK_qaj6yd47l5trvvxtnxeao1c33
|
||||
add constraint FKkv337e83rsecf0h3qy8bu7l9w
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_OPTIONS
|
||||
add constraint FK_6s1dxx8lfky4l5ibtd20ouvuj
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_OPTION_LABELS
|
||||
add constraint FK_90c86qtfefh98jcche7rtk5ms
|
||||
add constraint FKatlsylsvln6yse55eof6wwkj6
|
||||
foreign key (OPTION_ID)
|
||||
references CCM_CORE.FORMBUILDER_OPTIONS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS
|
||||
add constraint FK_2a4hflqpujuxvx90bsnie3s33
|
||||
foreign key (formSection_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_FORMSECTIONS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS
|
||||
add constraint FK_dth0onqirda98fvvpo1rtpjxi
|
||||
alter table CCM_CORE.FORMBUILDER_OPTIONS
|
||||
add constraint FKhe5q71wby9g4i56sotc501h11
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENER_DESCRIPTIONS
|
||||
add constraint FK_cynaaq1405ih7epmt4k6vv5m1
|
||||
add constraint FKcv3iu04gxjk9c0pn6tl8rqqv3
|
||||
foreign key (PROCESS_LISTENER_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENER_NAMES
|
||||
add constraint FK_gpc3rhvwhy9038k7or5ud8mim
|
||||
add constraint FK8rnyb1m6ij3b9hhmhr7klgd4p
|
||||
foreign key (PROCESS_LISTENER_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS
|
||||
add constraint FK7uiaeax8qafm82e5k729ms5ku
|
||||
foreign key (formSection_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_FORMSECTIONS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS
|
||||
add constraint FKbdnloo884qk6gn36jwiqv5rlp
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_REMOTE_SERVER_POST_LISTENER
|
||||
add constraint FK_b6b0wn2j0mps0ml4jh8s46y4r
|
||||
add constraint FKpajvu9m6fj1enm67a9gcb5ii9
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_SIMPLE_EMAIL_LISTENERS
|
||||
add constraint FK_33n9b1q1goybwbvvaotnq4n7
|
||||
add constraint FKsn82ktlq0c9ikijyv8k2bfv4f
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_TEMPLATE_EMAIL_LISTENERS
|
||||
add constraint FK_iqwglkvml7y4yevaq8s1936im
|
||||
add constraint FK8kjyu72btjsuaaqh4bvd8npns
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGETS
|
||||
add constraint FK_nei20rvwsnawx4u0ywrh22df1
|
||||
foreign key (label_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGET_LABELS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGETS
|
||||
add constraint FK_rr1oge60scu4a564h7rcra507
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGET_LABELS
|
||||
add constraint FK_7lp5ywog1suhe11jr3bl28cwg
|
||||
add constraint FKb1q9bfshcrkwlj7r8w5jb4y8l
|
||||
foreign key (widget_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGETS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGET_LABELS
|
||||
add constraint FK_ieiewnctdo2hdqeuxiv7cl1ru
|
||||
add constraint FKm1huo6ghk9l5o8buku9v8y6q7
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGETS
|
||||
add constraint FKs7qq6vxblhmq0rlf87re65jdp
|
||||
foreign key (label_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGET_LABELS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGETS
|
||||
add constraint FK1wosr4ujbfckdc50u5fgmrhrk
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_XML_EMAIL_LISTENERS
|
||||
add constraint FK_kcfevkdytrk81gj08f4aeh3qu
|
||||
add constraint FKjie9co03m7ow4ihig5rk7l8oj
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.GROUPS
|
||||
add constraint FK_bm1g1sp4aav32ghhbo04gkakl
|
||||
foreign key (PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.GROUP_MEMBERSHIPS
|
||||
add constraint FK_8fitvs176l2fpsoplbbsaxpjo
|
||||
add constraint FKq4qnny8ri3eo7eqh4olxco8nk
|
||||
foreign key (GROUP_ID)
|
||||
references CCM_CORE.GROUPS;
|
||||
|
||||
alter table CCM_CORE.GROUP_MEMBERSHIPS
|
||||
add constraint FK_7ttmeu1wo1bhgnxvqm5hksbwm
|
||||
add constraint FKc8u86ivkhvoiw6ju8b2p365he
|
||||
foreign key (MEMBER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.GROUPS
|
||||
add constraint FK4f61mlqxw0ct6s7wwpi9m0735
|
||||
foreign key (PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.INITS
|
||||
add constraint FK_jm1ulcmd86shcy83907ojny4q
|
||||
add constraint FK3nvvxk10nmq9nfuko8yklqdgc
|
||||
foreign key (REQUIRED_BY_ID)
|
||||
references CCM_CORE.INITS;
|
||||
|
||||
alter table CCM_CORE.LUCENE_DOCUMENTS
|
||||
add constraint FK_hhbqgpg0ocewhlr2cclrtsj7r
|
||||
add constraint FK942kl4yff8rdiwr0pjk2a9g8
|
||||
foreign key (CREATED_BY_PARTY_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.LUCENE_DOCUMENTS
|
||||
add constraint FK_mp7nlc3u4t38x0cevx0bg022s
|
||||
add constraint FKc5rs6afx4p9fidabfqsxr5ble
|
||||
foreign key (LAST_MODIFIED_BY)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.LUCENE_INDEXES
|
||||
add constraint FK_f5ddcxpneculqmctmixjus42k
|
||||
add constraint FK6gu0yrlviqk07dtb3r02iw43f
|
||||
foreign key (HOST_ID)
|
||||
references CCM_CORE.HOSTS;
|
||||
|
||||
alter table CCM_CORE.MESSAGES
|
||||
add constraint FK_pymp95s2bsv5dke8dxbdmdx1d
|
||||
add constraint FKph10aehmg9f20pn2w4buki97q
|
||||
foreign key (IN_REPLY_TO_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.MESSAGES
|
||||
add constraint FK_7w5nh4eo1l5idhvfwvkv02yyi
|
||||
add constraint FKjufsx3c3h538fj35h8hgfnb1p
|
||||
foreign key (SENDER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.MESSAGES
|
||||
add constraint FK_t98lp1382qxby5c7b34j238pc
|
||||
add constraint FK6w20ao7scwecd9mfwpun2ddqx
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.NOTIFICATIONS
|
||||
add constraint FK_a2hr4wa8qqnoj0njlrkuak3s6
|
||||
add constraint FKqk70c1x1dklhty9ju5t4wukd9
|
||||
foreign key (DIGEST_ID)
|
||||
references CCM_CORE.DIGESTS;
|
||||
|
||||
alter table CCM_CORE.NOTIFICATIONS
|
||||
add constraint FK_ck8hytjcms2iwen7q538n49nu
|
||||
add constraint FKtt4fjr2p75og79jxxgd8q8mr
|
||||
foreign key (MESSAGE_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.NOTIFICATIONS
|
||||
add constraint FK_lp67f9mq0basheao3o81xj0xh
|
||||
add constraint FK2vlnma0ox43j0clx8ead08n5s
|
||||
foreign key (RECEIVER_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.NOTIFICATIONS
|
||||
add constraint FK_2aqx4bgfyhhh4g3pvvjh8hy0w
|
||||
add constraint FKf423hhiaw1bexpxeh1pnas7qt
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.ONE_TIME_AUTH_TOKENS
|
||||
add constraint FK_fvr3t6w3nsm3u29mjuh4tplno
|
||||
add constraint FKtplfuphkiorfkttaewb4wmfjc
|
||||
foreign key (USER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.PERMISSIONS
|
||||
add constraint FK_7f7dd6k54fi1vy3llbvrer061
|
||||
add constraint FKj9di7pawxgtouxmu2k44bj5c4
|
||||
foreign key (CREATION_USER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.PERMISSIONS
|
||||
add constraint FK_cnt8ay16396ldn10w9yqfvtib
|
||||
add constraint FKikx3x0kn9fito23g50v6xbr9f
|
||||
foreign key (GRANTEE_ID)
|
||||
references CCM_CORE.CCM_ROLES;
|
||||
|
||||
alter table CCM_CORE.PERMISSIONS
|
||||
add constraint FK_5d855uu7512wakcver0bvdc3f
|
||||
add constraint FKkamckexjnffnt8lay9nqeawhm
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.PORTALS
|
||||
add constraint FK_2san7d6vxf5jhesvar5hq57v4
|
||||
add constraint FK5a2hdrbw03mmgr74vj5nxlpvk
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.PORTLETS
|
||||
add constraint FK_46ty07r54th9qc87pyi31jdqs
|
||||
add constraint FK9gr5xjt3rx4uhtw7vl6adruol
|
||||
foreign key (PORTAL_ID)
|
||||
references CCM_CORE.PORTALS;
|
||||
|
||||
alter table CCM_CORE.PORTLETS
|
||||
add constraint FK_r0tybwnahtdoo68tbna9q3s75
|
||||
add constraint FKjmx9uebt0gwxkw3xv34niy35f
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.QUEUE_ITEMS
|
||||
add constraint FK_kskdba7a8ytgc5fxen06peg7
|
||||
add constraint FKtgkwfruv9kjdybf46l02da088
|
||||
foreign key (MESSAGE_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.QUEUE_ITEMS
|
||||
add constraint FK_iccfxv2glwbqa465s8125ftgm
|
||||
add constraint FKs9aq1hyxstwmvx7fmfifp4x7r
|
||||
foreign key (RECEIVER_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FK_ceqi7mfjyk4vdoiyie09kmgj
|
||||
foreign key (parent_OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FK_eodj9xd1rmdokm4c3ir1l7s4d
|
||||
foreign key (resourceType_RESOURCE_TYPE_ID)
|
||||
references CCM_CORE.RESOURCE_TYPES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FK_f600trvtav1r0n6oy7nri9wry
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.RESOURCE_DESCRIPTIONS
|
||||
add constraint FK_pcahs6vr1ajb3a4mh0vi4stuy
|
||||
add constraint FKk9arvj5u21rv23ce3cav4opqx
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.RESOURCE_TITLES
|
||||
add constraint FK_brvlxvpy2f1n67562twvvux7s
|
||||
add constraint FKto4p6n2wklljyf7tmuxtmyfe0
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.RESOURCE_TYPE_DESCRIPTIONS
|
||||
add constraint FK_7860pdhhck6opa22gc9u0pgfu
|
||||
add constraint FKckpihjtv23iahbg3imnpbsr2
|
||||
foreign key (RESOURCE_TYPE_ID)
|
||||
references CCM_CORE.RESOURCE_TYPES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FKbo7ibfgodicn9flv2gfo11g5a
|
||||
foreign key (parent_OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FK262fbwetpjx3k4uuvw24wsiv
|
||||
foreign key (resourceType_RESOURCE_TYPE_ID)
|
||||
references CCM_CORE.RESOURCE_TYPES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FKbjdf8pm4frth8r06ev2qjm88f
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.ROLE_MEMBERSHIPS
|
||||
add constraint FK_hueyk522he8t6fa1blnpcslap
|
||||
add constraint FK9m88ywi7rcin7b7jrgh53emrq
|
||||
foreign key (MEMBER_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.ROLE_MEMBERSHIPS
|
||||
add constraint FK_eykbm84ndwgpqsr48wekhdoqj
|
||||
add constraint FKcsyogv5m2rgsrmtgnhgkjhfw7
|
||||
foreign key (ROLE_ID)
|
||||
references CCM_CORE.CCM_ROLES;
|
||||
|
||||
alter table CCM_CORE.SETTINGS_ENUM_VALUES
|
||||
add constraint FK_sq653hqyeeklci0y7pvoxf5ha
|
||||
add constraint FK8mw4p92s0h3h8bmo8saowu32i
|
||||
foreign key (ENUM_ID)
|
||||
references CCM_CORE.SETTINGS;
|
||||
|
||||
alter table CCM_CORE.SETTINGS_L10N_STR_VALUES
|
||||
add constraint FK_t21obt5do2tjhskjxgxd5143r
|
||||
add constraint FK5knjq7cisej0qfx5dw1y93rou
|
||||
foreign key (ENTRY_ID)
|
||||
references CCM_CORE.SETTINGS;
|
||||
|
||||
alter table CCM_CORE.SETTINGS_STRING_LIST
|
||||
add constraint FK_obwiaa74lrjqjlpjidjltysoq
|
||||
add constraint FKqeclqa5sf1g53vxs857tpwrus
|
||||
foreign key (LIST_ID)
|
||||
references CCM_CORE.SETTINGS;
|
||||
|
||||
alter table CCM_CORE.TASK_ASSIGNMENTS
|
||||
add constraint FK_klh64or0yq26c63181j1tps2o
|
||||
add constraint FKe29uwmvxdmol1fjob3auej4qv
|
||||
foreign key (ROLE_ID)
|
||||
references CCM_CORE.CCM_ROLES;
|
||||
|
||||
alter table CCM_CORE.TASK_ASSIGNMENTS
|
||||
add constraint FK_fu6ukne6hj8ihlfxtmp17xpfj
|
||||
add constraint FKc1vovbjg9mp5yegx2fdoutx7u
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_USER_TASKS;
|
||||
|
||||
alter table CCM_CORE.THREADS
|
||||
add constraint FK_oopqroe5a8fg932teo0cyifcv
|
||||
add constraint FKsx08mpwvwnw97uwdgjs76q39g
|
||||
foreign key (ROOT_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.THREADS
|
||||
add constraint FK_n86cmt6poesgsr4g4c4q07i9f
|
||||
add constraint FKp97b1sy1kop07rtapeh5l9fb2
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.USERS
|
||||
add constraint FK_9gwih54tm0rn63e536f6s9oti
|
||||
foreign key (PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.USER_EMAIL_ADDRESSES
|
||||
add constraint FK_tp5wms6tgfl827ihqbcgskusy
|
||||
add constraint FKr900l79erul95seyyccf04ufc
|
||||
foreign key (USER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.USERS
|
||||
add constraint FKosh928q71aonu6l1kurb417r
|
||||
foreign key (PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_DESCRIPTIONS
|
||||
add constraint FK_sp01mgi5mi5wbwrh8ivnfpw2n
|
||||
add constraint FKgx7upkqky82dpxvbs95imfl9l
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_NAMES
|
||||
add constraint FK_rmkgykysvk7su7h5tij67p2r3
|
||||
add constraint FKkxedy9p48avfk45r0bn4uc09i
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_COMMENTS
|
||||
add constraint FKkfqrf9jdvm7livu5if06w0r5t
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
|
||||
add constraint FK1htp420ki24jaswtcum56iawe
|
||||
foreign key (DEPENDENT_TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
|
||||
add constraint FK8rbggnp4yjpab8quvvx800ymy
|
||||
foreign key (DEPENDS_ON_TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_LABELS
|
||||
add constraint FKf715qud6g9xv2xeb8rrpnv4xs
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASKS
|
||||
add constraint FK_bawikoiw1k0bil1bvwq5qpa0j
|
||||
add constraint FK1693cbc36e4d8gucg8q7sc57e
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASKS_DESCRIPTIONS
|
||||
add constraint FK2s2498d2tpojjrtghq7iyaosv
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TEMPLATES
|
||||
add constraint FK8692vdme4yxnkj1m0k1dw74pk
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FK_byuic3urkanoiqjnf6awfqmyk
|
||||
add constraint FKf09depwj5rgso2dair07vnu33
|
||||
foreign key (LOCKING_USER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FK_2dtlvmuapubq81quny4elndh
|
||||
add constraint FK6evo9y34awhdfcyl8gv78qb7f
|
||||
foreign key (NOTIFICATION_SENDER)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FK_bg60xxg9kerqsxyphbfxulg8y
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
create sequence hibernate_sequence start with 1 increment by 1;
|
||||
add constraint FKefpdf9ojplu7loo31hfm0wl2h
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
We are using the ValidityAuditStrategy here because it is faster
|
||||
when querying data than the DefaultStrategy
|
||||
-->
|
||||
<property name="org.hibernate.envers.audit_strategy"
|
||||
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>
|
||||
<!--<property name="org.hibernate.envers.audit_strategy"
|
||||
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>-->
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
|
|
|
|||
|
|
@ -74,6 +74,15 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.CCM_OBJECTS_AUD (
|
||||
OBJECT_ID int8 not null,
|
||||
REV int4 not null,
|
||||
REVTYPE int2,
|
||||
REVEND int4,
|
||||
DISPLAY_NAME varchar(255),
|
||||
primary key (OBJECT_ID, REV)
|
||||
);
|
||||
|
||||
create table CCM_CORE.CCM_REVISIONS (
|
||||
id int4 not null,
|
||||
timestamp int8 not null,
|
||||
|
|
@ -123,6 +132,13 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_COMPONENT_DESCRIPTIONS (
|
||||
COMPONENT_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (COMPONENT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_COMPONENTS (
|
||||
ACTIVE boolean,
|
||||
ADMIN_NAME varchar(255),
|
||||
|
|
@ -134,13 +150,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_COMPONENT_DESCRIPTIONS (
|
||||
COMPONENT_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (COMPONENT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_CONFIRM_EMAIL_LISTENER (
|
||||
BODY text,
|
||||
FROM_EMAIL varchar(255),
|
||||
|
|
@ -212,12 +221,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_OPTIONS (
|
||||
PARAMETER_VALUE varchar(255),
|
||||
OBJECT_ID int8 not null,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_OPTION_LABELS (
|
||||
OPTION_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
|
|
@ -225,11 +228,9 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OPTION_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS (
|
||||
LISTENER_CLASS varchar(255),
|
||||
PROCESS_LISTENER_ORDER int8,
|
||||
create table CCM_CORE.FORMBUILDER_OPTIONS (
|
||||
PARAMETER_VALUE varchar(255),
|
||||
OBJECT_ID int8 not null,
|
||||
formSection_OBJECT_ID int8,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
|
|
@ -247,6 +248,14 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (PROCESS_LISTENER_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS (
|
||||
LISTENER_CLASS varchar(255),
|
||||
PROCESS_LISTENER_ORDER int8,
|
||||
OBJECT_ID int8 not null,
|
||||
formSection_OBJECT_ID int8,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_REMOTE_SERVER_POST_LISTENER (
|
||||
REMOTE_URL varchar(2048),
|
||||
OBJECT_ID int8 not null,
|
||||
|
|
@ -268,6 +277,12 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_WIDGET_LABELS (
|
||||
OBJECT_ID int8 not null,
|
||||
widget_OBJECT_ID int8,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_WIDGETS (
|
||||
DEFAULT_VALUE varchar(255),
|
||||
PARAMETER_MODEL varchar(255),
|
||||
|
|
@ -277,12 +292,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_WIDGET_LABELS (
|
||||
OBJECT_ID int8 not null,
|
||||
widget_OBJECT_ID int8,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.FORMBUILDER_XML_EMAIL_LISTENERS (
|
||||
RECIPIENT varchar(255),
|
||||
SUBJECT varchar(255),
|
||||
|
|
@ -290,11 +299,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.GROUPS (
|
||||
PARTY_ID int8 not null,
|
||||
primary key (PARTY_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.GROUP_MEMBERSHIPS (
|
||||
MEMBERSHIP_ID int8 not null,
|
||||
GROUP_ID int8,
|
||||
|
|
@ -302,6 +306,11 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (MEMBERSHIP_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.GROUPS (
|
||||
PARTY_ID int8 not null,
|
||||
primary key (PARTY_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.HOSTS (
|
||||
HOST_ID int8 not null,
|
||||
SERVER_NAME varchar(512),
|
||||
|
|
@ -429,14 +438,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (QUEUE_ITEM_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCES (
|
||||
CREATED timestamp,
|
||||
OBJECT_ID int8 not null,
|
||||
parent_OBJECT_ID int8,
|
||||
resourceType_RESOURCE_TYPE_ID int8,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCE_DESCRIPTIONS (
|
||||
OBJECT_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
|
|
@ -451,6 +452,13 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCE_TYPE_DESCRIPTIONS (
|
||||
RESOURCE_TYPE_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (RESOURCE_TYPE_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCE_TYPES (
|
||||
RESOURCE_TYPE_ID int8 not null,
|
||||
SINGLETON boolean,
|
||||
|
|
@ -461,11 +469,12 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (RESOURCE_TYPE_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.RESOURCE_TYPE_DESCRIPTIONS (
|
||||
RESOURCE_TYPE_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (RESOURCE_TYPE_ID, LOCALE)
|
||||
create table CCM_CORE.RESOURCES (
|
||||
CREATED timestamp,
|
||||
OBJECT_ID int8 not null,
|
||||
parent_OBJECT_ID int8,
|
||||
resourceType_RESOURCE_TYPE_ID int8,
|
||||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.ROLE_MEMBERSHIPS (
|
||||
|
|
@ -480,11 +489,11 @@ CREATE SCHEMA ccm_core;
|
|||
SETTING_ID int8 not null,
|
||||
CONFIGURATION_CLASS varchar(512) not null,
|
||||
NAME varchar(512) not null,
|
||||
SETTING_VALUE_LONG int8,
|
||||
SETTING_VALUE_STRING varchar(1024),
|
||||
SETTING_VALUE_BOOLEAN boolean,
|
||||
SETTING_VALUE_BIG_DECIMAL numeric(19, 2),
|
||||
SETTING_VALUE_DOUBLE float8,
|
||||
SETTING_VALUE_STRING varchar(1024),
|
||||
SETTING_VALUE_BIG_DECIMAL numeric(19, 2),
|
||||
SETTING_VALUE_LONG int8,
|
||||
primary key (SETTING_ID)
|
||||
);
|
||||
|
||||
|
|
@ -518,6 +527,13 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.USER_EMAIL_ADDRESSES (
|
||||
USER_ID int8 not null,
|
||||
EMAIL_ADDRESS varchar(512) not null,
|
||||
BOUNCING boolean,
|
||||
VERIFIED boolean
|
||||
);
|
||||
|
||||
create table CCM_CORE.USERS (
|
||||
BANNED boolean,
|
||||
FAMILY_NAME varchar(512),
|
||||
|
|
@ -531,18 +547,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (PARTY_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.USER_EMAIL_ADDRESSES (
|
||||
USER_ID int8 not null,
|
||||
EMAIL_ADDRESS varchar(512) not null,
|
||||
BOUNCING boolean,
|
||||
VERIFIED boolean
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOWS (
|
||||
WORKFLOW_ID int8 not null,
|
||||
primary key (WORKFLOW_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_DESCRIPTIONS (
|
||||
WORKFLOW_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
|
|
@ -557,21 +561,6 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (WORKFLOW_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TASKS (
|
||||
TASK_ID int8 not null,
|
||||
ACTIVE boolean,
|
||||
TASK_STATE varchar(512),
|
||||
WORKFLOW_ID int8,
|
||||
primary key (TASK_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TASKS_DESCRIPTIONS (
|
||||
TASK_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (TASK_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TASK_COMMENTS (
|
||||
TASK_ID int8 not null,
|
||||
COMMENT text
|
||||
|
|
@ -589,20 +578,42 @@ CREATE SCHEMA ccm_core;
|
|||
primary key (TASK_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_USER_TASKS (
|
||||
create table CCM_CORE.WORKFLOW_TASKS (
|
||||
TASK_ID int8 not null,
|
||||
ACTIVE boolean,
|
||||
TASK_STATE varchar(512),
|
||||
WORKFLOW_ID int8,
|
||||
primary key (TASK_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TASKS_DESCRIPTIONS (
|
||||
TASK_ID int8 not null,
|
||||
LOCALIZED_VALUE text,
|
||||
LOCALE varchar(255) not null,
|
||||
primary key (TASK_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TEMPLATES (
|
||||
WORKFLOW_ID int8 not null,
|
||||
primary key (WORKFLOW_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_USER_TASKS (
|
||||
DUE_DATE timestamp,
|
||||
DURATION_MINUTES int8,
|
||||
LOCKED boolean,
|
||||
START_DATE timestamp,
|
||||
TASK_ID int8 not null,
|
||||
LOCKING_USER_ID int8,
|
||||
NOTIFICATION_SENDER int8,
|
||||
primary key (TASK_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOWS (
|
||||
WORKFLOW_ID int8 not null,
|
||||
primary key (WORKFLOW_ID)
|
||||
);
|
||||
|
||||
alter table CCM_CORE.CATEGORY_DOMAINS
|
||||
add constraint UK_mb1riernf8a88u3mwl0bgfj8y unique (DOMAIN_KEY);
|
||||
|
||||
|
|
@ -613,462 +624,501 @@ CREATE SCHEMA ccm_core;
|
|||
add constraint UK_1cm71jlagvyvcnkqvxqyit3wx unique (UUID);
|
||||
|
||||
alter table CCM_CORE.HOSTS
|
||||
add constraint UK_9ramlv6uxwt13v0wj7q0tucsx unique (SERVER_NAME, SERVER_PORT);
|
||||
add constraint UK9ramlv6uxwt13v0wj7q0tucsx unique (SERVER_NAME, SERVER_PORT);
|
||||
|
||||
alter table CCM_CORE.INSTALLED_MODULES
|
||||
add constraint UK_11imwgfojyi4hpr18uw9g3jvx unique (MODULE_CLASS_NAME);
|
||||
|
||||
alter table CCM_CORE.SETTINGS
|
||||
add constraint UK_5whinfxdaepqs09e5ia9y71uk unique (CONFIGURATION_CLASS, NAME);
|
||||
add constraint UK5whinfxdaepqs09e5ia9y71uk unique (CONFIGURATION_CLASS, NAME);
|
||||
create sequence hibernate_sequence start 1 increment 1;
|
||||
|
||||
alter table CCM_CORE.APPLICATIONS
|
||||
add constraint FK_sn1sqtx94nhxgv282ymoqiock
|
||||
add constraint FKatcp9ij6mbkx0nfeig1o6n3lm
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.ATTACHMENTS
|
||||
add constraint FK_fwm2uvhmqg8bmo1d66g0b6be9
|
||||
add constraint FK8ju9hm9baceridp803nislkwb
|
||||
foreign key (MESSAGE_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.CATEGORIES
|
||||
add constraint FK_4sghd3hxh69xgu68m8uh2axej
|
||||
add constraint FKrj3marx99nheur4fqanm0ylur
|
||||
foreign key (PARENT_CATEGORY_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CATEGORIES
|
||||
add constraint FK_pvjwyfbuwafc1mlyevgwwyg49
|
||||
add constraint FKpm291swli2musd0204phta652
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.CATEGORIZATIONS
|
||||
add constraint FK_2onruptfmyn5mu8f5j2o4h8i3
|
||||
add constraint FKejp0ubk034nfq60v1po6srkke
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.CATEGORIZATIONS
|
||||
add constraint FK_k43sltpj69u3y5eltkjhumc4p
|
||||
add constraint FKoyeipswl876wa6mqwbx0uy83h
|
||||
foreign key (CATEGORY_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CATEGORY_DESCRIPTIONS
|
||||
add constraint FK_55equbyl81ut4yyt6jms57jwr
|
||||
add constraint FKhiwjlmh5vkbu3v3vng1la1qum
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CATEGORY_DOMAINS
|
||||
add constraint FK_jyt6c67quitehuh5xe7ulhqvu
|
||||
add constraint FKf25vi73cji01w8fgo6ow1dgg
|
||||
foreign key (ROOT_CATEGORY_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CATEGORY_DOMAINS
|
||||
add constraint FK_40h1mx7tdlmjvb6x2e04jqgi7
|
||||
add constraint FK58xpmnvciohkom1c16oua4xha
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.CATEGORY_TITLES
|
||||
add constraint FK_954p2g6kwhef5h41pfcda812u
|
||||
add constraint FKka9bt9f5br0kji5bcjxcmf6ch
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CCM_OBJECTS_AUD
|
||||
add constraint FKr00eauutiyvocno8ckx6h9nw6
|
||||
foreign key (REV)
|
||||
references CCM_CORE.CCM_REVISIONS;
|
||||
|
||||
alter table CCM_CORE.CCM_OBJECTS_AUD
|
||||
add constraint FKo5s37ctcdny7tmewjwv7705h5
|
||||
foreign key (REVEND)
|
||||
references CCM_CORE.CCM_REVISIONS;
|
||||
|
||||
alter table CCM_CORE.DIGESTS
|
||||
add constraint FK_3xrcpufumqnh4ke4somt89rvh
|
||||
add constraint FKc53g09agnye3w1v4euy3e0gsi
|
||||
foreign key (FROM_PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.DIGESTS
|
||||
add constraint FK_4sxl35dvaj54ck0ikf850h58x
|
||||
add constraint FK845r9ep6xu6nbt1mvxulwybym
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.DOMAIN_DESCRIPTIONS
|
||||
add constraint FK_12rneohwyp6p66ioyoyobvkxr
|
||||
add constraint FKn4i2dxgn8cqysa62dds6eih6a
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORY_DOMAINS;
|
||||
|
||||
alter table CCM_CORE.DOMAIN_OWNERSHIPS
|
||||
add constraint FK_m53bm8ecspukj3qj99q9xa8ox
|
||||
add constraint FK47nsasr7jrdwlky5gx0u6e9py
|
||||
foreign key (domain_OBJECT_ID)
|
||||
references CCM_CORE.CATEGORY_DOMAINS;
|
||||
|
||||
alter table CCM_CORE.DOMAIN_OWNERSHIPS
|
||||
add constraint FK_ce4xhu9ilpdvjsmrsjb739t64
|
||||
add constraint FK3u4hq6yqau4m419b1xva3xpwq
|
||||
foreign key (owner_OBJECT_ID)
|
||||
references CCM_CORE.APPLICATIONS;
|
||||
|
||||
alter table CCM_CORE.DOMAIN_TITLES
|
||||
add constraint FK_98kfhafuv6lmhnpkhurwp9bgm
|
||||
add constraint FK5p526dsdwn94els6lp5w0hdn4
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORY_DOMAINS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_COMPONENT_DESCRIPTIONS
|
||||
add constraint FKfh0k9lj3pf4amfc9bbbss0tr1
|
||||
foreign key (COMPONENT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
||||
add constraint FK_72108sd6vsqt88g3fb4kl6o81
|
||||
add constraint FKpcpmvyiix023b4g5n4q8nkfca
|
||||
foreign key (parentComponent_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_COMPONENTS
|
||||
add constraint FK_f9xo42yrxdjxqedrk3t2upm9e
|
||||
add constraint FKt0e0uv00pp1rwhyaltrytghnm
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_COMPONENT_DESCRIPTIONS
|
||||
add constraint FK_2njuft67tbfnkxsr62r0bmhh3
|
||||
foreign key (COMPONENT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_CONFIRM_EMAIL_LISTENER
|
||||
add constraint FK_qm4q6qc2p81e349jgpoyxpq10
|
||||
add constraint FK48khrbud3xhi2gvsvnlttd8tg
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_CONFIRM_REDIRECT_LISTENERS
|
||||
add constraint FK_cq44p887dqh2ycd0htku119wf
|
||||
add constraint FKbyjjt2ufendvje2obtge2l7et
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_DATA_DRIVEN_SELECTS
|
||||
add constraint FK_qeyxu4t8aqosmoup7ho9qrtae
|
||||
add constraint FK8oriyta1957u7dvbrqk717944
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGETS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_DATA_QUERIES
|
||||
add constraint FK_6xtng7pfv18ixfpid57grfh4
|
||||
add constraint FKhhaxpeddbtmrnjr5o0fopju3a
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_DATA_QUERY_DESCRIPTIONS
|
||||
add constraint FK_2rlo453aslip0ng1fpyv022ld
|
||||
add constraint FKsmduu1opoiulkeo2gc8v7lsbn
|
||||
foreign key (DATA_QUERY_ID)
|
||||
references CCM_CORE.FORMBUILDER_DATA_QUERIES;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_DATA_QUERY_NAMES
|
||||
add constraint FK_9nqk2rpq4exw708vobkmdcr1s
|
||||
add constraint FKju1x82inrw3kguyjuxoetn6gn
|
||||
foreign key (DATA_QUERY_ID)
|
||||
references CCM_CORE.FORMBUILDER_DATA_QUERIES;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_FORMSECTIONS
|
||||
add constraint FK_anavw6ab288yo2d90axcebv1p
|
||||
add constraint FKnfhsgxp4lvigq2pm33pn4afac
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_LISTENERS
|
||||
add constraint FK_lnlrrafk9r9v072vqtmnkwkou
|
||||
add constraint FK33ilyirwoux28yowafgd5xx0o
|
||||
foreign key (widget_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGETS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_LISTENERS
|
||||
add constraint FK_2ynw5cse8kayvi9wqdgg477w0
|
||||
add constraint FKlqm76746nq5yrt8ganm474uu0
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_METAOBJECTS
|
||||
add constraint FK_9bx162hal2lqub5m5c21hh31r
|
||||
add constraint FKf963v6u9mw8pwjmasrw51w8dx
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_OBJECT_TYPES
|
||||
add constraint FK_qaj6yd47l5trvvxtnxeao1c33
|
||||
add constraint FKkv337e83rsecf0h3qy8bu7l9w
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_OPTIONS
|
||||
add constraint FK_6s1dxx8lfky4l5ibtd20ouvuj
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_OPTION_LABELS
|
||||
add constraint FK_90c86qtfefh98jcche7rtk5ms
|
||||
add constraint FKatlsylsvln6yse55eof6wwkj6
|
||||
foreign key (OPTION_ID)
|
||||
references CCM_CORE.FORMBUILDER_OPTIONS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS
|
||||
add constraint FK_2a4hflqpujuxvx90bsnie3s33
|
||||
foreign key (formSection_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_FORMSECTIONS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS
|
||||
add constraint FK_dth0onqirda98fvvpo1rtpjxi
|
||||
alter table CCM_CORE.FORMBUILDER_OPTIONS
|
||||
add constraint FKhe5q71wby9g4i56sotc501h11
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENER_DESCRIPTIONS
|
||||
add constraint FK_cynaaq1405ih7epmt4k6vv5m1
|
||||
add constraint FKcv3iu04gxjk9c0pn6tl8rqqv3
|
||||
foreign key (PROCESS_LISTENER_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENER_NAMES
|
||||
add constraint FK_gpc3rhvwhy9038k7or5ud8mim
|
||||
add constraint FK8rnyb1m6ij3b9hhmhr7klgd4p
|
||||
foreign key (PROCESS_LISTENER_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS
|
||||
add constraint FK7uiaeax8qafm82e5k729ms5ku
|
||||
foreign key (formSection_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_FORMSECTIONS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_PROCESS_LISTENERS
|
||||
add constraint FKbdnloo884qk6gn36jwiqv5rlp
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_REMOTE_SERVER_POST_LISTENER
|
||||
add constraint FK_b6b0wn2j0mps0ml4jh8s46y4r
|
||||
add constraint FKpajvu9m6fj1enm67a9gcb5ii9
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_SIMPLE_EMAIL_LISTENERS
|
||||
add constraint FK_33n9b1q1goybwbvvaotnq4n7
|
||||
add constraint FKsn82ktlq0c9ikijyv8k2bfv4f
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_TEMPLATE_EMAIL_LISTENERS
|
||||
add constraint FK_iqwglkvml7y4yevaq8s1936im
|
||||
add constraint FK8kjyu72btjsuaaqh4bvd8npns
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGETS
|
||||
add constraint FK_nei20rvwsnawx4u0ywrh22df1
|
||||
foreign key (label_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGET_LABELS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGETS
|
||||
add constraint FK_rr1oge60scu4a564h7rcra507
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGET_LABELS
|
||||
add constraint FK_7lp5ywog1suhe11jr3bl28cwg
|
||||
add constraint FKb1q9bfshcrkwlj7r8w5jb4y8l
|
||||
foreign key (widget_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGETS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGET_LABELS
|
||||
add constraint FK_ieiewnctdo2hdqeuxiv7cl1ru
|
||||
add constraint FKm1huo6ghk9l5o8buku9v8y6q7
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGETS
|
||||
add constraint FKs7qq6vxblhmq0rlf87re65jdp
|
||||
foreign key (label_OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_WIDGET_LABELS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_WIDGETS
|
||||
add constraint FK1wosr4ujbfckdc50u5fgmrhrk
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_COMPONENTS;
|
||||
|
||||
alter table CCM_CORE.FORMBUILDER_XML_EMAIL_LISTENERS
|
||||
add constraint FK_kcfevkdytrk81gj08f4aeh3qu
|
||||
add constraint FKjie9co03m7ow4ihig5rk7l8oj
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.FORMBUILDER_PROCESS_LISTENERS;
|
||||
|
||||
alter table CCM_CORE.GROUPS
|
||||
add constraint FK_bm1g1sp4aav32ghhbo04gkakl
|
||||
foreign key (PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.GROUP_MEMBERSHIPS
|
||||
add constraint FK_8fitvs176l2fpsoplbbsaxpjo
|
||||
add constraint FKq4qnny8ri3eo7eqh4olxco8nk
|
||||
foreign key (GROUP_ID)
|
||||
references CCM_CORE.GROUPS;
|
||||
|
||||
alter table CCM_CORE.GROUP_MEMBERSHIPS
|
||||
add constraint FK_7ttmeu1wo1bhgnxvqm5hksbwm
|
||||
add constraint FKc8u86ivkhvoiw6ju8b2p365he
|
||||
foreign key (MEMBER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.GROUPS
|
||||
add constraint FK4f61mlqxw0ct6s7wwpi9m0735
|
||||
foreign key (PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.INITS
|
||||
add constraint FK_jm1ulcmd86shcy83907ojny4q
|
||||
add constraint FK3nvvxk10nmq9nfuko8yklqdgc
|
||||
foreign key (REQUIRED_BY_ID)
|
||||
references CCM_CORE.INITS;
|
||||
|
||||
alter table CCM_CORE.LUCENE_DOCUMENTS
|
||||
add constraint FK_hhbqgpg0ocewhlr2cclrtsj7r
|
||||
add constraint FK942kl4yff8rdiwr0pjk2a9g8
|
||||
foreign key (CREATED_BY_PARTY_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.LUCENE_DOCUMENTS
|
||||
add constraint FK_mp7nlc3u4t38x0cevx0bg022s
|
||||
add constraint FKc5rs6afx4p9fidabfqsxr5ble
|
||||
foreign key (LAST_MODIFIED_BY)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.LUCENE_INDEXES
|
||||
add constraint FK_f5ddcxpneculqmctmixjus42k
|
||||
add constraint FK6gu0yrlviqk07dtb3r02iw43f
|
||||
foreign key (HOST_ID)
|
||||
references CCM_CORE.HOSTS;
|
||||
|
||||
alter table CCM_CORE.MESSAGES
|
||||
add constraint FK_pymp95s2bsv5dke8dxbdmdx1d
|
||||
add constraint FKph10aehmg9f20pn2w4buki97q
|
||||
foreign key (IN_REPLY_TO_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.MESSAGES
|
||||
add constraint FK_7w5nh4eo1l5idhvfwvkv02yyi
|
||||
add constraint FKjufsx3c3h538fj35h8hgfnb1p
|
||||
foreign key (SENDER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.MESSAGES
|
||||
add constraint FK_t98lp1382qxby5c7b34j238pc
|
||||
add constraint FK6w20ao7scwecd9mfwpun2ddqx
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.NOTIFICATIONS
|
||||
add constraint FK_a2hr4wa8qqnoj0njlrkuak3s6
|
||||
add constraint FKqk70c1x1dklhty9ju5t4wukd9
|
||||
foreign key (DIGEST_ID)
|
||||
references CCM_CORE.DIGESTS;
|
||||
|
||||
alter table CCM_CORE.NOTIFICATIONS
|
||||
add constraint FK_ck8hytjcms2iwen7q538n49nu
|
||||
add constraint FKtt4fjr2p75og79jxxgd8q8mr
|
||||
foreign key (MESSAGE_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.NOTIFICATIONS
|
||||
add constraint FK_lp67f9mq0basheao3o81xj0xh
|
||||
add constraint FK2vlnma0ox43j0clx8ead08n5s
|
||||
foreign key (RECEIVER_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.NOTIFICATIONS
|
||||
add constraint FK_2aqx4bgfyhhh4g3pvvjh8hy0w
|
||||
add constraint FKf423hhiaw1bexpxeh1pnas7qt
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.ONE_TIME_AUTH_TOKENS
|
||||
add constraint FK_fvr3t6w3nsm3u29mjuh4tplno
|
||||
add constraint FKtplfuphkiorfkttaewb4wmfjc
|
||||
foreign key (USER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.PERMISSIONS
|
||||
add constraint FK_7f7dd6k54fi1vy3llbvrer061
|
||||
add constraint FKj9di7pawxgtouxmu2k44bj5c4
|
||||
foreign key (CREATION_USER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.PERMISSIONS
|
||||
add constraint FK_cnt8ay16396ldn10w9yqfvtib
|
||||
add constraint FKikx3x0kn9fito23g50v6xbr9f
|
||||
foreign key (GRANTEE_ID)
|
||||
references CCM_CORE.CCM_ROLES;
|
||||
|
||||
alter table CCM_CORE.PERMISSIONS
|
||||
add constraint FK_5d855uu7512wakcver0bvdc3f
|
||||
add constraint FKkamckexjnffnt8lay9nqeawhm
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.PORTALS
|
||||
add constraint FK_2san7d6vxf5jhesvar5hq57v4
|
||||
add constraint FK5a2hdrbw03mmgr74vj5nxlpvk
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.PORTLETS
|
||||
add constraint FK_46ty07r54th9qc87pyi31jdqs
|
||||
add constraint FK9gr5xjt3rx4uhtw7vl6adruol
|
||||
foreign key (PORTAL_ID)
|
||||
references CCM_CORE.PORTALS;
|
||||
|
||||
alter table CCM_CORE.PORTLETS
|
||||
add constraint FK_r0tybwnahtdoo68tbna9q3s75
|
||||
add constraint FKjmx9uebt0gwxkw3xv34niy35f
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.QUEUE_ITEMS
|
||||
add constraint FK_kskdba7a8ytgc5fxen06peg7
|
||||
add constraint FKtgkwfruv9kjdybf46l02da088
|
||||
foreign key (MESSAGE_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.QUEUE_ITEMS
|
||||
add constraint FK_iccfxv2glwbqa465s8125ftgm
|
||||
add constraint FKs9aq1hyxstwmvx7fmfifp4x7r
|
||||
foreign key (RECEIVER_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FK_ceqi7mfjyk4vdoiyie09kmgj
|
||||
foreign key (parent_OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FK_eodj9xd1rmdokm4c3ir1l7s4d
|
||||
foreign key (resourceType_RESOURCE_TYPE_ID)
|
||||
references CCM_CORE.RESOURCE_TYPES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FK_f600trvtav1r0n6oy7nri9wry
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.RESOURCE_DESCRIPTIONS
|
||||
add constraint FK_pcahs6vr1ajb3a4mh0vi4stuy
|
||||
add constraint FKk9arvj5u21rv23ce3cav4opqx
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.RESOURCE_TITLES
|
||||
add constraint FK_brvlxvpy2f1n67562twvvux7s
|
||||
add constraint FKto4p6n2wklljyf7tmuxtmyfe0
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.RESOURCE_TYPE_DESCRIPTIONS
|
||||
add constraint FK_7860pdhhck6opa22gc9u0pgfu
|
||||
add constraint FKckpihjtv23iahbg3imnpbsr2
|
||||
foreign key (RESOURCE_TYPE_ID)
|
||||
references CCM_CORE.RESOURCE_TYPES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FKbo7ibfgodicn9flv2gfo11g5a
|
||||
foreign key (parent_OBJECT_ID)
|
||||
references CCM_CORE.RESOURCES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FK262fbwetpjx3k4uuvw24wsiv
|
||||
foreign key (resourceType_RESOURCE_TYPE_ID)
|
||||
references CCM_CORE.RESOURCE_TYPES;
|
||||
|
||||
alter table CCM_CORE.RESOURCES
|
||||
add constraint FKbjdf8pm4frth8r06ev2qjm88f
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.ROLE_MEMBERSHIPS
|
||||
add constraint FK_hueyk522he8t6fa1blnpcslap
|
||||
add constraint FK9m88ywi7rcin7b7jrgh53emrq
|
||||
foreign key (MEMBER_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.ROLE_MEMBERSHIPS
|
||||
add constraint FK_eykbm84ndwgpqsr48wekhdoqj
|
||||
add constraint FKcsyogv5m2rgsrmtgnhgkjhfw7
|
||||
foreign key (ROLE_ID)
|
||||
references CCM_CORE.CCM_ROLES;
|
||||
|
||||
alter table CCM_CORE.SETTINGS_ENUM_VALUES
|
||||
add constraint FK_sq653hqyeeklci0y7pvoxf5ha
|
||||
add constraint FK8mw4p92s0h3h8bmo8saowu32i
|
||||
foreign key (ENUM_ID)
|
||||
references CCM_CORE.SETTINGS;
|
||||
|
||||
alter table CCM_CORE.SETTINGS_L10N_STR_VALUES
|
||||
add constraint FK_t21obt5do2tjhskjxgxd5143r
|
||||
add constraint FK5knjq7cisej0qfx5dw1y93rou
|
||||
foreign key (ENTRY_ID)
|
||||
references CCM_CORE.SETTINGS;
|
||||
|
||||
alter table CCM_CORE.SETTINGS_STRING_LIST
|
||||
add constraint FK_obwiaa74lrjqjlpjidjltysoq
|
||||
add constraint FKqeclqa5sf1g53vxs857tpwrus
|
||||
foreign key (LIST_ID)
|
||||
references CCM_CORE.SETTINGS;
|
||||
|
||||
alter table CCM_CORE.TASK_ASSIGNMENTS
|
||||
add constraint FK_klh64or0yq26c63181j1tps2o
|
||||
add constraint FKe29uwmvxdmol1fjob3auej4qv
|
||||
foreign key (ROLE_ID)
|
||||
references CCM_CORE.CCM_ROLES;
|
||||
|
||||
alter table CCM_CORE.TASK_ASSIGNMENTS
|
||||
add constraint FK_fu6ukne6hj8ihlfxtmp17xpfj
|
||||
add constraint FKc1vovbjg9mp5yegx2fdoutx7u
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_USER_TASKS;
|
||||
|
||||
alter table CCM_CORE.THREADS
|
||||
add constraint FK_oopqroe5a8fg932teo0cyifcv
|
||||
add constraint FKsx08mpwvwnw97uwdgjs76q39g
|
||||
foreign key (ROOT_ID)
|
||||
references CCM_CORE.MESSAGES;
|
||||
|
||||
alter table CCM_CORE.THREADS
|
||||
add constraint FK_n86cmt6poesgsr4g4c4q07i9f
|
||||
add constraint FKp97b1sy1kop07rtapeh5l9fb2
|
||||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CCM_OBJECTS;
|
||||
|
||||
alter table CCM_CORE.USERS
|
||||
add constraint FK_9gwih54tm0rn63e536f6s9oti
|
||||
foreign key (PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.USER_EMAIL_ADDRESSES
|
||||
add constraint FK_tp5wms6tgfl827ihqbcgskusy
|
||||
add constraint FKr900l79erul95seyyccf04ufc
|
||||
foreign key (USER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.USERS
|
||||
add constraint FKosh928q71aonu6l1kurb417r
|
||||
foreign key (PARTY_ID)
|
||||
references CCM_CORE.PARTIES;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_DESCRIPTIONS
|
||||
add constraint FK_sp01mgi5mi5wbwrh8ivnfpw2n
|
||||
add constraint FKgx7upkqky82dpxvbs95imfl9l
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_NAMES
|
||||
add constraint FK_rmkgykysvk7su7h5tij67p2r3
|
||||
add constraint FKkxedy9p48avfk45r0bn4uc09i
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_COMMENTS
|
||||
add constraint FKkfqrf9jdvm7livu5if06w0r5t
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
|
||||
add constraint FK1htp420ki24jaswtcum56iawe
|
||||
foreign key (DEPENDENT_TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
|
||||
add constraint FK8rbggnp4yjpab8quvvx800ymy
|
||||
foreign key (DEPENDS_ON_TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_LABELS
|
||||
add constraint FKf715qud6g9xv2xeb8rrpnv4xs
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASKS
|
||||
add constraint FK_bawikoiw1k0bil1bvwq5qpa0j
|
||||
add constraint FK1693cbc36e4d8gucg8q7sc57e
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASKS_DESCRIPTIONS
|
||||
add constraint FK2s2498d2tpojjrtghq7iyaosv
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TEMPLATES
|
||||
add constraint FK8692vdme4yxnkj1m0k1dw74pk
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FK_byuic3urkanoiqjnf6awfqmyk
|
||||
add constraint FKf09depwj5rgso2dair07vnu33
|
||||
foreign key (LOCKING_USER_ID)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FK_2dtlvmuapubq81quny4elndh
|
||||
add constraint FK6evo9y34awhdfcyl8gv78qb7f
|
||||
foreign key (NOTIFICATION_SENDER)
|
||||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FK_bg60xxg9kerqsxyphbfxulg8y
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
create sequence hibernate_sequence start 1 increment 1;
|
||||
add constraint FKefpdf9ojplu7loo31hfm0wl2h
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
We are using the ValidityAuditStrategy here because it is faster
|
||||
when querying data than the DefaultStrategy
|
||||
-->
|
||||
<property name="org.hibernate.envers.audit_strategy"
|
||||
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>
|
||||
<!--<property name="org.hibernate.envers.audit_strategy"
|
||||
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>-->
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@ ccm_core.ccm_objects:
|
|||
uuid: 921bc481-cd82-4138-9791-6df2cfbbebde
|
||||
- object_id: -30
|
||||
display_name: Test Object 3
|
||||
uuid: 6ad52a5f-31a1-4686-affc-c36741e7e949
|
||||
uuid: 6ad52a5f-31a1-4686-affc-c36741e7e949
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-envers</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ public class ShortcutManagerTest {
|
|||
return ShrinkWrap.create(
|
||||
WebArchive.class,
|
||||
"LibreCCM-org.libreccm.shortcuts.ShortcutTest-web.war")
|
||||
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage())
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.cdi.utils.CdiUtil.class.getPackage())
|
||||
|
|
|
|||
|
|
@ -65,51 +65,51 @@ import static org.junit.Assert.*;
|
|||
@Transactional(TransactionMode.COMMIT)
|
||||
@CreateSchema({"create_ccm_shortcuts_schema.sql"})
|
||||
public class ShortcutRepositoryTest {
|
||||
|
||||
|
||||
@Inject
|
||||
private ShortcutRepository shortcutRepository;
|
||||
|
||||
|
||||
@PersistenceContext
|
||||
private EntityManager entityManager;
|
||||
|
||||
|
||||
public ShortcutRepositoryTest() {
|
||||
}
|
||||
|
||||
|
||||
@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");
|
||||
.resolver()
|
||||
.loadPomFromFile("pom.xml");
|
||||
final PomEquippedResolveStage dependencies = pom
|
||||
.importCompileAndRuntimeDependencies();
|
||||
.importCompileAndRuntimeDependencies();
|
||||
dependencies.addDependency(MavenDependencies.createDependency(
|
||||
"org.libreccm:ccm-core", ScopeType.RUNTIME, false));
|
||||
"org.libreccm:ccm-core", ScopeType.RUNTIME, false));
|
||||
dependencies.addDependency(MavenDependencies.createDependency(
|
||||
"org.libreccm:ccm-testutils", ScopeType.RUNTIME, false));
|
||||
"org.libreccm:ccm-testutils", ScopeType.RUNTIME, false));
|
||||
dependencies.addDependency(MavenDependencies.createDependency(
|
||||
"net.sf.saxon:Saxon-HE", ScopeType.RUNTIME, false));
|
||||
"net.sf.saxon:Saxon-HE", ScopeType.RUNTIME, false));
|
||||
dependencies.addDependency(MavenDependencies.createDependency(
|
||||
"org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven",
|
||||
ScopeType.RUNTIME, false));
|
||||
final File[] libsWithCcmCore = dependencies.resolve().withTransitivity().
|
||||
asFile();
|
||||
|
||||
"org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven",
|
||||
ScopeType.RUNTIME, false));
|
||||
final File[] libsWithCcmCore = dependencies.resolve().withTransitivity()
|
||||
.asFile();
|
||||
|
||||
final List<File> libsList = new ArrayList<>(libsWithCcmCore.length - 1);
|
||||
IntStream.range(0, libsWithCcmCore.length).forEach(i -> {
|
||||
final File lib = libsWithCcmCore[i];
|
||||
|
|
@ -118,96 +118,97 @@ public class ShortcutRepositoryTest {
|
|||
}
|
||||
});
|
||||
final File[] libs = libsList.toArray(new File[libsList.size()]);
|
||||
|
||||
|
||||
for (File lib : libs) {
|
||||
System.err.printf("Adding file '%s' to test archive...%n",
|
||||
lib.getName());
|
||||
}
|
||||
|
||||
|
||||
return ShrinkWrap.create(
|
||||
WebArchive.class,
|
||||
"LibreCCM-org.libreccm.shortcuts.ShortcutTest-web.war")
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.configuration.Configuration.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
|
||||
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.l10n.LocalizedString.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.security.Permission.class.getPackage())
|
||||
.addPackage(org.libreccm.shortcuts.Shortcuts.class.getPackage())
|
||||
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||
.addAsLibraries(libs)
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
.addAsWebInfResource("test-web.xml", "WEB-INF/web.xml")
|
||||
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
|
||||
WebArchive.class,
|
||||
"LibreCCM-org.libreccm.shortcuts.ShortcutTest-web.war")
|
||||
.addPackage(org.libreccm.auditing.CcmRevision.class.getPackage())
|
||||
.addPackage(org.libreccm.categorization.Categorization.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.configuration.Configuration.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.core.CcmCore.class.getPackage())
|
||||
.addPackage(org.libreccm.jpa.EntityManagerProducer.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.l10n.LocalizedString.class
|
||||
.getPackage())
|
||||
.addPackage(org.libreccm.security.Permission.class.getPackage())
|
||||
.addPackage(org.libreccm.shortcuts.Shortcuts.class.getPackage())
|
||||
.addPackage(org.libreccm.web.CcmApplication.class.getPackage())
|
||||
.addPackage(org.libreccm.workflow.Workflow.class.getPackage())
|
||||
.addAsLibraries(libs)
|
||||
.addAsResource("test-persistence.xml",
|
||||
"META-INF/persistence.xml")
|
||||
.addAsWebInfResource("test-web.xml", "WEB-INF/web.xml")
|
||||
.addAsWebInfResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@InSequence(1)
|
||||
public void repoIsInjected() {
|
||||
assertThat(shortcutRepository, is(not(nullValue())));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@InSequence(2)
|
||||
public void entityManagerIsInjected() {
|
||||
assertThat(entityManager, is(not((nullValue()))));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@UsingDataSet(
|
||||
"datasets/org/libreccm/shortcuts/ShortcutRepositoryTest/data.xml")
|
||||
"datasets/org/libreccm/shortcuts/ShortcutRepositoryTest/data.xml")
|
||||
@InSequence(10)
|
||||
public void findByUrlKey() {
|
||||
|
||||
|
||||
final Optional<Shortcut> members = shortcutRepository.findByUrlKey(
|
||||
"members");
|
||||
"members");
|
||||
final Optional<Shortcut> mitglieder = shortcutRepository.findByUrlKey(
|
||||
"mitglieder");
|
||||
"mitglieder");
|
||||
final Optional<Shortcut> shop = shortcutRepository.findByUrlKey("shop");
|
||||
|
||||
|
||||
assertThat(members.isPresent(), is(true));
|
||||
assertThat(members.get().getUrlKey(), is(equalTo("/members/")));
|
||||
assertThat(members.get().getRedirect(),
|
||||
is(equalTo("/ccm/navigation/members")));
|
||||
|
||||
|
||||
assertThat(mitglieder.isPresent(), is(true));
|
||||
assertThat(mitglieder.get().getUrlKey(), is(equalTo("/mitglieder/")));
|
||||
assertThat(mitglieder.get().getRedirect(),
|
||||
is(equalTo("/ccm/navigation/members")));
|
||||
|
||||
|
||||
assertThat(shop.isPresent(), is(true));
|
||||
assertThat(shop.get().getUrlKey(),
|
||||
is(equalTo("/shop/")));
|
||||
assertThat(shop.get().getRedirect(),
|
||||
is(equalTo("http://www.example.com")));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@UsingDataSet(
|
||||
"datasets/org/libreccm/shortcuts/ShortcutRepositoryTest/data.xml")
|
||||
"datasets/org/libreccm/shortcuts/ShortcutRepositoryTest/data.xml")
|
||||
@InSequence(10)
|
||||
public void findByUrlKeyNotExisting() {
|
||||
final Optional<Shortcut> result = shortcutRepository.findByUrlKey(
|
||||
"foo");
|
||||
|
||||
"foo");
|
||||
|
||||
assertThat(result, is(not(nullValue())));
|
||||
assertThat(result.isPresent(), is(false));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@UsingDataSet(
|
||||
"datasets/org/libreccm/shortcuts/ShortcutRepositoryTest/data.xml")
|
||||
"datasets/org/libreccm/shortcuts/ShortcutRepositoryTest/data.xml")
|
||||
@InSequence(30)
|
||||
public void findByRedirect() {
|
||||
|
||||
|
||||
final List<Shortcut> toMembers = shortcutRepository.findByRedirect(
|
||||
"/ccm/navigation/members");
|
||||
"/ccm/navigation/members");
|
||||
assertThat(toMembers.size(), is(2));
|
||||
assertThat(toMembers.get(0).getUrlKey(), is(equalTo("/members/")));
|
||||
assertThat(toMembers.get(0).getRedirect(),
|
||||
|
|
@ -215,24 +216,25 @@ public class ShortcutRepositoryTest {
|
|||
assertThat(toMembers.get(1).getUrlKey(), is(equalTo("/mitglieder/")));
|
||||
assertThat(toMembers.get(1).getRedirect(),
|
||||
is(equalTo("/ccm/navigation/members")));
|
||||
|
||||
|
||||
final List<Shortcut> toExampleCom = shortcutRepository.findByRedirect(
|
||||
"http://www.example.com");
|
||||
"http://www.example.com");
|
||||
assertThat(toExampleCom.size(), is(1));
|
||||
assertThat(toExampleCom.get(0).getUrlKey(), is(equalTo("/shop/")));
|
||||
assertThat(toExampleCom.get(0).getRedirect(),
|
||||
is(equalTo("http://www.example.com")));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@UsingDataSet(
|
||||
"datasets/org/libreccm/shortcuts/ShortcutRepositoryTest/data.xml")
|
||||
"datasets/org/libreccm/shortcuts/ShortcutRepositoryTest/data.xml")
|
||||
@InSequence(30)
|
||||
public void findByRedirectNotExisting() {
|
||||
final List<Shortcut> result = shortcutRepository.findByRedirect(
|
||||
"http://www.example.org");
|
||||
|
||||
"http://www.example.org");
|
||||
|
||||
assertThat(result, is(not(nullValue())));
|
||||
assertThat(result.isEmpty(), is(true));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,6 +76,14 @@ CREATE SCHEMA ccm_shortcuts;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.CCM_OBJECTS_AUD (
|
||||
OBJECT_ID bigint not null,
|
||||
REV integer not null,
|
||||
REVTYPE tinyint,
|
||||
DISPLAY_NAME varchar(255),
|
||||
primary key (OBJECT_ID, REV)
|
||||
);
|
||||
|
||||
create table CCM_CORE.CCM_REVISIONS (
|
||||
id integer not null,
|
||||
timestamp bigint not null,
|
||||
|
|
@ -482,10 +490,10 @@ CREATE SCHEMA ccm_shortcuts;
|
|||
SETTING_ID bigint not null,
|
||||
CONFIGURATION_CLASS varchar(512) not null,
|
||||
NAME varchar(512) not null,
|
||||
SETTING_VALUE_BOOLEAN boolean,
|
||||
SETTING_VALUE_LONG bigint,
|
||||
SETTING_VALUE_STRING varchar(1024),
|
||||
SETTING_VALUE_DOUBLE double,
|
||||
SETTING_VALUE_LONG bigint,
|
||||
SETTING_VALUE_BOOLEAN boolean,
|
||||
SETTING_VALUE_STRING varchar(1024),
|
||||
SETTING_VALUE_BIG_DECIMAL decimal(19,2),
|
||||
primary key (SETTING_ID)
|
||||
);
|
||||
|
|
@ -586,15 +594,17 @@ CREATE SCHEMA ccm_shortcuts;
|
|||
primary key (TASK_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TEMPLATES (
|
||||
WORKFLOW_ID bigint not null,
|
||||
primary key (WORKFLOW_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_USER_TASKS (
|
||||
TASK_ID bigint not null,
|
||||
ACTIVE boolean,
|
||||
TASK_STATE varchar(512),
|
||||
WORKFLOW_ID bigint,
|
||||
DUE_DATE timestamp,
|
||||
DURATION_MINUTES bigint,
|
||||
LOCKED boolean,
|
||||
START_DATE timestamp,
|
||||
TASK_ID bigint not null,
|
||||
LOCKING_USER_ID bigint,
|
||||
NOTIFICATION_SENDER bigint,
|
||||
primary key (TASK_ID)
|
||||
|
|
@ -632,7 +642,6 @@ CREATE SCHEMA ccm_shortcuts;
|
|||
|
||||
alter table CCM_SHORTCUTS.SHORTCUTS
|
||||
add constraint UK_4otuwtog6qqdbg4e6p8xdpw8h unique (URL_KEY);
|
||||
|
||||
create sequence hibernate_sequence start with 1 increment by 1;
|
||||
|
||||
alter table CCM_CORE.APPLICATIONS
|
||||
|
|
@ -685,6 +694,11 @@ create sequence hibernate_sequence start with 1 increment by 1;
|
|||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CCM_OBJECTS_AUD
|
||||
add constraint FKr00eauutiyvocno8ckx6h9nw6
|
||||
foreign key (REV)
|
||||
references CCM_CORE.CCM_REVISIONS;
|
||||
|
||||
alter table CCM_CORE.DIGESTS
|
||||
add constraint FKc53g09agnye3w1v4euy3e0gsi
|
||||
foreign key (FROM_PARTY_ID)
|
||||
|
|
@ -1065,11 +1079,41 @@ create sequence hibernate_sequence start with 1 increment by 1;
|
|||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_COMMENTS
|
||||
add constraint FKkfqrf9jdvm7livu5if06w0r5t
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
|
||||
add constraint FK1htp420ki24jaswtcum56iawe
|
||||
foreign key (DEPENDENT_TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
|
||||
add constraint FK8rbggnp4yjpab8quvvx800ymy
|
||||
foreign key (DEPENDS_ON_TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_LABELS
|
||||
add constraint FKf715qud6g9xv2xeb8rrpnv4xs
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASKS
|
||||
add constraint FK1693cbc36e4d8gucg8q7sc57e
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASKS_DESCRIPTIONS
|
||||
add constraint FK2s2498d2tpojjrtghq7iyaosv
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TEMPLATES
|
||||
add constraint FK8692vdme4yxnkj1m0k1dw74pk
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FKf09depwj5rgso2dair07vnu33
|
||||
foreign key (LOCKING_USER_ID)
|
||||
|
|
@ -1081,6 +1125,6 @@ create sequence hibernate_sequence start with 1 increment by 1;
|
|||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FK_bg60xxg9kerqsxyphbfxulg8y
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
add constraint FKefpdf9ojplu7loo31hfm0wl2h
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
We are using the ValidityAuditStrategy here because it is faster
|
||||
when querying data than the DefaultStrategy
|
||||
-->
|
||||
<property name="org.hibernate.envers.audit_strategy"
|
||||
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>
|
||||
<!--<property name="org.hibernate.envers.audit_strategy"
|
||||
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>-->
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,14 @@ CREATE SCHEMA ccm_shortcuts;
|
|||
primary key (OBJECT_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.CCM_OBJECTS_AUD (
|
||||
OBJECT_ID int8 not null,
|
||||
REV int4 not null,
|
||||
REVTYPE int2,
|
||||
DISPLAY_NAME varchar(255),
|
||||
primary key (OBJECT_ID, REV)
|
||||
);
|
||||
|
||||
create table CCM_CORE.CCM_REVISIONS (
|
||||
id int4 not null,
|
||||
timestamp int8 not null,
|
||||
|
|
@ -482,11 +490,11 @@ CREATE SCHEMA ccm_shortcuts;
|
|||
SETTING_ID int8 not null,
|
||||
CONFIGURATION_CLASS varchar(512) not null,
|
||||
NAME varchar(512) not null,
|
||||
SETTING_VALUE_BOOLEAN boolean,
|
||||
SETTING_VALUE_LONG int8,
|
||||
SETTING_VALUE_STRING varchar(1024),
|
||||
SETTING_VALUE_DOUBLE float8,
|
||||
SETTING_VALUE_BIG_DECIMAL numeric(19, 2),
|
||||
SETTING_VALUE_DOUBLE float8,
|
||||
SETTING_VALUE_STRING varchar(1024),
|
||||
SETTING_VALUE_LONG int8,
|
||||
SETTING_VALUE_BOOLEAN boolean,
|
||||
primary key (SETTING_ID)
|
||||
);
|
||||
|
||||
|
|
@ -586,15 +594,17 @@ CREATE SCHEMA ccm_shortcuts;
|
|||
primary key (TASK_ID, LOCALE)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_TEMPLATES (
|
||||
WORKFLOW_ID int8 not null,
|
||||
primary key (WORKFLOW_ID)
|
||||
);
|
||||
|
||||
create table CCM_CORE.WORKFLOW_USER_TASKS (
|
||||
TASK_ID int8 not null,
|
||||
ACTIVE boolean,
|
||||
TASK_STATE varchar(512),
|
||||
WORKFLOW_ID int8,
|
||||
DUE_DATE timestamp,
|
||||
DURATION_MINUTES int8,
|
||||
LOCKED boolean,
|
||||
START_DATE timestamp,
|
||||
TASK_ID int8 not null,
|
||||
LOCKING_USER_ID int8,
|
||||
NOTIFICATION_SENDER int8,
|
||||
primary key (TASK_ID)
|
||||
|
|
@ -684,6 +694,11 @@ create sequence hibernate_sequence start 1 increment 1;
|
|||
foreign key (OBJECT_ID)
|
||||
references CCM_CORE.CATEGORIES;
|
||||
|
||||
alter table CCM_CORE.CCM_OBJECTS_AUD
|
||||
add constraint FKr00eauutiyvocno8ckx6h9nw6
|
||||
foreign key (REV)
|
||||
references CCM_CORE.CCM_REVISIONS;
|
||||
|
||||
alter table CCM_CORE.DIGESTS
|
||||
add constraint FKc53g09agnye3w1v4euy3e0gsi
|
||||
foreign key (FROM_PARTY_ID)
|
||||
|
|
@ -1064,11 +1079,41 @@ create sequence hibernate_sequence start 1 increment 1;
|
|||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_COMMENTS
|
||||
add constraint FKkfqrf9jdvm7livu5if06w0r5t
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
|
||||
add constraint FK1htp420ki24jaswtcum56iawe
|
||||
foreign key (DEPENDENT_TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_DEPENDENCIES
|
||||
add constraint FK8rbggnp4yjpab8quvvx800ymy
|
||||
foreign key (DEPENDS_ON_TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASK_LABELS
|
||||
add constraint FKf715qud6g9xv2xeb8rrpnv4xs
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASKS
|
||||
add constraint FK1693cbc36e4d8gucg8q7sc57e
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TASKS_DESCRIPTIONS
|
||||
add constraint FK2s2498d2tpojjrtghq7iyaosv
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_TEMPLATES
|
||||
add constraint FK8692vdme4yxnkj1m0k1dw74pk
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FKf09depwj5rgso2dair07vnu33
|
||||
foreign key (LOCKING_USER_ID)
|
||||
|
|
@ -1080,6 +1125,6 @@ create sequence hibernate_sequence start 1 increment 1;
|
|||
references CCM_CORE.USERS;
|
||||
|
||||
alter table CCM_CORE.WORKFLOW_USER_TASKS
|
||||
add constraint FK_bg60xxg9kerqsxyphbfxulg8y
|
||||
foreign key (WORKFLOW_ID)
|
||||
references CCM_CORE.WORKFLOWS;
|
||||
add constraint FKefpdf9ojplu7loo31hfm0wl2h
|
||||
foreign key (TASK_ID)
|
||||
references CCM_CORE.WORKFLOW_TASKS;
|
||||
|
|
@ -32,8 +32,8 @@
|
|||
We are using the ValidityAuditStrategy here because it is faster
|
||||
when querying data than the DefaultStrategy
|
||||
-->
|
||||
<property name="org.hibernate.envers.audit_strategy"
|
||||
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>
|
||||
<!--<property name="org.hibernate.envers.audit_strategy"
|
||||
value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>-->
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue