mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge from HEAD to WCM-DEV2.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3659 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -355,7 +355,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="script" class="org.alfresco.repo.action.executer.ScriptActionExecutor" parent="action-executer">
|
||||
<bean id="script" class="org.alfresco.repo.action.executer.ScriptActionExecuter" parent="action-executer">
|
||||
<property name="serviceRegistry">
|
||||
<ref bean="ServiceRegistry" />
|
||||
</property>
|
||||
@@ -363,10 +363,16 @@
|
||||
<ref bean="personService" />
|
||||
</property>
|
||||
<property name="storeUrl">
|
||||
<value>${spaces.store}</value>
|
||||
<value>${spaces.store}</value>
|
||||
</property>
|
||||
<property name="companyHomePath">
|
||||
<value>/${spaces.company_home.childname}</value>
|
||||
<value>/${spaces.company_home.childname}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="counter" class="org.alfresco.repo.action.executer.CounterIncrementActionExecuter" parent="action-executer">
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService" /> <!-- runtime nodeService -->
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
@@ -24,8 +24,10 @@
|
||||
<import resource="classpath:alfresco/import-export-context.xml" />
|
||||
<import resource="classpath:alfresco/workflow-context.xml" />
|
||||
<import resource="classpath:alfresco/bootstrap-context.xml" />
|
||||
<import resource="classpath:alfresco/workflow-context.xml" />
|
||||
<import resource="classpath:alfresco/jcr-api-context.xml" />
|
||||
<import resource="classpath:alfresco/avm-services-context.xml" />
|
||||
<import resource="classpath:alfresco/audit-services-context.xml" />
|
||||
<import resource="classpath*:alfresco/patch/*-context.xml" />
|
||||
<import resource="classpath*:alfresco/domain/*-context.xml" />
|
||||
|
||||
|
87
config/alfresco/audit-services-context.xml
Normal file
87
config/alfresco/audit-services-context.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- Base audit service - non TX -->
|
||||
|
||||
<bean id="auditService" class="org.alfresco.repo.audit.AuditServiceImpl">
|
||||
<property name="auditComponent">
|
||||
<ref bean="auditComponent"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- Audit component -->
|
||||
|
||||
<bean id="auditComponent" class="org.alfresco.repo.audit.AuditComponentImpl">
|
||||
<property name="publicServiceIdentifier">
|
||||
<ref bean="publicServiceIdentifier"/>
|
||||
</property>
|
||||
<property name="auditDAO">
|
||||
<ref bean="auditDao"/>
|
||||
</property>
|
||||
<property name="auditFailedDAO">
|
||||
<ref bean="auditFailedDao"/>
|
||||
</property>
|
||||
<property name="auditConfiguration">
|
||||
<ref bean="auditConfiguration"/>
|
||||
</property>
|
||||
<property name="auditModel">
|
||||
<ref bean="auditModel"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Public service idntifier -->
|
||||
|
||||
<bean id="publicServiceIdentifier" class="org.alfresco.repo.audit.PublicServiceIdentifierImpl"/>
|
||||
|
||||
<!-- The configuration of the audit model -->
|
||||
|
||||
<bean id="auditConfiguration" class="org.alfresco.repo.audit.AuditConfigurationImpl">
|
||||
<property name="config">
|
||||
<value>alfresco/auditConfig.xml</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- The content store in which to store audit information -->
|
||||
|
||||
<bean id="auditFileContentStore" class="org.alfresco.repo.content.filestore.FileContentStore">
|
||||
<constructor-arg>
|
||||
<value>${dir.auditcontentstore}</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
|
||||
<!-- The audit model -->
|
||||
|
||||
<bean id="auditModel" class="org.alfresco.repo.audit.model.AuditEntry">
|
||||
<property name="auditConfiguration">
|
||||
<ref bean="auditConfiguration"/>
|
||||
</property>
|
||||
<property name="namespacePrefixResolver">
|
||||
<ref bean="namespaceService"/>
|
||||
</property>
|
||||
<property name="publicServiceIdentifier">
|
||||
<ref bean="publicServiceIdentifier"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- The audit DAO wapped to use another TX so we can log exceptions -->
|
||||
|
||||
<bean id='auditFailedDao' class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.repo.audit.AuditDAO</value>
|
||||
</property>
|
||||
<property name="transactionManager">
|
||||
<ref bean="transactionManager" />
|
||||
</property>
|
||||
<property name="target">
|
||||
<ref bean="auditDao" />
|
||||
</property>
|
||||
<property name="transactionAttributes">
|
||||
<props>
|
||||
<prop key="*">${server.transaction.mode.default}, PROPAGATION_REQUIRES_NEW</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
</beans>
|
@@ -3,7 +3,7 @@
|
||||
<!-- Default Audit Configuration -->
|
||||
|
||||
|
||||
<Audit xmlns="http://www.alfresco.org/model/audit/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" enabled="true" auditInternal="false" mode="all">
|
||||
<Audit xmlns="http://www.alfresco.org/model/audit/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" enabled="false" auditInternal="false" mode="all">
|
||||
|
||||
<!-- -->
|
||||
<!-- Global options -->
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
<Service name="LicenseService" mode="none" enabled="false"/>
|
||||
|
||||
<Service name="NamespaceService"/>
|
||||
<Service name="NamespaceService" mode="none" enabled="false"/>
|
||||
|
||||
<Service name="TransactionService" mode="none" enabled="false"/>
|
||||
|
||||
|
@@ -32,7 +32,9 @@
|
||||
|
||||
<!-- Abstract Filter entry -->
|
||||
|
||||
<xs:complexType name="Filter" abstract="true"/>
|
||||
<xs:complexType name="Filter" abstract="true">
|
||||
<xs:attribute name="invert" type="xs:boolean" default="false"/>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Simple Filter entry -->
|
||||
<!--
|
||||
@@ -47,17 +49,17 @@
|
||||
A simple value (intended for use with non node arguments)
|
||||
|
||||
-->
|
||||
<xs:simpleType name="KeyFilterType">
|
||||
<xs:simpleType name="KeyFilterMode">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="path"/>
|
||||
<xs:enumeration value="type"/>
|
||||
<xs:enumeration value="aspect"/>
|
||||
<xs:enumeration value="id"/>
|
||||
<xs:enumeration value="node_ref"/>
|
||||
<xs:enumeration value="all"/>
|
||||
<xs:enumeration value="xpath"/>
|
||||
<xs:enumeration value="value"/>
|
||||
<xs:enumeration value="protocol"/>
|
||||
<xs:enumeration value="store"/>
|
||||
<xs:enumeration value="store_protocol"/>
|
||||
<xs:enumeration value="store_identifier"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
@@ -102,7 +104,7 @@
|
||||
<xs:sequence>
|
||||
<xs:element name="Expression" type="xs:string"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="type" type="a:KeyFilterType" use="required"/>
|
||||
<xs:attribute name="mode" type="a:KeyFilterMode" use="required"/>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
@@ -196,6 +198,7 @@
|
||||
<xs:extension base="a:MandatoryAuditEntry">
|
||||
<xs:sequence>
|
||||
<xs:element name="Service" type="a:Service" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="Application" type="a:Application" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
|
@@ -25,6 +25,31 @@
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- ensure that the schema is bootstrapped -->
|
||||
<bean id="schemaBootstrap" class="org.alfresco.repo.domain.schema.SchemaBootstrap" >
|
||||
<property name="localSessionFactory">
|
||||
<ref bean="&sessionFactory"></ref> <!-- inject the actual factory, not a session -->
|
||||
</property>
|
||||
<property name="updateSchema">
|
||||
<value>${db.schema.update}</value>
|
||||
</property>
|
||||
<property name="postCreateScriptUrls">
|
||||
<list>
|
||||
<value>classpath:alfresco/dbscripts/create/1.4/${db.script.dialect}/sample.sql</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="validateUpdateScriptPatches">
|
||||
<list>
|
||||
</list>
|
||||
</property>
|
||||
<property name="applyUpdateScriptPatches">
|
||||
<list>
|
||||
<ref bean="patch.schemaUpdateScript-V1.4-1" />
|
||||
<ref bean="patch.schemaUpdateScript-V1.4-2" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Bootstrap Files -->
|
||||
|
||||
<bean id="systemInfoBootstrap" parent="systemInfoImporter">
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<!-- EH Cache Manager to produce in-transaction EH Caches -->
|
||||
<!-- ==================================================== -->
|
||||
|
||||
<bean name="transactionalEHCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" >
|
||||
<bean name="transactionalEHCacheManager" class="org.alfresco.repo.cache.EhCacheManagerFactoryBean" >
|
||||
<property name="configLocation">
|
||||
<value>classpath:alfresco/ehcache-transactional.xml</value>
|
||||
</property>
|
||||
|
@@ -60,9 +60,6 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- use around method calls to debug - see class comments for details -->
|
||||
<bean id="methodCallLogAdvice" class="org.alfresco.util.debug.MethodCallLogAdvice" />
|
||||
|
||||
<!-- -->
|
||||
<!-- I18N -->
|
||||
<!-- -->
|
||||
@@ -79,6 +76,7 @@
|
||||
<value>alfresco.messages.template-service</value>
|
||||
<value>alfresco.messages.lock-service</value>
|
||||
<value>alfresco.messages.patch-service</value>
|
||||
<value>alfresco.messages.schema-update</value>
|
||||
<value>alfresco.messages.webdav-messages</value>
|
||||
</list>
|
||||
</property>
|
||||
|
@@ -0,0 +1,4 @@
|
||||
--
|
||||
-- Insert post-creation scripts here
|
||||
-- This is a generic fallback for cases where specific dialects are not catered for
|
||||
--
|
@@ -0,0 +1,4 @@
|
||||
--
|
||||
-- Insert post-creation scripts here
|
||||
-- This is specific to the dialect described in the path to the file
|
||||
--
|
@@ -0,0 +1,653 @@
|
||||
-- ------------------------------------------------------
|
||||
-- Alfresco Schema conversion V1.2.1 to V1.3
|
||||
--
|
||||
-- Author: Derek Hulley
|
||||
-- ------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Create temporary 1.3 schema
|
||||
--
|
||||
|
||||
CREATE TABLE `T_access_control_entry` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`protocol` varchar(50) default NULL,
|
||||
`identifier` varchar(100) default NULL,
|
||||
`uuid` varchar(36) default NULL,
|
||||
`typeUri` varchar(100) default NULL,
|
||||
`typeName` varchar(100) default NULL,
|
||||
`name` varchar(100) default NULL,
|
||||
`recipient` varchar(100) default NULL,
|
||||
`acl_id` bigint(20),
|
||||
`permission_id` bigint(20),
|
||||
`authority_id` varchar(100),
|
||||
`allowed` bit(1) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
ALTER TABLE `T_access_control_entry` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `uuid`);
|
||||
|
||||
CREATE TABLE `T_access_control_list` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`uuid` varchar(36) NOT NULL,
|
||||
`inherits` bit(1) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
ALTER TABLE `T_access_control_list` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `uuid`);
|
||||
|
||||
CREATE TABLE `T_applied_patch` (
|
||||
`id` varchar(32) NOT NULL,
|
||||
`description` text,
|
||||
`fixes_from_schema` int(11) default NULL,
|
||||
`fixes_to_schema` int(11) default NULL,
|
||||
`applied_to_schema` int(11) default NULL,
|
||||
`target_schema` int(11) default NULL,
|
||||
`applied_on_date` datetime default NULL,
|
||||
`applied_to_server` varchar(64) default NULL,
|
||||
`was_executed` bit(1) default NULL,
|
||||
`succeeded` bit(1) default NULL,
|
||||
`report` text
|
||||
);
|
||||
|
||||
CREATE TABLE `T_auth_ext_keys` (
|
||||
`id` varchar(100) NOT NULL,
|
||||
`externalKey` varchar(100) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE `T_authority` (
|
||||
`recipient` varchar(100) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE `T_child_assoc` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`parent_node_id` bigint(20) default NULL,
|
||||
`parent_protocol` varchar(50) default NULL,
|
||||
`parent_identifier` varchar(100) default NULL,
|
||||
`parent_uuid` varchar(36) default NULL,
|
||||
`child_node_id` bigint(20) default NULL,
|
||||
`child_protocol` varchar(50) default NULL,
|
||||
`child_identifier` varchar(100) default NULL,
|
||||
`child_uuid` varchar(36) default NULL,
|
||||
`type_qname` varchar(255) NOT NULL,
|
||||
`qname` varchar(255) NOT NULL,
|
||||
`is_primary` bit(1) default NULL,
|
||||
`assoc_index` int(11) default NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
ALTER TABLE `T_child_assoc` ADD INDEX `IDX_REF_PARENT`(`parent_protocol`, `parent_identifier`, `parent_uuid`);
|
||||
ALTER TABLE `T_child_assoc` ADD INDEX `IDX_REF_CHILD`(`child_protocol`, `child_identifier`, `child_uuid`);
|
||||
|
||||
CREATE TABLE `T_node` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`uuid` varchar(36) NOT NULL,
|
||||
`acl_id` bigint(20) default NULL,
|
||||
`type_qname` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
ALTER TABLE `T_node` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `uuid`);
|
||||
|
||||
CREATE TABLE `T_node_aspects` (
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`uuid` varchar(36) NOT NULL,
|
||||
`node_id` bigint(20),
|
||||
`qname` varchar(200) default NULL
|
||||
);
|
||||
ALTER TABLE `T_node_aspects` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `uuid`);
|
||||
|
||||
CREATE TABLE `T_node_assoc` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`source_node_id` bigint(20) default NULL,
|
||||
`source_protocol` varchar(50) default NULL,
|
||||
`source_identifier` varchar(100) default NULL,
|
||||
`source_uuid` varchar(36) default NULL,
|
||||
`target_node_id` bigint(20) default NULL,
|
||||
`target_protocol` varchar(50) default NULL,
|
||||
`target_identifier` varchar(100) default NULL,
|
||||
`target_uuid` varchar(36) default NULL,
|
||||
`type_qname` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
ALTER TABLE `T_node_assoc` ADD INDEX `IDX_REF_SOURCE`(`source_protocol`, `source_identifier`, `source_uuid`);
|
||||
ALTER TABLE `T_node_assoc` ADD INDEX `IDX_REF_TARGET`(`target_protocol`, `target_identifier`, `target_uuid`);
|
||||
|
||||
CREATE TABLE `T_node_properties` (
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`uuid` varchar(36) NOT NULL,
|
||||
`node_id` bigint(20),
|
||||
`actual_type` varchar(15) NOT NULL,
|
||||
`multi_valued` bit(1) NOT NULL,
|
||||
`persisted_type` varchar(15) NOT NULL,
|
||||
`boolean_value` bit(1) default NULL,
|
||||
`long_value` bigint(20) default NULL,
|
||||
`float_value` float default NULL,
|
||||
`double_value` double default NULL,
|
||||
`string_value` text,
|
||||
`serializable_value` blob,
|
||||
`qname` varchar(200) NOT NULL
|
||||
);
|
||||
ALTER TABLE `t_node_properties` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `uuid`);
|
||||
|
||||
CREATE TABLE `T_node_status` (
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`guid` varchar(36) NOT NULL,
|
||||
`node_id` bigint(20) default NULL,
|
||||
`change_txn_id` varchar(56) NOT NULL,
|
||||
`deleted` bit(1) NOT NULL
|
||||
);
|
||||
ALTER TABLE `t_node_status` ADD INDEX `IDX_REF`(`protocol`, `identifier`, `guid`);
|
||||
|
||||
CREATE TABLE `T_permission` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`type_qname` varchar(200) NOT NULL,
|
||||
`name` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `T_store` (
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`root_node_id` bigint(20) default NULL
|
||||
);
|
||||
ALTER TABLE `t_store` ADD INDEX `IDX_STORE_REF`(`protocol`, `identifier`);
|
||||
|
||||
CREATE TABLE `T_version_count` (
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`version_count` int(11) NOT NULL
|
||||
);
|
||||
|
||||
--
|
||||
-- Copy data from old tables to intermediate tables
|
||||
--
|
||||
|
||||
insert into T_store (protocol, identifier)
|
||||
select protocol, identifier from store;
|
||||
|
||||
insert into T_node (protocol, identifier, uuid, type_qname)
|
||||
select protocol, identifier, guid, type_qname from node;
|
||||
|
||||
update T_store tstore set root_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tstore.protocol and
|
||||
tnode.identifier = tstore.identifier and
|
||||
tnode.uuid =
|
||||
(select ostore.root_guid from store ostore where
|
||||
ostore.protocol = tstore.protocol and
|
||||
ostore.identifier = tstore.identifier
|
||||
)
|
||||
);
|
||||
|
||||
insert into t_version_count (protocol, identifier, version_count)
|
||||
select protocol, identifier, version_count from version_count;
|
||||
|
||||
insert into t_node_status (protocol, identifier, guid, change_txn_id, deleted)
|
||||
select protocol, identifier, guid, change_txn_id, deleted from node_status;
|
||||
update T_node_status tstatus set node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tstatus.protocol and
|
||||
tnode.identifier = tstatus.identifier and
|
||||
tnode.uuid = tstatus.guid
|
||||
);
|
||||
|
||||
insert into T_node_properties
|
||||
(
|
||||
protocol, identifier, uuid, actual_type, multi_valued, persisted_type,
|
||||
boolean_value, long_value, float_value, double_value, string_value, serializable_value, qname
|
||||
)
|
||||
select
|
||||
protocol, identifier, guid, actual_type, multi_valued, persisted_type,
|
||||
boolean_value, long_value, float_value, double_value, string_value, serializable_value, qname
|
||||
from node_properties;
|
||||
update T_node_properties tproperties set node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tproperties.protocol and
|
||||
tnode.identifier = tproperties.identifier and
|
||||
tnode.uuid = tproperties.uuid
|
||||
);
|
||||
|
||||
insert into T_node_aspects
|
||||
(
|
||||
protocol, identifier, uuid, qname
|
||||
)
|
||||
select
|
||||
protocol, identifier, guid, qname
|
||||
from node_aspects;
|
||||
update T_node_aspects taspects set node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = taspects.protocol and
|
||||
tnode.identifier = taspects.identifier and
|
||||
tnode.uuid = taspects.uuid
|
||||
);
|
||||
|
||||
insert into T_child_assoc
|
||||
(
|
||||
parent_protocol, parent_identifier, parent_uuid,
|
||||
child_protocol, child_identifier, child_uuid,
|
||||
type_qname, qname, is_primary, assoc_index
|
||||
)
|
||||
select
|
||||
parent_protocol, parent_identifier, parent_guid,
|
||||
child_protocol, child_identifier, child_guid,
|
||||
type_qname, qname, isPrimary, assoc_index
|
||||
from
|
||||
child_assoc;
|
||||
update T_child_assoc tassoc set parent_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tassoc.parent_protocol and
|
||||
tnode.identifier = tassoc.parent_identifier and
|
||||
tnode.uuid = tassoc.parent_uuid
|
||||
);
|
||||
update T_child_assoc tassoc set child_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tassoc.child_protocol and
|
||||
tnode.identifier = tassoc.child_identifier and
|
||||
tnode.uuid = tassoc.child_uuid
|
||||
);
|
||||
|
||||
insert into T_node_assoc
|
||||
(
|
||||
source_protocol, source_identifier, source_uuid,
|
||||
target_protocol, target_identifier, target_uuid,
|
||||
type_qname
|
||||
)
|
||||
select
|
||||
source_protocol, source_identifier, source_guid,
|
||||
target_protocol, target_identifier, target_guid,
|
||||
type_qname
|
||||
from
|
||||
node_assoc;
|
||||
update T_node_assoc tassoc set source_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tassoc.source_protocol and
|
||||
tnode.identifier = tassoc.source_identifier and
|
||||
tnode.uuid = tassoc.source_uuid
|
||||
);
|
||||
update T_node_assoc tassoc set target_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tassoc.target_protocol and
|
||||
tnode.identifier = tassoc.target_identifier and
|
||||
tnode.uuid = tassoc.target_uuid
|
||||
);
|
||||
|
||||
insert into T_permission
|
||||
(
|
||||
type_qname, name
|
||||
)
|
||||
select
|
||||
CONCAT('{', type_uri, '}', type_name), name
|
||||
from
|
||||
permission_ref;
|
||||
|
||||
insert into T_access_control_list
|
||||
(
|
||||
protocol, identifier, uuid, inherits
|
||||
)
|
||||
select
|
||||
protocol, identifier, guid, inherits
|
||||
from node_permission;
|
||||
update T_node tnode set acl_id =
|
||||
(select tacl.id from T_access_control_list tacl where
|
||||
tacl.protocol = tnode.protocol and
|
||||
tacl.identifier = tnode.identifier and
|
||||
tacl.uuid = tnode.uuid
|
||||
);
|
||||
|
||||
insert into T_auth_ext_keys
|
||||
(
|
||||
id, externalKey
|
||||
)
|
||||
select
|
||||
id, externalKey
|
||||
from
|
||||
externalkeys;
|
||||
|
||||
insert into T_authority
|
||||
(
|
||||
recipient
|
||||
)
|
||||
select
|
||||
recipient
|
||||
from
|
||||
recipient;
|
||||
|
||||
insert into T_access_control_entry
|
||||
(
|
||||
protocol, identifier, uuid,
|
||||
typeUri, typeName, name,
|
||||
recipient,
|
||||
allowed
|
||||
)
|
||||
select
|
||||
protocol, identifier, guid,
|
||||
typeUri, typeName, name,
|
||||
recipient,
|
||||
allowed
|
||||
from node_perm_entry;
|
||||
update T_access_control_entry tentry
|
||||
set
|
||||
acl_id =
|
||||
(
|
||||
select
|
||||
tacl.id
|
||||
from T_access_control_list tacl
|
||||
join T_node tnode on tacl.id = tnode.acl_id
|
||||
where
|
||||
tnode.protocol = tentry.protocol and
|
||||
tnode.identifier = tentry.identifier and
|
||||
tnode.uuid = tentry.uuid
|
||||
);
|
||||
update T_access_control_entry tentry
|
||||
set
|
||||
tentry.permission_id =
|
||||
(
|
||||
select
|
||||
tpermission.id
|
||||
from T_permission tpermission
|
||||
where
|
||||
tpermission.type_qname = CONCAT('{', tentry.typeUri, '}', tentry.typeName) and
|
||||
tpermission.name = tentry.name
|
||||
);
|
||||
update T_access_control_entry tentry
|
||||
set
|
||||
tentry.authority_id =
|
||||
(
|
||||
select
|
||||
tauthority.recipient
|
||||
from T_authority tauthority
|
||||
where
|
||||
tauthority.recipient = tentry.recipient
|
||||
);
|
||||
delete from T_access_control_list where id not in (select distinct(acl_id) id from t_access_control_entry where acl_id is not null);
|
||||
delete from T_access_control_entry where acl_id is null;
|
||||
update T_node set acl_id = null where acl_id not in (select id from t_access_control_list);
|
||||
|
||||
--
|
||||
-- Create New schema (MySQL)
|
||||
--
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
DROP TABLE child_assoc;
|
||||
DROP TABLE node_assoc;
|
||||
DROP TABLE node_properties;
|
||||
DROP TABLE node_aspects;
|
||||
DROP TABLE node;
|
||||
DROP TABLE node_status;
|
||||
DROP TABLE version_count;
|
||||
DROP TABLE store;
|
||||
DROP TABLE node_perm_entry;
|
||||
DROP TABLE node_permission;
|
||||
DROP TABLE permission_ref;
|
||||
DROP TABLE recipient;
|
||||
DROP TABLE externalKeys;
|
||||
|
||||
CREATE TABLE `access_control_entry` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`acl_id` bigint(20) NOT NULL,
|
||||
`permission_id` bigint(20) NOT NULL,
|
||||
`authority_id` varchar(100) NOT NULL,
|
||||
`allowed` bit(1) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `acl_id` (`acl_id`,`permission_id`,`authority_id`),
|
||||
KEY `FKF064DF7560601995` (`permission_id`),
|
||||
KEY `FKF064DF75B25A50BF` (`authority_id`),
|
||||
KEY `FKF064DF75B9553F6C` (`acl_id`),
|
||||
CONSTRAINT `FKF064DF75B9553F6C` FOREIGN KEY (`acl_id`) REFERENCES `access_control_list` (`id`),
|
||||
CONSTRAINT `FKF064DF7560601995` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`id`),
|
||||
CONSTRAINT `FKF064DF75B25A50BF` FOREIGN KEY (`authority_id`) REFERENCES `authority` (`recipient`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `access_control_list` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`inherits` bit(1) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `auth_ext_keys` (
|
||||
`id` varchar(100) NOT NULL,
|
||||
`externalKey` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`id`,`externalKey`),
|
||||
KEY `FK31D3BA097B7FDE43` (`id`),
|
||||
CONSTRAINT `FK31D3BA097B7FDE43` FOREIGN KEY (`id`) REFERENCES `authority` (`recipient`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `authority` (
|
||||
`recipient` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`recipient`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `child_assoc` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`parent_node_id` bigint(20) default NULL,
|
||||
`child_node_id` bigint(20) default NULL,
|
||||
`type_qname` varchar(255) NOT NULL,
|
||||
`qname` varchar(255) NOT NULL,
|
||||
`is_primary` bit(1) default NULL,
|
||||
`assoc_index` int(11) default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FKFFC5468E74173FF4` (`child_node_id`),
|
||||
KEY `FKFFC5468E8E50E582` (`parent_node_id`),
|
||||
CONSTRAINT `FKFFC5468E8E50E582` FOREIGN KEY (`parent_node_id`) REFERENCES `node` (`id`),
|
||||
CONSTRAINT `FKFFC5468E74173FF4` FOREIGN KEY (`child_node_id`) REFERENCES `node` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
FKFFC5468E74173FF4
|
||||
|
||||
CREATE TABLE `node` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`uuid` varchar(36) NOT NULL,
|
||||
`type_qname` varchar(255) NOT NULL,
|
||||
`acl_id` bigint(20) default NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `protocol` (`protocol`,`identifier`,`uuid`),
|
||||
KEY `FK33AE02D24ADD25` (`protocol`,`identifier`),
|
||||
CONSTRAINT `FK33AE02D24ADD25` FOREIGN KEY (`protocol`, `identifier`) REFERENCES `store` (`protocol`, `identifier`),
|
||||
CONSTRAINT `FK33AE02B9553F6C` FOREIGN KEY (`acl_id`) REFERENCES `access_control_list` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `node_aspects` (
|
||||
`node_id` bigint(20) NOT NULL,
|
||||
`qname` varchar(200) default NULL,
|
||||
KEY `FK2B91A9DE7F2C8017` (`node_id`),
|
||||
CONSTRAINT `FK2B91A9DE7F2C8017` FOREIGN KEY (`node_id`) REFERENCES `node` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `node_assoc` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`source_node_id` bigint(20) default NULL,
|
||||
`target_node_id` bigint(20) default NULL,
|
||||
`type_qname` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `FK5BAEF398B69C43F3` (`source_node_id`),
|
||||
KEY `FK5BAEF398A8FC7769` (`target_node_id`),
|
||||
CONSTRAINT `FK5BAEF398A8FC7769` FOREIGN KEY (`target_node_id`) REFERENCES `node` (`id`),
|
||||
CONSTRAINT `FK5BAEF398B69C43F3` FOREIGN KEY (`source_node_id`) REFERENCES `node` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `node_properties` (
|
||||
`node_id` bigint(20) NOT NULL,
|
||||
`actual_type` varchar(15) NOT NULL,
|
||||
`multi_valued` bit(1) NOT NULL,
|
||||
`persisted_type` varchar(15) NOT NULL,
|
||||
`boolean_value` bit(1) default NULL,
|
||||
`long_value` bigint(20) default NULL,
|
||||
`float_value` float default NULL,
|
||||
`double_value` double default NULL,
|
||||
`string_value` text,
|
||||
`serializable_value` blob,
|
||||
`qname` varchar(200) NOT NULL,
|
||||
PRIMARY KEY (`node_id`,`qname`),
|
||||
KEY `FKC962BF907F2C8017` (`node_id`),
|
||||
CONSTRAINT `FKC962BF907F2C8017` FOREIGN KEY (`node_id`) REFERENCES `node` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `node_status` (
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`guid` varchar(36) NOT NULL,
|
||||
`node_id` bigint(20) default NULL,
|
||||
`change_txn_id` varchar(56) NOT NULL,
|
||||
PRIMARY KEY (`protocol`,`identifier`,`guid`),
|
||||
KEY `FK38ECB8CF7F2C8017` (`node_id`),
|
||||
CONSTRAINT `FK38ECB8CF7F2C8017` FOREIGN KEY (`node_id`) REFERENCES `node` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `permission` (
|
||||
`id` bigint(20) NOT NULL auto_increment,
|
||||
`type_qname` varchar(200) NOT NULL,
|
||||
`name` varchar(100) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `type_qname` (`type_qname`,`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `store` (
|
||||
`protocol` varchar(50) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`root_node_id` bigint(20) default NULL,
|
||||
PRIMARY KEY (`protocol`,`identifier`),
|
||||
KEY `FK68AF8E122DBA5BA` (`root_node_id`),
|
||||
CONSTRAINT `FK68AF8E122DBA5BA` FOREIGN KEY (`root_node_id`) REFERENCES `node` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `version_count` (
|
||||
`protocol` varchar(100) NOT NULL,
|
||||
`identifier` varchar(100) NOT NULL,
|
||||
`version_count` int(11) NOT NULL,
|
||||
PRIMARY KEY (`protocol`,`identifier`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
--
|
||||
-- Copy data into new schema
|
||||
--
|
||||
|
||||
insert into store
|
||||
(
|
||||
protocol, identifier, root_node_id
|
||||
)
|
||||
select
|
||||
protocol, identifier, root_node_id
|
||||
from
|
||||
T_store;
|
||||
|
||||
insert into node
|
||||
(
|
||||
id, protocol, identifier, uuid, type_qname, acl_id
|
||||
)
|
||||
select
|
||||
id, protocol, identifier, uuid, type_qname, acl_id
|
||||
from
|
||||
T_node;
|
||||
|
||||
insert into version_count
|
||||
(
|
||||
protocol, identifier, version_count
|
||||
)
|
||||
select
|
||||
protocol, identifier, version_count
|
||||
from
|
||||
T_version_count;
|
||||
|
||||
insert into node_status
|
||||
(
|
||||
protocol, identifier, guid, node_id, change_txn_id
|
||||
)
|
||||
select
|
||||
protocol, identifier, guid, node_id, change_txn_id
|
||||
from
|
||||
T_node_status;
|
||||
|
||||
insert into node_properties
|
||||
(
|
||||
node_id, actual_type, multi_valued, persisted_type,
|
||||
boolean_value, long_value, float_value, double_value, string_value, serializable_value, qname
|
||||
)
|
||||
select
|
||||
node_id, actual_type, multi_valued, persisted_type,
|
||||
boolean_value, long_value, float_value, double_value, string_value, serializable_value, qname
|
||||
from
|
||||
T_node_properties;
|
||||
|
||||
insert into node_aspects
|
||||
(
|
||||
node_id, qname
|
||||
)
|
||||
select
|
||||
node_id, qname
|
||||
from
|
||||
T_node_aspects;
|
||||
|
||||
insert into child_assoc
|
||||
(
|
||||
id, parent_node_id, child_node_id, type_qname, qname, is_primary, assoc_index
|
||||
)
|
||||
select
|
||||
id, parent_node_id, child_node_id, type_qname, qname, is_primary, assoc_index
|
||||
from
|
||||
T_child_assoc;
|
||||
|
||||
insert into node_assoc
|
||||
(
|
||||
id, source_node_id, target_node_id, type_qname
|
||||
)
|
||||
select
|
||||
id, source_node_id, target_node_id, type_qname
|
||||
from
|
||||
T_node_assoc;
|
||||
|
||||
insert into permission
|
||||
(
|
||||
id, type_qname, name
|
||||
)
|
||||
select
|
||||
id, type_qname, name
|
||||
from
|
||||
T_permission;
|
||||
|
||||
insert into access_control_list
|
||||
(
|
||||
id, inherits
|
||||
)
|
||||
select
|
||||
id, inherits
|
||||
from
|
||||
T_access_control_list;
|
||||
|
||||
insert into auth_ext_keys
|
||||
(
|
||||
id, externalKey
|
||||
)
|
||||
select
|
||||
id, externalKey
|
||||
from
|
||||
T_auth_ext_keys;
|
||||
|
||||
insert into authority
|
||||
(
|
||||
recipient
|
||||
)
|
||||
select
|
||||
recipient
|
||||
from
|
||||
T_authority;
|
||||
|
||||
insert into access_control_entry
|
||||
(
|
||||
id, acl_id, permission_id, authority_id, allowed
|
||||
)
|
||||
select
|
||||
id, acl_id, permission_id, authority_id, allowed
|
||||
from
|
||||
T_access_control_entry;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
|
||||
|
||||
-- Allow longer patch identifiers
|
||||
|
||||
ALTER TABLE applied_patch MODIFY id varchar(64) not null;
|
@@ -0,0 +1,636 @@
|
||||
-- ------------------------------------------------------
|
||||
-- Alfresco Schema conversion V1.2.1 to V1.3
|
||||
--
|
||||
-- For Oracle.
|
||||
--
|
||||
-- Note: This script does not create a temporary
|
||||
-- properties table. It updates the existing
|
||||
-- table as it is not possible to insert..select
|
||||
-- long raw columns in Oracle.
|
||||
--
|
||||
-- Author: David Caruana
|
||||
-- ------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Create temporary 1.3 schema
|
||||
--
|
||||
|
||||
CREATE TABLE T_access_control_entry (
|
||||
id number(19,0) NOT NULL,
|
||||
protocol varchar2(50) default NULL,
|
||||
identifier varchar2(100) default NULL,
|
||||
uuid varchar2(36) default NULL,
|
||||
typeUri varchar2(100) default NULL,
|
||||
typeName varchar2(100) default NULL,
|
||||
name varchar2(100) default NULL,
|
||||
recipient varchar2(100) default NULL,
|
||||
acl_id number(19, 0),
|
||||
permission_id number(19, 0),
|
||||
authority_id varchar2(100),
|
||||
allowed number(1, 0) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX IDX_ACE_REF ON T_access_control_entry (protocol, identifier, uuid);
|
||||
|
||||
CREATE TABLE T_access_control_list
|
||||
(
|
||||
id number(19,0) not null,
|
||||
protocol varchar2(50) NOT NULL,
|
||||
identifier varchar2(100) NOT NULL,
|
||||
uuid varchar2(36) NOT NULL,
|
||||
inherits number(1,0) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX IDX_ACL_REF ON T_access_control_list (protocol, identifier, uuid);
|
||||
|
||||
create table T_auth_ext_keys
|
||||
(
|
||||
id varchar2(100) not null,
|
||||
externalKey varchar2(100) not null,
|
||||
primary key (id, externalKey)
|
||||
);
|
||||
|
||||
create table T_authority
|
||||
(
|
||||
recipient varchar2(100) not null,
|
||||
primary key (recipient)
|
||||
);
|
||||
|
||||
CREATE TABLE T_child_assoc
|
||||
(
|
||||
id number(19,0) NOT NULL,
|
||||
parent_node_id number(19,0) default NULL,
|
||||
parent_protocol varchar(50) default NULL,
|
||||
parent_identifier varchar(100) default NULL,
|
||||
parent_uuid varchar(36) default NULL,
|
||||
child_node_id number(19,0) default NULL,
|
||||
child_protocol varchar(50) default NULL,
|
||||
child_identifier varchar(100) default NULL,
|
||||
child_uuid varchar(36) default NULL,
|
||||
type_qname varchar(255) NOT NULL,
|
||||
qname varchar(255) NOT NULL,
|
||||
is_primary number(1,0) default NULL,
|
||||
assoc_index number(10,0) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX IDX_CA_PARENT ON T_child_assoc(parent_protocol, parent_identifier, parent_uuid);
|
||||
CREATE INDEX IDX_CA_CHILD ON T_child_assoc(child_protocol, child_identifier, child_uuid);
|
||||
|
||||
CREATE TABLE T_node
|
||||
(
|
||||
id number(19,0) NOT NULL,
|
||||
protocol varchar2(50) NOT NULL,
|
||||
identifier varchar2(100) NOT NULL,
|
||||
uuid varchar2(36) NOT NULL,
|
||||
acl_id number(19,0) default NULL,
|
||||
type_qname varchar2(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX IDX_NODE_REF ON T_node(protocol, identifier, uuid);
|
||||
|
||||
CREATE TABLE T_node_aspects
|
||||
(
|
||||
protocol varchar2(50) NOT NULL,
|
||||
identifier varchar2(100) NOT NULL,
|
||||
uuid varchar2(36) NOT NULL,
|
||||
node_id number(19,0),
|
||||
qname varchar2(200) default NULL
|
||||
);
|
||||
CREATE INDEX IDX_ASPECTS_REF ON T_node_aspects(protocol, identifier, uuid);
|
||||
|
||||
CREATE TABLE T_node_assoc
|
||||
(
|
||||
id number(19,0) NOT NULL,
|
||||
source_node_id number(19,0) default NULL,
|
||||
source_protocol varchar2(50) default NULL,
|
||||
source_identifier varchar2(100) default NULL,
|
||||
source_uuid varchar2(36) default NULL,
|
||||
target_node_id number(19,0) default NULL,
|
||||
target_protocol varchar2(50) default NULL,
|
||||
target_identifier varchar2(100) default NULL,
|
||||
target_uuid varchar2(36) default NULL,
|
||||
type_qname varchar2(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX IDX_NA_SOURCE on T_node_assoc(source_protocol, source_identifier, source_uuid);
|
||||
CREATE INDEX IDX_NA_TARGET on T_node_assoc(target_protocol, target_identifier, target_uuid);
|
||||
|
||||
CREATE TABLE T_node_status
|
||||
(
|
||||
protocol varchar2(50) NOT NULL,
|
||||
identifier varchar2(100) NOT NULL,
|
||||
guid varchar2(36) NOT NULL,
|
||||
node_id number(19,0) default NULL,
|
||||
change_txn_id varchar2(56) NOT NULL,
|
||||
deleted number(1,0) NOT NULL,
|
||||
primary key (protocol, identifier, guid)
|
||||
);
|
||||
|
||||
CREATE TABLE T_permission
|
||||
(
|
||||
id number(19,0) NOT NULL,
|
||||
type_qname varchar2(200) NOT NULL,
|
||||
name varchar2(100) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
unique (type_qname, name)
|
||||
);
|
||||
|
||||
CREATE TABLE T_store
|
||||
(
|
||||
protocol varchar2(50) NOT NULL,
|
||||
identifier varchar2(100) NOT NULL,
|
||||
root_node_id number(19,0) default NULL,
|
||||
primary key (protocol, identifier)
|
||||
);
|
||||
|
||||
CREATE TABLE T_version_count
|
||||
(
|
||||
protocol varchar2(50) NOT NULL,
|
||||
identifier varchar2(100) NOT NULL,
|
||||
version_count number(10,0) NOT NULL,
|
||||
primary key (protocol, identifier)
|
||||
);
|
||||
|
||||
create sequence hibernate_sequence;
|
||||
|
||||
|
||||
--
|
||||
-- Copy data from old tables to intermediate tables
|
||||
--
|
||||
|
||||
insert into T_store (protocol, identifier)
|
||||
select protocol, identifier from store;
|
||||
|
||||
insert into T_node (id, protocol, identifier, uuid, type_qname)
|
||||
select hibernate_sequence.nextval, protocol, identifier, guid, type_qname from node;
|
||||
|
||||
update T_store tstore set root_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tstore.protocol and
|
||||
tnode.identifier = tstore.identifier and
|
||||
tnode.uuid =
|
||||
(select ostore.root_guid from store ostore where
|
||||
ostore.protocol = tstore.protocol and
|
||||
ostore.identifier = tstore.identifier
|
||||
)
|
||||
);
|
||||
|
||||
insert into t_version_count (protocol, identifier, version_count)
|
||||
select protocol, identifier, version_count from version_count;
|
||||
|
||||
insert into t_node_status (protocol, identifier, guid, change_txn_id, deleted)
|
||||
select protocol, identifier, guid, change_txn_id, deleted from node_status;
|
||||
update T_node_status tstatus set node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tstatus.protocol and
|
||||
tnode.identifier = tstatus.identifier and
|
||||
tnode.uuid = tstatus.guid
|
||||
);
|
||||
|
||||
|
||||
insert into T_node_aspects
|
||||
(
|
||||
protocol, identifier, uuid, qname
|
||||
)
|
||||
select
|
||||
protocol, identifier, guid, qname
|
||||
from node_aspects;
|
||||
update T_node_aspects taspects set node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = taspects.protocol and
|
||||
tnode.identifier = taspects.identifier and
|
||||
tnode.uuid = taspects.uuid
|
||||
);
|
||||
|
||||
insert into T_child_assoc
|
||||
(
|
||||
id, parent_protocol, parent_identifier, parent_uuid,
|
||||
child_protocol, child_identifier, child_uuid,
|
||||
type_qname, qname, is_primary, assoc_index
|
||||
)
|
||||
select
|
||||
hibernate_sequence.nextval, parent_protocol, parent_identifier, parent_guid,
|
||||
child_protocol, child_identifier, child_guid,
|
||||
type_qname, qname, isPrimary, assoc_index
|
||||
from
|
||||
child_assoc;
|
||||
update T_child_assoc tassoc set parent_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tassoc.parent_protocol and
|
||||
tnode.identifier = tassoc.parent_identifier and
|
||||
tnode.uuid = tassoc.parent_uuid
|
||||
);
|
||||
update T_child_assoc tassoc set child_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tassoc.child_protocol and
|
||||
tnode.identifier = tassoc.child_identifier and
|
||||
tnode.uuid = tassoc.child_uuid
|
||||
);
|
||||
|
||||
insert into T_node_assoc
|
||||
(
|
||||
id, source_protocol, source_identifier, source_uuid,
|
||||
target_protocol, target_identifier, target_uuid,
|
||||
type_qname
|
||||
)
|
||||
select
|
||||
hibernate_sequence.nextval, source_protocol, source_identifier, source_guid,
|
||||
target_protocol, target_identifier, target_guid,
|
||||
type_qname
|
||||
from
|
||||
node_assoc;
|
||||
update T_node_assoc tassoc set source_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tassoc.source_protocol and
|
||||
tnode.identifier = tassoc.source_identifier and
|
||||
tnode.uuid = tassoc.source_uuid
|
||||
);
|
||||
update T_node_assoc tassoc set target_node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tassoc.target_protocol and
|
||||
tnode.identifier = tassoc.target_identifier and
|
||||
tnode.uuid = tassoc.target_uuid
|
||||
);
|
||||
|
||||
insert into T_permission
|
||||
(
|
||||
id, type_qname, name
|
||||
)
|
||||
select
|
||||
hibernate_sequence.nextval, '{' || type_uri || '}' || type_name, name
|
||||
from
|
||||
permission_ref;
|
||||
|
||||
insert into T_access_control_list
|
||||
(
|
||||
id, protocol, identifier, uuid, inherits
|
||||
)
|
||||
select
|
||||
hibernate_sequence.nextval, protocol, identifier, guid, inherits
|
||||
from node_permission;
|
||||
update T_node tnode set acl_id =
|
||||
(select tacl.id from T_access_control_list tacl where
|
||||
tacl.protocol = tnode.protocol and
|
||||
tacl.identifier = tnode.identifier and
|
||||
tacl.uuid = tnode.uuid
|
||||
);
|
||||
|
||||
insert into T_auth_ext_keys
|
||||
(
|
||||
id, externalKey
|
||||
)
|
||||
select
|
||||
id, externalKey
|
||||
from
|
||||
externalkeys;
|
||||
|
||||
insert into T_authority
|
||||
(
|
||||
recipient
|
||||
)
|
||||
select
|
||||
recipient
|
||||
from
|
||||
recipient;
|
||||
|
||||
insert into T_access_control_entry
|
||||
(
|
||||
id, protocol, identifier, uuid,
|
||||
typeUri, typeName, name,
|
||||
recipient,
|
||||
allowed
|
||||
)
|
||||
select
|
||||
hibernate_sequence.nextval, e.protocol, e.identifier, e.guid,
|
||||
e.typeUri, e.typeName, e.name,
|
||||
e.recipient,
|
||||
e.allowed
|
||||
from node_perm_entry e join t_node n on e.protocol = n.protocol and e.identifier = n.identifier and e.guid = n.uuid
|
||||
;
|
||||
|
||||
update T_access_control_entry tentry
|
||||
set
|
||||
acl_id =
|
||||
(
|
||||
select
|
||||
tacl.id
|
||||
from T_access_control_list tacl
|
||||
join T_node tnode on tacl.id = tnode.acl_id
|
||||
where
|
||||
tnode.protocol = tentry.protocol and
|
||||
tnode.identifier = tentry.identifier and
|
||||
tnode.uuid = tentry.uuid
|
||||
);
|
||||
update T_access_control_entry tentry
|
||||
set
|
||||
tentry.permission_id =
|
||||
(
|
||||
select
|
||||
tpermission.id
|
||||
from T_permission tpermission
|
||||
where
|
||||
tpermission.type_qname = '{' || tentry.typeUri || '}' || tentry.typeName and
|
||||
tpermission.name = tentry.name
|
||||
);
|
||||
update T_access_control_entry tentry
|
||||
set
|
||||
tentry.authority_id =
|
||||
(
|
||||
select
|
||||
tauthority.recipient
|
||||
from T_authority tauthority
|
||||
where
|
||||
tauthority.recipient = tentry.recipient
|
||||
);
|
||||
delete from T_access_control_list where id not in (select distinct(acl_id) id from t_access_control_entry where acl_id is not null);
|
||||
delete from T_access_control_entry where acl_id is null;
|
||||
update T_node set acl_id = null where acl_id not in (select id from t_access_control_list);
|
||||
|
||||
--
|
||||
-- Create New schema (Oracle)
|
||||
--
|
||||
|
||||
DROP TABLE child_assoc cascade constraints;
|
||||
DROP TABLE node_assoc cascade constraints;
|
||||
DROP TABLE node_aspects cascade constraints;
|
||||
DROP TABLE node cascade constraints;
|
||||
DROP TABLE node_status cascade constraints;
|
||||
DROP TABLE version_count cascade constraints;
|
||||
DROP TABLE store cascade constraints;
|
||||
DROP TABLE node_perm_entry cascade constraints;
|
||||
DROP TABLE node_permission cascade constraints;
|
||||
DROP TABLE permission_ref cascade constraints;
|
||||
DROP TABLE recipient cascade constraints;
|
||||
DROP TABLE externalKeys cascade constraints;
|
||||
|
||||
create table access_control_entry
|
||||
(
|
||||
id number(19,0) not null,
|
||||
acl_id number(19,0) not null,
|
||||
permission_id number(19,0) not null,
|
||||
authority_id varchar2(100) not null,
|
||||
allowed number(1,0) not null,
|
||||
primary key (id),
|
||||
unique (acl_id, permission_id, authority_id)
|
||||
);
|
||||
|
||||
create table access_control_list
|
||||
(
|
||||
id number(19,0) not null,
|
||||
inherits number(1,0) not null,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create table auth_ext_keys
|
||||
(
|
||||
id varchar2(100) not null,
|
||||
externalKey varchar2(100) not null,
|
||||
primary key (id, externalKey)
|
||||
);
|
||||
|
||||
create table authority
|
||||
(
|
||||
recipient varchar2(100) not null,
|
||||
primary key (recipient)
|
||||
);
|
||||
|
||||
create table child_assoc
|
||||
(
|
||||
id number(19,0) not null,
|
||||
parent_node_id number(19,0),
|
||||
child_node_id number(19,0),
|
||||
type_qname varchar2(255) not null,
|
||||
qname varchar2(255) not null,
|
||||
is_primary number(1,0),
|
||||
assoc_index number(10,0),
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create table node
|
||||
(
|
||||
id number(19,0) not null,
|
||||
protocol varchar2(50) not null,
|
||||
identifier varchar2(100) not null,
|
||||
uuid varchar2(36) not null,
|
||||
type_qname varchar2(255) not null,
|
||||
acl_id number(19,0),
|
||||
primary key (id),
|
||||
unique (protocol, identifier, uuid)
|
||||
);
|
||||
|
||||
create table node_aspects
|
||||
(
|
||||
node_id number(19,0) not null,
|
||||
qname varchar2(200)
|
||||
);
|
||||
|
||||
create table node_assoc
|
||||
(
|
||||
id number(19,0) not null,
|
||||
source_node_id number(19,0),
|
||||
target_node_id number(19,0),
|
||||
type_qname varchar2(255) not null,
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create table node_status
|
||||
(
|
||||
protocol varchar2(50) not null,
|
||||
identifier varchar2(100) not null,
|
||||
guid varchar2(36) not null,
|
||||
node_id number(19,0),
|
||||
change_txn_id varchar2(56) not null,
|
||||
primary key (protocol, identifier, guid)
|
||||
);
|
||||
|
||||
create table permission
|
||||
(
|
||||
id number(19,0) not null,
|
||||
type_qname varchar2(200) not null,
|
||||
name varchar2(100) not null,
|
||||
primary key (id),
|
||||
unique (type_qname, name)
|
||||
);
|
||||
|
||||
create table store
|
||||
(
|
||||
protocol varchar2(50) not null,
|
||||
identifier varchar2(100) not null,
|
||||
root_node_id number(19,0),
|
||||
primary key (protocol, identifier)
|
||||
);
|
||||
|
||||
create table version_count
|
||||
(
|
||||
protocol varchar2(100) not null,
|
||||
identifier varchar2(100) not null,
|
||||
version_count number(10,0) not null,
|
||||
primary key (protocol, identifier)
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Copy data into new schema
|
||||
--
|
||||
|
||||
insert into store
|
||||
(
|
||||
protocol, identifier, root_node_id
|
||||
)
|
||||
select
|
||||
protocol, identifier, root_node_id
|
||||
from
|
||||
T_store;
|
||||
|
||||
insert into node
|
||||
(
|
||||
id, protocol, identifier, uuid, type_qname, acl_id
|
||||
)
|
||||
select
|
||||
id, protocol, identifier, uuid, type_qname, acl_id
|
||||
from
|
||||
T_node;
|
||||
|
||||
insert into version_count
|
||||
(
|
||||
protocol, identifier, version_count
|
||||
)
|
||||
select
|
||||
protocol, identifier, version_count
|
||||
from
|
||||
T_version_count;
|
||||
|
||||
insert into node_status
|
||||
(
|
||||
protocol, identifier, guid, node_id, change_txn_id
|
||||
)
|
||||
select
|
||||
protocol, identifier, guid, node_id, change_txn_id
|
||||
from
|
||||
T_node_status;
|
||||
|
||||
|
||||
alter table node_properties add (node_id number(19,0));
|
||||
|
||||
update node_properties tproperties set node_id =
|
||||
(select tnode.id from T_node tnode where
|
||||
tnode.protocol = tproperties.protocol and
|
||||
tnode.identifier = tproperties.identifier and
|
||||
tnode.uuid = tproperties.guid
|
||||
);
|
||||
|
||||
alter table node_properties modify (node_id number(19,0) not null);
|
||||
alter table node_properties drop primary key;
|
||||
alter table node_properties add primary key (node_id, qname);
|
||||
alter table node_properties drop column protocol;
|
||||
alter table node_properties drop column identifier;
|
||||
alter table node_properties drop column guid;
|
||||
|
||||
|
||||
insert into node_aspects
|
||||
(
|
||||
node_id, qname
|
||||
)
|
||||
select
|
||||
node_id, qname
|
||||
from
|
||||
T_node_aspects;
|
||||
|
||||
insert into child_assoc
|
||||
(
|
||||
id, parent_node_id, child_node_id, type_qname, qname, is_primary, assoc_index
|
||||
)
|
||||
select
|
||||
id, parent_node_id, child_node_id, type_qname, qname, is_primary, assoc_index
|
||||
from
|
||||
T_child_assoc;
|
||||
|
||||
insert into node_assoc
|
||||
(
|
||||
id, source_node_id, target_node_id, type_qname
|
||||
)
|
||||
select
|
||||
id, source_node_id, target_node_id, type_qname
|
||||
from
|
||||
T_node_assoc;
|
||||
|
||||
insert into permission
|
||||
(
|
||||
id, type_qname, name
|
||||
)
|
||||
select
|
||||
id, type_qname, name
|
||||
from
|
||||
T_permission;
|
||||
|
||||
insert into access_control_list
|
||||
(
|
||||
id, inherits
|
||||
)
|
||||
select
|
||||
id, inherits
|
||||
from
|
||||
T_access_control_list;
|
||||
|
||||
insert into auth_ext_keys
|
||||
(
|
||||
id, externalKey
|
||||
)
|
||||
select
|
||||
id, externalKey
|
||||
from
|
||||
T_auth_ext_keys;
|
||||
|
||||
insert into authority
|
||||
(
|
||||
recipient
|
||||
)
|
||||
select
|
||||
recipient
|
||||
from
|
||||
T_authority;
|
||||
|
||||
insert into access_control_entry
|
||||
(
|
||||
id, acl_id, permission_id, authority_id, allowed
|
||||
)
|
||||
select
|
||||
id, acl_id, permission_id, authority_id, allowed
|
||||
from
|
||||
T_access_control_entry;
|
||||
|
||||
|
||||
-- Enable constraints
|
||||
|
||||
alter table access_control_entry add constraint FKF064DF7560601995 foreign key (permission_id) references permission;
|
||||
alter table access_control_entry add constraint FKF064DF75B25A50BF foreign key (authority_id) references authority;
|
||||
alter table access_control_entry add constraint FKF064DF75B9553F6C foreign key (acl_id) references access_control_list;
|
||||
alter table auth_ext_keys add constraint FK31D3BA097B7FDE43 foreign key (id) references authority;
|
||||
alter table child_assoc add constraint FKC6EFFF3274173FF4 foreign key (child_node_id) references node;
|
||||
alter table child_assoc add constraint FKC6EFFF328E50E582 foreign key (parent_node_id) references node;
|
||||
alter table node add constraint FK33AE02B9553F6C foreign key (acl_id) references access_control_list;
|
||||
alter table node add constraint FK33AE02D24ADD25 foreign key (protocol, identifier) references store;
|
||||
alter table node_properties add constraint FKC962BF907F2C8017 foreign key (node_id) references node;
|
||||
alter table node_aspects add constraint FK2B91A9DE7F2C8017 foreign key (node_id) references node;
|
||||
alter table node_assoc add constraint FK5BAEF398B69C43F3 foreign key (source_node_id) references node;
|
||||
alter table node_assoc add constraint FK5BAEF398A8FC7769 foreign key (target_node_id) references node;
|
||||
alter table node_status add constraint FK38ECB8CF7F2C8017 foreign key (node_id) references node;
|
||||
alter table store add constraint FK68AF8E122DBA5BA foreign key (root_node_id) references node;
|
||||
|
||||
-- Add additional indexes
|
||||
CREATE INDEX FKF064DF7560601995 ON access_control_entry (permission_id);
|
||||
CREATE INDEX FKF064DF75B25A50BF ON access_control_entry (authority_id);
|
||||
CREATE INDEX FKF064DF75B9553F6C ON access_control_entry (acl_id);
|
||||
CREATE INDEX FK31D3BA097B7FDE43 ON auth_ext_keys (id);
|
||||
CREATE INDEX FKC6EFFF3274173FF4 ON child_assoc (child_node_id);
|
||||
CREATE INDEX FKC6EFFF328E50E582 ON child_assoc (parent_node_id);
|
||||
CREATE INDEX FK33AE02B9553F6C ON node (acl_id);
|
||||
CREATE INDEX FK33AE02D24ADD25 ON node (protocol, identifier);
|
||||
CREATE INDEX FK2B91A9DE7F2C8017 ON node_aspects (node_id);
|
||||
CREATE INDEX FK5BAEF398B69C43F3 ON node_assoc (source_node_id);
|
||||
CREATE INDEX FK5BAEF398A8FC7769 ON node_assoc (target_node_id);
|
||||
CREATE INDEX FKC962BF907F2C8017 ON node_properties (node_id);
|
||||
CREATE INDEX FK38ECB8CF7F2C8017 ON node_status (node_id);
|
||||
CREATE INDEX FK68AF8E122DBA5BA ON store (root_node_id);
|
||||
|
||||
ALTER TABLE applied_patch MODIFY id varchar(64);
|
@@ -0,0 +1,75 @@
|
||||
-- ------------------------------------------------------
|
||||
-- Alfresco Schema conversion V1.3 to V1.4 Part 1
|
||||
--
|
||||
-- Adds the columns required to enforce the duplicate name detection
|
||||
--
|
||||
-- Author: Derek Hulley
|
||||
-- ------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Delete intermediate tables from previous upgrades
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS T_access_control_entry;
|
||||
DROP TABLE IF EXISTS T_access_control_list;
|
||||
DROP TABLE IF EXISTS T_applied_patch;
|
||||
DROP TABLE IF EXISTS T_auth_ext_keys;
|
||||
DROP TABLE IF EXISTS T_authority;
|
||||
DROP TABLE IF EXISTS T_child_assoc;
|
||||
DROP TABLE IF EXISTS T_node;
|
||||
DROP TABLE IF EXISTS T_node_aspects;
|
||||
DROP TABLE IF EXISTS T_node_assoc;
|
||||
DROP TABLE IF EXISTS T_node_properties;
|
||||
DROP TABLE IF EXISTS T_node_status;
|
||||
DROP TABLE IF EXISTS T_permission;
|
||||
DROP TABLE IF EXISTS T_store;
|
||||
DROP TABLE IF EXISTS T_version_count;
|
||||
|
||||
--
|
||||
-- Unique name constraint
|
||||
--
|
||||
|
||||
-- Apply new schema changes to child assoc table
|
||||
ALTER TABLE child_assoc
|
||||
ADD COLUMN child_node_name VARCHAR(50) NOT NULL DEFAULT 'V1.4 upgrade' AFTER type_qname,
|
||||
ADD COLUMN child_node_name_crc bigint(20) NOT NULL DEFAULT -1 AFTER child_node_name;
|
||||
|
||||
UPDATE child_assoc
|
||||
SET child_node_name_crc = id * -1;
|
||||
|
||||
ALTER TABLE child_assoc
|
||||
ADD UNIQUE INDEX IDX_CHILD_NAMECRC(parent_node_id, type_qname, child_node_name, child_node_name_crc);
|
||||
|
||||
-- Apply unique index for node associations
|
||||
ALTER TABLE node_assoc
|
||||
ADD UNIQUE INDEX IDX_ASSOC(source_node_id, type_qname, target_node_id);
|
||||
|
||||
--
|
||||
-- Rename tables to give 'alf_' prefix
|
||||
--
|
||||
ALTER TABLE access_control_entry RENAME TO alf_access_control_entry;
|
||||
ALTER TABLE access_control_list RENAME TO alf_access_control_list;
|
||||
ALTER TABLE applied_patch RENAME TO alf_applied_patch;
|
||||
ALTER TABLE auth_ext_keys RENAME TO alf_auth_ext_keys;
|
||||
ALTER TABLE authority RENAME TO alf_authority;
|
||||
ALTER TABLE child_assoc RENAME TO alf_child_assoc;
|
||||
ALTER TABLE node RENAME TO alf_node;
|
||||
ALTER TABLE node_aspects RENAME TO alf_node_aspects;
|
||||
ALTER TABLE node_assoc RENAME TO alf_node_assoc;
|
||||
ALTER TABLE node_properties RENAME TO alf_node_properties;
|
||||
ALTER TABLE node_status RENAME TO alf_node_status;
|
||||
ALTER TABLE permission RENAME TO alf_permission;
|
||||
ALTER TABLE store RENAME TO alf_store;
|
||||
ALTER TABLE version_count RENAME TO alf_version_count;
|
||||
|
||||
--
|
||||
-- Record script finish
|
||||
--
|
||||
delete from alf_applied_patch where id = 'patch.schemaUpdateScript-V1.4-1';
|
||||
insert into alf_applied_patch
|
||||
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
|
||||
values
|
||||
(
|
||||
'patch.schemaUpdateScript-V1.4-1', 'Manually execute script upgrade V1.4 part 1',
|
||||
0, 19, -1, 20, now(), 'UNKOWN', 1, 1, 'Script completed'
|
||||
);
|
@@ -0,0 +1,59 @@
|
||||
-- ------------------------------------------------------
|
||||
-- Alfresco Schema conversion V1.3 to V1.4 Part 2
|
||||
--
|
||||
-- Adds the alf_transaction and alf_server tables to keep track of the sources
|
||||
-- of transactions.
|
||||
--
|
||||
-- Author: Derek Hulley
|
||||
-- ------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Create server and transaction tables
|
||||
--
|
||||
|
||||
CREATE TABLE alf_server (
|
||||
id bigint(20) NOT NULL auto_increment,
|
||||
ip_address varchar(15) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY ip_address (ip_address)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
insert into alf_server (id, ip_address) values (0, '0.0.0.0');
|
||||
|
||||
CREATE TABLE alf_transaction (
|
||||
id bigint(20) NOT NULL auto_increment,
|
||||
server_id bigint(20) default NULL,
|
||||
change_txn_id varchar(56) NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY FKB8761A3A9AE340B7 (server_id),
|
||||
KEY IDX_CHANGE_TXN (change_txn_id),
|
||||
CONSTRAINT FKB8761A3A9AE340B7 FOREIGN KEY (server_id) REFERENCES alf_server (id)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
insert into alf_transaction
|
||||
(
|
||||
server_id, change_txn_id
|
||||
)
|
||||
select (select max(id) from alf_server), change_txn_id from alf_node_status group by change_txn_id;
|
||||
|
||||
-- Alter node status
|
||||
ALTER TABLE alf_node_status
|
||||
ADD COLUMN transaction_id bigint(20) NOT NULL DEFAULT 0 AFTER node_id;
|
||||
-- Update FK column
|
||||
UPDATE alf_node_status ns SET ns.transaction_id =
|
||||
(
|
||||
select t.id from alf_transaction t where t.change_txn_id = ns.change_txn_id
|
||||
);
|
||||
ALTER TABLE alf_node_status
|
||||
DROP COLUMN change_txn_id,
|
||||
ADD CONSTRAINT FK71C2002B9E57C13D FOREIGN KEY (transaction_id) REFERENCES alf_transaction (id);
|
||||
|
||||
--
|
||||
-- Record script finish
|
||||
--
|
||||
delete from alf_applied_patch where id = 'patch.schemaUpdateScript-V1.4-2';
|
||||
insert into alf_applied_patch
|
||||
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
|
||||
values
|
||||
(
|
||||
'patch.schemaUpdateScript-V1.4-2', 'Manually execute script upgrade V1.4 part 2',
|
||||
0, 20, -1, 21, now(), 'UNKOWN', 1, 1, 'Script completed'
|
||||
);
|
@@ -1,10 +1,11 @@
|
||||
#
|
||||
# Hibernate configuration
|
||||
#
|
||||
hibernate.jdbc.use_streams_for_binary=true
|
||||
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
|
||||
hibernate.show_sql=false
|
||||
|
||||
hibernate.jdbc.use_streams_for_binary=true
|
||||
hibernate.hbm2ddl.auto=update
|
||||
hibernate.show_sql=false
|
||||
hibernate.cache.use_query_cache=true
|
||||
hibernate.max_fetch_depth=10
|
||||
hibernate.cache.provider_class=org.alfresco.repo.cache.InternalEhCacheManagerFactoryBean
|
||||
|
@@ -1,189 +1,144 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<ehcache>
|
||||
<!-- defaults -->
|
||||
<diskStore
|
||||
path="java.io.tmpdir"/>
|
||||
<!--
|
||||
<cacheManagerPeerProviderFactory
|
||||
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
|
||||
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
|
||||
multicastGroupPort=4446"/>
|
||||
<cacheManagerPeerListenerFactory
|
||||
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>
|
||||
-->
|
||||
<defaultCache
|
||||
maxElementsInMemory="5000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
>
|
||||
<!--
|
||||
<cacheEventListenerFactory
|
||||
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
|
||||
properties="replicateAsynchronously=false, replicatePuts=false,
|
||||
replicateUpdates=true, replicateUpdatesViaCopy=false,
|
||||
replicateRemovals=true"/>
|
||||
-->
|
||||
</defaultCache>
|
||||
<!-- Hibernate usage -->
|
||||
<cache
|
||||
name="org.hibernate.cache.StandardQueryCache"
|
||||
maxElementsInMemory="50"
|
||||
eternal="true"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"/>
|
||||
/>
|
||||
<!-- approx 0.4MB memory required -->
|
||||
<cache
|
||||
name="org.hibernate.cache.UpdateTimestampsCache"
|
||||
maxElementsInMemory="2000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
/>
|
||||
<!-- approx 40MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeImpl"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 0.1 MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.QNameEntityImpl"
|
||||
maxElementsInMemory="100"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 40MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeStatusImpl"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 15MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeImpl.aspects"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 10MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeImpl.properties"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 20MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeImpl.childAssocs"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 10MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeImpl.parentAssocs"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 250MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.ChildAssocImpl"
|
||||
maxElementsInMemory="200000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 10MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeImpl.sourceNodeAssocs"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 10MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeImpl.targetNodeAssocs"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- general use node associations are not common -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.NodeAssocImpl"
|
||||
maxElementsInMemory="1000"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- low numbers of objects expected -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.StoreImpl"
|
||||
maxElementsInMemory="100"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- version counters -->
|
||||
<!-- approx 0.4MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.VersionCountImpl"
|
||||
maxElementsInMemory="100"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="0"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- approx 0.1MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.AppliedPatchImpl"
|
||||
maxElementsInMemory="100"
|
||||
eternal="true"
|
||||
timeToIdleSeconds="0"
|
||||
timeToLiveSeconds="60"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
<!-- Permission related caches -->
|
||||
<!-- approx 1MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl"
|
||||
maxElementsInMemory="1000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
/>
|
||||
<!-- approx 1MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.DbAccessControlListImpl.entries"
|
||||
maxElementsInMemory="1000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
/>
|
||||
<!-- approx 5MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl"
|
||||
maxElementsInMemory="5000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
/>
|
||||
<!-- approx 1MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.DbPermissionImpl"
|
||||
maxElementsInMemory="500"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
/>
|
||||
<!-- approx 10MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.DbAuthorityImpl"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
/>
|
||||
<!-- approx 5MB memory required -->
|
||||
<cache
|
||||
name="org.alfresco.repo.domain.hibernate.DbAuthorityImpl.externalKeys"
|
||||
maxElementsInMemory="5000"
|
||||
/>
|
||||
<!-- Audit caches -->
|
||||
<cache
|
||||
name="org.alfresco.repo.audit.hibernate.AuditConfigImpl"
|
||||
maxElementsInMemory="2"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
<cache
|
||||
name="org.alfresco.repo.audit.hibernate.AuditDateImpl"
|
||||
maxElementsInMemory="2"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
<cache
|
||||
name="org.alfresco.repo.audit.hibernate.AuditSourceImpl"
|
||||
maxElementsInMemory="2000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"/>
|
||||
|
||||
</ehcache>
|
@@ -2,6 +2,7 @@
|
||||
# Sample database connection properties
|
||||
#
|
||||
|
||||
#db.schema.update=true
|
||||
#db.username=alfresco
|
||||
#db.password=alfresco
|
||||
#db.pool.initial=10
|
||||
|
@@ -30,6 +30,9 @@
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="sessionFactoryBase" abstract="true">
|
||||
<property name="schemaUpdate">
|
||||
<value>false</value>
|
||||
</property>
|
||||
<property name="mappingResources">
|
||||
<list>
|
||||
<!-- -->
|
||||
@@ -38,10 +41,15 @@
|
||||
|
||||
<value>org/alfresco/repo/domain/hibernate/Node.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/Store.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/Transaction.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/VersionCount.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/AppliedPatch.hbm.xml</value>
|
||||
<value>org/alfresco/repo/domain/hibernate/Permission.hbm.xml</value>
|
||||
<value>org/alfresco/repo/avm/hibernate/AVM.hbm.xml</value>
|
||||
|
||||
<!-- Audit config -->
|
||||
<!-- TODO: Move into org/alfresco/repo/domain/hibernate/ -->
|
||||
<value>org/alfresco/repo/audit/hibernate/Audit.hbm.xml</value>
|
||||
|
||||
<!-- -->
|
||||
<!-- JBoss jBPM Workflow Engine -->
|
||||
@@ -147,6 +155,8 @@
|
||||
<prop key="org.alfresco.repo.domain.hibernate.ChildAssocImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.NodeAssocImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.StoreImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.TransactionImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.ServerImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.VersionCountImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.AppliedPatchImpl">${cache.strategy}</prop>
|
||||
|
||||
@@ -154,6 +164,10 @@
|
||||
<prop key="org.alfresco.repo.domain.hibernate.DbAccessControlEntryImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.DbPermissionImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.domain.hibernate.DbAuthorityImpl">${cache.strategy}</prop>
|
||||
|
||||
<prop key="org.alfresco.repo.audit.hibernate.AuditConfigImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.audit.hibernate.AuditDateImpl">${cache.strategy}</prop>
|
||||
<prop key="org.alfresco.repo.audit.hibernate.AuditSourceImpl">${cache.strategy}</prop>
|
||||
</props>
|
||||
</property>
|
||||
<property name="collectionCacheStrategies" >
|
||||
@@ -197,21 +211,24 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="nodeDaoServiceImpl" class="org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl" >
|
||||
<bean id="nodeDaoServiceImpl" class="org.alfresco.repo.node.db.hibernate.HibernateNodeDaoServiceImpl">
|
||||
<property name="sessionFactory">
|
||||
<ref bean="sessionFactory" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dbNodeDaoServiceTxnRegistration" class="org.alfresco.repo.transaction.TransactionalDaoInterceptor" >
|
||||
<property name="daoService">
|
||||
<ref bean="nodeDaoServiceImpl" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="persmissionsDaoServiceTxnRegistration" class="org.alfresco.repo.transaction.TransactionalDaoInterceptor" >
|
||||
<property name="daoService">
|
||||
<ref bean="permissionsDaoComponent" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="nodeDaoService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.repo.node.db.NodeDaoService</value>
|
||||
@@ -226,4 +243,14 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="auditDao" class="org.alfresco.repo.audit.hibernate.HibernateAuditDAO">
|
||||
<property name="sessionFactory">
|
||||
<ref bean="sessionFactory"/>
|
||||
</property>
|
||||
<property name="contentStore">
|
||||
<ref bean="auditFileContentStore"/>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
@@ -22,17 +22,11 @@
|
||||
<property name="nodeService">
|
||||
<ref bean="nodeService" />
|
||||
</property>
|
||||
<property name="stores">
|
||||
<list>
|
||||
<value>workspace://SpacesStore</value>
|
||||
<value>workspace://lightWeightVersionStore</value>
|
||||
<value>user://alfrescoUserStore</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- full node index recovery -->
|
||||
<bean id="indexRecoveryComponent" class="org.alfresco.repo.node.index.FullIndexRecoveryComponent" parent="indexRecoveryComponentBase">
|
||||
<!-- Properties controlling full index rebuilding / tracking -->
|
||||
<property name="executeFullRecovery">
|
||||
<value>false</value> <!-- enable this to start the full index recovery -->
|
||||
</property>
|
||||
@@ -47,4 +41,43 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- attempt to reindex content that was missing before -->
|
||||
<!--
|
||||
<bean id="missingContentReindexComponent" class="org.alfresco.repo.node.index.MissingContentReindexComponent" parent="indexRecoveryComponentBase">
|
||||
<property name="runContinuously">
|
||||
<value>false</value>
|
||||
</property>
|
||||
<property name="waitTime">
|
||||
<value>300000</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="missingContentReindexTrigger" class="org.alfresco.util.TriggerBean">
|
||||
<property name="jobDetail">
|
||||
<bean id="IndexRecoveryJobDetail" class="org.springframework.scheduling.quartz.JobDetailBean">
|
||||
<property name="jobClass">
|
||||
<value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
|
||||
</property>
|
||||
<property name="jobDataAsMap">
|
||||
<map>
|
||||
<entry key="missingContentReindexComponent">
|
||||
<ref bean="missingContentReindexComponent" />
|
||||
</entry>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="startDelay">
|
||||
<value>60000</value>
|
||||
</property>
|
||||
<property name="repeatCount">
|
||||
<value>0</value>
|
||||
</property>
|
||||
<property name="scheduler">
|
||||
<ref bean="schedulerFactory" />
|
||||
</property>
|
||||
</bean>
|
||||
-->
|
||||
|
||||
|
||||
</beans>
|
@@ -74,10 +74,13 @@ export.generic.package.description=Alfresco Repository export.
|
||||
export.package.error=Failed to find temporary file for export
|
||||
|
||||
script.title=Execute a script
|
||||
script.description=Execute a JavaScript file to perform tasks such as creating new files or folders
|
||||
script.description=Execute a JavaScript file to perform tasks such as creating new files or folders.
|
||||
|
||||
counter.title=Increment Counter
|
||||
counter.counter=Increment the counter property for the item.
|
||||
|
||||
execute-all-rules.title=Execute all rules
|
||||
execute-all-rules.description=Execute all rules on the child items
|
||||
execute-all-rules.description=Execute all rules on the child items.
|
||||
|
||||
start-workflow.title=Start Workflow
|
||||
start-workflow.description=This will start a workflow for the matched items.
|
||||
|
@@ -16,6 +16,9 @@ patch.general.property_not_set=Patch property ''{0}'' has not been set on this p
|
||||
|
||||
# Individual patch messages
|
||||
|
||||
patch.marker.description=Marker patch to record installations and upgrades
|
||||
patch.marker.result=Marker patch applied
|
||||
|
||||
patch.savedSearchesFolder.description=Ensures the existence of the 'Saved Searches' folder.
|
||||
patch.savedSearchesFolder.result.exists=The saved searches folder already exists: {0}
|
||||
patch.savedSearchesFolder.result.created=The saved searches folder was successfully created: {0}
|
||||
|
8
config/alfresco/messages/schema-update.properties
Normal file
8
config/alfresco/messages/schema-update.properties
Normal file
@@ -0,0 +1,8 @@
|
||||
# Schema update messages
|
||||
|
||||
schema.update.msg.executing_script=Executing schema upgrade script: {0}
|
||||
schema.update.err.update_failed=Schema auto-update failed
|
||||
schema.update.err.validation_failed=Schema validation failed
|
||||
schema.update.err.update_script_not_run=The following schema upgrade script needs to be executed manually: {0}
|
||||
schema.update.err.script_not_found=The schema script could not be found at location {0}
|
||||
schema.update.err.statement_terminator=Scripts must terminate all statements with '';'' (line {0} of {1}).
|
@@ -526,6 +526,9 @@
|
||||
<property name="cm:hits">
|
||||
<type>d:int</type>
|
||||
</property>
|
||||
<property name="cm:counter">
|
||||
<type>d:int</type>
|
||||
</property>
|
||||
</properties>
|
||||
</aspect>
|
||||
|
||||
|
@@ -441,12 +441,12 @@
|
||||
|
||||
<bean id="patch.schemaUpdateScript-V1.4-1" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<property name="id"><value>patch.schemaUpdateScript-V1.4-1</value></property>
|
||||
<property name="description"><value>patch.patch.schemaUpgradeScriptPatch.description</value></property>
|
||||
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>19</value></property>
|
||||
<property name="targetSchema"><value>20</value></property>
|
||||
<property name="scriptName">
|
||||
<value>AlfrescoSchemaUpdate-1.4-1-xxx.sql</value>
|
||||
<property name="scriptUrl">
|
||||
<value>classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-1.sql</value>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="patch.uniqueChildName" class="org.alfresco.repo.admin.patch.impl.UniqueChildNamePatch" parent="basePatch" >
|
||||
@@ -472,5 +472,21 @@
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="patch.schemaUpdateScript-V1.4-2" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<property name="id"><value>patch.schemaUpdateScript-V1.4-2</value></property>
|
||||
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>20</value></property>
|
||||
<property name="targetSchema"><value>21</value></property>
|
||||
<property name="scriptUrl">
|
||||
<value>classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-2.sql</value>
|
||||
</property>
|
||||
<!-- dependent on upgrade script 1.4-1 having being run -->
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.schemaUpdateScript-V1.4-1" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -712,4 +712,20 @@
|
||||
|
||||
<bean id="ScriptService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
|
||||
|
||||
<!-- ================ -->
|
||||
<!-- Workflow Service -->
|
||||
<!-- ================ -->
|
||||
|
||||
<!-- TODO: Add workflow security -->
|
||||
|
||||
<bean id="WorkflowService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
|
||||
|
||||
<!-- ============= -->
|
||||
<!-- Audit Service -->
|
||||
<!-- ============= -->
|
||||
|
||||
<!-- TODO: Add audit security -->
|
||||
|
||||
<bean id="AuditService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
|
||||
|
||||
</beans>
|
@@ -5,6 +5,8 @@ dir.root=./alf_data
|
||||
dir.contentstore=${dir.root}/contentstore
|
||||
dir.contentstore.deleted=${dir.root}/contentstore.deleted
|
||||
|
||||
dir.auditcontentstore=${dir.root}/audit.contentstore
|
||||
|
||||
# The location for lucene index files
|
||||
|
||||
dir.indexes=${dir.root}/lucene-indexes
|
||||
@@ -54,6 +56,7 @@ lucene.lock.poll.interval=100
|
||||
|
||||
# Database configuration
|
||||
|
||||
db.schema.update=true
|
||||
db.driver=org.gjt.mm.mysql.Driver
|
||||
db.name=alfresco
|
||||
db.url=jdbc:mysql:///${db.name}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Alfresco</title>
|
||||
<copyright>Copyright (c) 2005 Alfresco Software, Inc. All rights reserved.</copyright>
|
||||
<#assign hostname="http://localhost:8080/alfresco">
|
||||
<#assign spaceref="${hostname}/navigate/browse/${space.nodeRef.storeRef.protocol}/${space.nodeRef.storeRef.identifier}/${space.nodeRef.id}">
|
||||
<#assign datetimeformat="EEE, dd MMM yyyy HH:mm:ss zzz">
|
||||
<link>${spaceref}</link>
|
||||
<description>Recent Changes to '${space.name}'</description>
|
||||
<language>en-us</language>
|
||||
<lastBuildDate>${date?string(datetimeformat)}</lastBuildDate>
|
||||
<pubDate>${date?string(datetimeformat)}</pubDate>
|
||||
<ttl>120</ttl>
|
||||
<generator>Alfresco 1.2</generator>
|
||||
<image>
|
||||
<title>${space.name}</title>
|
||||
<width>32</width>
|
||||
<height>32</height>
|
||||
<link>${spaceref}</link>
|
||||
<url>${hostname}${space.icon32}</url>
|
||||
</image>
|
||||
<#assign weekms=1000*60*60*24*7>
|
||||
<#list space.childrenByXPath[".//*[subtypeOf('cm:content')]"] as child>
|
||||
<#if (dateCompare(child.properties["cm:modified"], date, weekms) == 1) || (dateCompare(child.properties["cm:created"], date, weekms) == 1)>
|
||||
<item>
|
||||
<title>${child.properties.name}</title>
|
||||
<link>${hostname}${child.url}</link>
|
||||
<description>
|
||||
${"<a href='${hostname}${child.url}'>"?xml}${child.properties.name}${"</a>"?xml}
|
||||
<#if child.properties["cm:description"]?exists && child.properties["cm:description"] != "">
|
||||
${child.properties["cm:description"]}
|
||||
</#if>
|
||||
</description>
|
||||
<pubDate>${child.properties["cm:modified"]?string(datetimeformat)}</pubDate>
|
||||
<guid isPermaLink="false">${hostname}${child.url}</guid>
|
||||
</item>
|
||||
</#if>
|
||||
</#list>
|
||||
|
||||
</channel>
|
||||
</rss>
|
@@ -1,20 +0,0 @@
|
||||
<#-- Table of the images found in a folder under Company Home called "Company Logos" -->
|
||||
<#-- Shows each image found as inline content -->
|
||||
<table>
|
||||
<#list companyhome.children as child>
|
||||
<#if child.isContainer && child.name = "Company Logos">
|
||||
<#list child.children as image>
|
||||
<#switch image.mimetype>
|
||||
<#case "image/jpeg">
|
||||
<#case "image/gif">
|
||||
<#case "image/png">
|
||||
<tr>
|
||||
<td><img src="/alfresco${image.url}"></td>
|
||||
</tr>
|
||||
<#break>
|
||||
<#default>
|
||||
</#switch>
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
@@ -1,18 +1,47 @@
|
||||
<#-- Shows some general info about the current document, including NodeRef and aspects applied -->
|
||||
<h3>General document info</h3>
|
||||
<#if document?exists>
|
||||
<h4>Current Document Info:</h4>
|
||||
<b>Name:</b> ${document.name}<br>
|
||||
<b>Ref:</b> ${document.nodeRef}<br>
|
||||
<b>Type:</b> ${document.type}<br>
|
||||
<b>DBID:</b> ${document.properties["sys:node-dbid"]}<br>
|
||||
<b>Content URL:</b> <a href="/alfresco${document.url}">/alfresco${document.url}</a><br>
|
||||
<b>Locked:</b> <#if document.isLocked>Yes<#else>No</#if><br>
|
||||
<#if hasAspect(document, "cm:countable") == 1 && document.properties['cm:counter']?exists>
|
||||
<b>Counter:</b> ${document.properties['cm:counter']}<br>
|
||||
</#if>
|
||||
<b>Aspects:</b>
|
||||
<table>
|
||||
<#list document.aspects as aspect>
|
||||
<tr><td>${aspect}</td></tr>
|
||||
</#list>
|
||||
</table>
|
||||
<b>Properties:</b>
|
||||
<table>
|
||||
<#-- Get a list of all the property names for the document -->
|
||||
<#assign props = document.properties?keys>
|
||||
<#list props as t>
|
||||
<#-- If the property exists -->
|
||||
<#if document.properties[t]?exists>
|
||||
<#-- If it is a date, format it accordingly -->
|
||||
<#if document.properties[t]?is_date>
|
||||
<tr><td>${t} = ${document.properties[t]?datetime}</td></tr>
|
||||
|
||||
<#-- If it is a boolean, format it accordingly -->
|
||||
<#elseif document.properties[t]?is_boolean>
|
||||
<tr><td>${t} = ${document.properties[t]?string("yes", "no")}</td></tr>
|
||||
|
||||
<#-- If it is a collection, enumerate it -->
|
||||
<#elseif document.properties[t]?is_enumerable>
|
||||
<tr><td>${t} = <#list document.properties[t] as i>${i} </#list></td></tr>
|
||||
|
||||
<#-- Otherwise treat it as a string -->
|
||||
<#else>
|
||||
<tr><td>${t} = ${document.properties[t]}</td></tr>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
||||
<#else>
|
||||
No document found!
|
||||
</#if>
|
||||
|
@@ -1,47 +0,0 @@
|
||||
<h3>=====Example Template Start=====</h3>
|
||||
|
||||
<b>Company Home Space:</b> ${companyhome.properties.name}
|
||||
<br>
|
||||
<b>My Home Space:</b> ${userhome.properties.name}
|
||||
<br>
|
||||
<b>Company Home children count:</b> ${companyhome.children?size}
|
||||
<br>
|
||||
<b>Company Home first child node name:</b> ${companyhome.children[0].properties.name}
|
||||
<br>
|
||||
<b>Current Document Name:</b> ${document.name}
|
||||
<br>
|
||||
<b>Current Space Name:</b> ${space.name}
|
||||
|
||||
<h4>List of child spaces in my Home Space:</h4>
|
||||
<table>
|
||||
<#list userhome.children as child>
|
||||
<#if child.isContainer>
|
||||
<tr>
|
||||
<td><img src="/alfresco${child.icon32}"></td>
|
||||
<td><b>${child.properties.name}</b> (${child.children?size})</td>
|
||||
<td><b>Path:</b> ${child.displayPath}</td>
|
||||
</tr>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
||||
|
||||
<h4>List of docs in my Home Space (text only content shown inline, JPG images shown as thumbnails):</h4>
|
||||
<table>
|
||||
<#list userhome.children as child>
|
||||
<#if child.isDocument>
|
||||
<tr><td><img src="/alfresco${child.icon16}"></td><td><a href="/alfresco${child.url}">${child.properties.name}</a></td></tr>
|
||||
<#if child.mimetype = "text/plain">
|
||||
<tr><td></td><td>${child.content}</td></tr>
|
||||
<#elseif child.mimetype = "image/jpeg">
|
||||
<tr><td></td><td><img width=100 height=65 src="/alfresco${child.url}"></td></tr>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
||||
|
||||
<h4>Assoc example:</h4>
|
||||
<#if userhome.children[0].assocs["cm:contains"]?exists>
|
||||
${userhome.children[0].assocs["cm:contains"][0].name}
|
||||
</#if>
|
||||
|
||||
<h3>=====Example Template End=====</h3>
|
@@ -1,22 +0,0 @@
|
||||
<#-- Displays a table of all the documents from a "Press Releases" folder under Company Home -->
|
||||
<#-- Obviously this folder needs to exist and the docs in it should have the title and description fields set -->
|
||||
<table>
|
||||
<#list companyhome.children as child>
|
||||
<#if child.isContainer && child.name = "Press Releases">
|
||||
<#list child.children as doc>
|
||||
<#if doc.isDocument>
|
||||
<tr>
|
||||
<td><h3>${doc.properties.title}</h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left:4px"><b>${doc.properties.description}</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left:8px"><small>${doc.content}</small></td>
|
||||
</tr>
|
||||
<tr><td><div style="padding:6px"></div></td></tr>
|
||||
</#if>
|
||||
</#list>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
@@ -1,15 +0,0 @@
|
||||
<#-- List of docs in the Home Space for current user -->
|
||||
<#-- If the doc mimetype is plain/text then the content is shown inline -->
|
||||
<#-- If the doc mimetype is JPEG then the image is shown inline as a small thumbnail image -->
|
||||
<table>
|
||||
<#list userhome.children as child>
|
||||
<#if child.isDocument>
|
||||
<tr><td>${child.properties.name}</td></tr>
|
||||
<#if child.mimetype = "text/plain">
|
||||
<tr><td style='padding-left:16px'>${child.content}</td></tr>
|
||||
<#elseif child.mimetype = "image/jpeg">
|
||||
<tr><td style='padding-left:16px'><img width=100 height=65 src="/alfresco${child.url}"><td></tr>
|
||||
</#if>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
@@ -1,26 +0,0 @@
|
||||
<#-- Shows use of the childByNamePath, childrenByXPath and childrenByLuceneSearch API -->
|
||||
|
||||
<h3>Template Documents in 'Company Home/Data Dictionary/Presentation Templates':</h3>
|
||||
<table>
|
||||
<#list companyhome.childByNamePath["Data Dictionary/Presentation Templates"].children as child>
|
||||
<#if child.isDocument>
|
||||
<tr><td><a href="/alfresco${child.url}" target="new">${child.properties.name}</a></td></tr>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
||||
|
||||
<h3>Folders in 'Company Home/Data Dictionary/Space Templates/Software Engineering Project':</h3>
|
||||
<table>
|
||||
<#list companyhome.childrenByXPath["*[@cm:name='Data Dictionary']/*[@cm:name='Space Templates']/*[@cm:name='Software Engineering Project']/*"] as child>
|
||||
<#if child.isContainer>
|
||||
<tr><td><img src="/alfresco${child.icon32}"> ${child.properties.name}</td></tr>
|
||||
</#if>
|
||||
</#list>
|
||||
</table>
|
||||
|
||||
<h3>Lucene Search - documents containing the text 'Alfresco'</h3>
|
||||
<table>
|
||||
<#list companyhome.childrenByLuceneSearch["TEXT:alfresco"] as child>
|
||||
<tr><td><a href="/alfresco${child.url}" target="new">${child.properties.name}</a></td></tr>
|
||||
</#list>
|
||||
</table>
|
@@ -7,8 +7,8 @@
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:description>Displays basic information about the current document</cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/doc_info.ftl|mimetype=text/plain|size=636|encoding=UTF-8</cm:content>
|
||||
<cm:description>Displays useful information about the current document</cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/doc_info.ftl|mimetype=text/plain|size=1884|encoding=UTF-8</cm:content>
|
||||
<cm:title>doc_info.ftl</cm:title>
|
||||
<cm:name>doc_info.ftl</cm:name>
|
||||
</view:properties>
|
||||
@@ -84,20 +84,6 @@
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns="" view:childName="cm:RSS_2.0_recent_docs.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:description>Renders a valid RSS2.0 XML document showing the documents in the current space created or modified in the last 7 days. The template should be configured to use the appropriate server and port before use.</cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/RSS_2.0_recent_docs.ftl|mimetype=text/plain|size=1917|encoding=UTF-8</cm:content>
|
||||
<cm:title>RSS_2.0_recent_docs.ftl</cm:title>
|
||||
<cm:name>RSS_2.0_recent_docs.ftl</cm:name>
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns="" view:childName="cm:recent_docs.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
@@ -140,18 +126,4 @@
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
<cm:content xmlns:alf="http://www.alfresco.org" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns="" view:childName="cm:xpath_search.ftl">
|
||||
<view:aspects>
|
||||
<cm:titled></cm:titled>
|
||||
<app:inlineeditable></app:inlineeditable>
|
||||
</view:aspects>
|
||||
<view:properties>
|
||||
<app:editInline>true</app:editInline>
|
||||
<cm:description>Example of using XPath and Lucene searches within a template.</cm:description>
|
||||
<cm:content>contentUrl=classpath:alfresco/templates/content/examples/xpath_search.ftl|mimetype=text/plain|size=1109|encoding=UTF-8</cm:content>
|
||||
<cm:title>xpath_search.ftl</cm:title>
|
||||
<cm:name>xpath_search.ftl</cm:name>
|
||||
</view:properties>
|
||||
<view:associations></view:associations>
|
||||
</cm:content>
|
||||
</view:view>
|
@@ -7,7 +7,7 @@
|
||||
version.major=1
|
||||
version.minor=4
|
||||
version.revision=0
|
||||
version.label=Dev
|
||||
version.label=Preview
|
||||
|
||||
# Edition label
|
||||
|
||||
@@ -19,4 +19,4 @@ version.build=@build-number@
|
||||
|
||||
# Schema number
|
||||
|
||||
version.schema=20
|
||||
version.schema=21
|
||||
|
Reference in New Issue
Block a user