mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged V3.1 to HEAD
12923: New Enterprise Examples project containing hyperic plugin and README.txt 12908: A few fixes to improve consistency in JMX object naming 12889: Fix failing unit tests. Include linkvalidation in unit test classpath. 12885: Merged DEV/DAVEW_POST3D to V3.1 12881: Changes to allow monitoring of authentication configuration 12862: Merged DEV/3.1_ENTERPRISE_ONLY to DEV/DAVEW_POST3D 12797: Changes to allow persistence of changes made by JMX. 12852: Review comment from Derek: remove dependencies of descriptor service (serverDescriptorDAO, currentRepoDescriptorDAO and installedRepoDescriptorDAO) out of bootstrap-context.xml 12849: Correction to JAWS-221: dbscripts directory must be directly under config/alfresco in enterprise project. 12847: JAWS-221: Move proprietary DB create/upgrade scripts into Enterprise Only project 12845: Avoid NullPointerExceptions in status templates when no codeName or description exists for the status code git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13513 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -449,64 +449,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="serverDescriptorDAO" class="org.alfresco.repo.descriptor.ServerDescriptorDAOImpl">
|
|
||||||
<property name="repositoryName">
|
|
||||||
<value>${repository.name}</value>
|
|
||||||
</property>
|
|
||||||
<property name="resource">
|
|
||||||
<value>classpath:alfresco/version.properties</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="currentRepoDescriptorDAO" class="org.alfresco.repo.descriptor.RepositoryDescriptorDAOImpl">
|
|
||||||
<property name="name">
|
|
||||||
<value>system.descriptor.current.childname</value>
|
|
||||||
</property>
|
|
||||||
<property name="systemBootstrap">
|
|
||||||
<ref bean="systemBootstrap"/>
|
|
||||||
</property>
|
|
||||||
<property name="transactionService">
|
|
||||||
<ref bean="transactionService"/>
|
|
||||||
</property>
|
|
||||||
<property name="namespaceService">
|
|
||||||
<ref bean="namespaceService"/>
|
|
||||||
</property>
|
|
||||||
<property name="nodeService">
|
|
||||||
<ref bean="nodeService"/>
|
|
||||||
</property>
|
|
||||||
<property name="contentService">
|
|
||||||
<ref bean="contentService"/>
|
|
||||||
</property>
|
|
||||||
<property name="searchService">
|
|
||||||
<ref bean="searchService"/>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="installedRepoDescriptorDAO" class="org.alfresco.repo.descriptor.RepositoryDescriptorDAOImpl">
|
|
||||||
<property name="name">
|
|
||||||
<value>system.descriptor.childname</value>
|
|
||||||
</property>
|
|
||||||
<property name="systemBootstrap">
|
|
||||||
<ref bean="systemBootstrap"/>
|
|
||||||
</property>
|
|
||||||
<property name="transactionService">
|
|
||||||
<ref bean="transactionService"/>
|
|
||||||
</property>
|
|
||||||
<property name="namespaceService">
|
|
||||||
<ref bean="namespaceService"/>
|
|
||||||
</property>
|
|
||||||
<property name="nodeService">
|
|
||||||
<ref bean="nodeService"/>
|
|
||||||
</property>
|
|
||||||
<property name="contentService">
|
|
||||||
<ref bean="contentService"/>
|
|
||||||
</property>
|
|
||||||
<property name="searchService">
|
|
||||||
<ref bean="searchService"/>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- This component checks the interconnection between the metadata, indexes and content -->
|
<!-- This component checks the interconnection between the metadata, indexes and content -->
|
||||||
<bean id="configurationChecker" class="org.alfresco.repo.admin.ConfigurationChecker">
|
<bean id="configurationChecker" class="org.alfresco.repo.admin.ConfigurationChecker">
|
||||||
<property name="strict">
|
<property name="strict">
|
||||||
|
@@ -1198,4 +1198,62 @@
|
|||||||
<value>/sys:system-registry</value>
|
<value>/sys:system-registry</value>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="serverDescriptorDAO" class="org.alfresco.repo.descriptor.ServerDescriptorDAOImpl">
|
||||||
|
<property name="repositoryName">
|
||||||
|
<value>${repository.name}</value>
|
||||||
|
</property>
|
||||||
|
<property name="resource">
|
||||||
|
<value>classpath:alfresco/version.properties</value>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="currentRepoDescriptorDAO" class="org.alfresco.repo.descriptor.RepositoryDescriptorDAOImpl">
|
||||||
|
<property name="name">
|
||||||
|
<value>system.descriptor.current.childname</value>
|
||||||
|
</property>
|
||||||
|
<property name="systemBootstrap">
|
||||||
|
<ref bean="systemBootstrap"/>
|
||||||
|
</property>
|
||||||
|
<property name="transactionService">
|
||||||
|
<ref bean="transactionService"/>
|
||||||
|
</property>
|
||||||
|
<property name="namespaceService">
|
||||||
|
<ref bean="namespaceService"/>
|
||||||
|
</property>
|
||||||
|
<property name="nodeService">
|
||||||
|
<ref bean="nodeService"/>
|
||||||
|
</property>
|
||||||
|
<property name="contentService">
|
||||||
|
<ref bean="contentService"/>
|
||||||
|
</property>
|
||||||
|
<property name="searchService">
|
||||||
|
<ref bean="searchService"/>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<bean id="installedRepoDescriptorDAO" class="org.alfresco.repo.descriptor.RepositoryDescriptorDAOImpl">
|
||||||
|
<property name="name">
|
||||||
|
<value>system.descriptor.childname</value>
|
||||||
|
</property>
|
||||||
|
<property name="systemBootstrap">
|
||||||
|
<ref bean="systemBootstrap"/>
|
||||||
|
</property>
|
||||||
|
<property name="transactionService">
|
||||||
|
<ref bean="transactionService"/>
|
||||||
|
</property>
|
||||||
|
<property name="namespaceService">
|
||||||
|
<ref bean="namespaceService"/>
|
||||||
|
</property>
|
||||||
|
<property name="nodeService">
|
||||||
|
<ref bean="nodeService"/>
|
||||||
|
</property>
|
||||||
|
<property name="contentService">
|
||||||
|
<ref bean="contentService"/>
|
||||||
|
</property>
|
||||||
|
<property name="searchService">
|
||||||
|
<ref bean="searchService"/>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@@ -1,37 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Activities Schema - Extras (Indexes, Sequences)
|
|
||||||
-- Database: PostgreSQL
|
|
||||||
-- Since: V3.0.0 Schema
|
|
||||||
--
|
|
||||||
|
|
||||||
-- Activity Post
|
|
||||||
CREATE SEQUENCE alf_activity_post_seq START WITH 1 INCREMENT BY 1;
|
|
||||||
CREATE INDEX post_jobtasknode_idx ON alf_activity_post(job_task_node);
|
|
||||||
CREATE INDEX post_status_idx ON alf_activity_post(status);
|
|
||||||
|
|
||||||
-- Activity Feed
|
|
||||||
CREATE SEQUENCE alf_activity_feed_seq START WITH 1 INCREMENT BY 1;
|
|
||||||
|
|
||||||
CREATE INDEX feed_postdate_idx ON alf_activity_feed(post_date);
|
|
||||||
CREATE INDEX feed_postuserid_idx ON alf_activity_feed(post_user_id);
|
|
||||||
CREATE INDEX feed_feeduserid_idx ON alf_activity_feed(feed_user_id);
|
|
||||||
CREATE INDEX feed_sitenetwork_idx ON alf_activity_feed(site_network);
|
|
||||||
CREATE INDEX feed_activityformat_idx ON alf_activity_feed(activity_format);
|
|
||||||
|
|
||||||
-- Activity Feed Control
|
|
||||||
CREATE SEQUENCE alf_activity_feed_control_seq START WITH 1 INCREMENT BY 1;
|
|
||||||
|
|
||||||
CREATE INDEX feedctrl_feeduserid_idx ON alf_activity_feed_control(feed_user_id);
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V3.0-0-CreateActivitiesExtras';
|
|
||||||
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.db-V3.0-0-CreateActivitiesExtras', 'Executed script create V3.0: Created activities extras',
|
|
||||||
0, 125, -1, 126, null, 'UNKNOWN', TRUE, TRUE, 'Script completed'
|
|
||||||
);
|
|
@@ -1,636 +0,0 @@
|
|||||||
-- ------------------------------------------------------
|
|
||||||
-- 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);
|
|
@@ -1,92 +0,0 @@
|
|||||||
-- ------------------------------------------------------
|
|
||||||
-- Alfresco Schema conversion V1.3 to V1.4 Part 1 (Oracle)
|
|
||||||
--
|
|
||||||
-- Adds the columns required to enforce the duplicate name detection
|
|
||||||
--
|
|
||||||
-- Author: Derek Hulley
|
|
||||||
-- ------------------------------------------------------
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Unique name constraint
|
|
||||||
--
|
|
||||||
|
|
||||||
-- Apply new schema changes to child assoc table
|
|
||||||
ALTER TABLE child_assoc ADD
|
|
||||||
(
|
|
||||||
child_node_name VARCHAR2(50 CHAR) DEFAULT 'V1.4 upgrade' NOT NULL,
|
|
||||||
child_node_name_crc NUMBER(19,0) DEFAULT -1 NOT NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
UPDATE child_assoc
|
|
||||||
SET child_node_name_crc = id * -1;
|
|
||||||
|
|
||||||
CREATE UNIQUE INDEX IDX_CHILD_NAMECRC ON child_assoc (parent_node_id, type_qname, child_node_name, child_node_name_crc);
|
|
||||||
|
|
||||||
-- Apply unique index for node associations
|
|
||||||
CREATE UNIQUE INDEX IDX_ASSOC ON node_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;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- The table renames will cause Hibernate to rehash the FK constraint names
|
|
||||||
--
|
|
||||||
ALTER TABLE alf_access_control_entry RENAME CONSTRAINT FKF064DF7560601995 TO FKFFF41F9960601995;
|
|
||||||
ALTER TABLE alf_access_control_entry RENAME CONSTRAINT FKF064DF75B25A50BF TO FKFFF41F99B25A50BF;
|
|
||||||
ALTER TABLE alf_access_control_entry RENAME CONSTRAINT FKF064DF75B9553F6C TO FKFFF41F99B9553F6C;
|
|
||||||
ALTER TABLE alf_auth_ext_keys RENAME CONSTRAINT FK31D3BA097B7FDE43 TO FK8A749A657B7FDE43;
|
|
||||||
ALTER TABLE alf_child_assoc RENAME CONSTRAINT FKC6EFFF3274173FF4 TO FKFFC5468E74173FF4;
|
|
||||||
ALTER TABLE alf_child_assoc RENAME CONSTRAINT FKC6EFFF328E50E582 TO FKFFC5468E8E50E582;
|
|
||||||
ALTER TABLE alf_node RENAME CONSTRAINT FK33AE02B9553F6C TO FK60EFB626B9553F6C;
|
|
||||||
ALTER TABLE alf_node RENAME CONSTRAINT FK33AE02D24ADD25 TO FK60EFB626D24ADD25;
|
|
||||||
ALTER TABLE alf_node_properties RENAME CONSTRAINT FKC962BF907F2C8017 TO FK7D4CF8EC7F2C8017;
|
|
||||||
ALTER TABLE alf_node_aspects RENAME CONSTRAINT FK2B91A9DE7F2C8017 TO FKD654E027F2C8017;
|
|
||||||
ALTER TABLE alf_node_assoc RENAME CONSTRAINT FK5BAEF398B69C43F3 TO FKE1A550BCB69C43F3;
|
|
||||||
ALTER TABLE alf_node_assoc RENAME CONSTRAINT FK5BAEF398A8FC7769 TO FKE1A550BCA8FC7769;
|
|
||||||
ALTER TABLE alf_node_status RENAME CONSTRAINT FK38ECB8CF7F2C8017 TO FK71C2002B7F2C8017;
|
|
||||||
ALTER TABLE alf_store RENAME CONSTRAINT FK68AF8E122DBA5BA TO FKBD4FF53D22DBA5BA;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Rename the indexes to keep in synch with the new table names. For Oracle, Hibernate doesn't create or add these
|
|
||||||
--
|
|
||||||
ALTER INDEX FKF064DF7560601995 RENAME TO FKFFF41F9960601995;
|
|
||||||
ALTER INDEX FKF064DF75B25A50BF RENAME TO FKFFF41F99B25A50BF;
|
|
||||||
ALTER INDEX FKF064DF75B9553F6C RENAME TO FKFFF41F99B9553F6C;
|
|
||||||
ALTER INDEX FK31D3BA097B7FDE43 RENAME TO FK8A749A657B7FDE43;
|
|
||||||
ALTER INDEX FKC6EFFF3274173FF4 RENAME TO FKFFC5468E74173FF4;
|
|
||||||
ALTER INDEX FKC6EFFF328E50E582 RENAME TO FKFFC5468E8E50E582;
|
|
||||||
ALTER INDEX FK33AE02B9553F6C RENAME TO FK60EFB626B9553F6C;
|
|
||||||
ALTER INDEX FK33AE02D24ADD25 RENAME TO FK60EFB626D24ADD25;
|
|
||||||
ALTER INDEX FKC962BF907F2C8017 RENAME TO FK7D4CF8EC7F2C8017;
|
|
||||||
ALTER INDEX FK2B91A9DE7F2C8017 RENAME TO FKD654E027F2C8017;
|
|
||||||
ALTER INDEX FK5BAEF398B69C43F3 RENAME TO FKE1A550BCB69C43F3;
|
|
||||||
ALTER INDEX FK5BAEF398A8FC7769 RENAME TO FKE1A550BCA8FC7769;
|
|
||||||
ALTER INDEX FK38ECB8CF7F2C8017 RENAME TO FK71C2002B7F2C8017;
|
|
||||||
ALTER INDEX FK68AF8E122DBA5BA RENAME TO FKBD4FF53D22DBA5BA;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- 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, sysdate, 'UNKOWN', 1, 1, 'Script completed'
|
|
||||||
);
|
|
@@ -1,69 +0,0 @@
|
|||||||
-- ------------------------------------------------------
|
|
||||||
-- Alfresco Schema conversion V1.3 to V1.4 Part 2 (Oracle)
|
|
||||||
--
|
|
||||||
-- 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 number(19,0) not null,
|
|
||||||
ip_address varchar2(15 char) not null,
|
|
||||||
primary key (id),
|
|
||||||
unique (ip_address)
|
|
||||||
);
|
|
||||||
insert into alf_server (id, ip_address) values (0, '0.0.0.0');
|
|
||||||
|
|
||||||
create table alf_transaction
|
|
||||||
(
|
|
||||||
id number(19,0) not null,
|
|
||||||
server_id number(19,0),
|
|
||||||
change_txn_id varchar2(56 char) not null,
|
|
||||||
primary key (id)
|
|
||||||
);
|
|
||||||
alter table alf_transaction add constraint FKB8761A3A9AE340B7 foreign key (server_id) references alf_server;
|
|
||||||
create index FKB8761A3A9AE340B7 on alf_transaction (server_id);
|
|
||||||
|
|
||||||
insert into alf_transaction
|
|
||||||
(
|
|
||||||
id, server_id, change_txn_id
|
|
||||||
)
|
|
||||||
select
|
|
||||||
hibernate_sequence.nextval,
|
|
||||||
(select max(id) from alf_server),
|
|
||||||
change_txn_id
|
|
||||||
from alf_node_status;
|
|
||||||
|
|
||||||
-- Alter node status
|
|
||||||
alter table alf_node_status add
|
|
||||||
(
|
|
||||||
transaction_id number(19,0) DEFAULT 0 NOT NULL
|
|
||||||
);
|
|
||||||
-- 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 and rownum = 1
|
|
||||||
);
|
|
||||||
alter table alf_node_status DROP COLUMN change_txn_id;
|
|
||||||
alter table alf_node_status ADD CONSTRAINT FK71C2002B9E57C13D FOREIGN KEY (transaction_id) REFERENCES alf_transaction (id);
|
|
||||||
create index FK71C2002B9E57C13D on alf_node_status (transaction_id);
|
|
||||||
alter table alf_node_status DROP COLUMN deleted;(optional)
|
|
||||||
|
|
||||||
--
|
|
||||||
-- 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, sysdate, 'UNKOWN', 1, 1, 'Script completed'
|
|
||||||
);
|
|
@@ -1,17 +0,0 @@
|
|||||||
--
|
|
||||||
-- Explicit index for alf_transaction.commit_time_ms (PostgreSQL 1.4)
|
|
||||||
--
|
|
||||||
|
|
||||||
UPDATE alf_transaction SET commit_time_ms = id WHERE commit_time_ms IS NULL;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
delete from alf_applied_patch where id = 'patch.db-V1.4-TxnCommitTimeIndex';
|
|
||||||
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.db-V1.4-TxnCommitTimeIndex', 'Executed script AlfrescoSchemaUpdate-1.4-TxnCommitTimeIndex.sql',
|
|
||||||
0, 75, -1, 76, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
|
|
||||||
);
|
|
@@ -1,24 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Indexes for alf_content_url table
|
|
||||||
-- Database: PostgreSQL
|
|
||||||
-- Since: V2.0 Schema 44
|
|
||||||
-- Author: Derek Hulley
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
|
|
||||||
-- Content URLs
|
|
||||||
SELECT COUNT(*) FROM alf_content_url;
|
|
||||||
CREATE INDEX idx_alf_con_urls ON alf_content_url (content_url);(optional)
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.0-ContentUrls';
|
|
||||||
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.db-V2.0-ContentUrls', 'Manually executed script upgrade V2.0: Indexes for alf_content_url table',
|
|
||||||
0, 123, -1, 124, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
|
|
||||||
);
|
|
@@ -1,22 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Jbpm 3.2 Process Instance Key
|
|
||||||
-- Database: SQL Server
|
|
||||||
-- Since: V2.1 Schema 63
|
|
||||||
-- Author: David Caruana
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
|
|
||||||
UPDATE JBPM_PROCESSINSTANCE SET KEY_ = STR(ID_) WHERE KEY_ IS NULL;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-JBPMProcessKey';
|
|
||||||
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.db-V2.1-JBPMProcessKey', 'Manually executed script upgrade V2.1: JBPM 3.2 Process Instance Key',
|
|
||||||
0, 62, -1, 63, null, 'UNKOWN', 1, 1, 'Script completed'
|
|
||||||
);
|
|
@@ -1,21 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Add text columns that allow null
|
|
||||||
-- Database: SQL Server
|
|
||||||
-- Since: V2.1 Schema 64
|
|
||||||
-- Author: Derek Hulley
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
-- This is a Sybase issue, so nothing is required here.
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-NotNullColumns';
|
|
||||||
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.db-V2.1-NotNullColumns', 'Manually executed script upgrade V2.1: Add nullable columns',
|
|
||||||
0, 63, -1, 64, null, 'UNKOWN', 1, 1, 'Script completed'
|
|
||||||
);
|
|
@@ -1,29 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Jbpm 3.1.2 -> 3.2 Data Migration
|
|
||||||
-- Database: PostgreSQL
|
|
||||||
-- Since: V2.1 Schema 52
|
|
||||||
-- Author: David Caruana
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
|
|
||||||
UPDATE JBPM_TASK SET PRIORITY_ = 2;
|
|
||||||
UPDATE JBPM_NODE SET ISASYNCEXCL_ = FALSE;
|
|
||||||
UPDATE JBPM_MODULEINSTANCE SET VERSION_ = 0;
|
|
||||||
UPDATE JBPM_POOLEDACTOR SET VERSION_ = 0;
|
|
||||||
UPDATE JBPM_SWIMLANEINSTANCE SET VERSION_ = 0;
|
|
||||||
UPDATE JBPM_TASKINSTANCE SET VERSION_ = 0;
|
|
||||||
UPDATE JBPM_TOKENVARIABLEMAP SET VERSION_ = 0;
|
|
||||||
UPDATE JBPM_VARIABLEINSTANCE SET VERSION_ = 0;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-JBPMUpdate';
|
|
||||||
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.db-V2.1-JBPMUpdate', 'Manually executed script upgrade V2.1: JBPM 3.1.2 to 3.2 Data Upgrade',
|
|
||||||
0, 51, -1, 52, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
|
|
||||||
);
|
|
@@ -1,22 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Jbpm 3.2 Process Instance Key
|
|
||||||
-- Database: PostgreSQL
|
|
||||||
-- Since: V2.1 Schema 63
|
|
||||||
-- Author: David Caruana
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
|
|
||||||
UPDATE JBPM_PROCESSINSTANCE SET KEY_ = ID_ WHERE KEY_ IS NULL;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-JBPMProcessKey';
|
|
||||||
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.db-V2.1-JBPMProcessKey', 'Manually executed script upgrade V2.1: JBPM 3.2 Process Instance Key',
|
|
||||||
0, 62, -1, 63, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
|
|
||||||
);
|
|
@@ -1,21 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Add text columns that allow null
|
|
||||||
-- Database: PostgreSQL
|
|
||||||
-- Since: V2.1 Schema 64
|
|
||||||
-- Author: Derek Hulley
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
-- This is a Sybase issue, so nothing is required here.
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-NotNullColumns';
|
|
||||||
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.db-V2.1-NotNullColumns', 'Manually executed script upgrade V2.1: Add nullable columns',
|
|
||||||
0, 63, -1, 64, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
|
|
||||||
);
|
|
@@ -1,36 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Remove wcmwf:submitted Aspect
|
|
||||||
-- Database: PostgreSQL
|
|
||||||
-- Since: V2.1 Schema 73
|
|
||||||
-- Author: Derek Hulley
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
-- This removes the wcmwf:submitted aspect along with the wcmwf:workflowInstanceId property
|
|
||||||
-- from the AVM nodes.
|
|
||||||
-- PostgreSQL requires TRUE for boolean values.
|
|
||||||
|
|
||||||
DELETE FROM avm_aspects WHERE EXISTS
|
|
||||||
(
|
|
||||||
SELECT q.id FROM alf_qname q
|
|
||||||
JOIN alf_namespace n ON (q.ns_id = n.id)
|
|
||||||
WHERE n.uri = 'http://www.alfresco.org/model/wcmworkflow/1.0' and q.local_name = 'submitted' AND q.id = avm_aspects.qname_id
|
|
||||||
);
|
|
||||||
DELETE FROM avm_node_properties WHERE EXISTS
|
|
||||||
(
|
|
||||||
SELECT q.id FROM alf_qname q
|
|
||||||
JOIN alf_namespace n ON (q.ns_id = n.id)
|
|
||||||
WHERE n.uri = 'http://www.alfresco.org/model/wcmworkflow/1.0' and q.local_name = 'workflowInstanceId' AND q.id = avm_node_properties.qname_id
|
|
||||||
);
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-RemoveWcmSubmittedAspect';
|
|
||||||
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.db-V2.1-RemoveWcmSubmittedAspect', 'Manually executed script upgrade V2.1: Remove wcmwf:submitted aspect',
|
|
||||||
0, 72, -1, 73, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
|
|
||||||
);
|
|
@@ -1,33 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: Fill 'version' columns with data
|
|
||||||
-- Database: PostgreSQL
|
|
||||||
-- Since: V2.1 Schema 54
|
|
||||||
-- Author: Derek Hulley
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
|
|
||||||
UPDATE alf_store SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_node SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_child_assoc SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_node_assoc SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_node_status SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_transaction SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_server SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_access_control_list SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_access_control_entry SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_permission SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_authority SET version = 1 WHERE version IS NULL;
|
|
||||||
UPDATE alf_version_count SET version = 1 WHERE version IS NULL;
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-VersionColumns2';
|
|
||||||
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.db-V2.1-VersionColumns2', 'Manually executed script upgrade V2.1: Created initial version number for ADM entities',
|
|
||||||
0, 63, -1, 64, null, 'UNKOWN', TRUE, TRUE, 'Script completed'
|
|
||||||
);
|
|
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
* Solution to PostgreSQL issue:
|
|
||||||
* function information_schema._pg_keypositions() does not exist
|
|
||||||
* Taken from: http://archives.postgresql.org/pgsql-general/2005-12/msg00060.php
|
|
||||||
* Author: Jason Long
|
|
||||||
* Tested against PostgreSQL 8.2
|
|
||||||
* First seen during upgrade testing of PostgreSQL from Alfresco 1.4.3 to 2.0
|
|
||||||
*/
|
|
||||||
SET search_path TO information_schema, public;
|
|
||||||
CREATE FUNCTION _pg_keypositions() RETURNS SETOF integer
|
|
||||||
LANGUAGE sql
|
|
||||||
IMMUTABLE
|
|
||||||
AS 'select g.s
|
|
||||||
from generate_series(1,current_setting(''max_index_keys'')::int,1)
|
|
||||||
as g(s)';
|
|
@@ -1,53 +0,0 @@
|
|||||||
--
|
|
||||||
-- Title: ADD text columns that allow null
|
|
||||||
-- Database: Sybase
|
|
||||||
-- Since: V2.1 Schema 64
|
|
||||||
-- Author: Derek Hulley
|
|
||||||
--
|
|
||||||
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
|
||||||
--
|
|
||||||
-- Sybase won't allow ALTER TABLE commands where the text columns are not null.
|
|
||||||
-- Where the nullability is not explicitly set, Sybase assumes NOT NULL.
|
|
||||||
|
|
||||||
-- JBPM
|
|
||||||
ALTER TABLE JBPM_NODE ADD DESCRIPTION_ text NULL;
|
|
||||||
ALTER TABLE JBPM_NODE ADD ISASYNCEXCL_ tinyint DEFAULT 0;
|
|
||||||
ALTER TABLE JBPM_NODE ADD SUBPROCNAME_ text NULL;
|
|
||||||
ALTER TABLE JBPM_NODE ADD SCRIPT_ numeric(19,0) NULL;
|
|
||||||
ALTER TABLE JBPM_PROCESSDEFINITION ADD CLASS_ char(1) NOT NULL DEFAULT 'P';
|
|
||||||
ALTER TABLE JBPM_PROCESSDEFINITION ADD DESCRIPTION_ text NULL;
|
|
||||||
ALTER TABLE JBPM_PROCESSINSTANCE ADD KEY_ text NULL;
|
|
||||||
ALTER TABLE JBPM_TASK ADD CONDITION_ text NULL;
|
|
||||||
ALTER TABLE JBPM_TASK ADD PRIORITY_ int DEFAULT 2;
|
|
||||||
ALTER TABLE JBPM_TASKINSTANCE ADD PROCINST_ numeric(19,0) NULL;
|
|
||||||
ALTER TABLE JBPM_TOKEN ADD LOCK_ text NULL;
|
|
||||||
ALTER TABLE JBPM_TRANSITION ADD DESCRIPTION_ text NULL;
|
|
||||||
ALTER TABLE JBPM_TRANSITION ADD CONDITION_ text NULL;
|
|
||||||
|
|
||||||
-- ALFRESCO
|
|
||||||
ALTER TABLE alf_access_control_entry ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_access_control_list ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_authority ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_child_assoc ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_node ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_node_assoc ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_node_properties ADD attribute_value numeric(19,0) NULL;
|
|
||||||
ALTER TABLE alf_node_status ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_permission ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_server ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_store ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_transaction ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
ALTER TABLE alf_version_count ADD version numeric(19,0) DEFAULT 0;
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- Record script finish
|
|
||||||
--
|
|
||||||
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V2.1-NotNullColumns';
|
|
||||||
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.db-V2.1-NotNullColumns', 'Manually executed script upgrade V2.1: ADD nullable text columns for Sybase',
|
|
||||||
0, 63, -1, 64, null, 'UNKOWN', 1, 1, 'Script completed'
|
|
||||||
);
|
|
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
* As a special exception to the terms and conditions of version 2.0 of
|
||||||
|
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||||
|
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||||
|
* FLOSS exception. You should have received a copy of the text describing
|
||||||
|
* the FLOSS exception, and it is also available here:
|
||||||
|
* http://www.alfresco.com/legal/licensing"
|
||||||
|
*/
|
||||||
|
package org.alfresco.repo.domain.schema;
|
||||||
|
|
||||||
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class of event that notifies the listener of the availability of the Alfresco Database Schema. Any class requiring
|
||||||
|
* the database must wait until after this event.
|
||||||
|
*
|
||||||
|
* @author dward
|
||||||
|
*/
|
||||||
|
public class SchemaAvailableEvent extends ApplicationEvent
|
||||||
|
{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -1882393521985043422L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Constructor.
|
||||||
|
*
|
||||||
|
* @param source
|
||||||
|
* the source of the event
|
||||||
|
*/
|
||||||
|
public SchemaAvailableEvent(Object source)
|
||||||
|
{
|
||||||
|
super(source);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -1183,6 +1183,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
cfg.setProperty(Environment.CONNECTION_PROVIDER, defaultConnectionProviderFactoryClass);
|
cfg.setProperty(Environment.CONNECTION_PROVIDER, defaultConnectionProviderFactoryClass);
|
||||||
|
|
||||||
// all done successfully
|
// all done successfully
|
||||||
|
((ApplicationContext) event.getSource()).publishEvent(new SchemaAvailableEvent(this));
|
||||||
}
|
}
|
||||||
catch (Throwable e)
|
catch (Throwable e)
|
||||||
{
|
{
|
||||||
|
@@ -28,6 +28,7 @@ import java.util.List;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.alfresco.repo.cache.SimpleCache;
|
import org.alfresco.repo.cache.SimpleCache;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
|
|
||||||
@@ -76,6 +77,7 @@ public abstract class AbstractAuthenticationService implements AuthenticationSer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowedUsers(List<String> allowedUsers)
|
public void setAllowedUsers(List<String> allowedUsers)
|
||||||
{
|
{
|
||||||
if (initialised)
|
if (initialised)
|
||||||
@@ -105,6 +107,7 @@ public abstract class AbstractAuthenticationService implements AuthenticationSer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setMaxUsers(int maxUsers)
|
public void setMaxUsers(int maxUsers)
|
||||||
{
|
{
|
||||||
if (initialised)
|
if (initialised)
|
||||||
|
@@ -31,6 +31,8 @@ import net.sf.acegisecurity.AuthenticationManager;
|
|||||||
import net.sf.acegisecurity.UserDetails;
|
import net.sf.acegisecurity.UserDetails;
|
||||||
import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
import net.sf.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||||
|
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
|
|
||||||
public class AuthenticationComponentImpl extends AbstractAuthenticationComponent
|
public class AuthenticationComponentImpl extends AbstractAuthenticationComponent
|
||||||
{
|
{
|
||||||
private MutableAuthenticationDao authenticationDao;
|
private MutableAuthenticationDao authenticationDao;
|
||||||
@@ -57,6 +59,7 @@ public class AuthenticationComponentImpl extends AbstractAuthenticationComponent
|
|||||||
*
|
*
|
||||||
* @param authenticationDao
|
* @param authenticationDao
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAuthenticationDao(MutableAuthenticationDao authenticationDao)
|
public void setAuthenticationDao(MutableAuthenticationDao authenticationDao)
|
||||||
{
|
{
|
||||||
this.authenticationDao = authenticationDao;
|
this.authenticationDao = authenticationDao;
|
||||||
|
@@ -28,6 +28,7 @@ import java.util.Collections;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationComponent.UserNameValidationMode;
|
import org.alfresco.repo.security.authentication.AuthenticationComponent.UserNameValidationMode;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.alfresco.service.cmr.security.PermissionService;
|
import org.alfresco.service.cmr.security.PermissionService;
|
||||||
|
|
||||||
public class AuthenticationServiceImpl extends AbstractAuthenticationService
|
public class AuthenticationServiceImpl extends AbstractAuthenticationService
|
||||||
@@ -51,6 +52,7 @@ public class AuthenticationServiceImpl extends AbstractAuthenticationService
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAuthenticationDao(MutableAuthenticationDao authenticationDao)
|
public void setAuthenticationDao(MutableAuthenticationDao authenticationDao)
|
||||||
{
|
{
|
||||||
this.authenticationDao = authenticationDao;
|
this.authenticationDao = authenticationDao;
|
||||||
@@ -61,6 +63,7 @@ public class AuthenticationServiceImpl extends AbstractAuthenticationService
|
|||||||
this.ticketComponent = ticketComponent;
|
this.ticketComponent = ticketComponent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
|
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
|
||||||
{
|
{
|
||||||
this.authenticationComponent = authenticationComponent;
|
this.authenticationComponent = authenticationComponent;
|
||||||
|
@@ -29,6 +29,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import net.sf.acegisecurity.Authentication;
|
import net.sf.acegisecurity.Authentication;
|
||||||
|
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.alfresco.service.cmr.security.PermissionService;
|
import org.alfresco.service.cmr.security.PermissionService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -72,6 +73,7 @@ public class ChainingAuthenticationComponentImpl implements AuthenticationCompon
|
|||||||
*
|
*
|
||||||
* @param authenticationComponents
|
* @param authenticationComponents
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAuthenticationComponents(List<AuthenticationComponent> authenticationComponents)
|
public void setAuthenticationComponents(List<AuthenticationComponent> authenticationComponents)
|
||||||
{
|
{
|
||||||
this.authenticationComponents = authenticationComponents;
|
this.authenticationComponents = authenticationComponents;
|
||||||
@@ -92,6 +94,7 @@ public class ChainingAuthenticationComponentImpl implements AuthenticationCompon
|
|||||||
*
|
*
|
||||||
* @param mutableAuthenticationComponent
|
* @param mutableAuthenticationComponent
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setMutableAuthenticationComponent(AuthenticationComponent mutableAuthenticationComponent)
|
public void setMutableAuthenticationComponent(AuthenticationComponent mutableAuthenticationComponent)
|
||||||
{
|
{
|
||||||
this.mutableAuthenticationComponent = mutableAuthenticationComponent;
|
this.mutableAuthenticationComponent = mutableAuthenticationComponent;
|
||||||
@@ -99,6 +102,7 @@ public class ChainingAuthenticationComponentImpl implements AuthenticationCompon
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setNtlmMode(NTLMMode ntlmMode)
|
public void setNtlmMode(NTLMMode ntlmMode)
|
||||||
{
|
{
|
||||||
this.ntlmMode = ntlmMode;
|
this.ntlmMode = ntlmMode;
|
||||||
|
@@ -29,6 +29,7 @@ import java.util.HashSet;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||||
import org.alfresco.service.cmr.security.PermissionService;
|
import org.alfresco.service.cmr.security.PermissionService;
|
||||||
|
|
||||||
@@ -69,6 +70,7 @@ public class ChainingAuthenticationServiceImpl extends AbstractAuthenticationSer
|
|||||||
return authenticationServices;
|
return authenticationServices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAuthenticationServices(List<AuthenticationService> authenticationServices)
|
public void setAuthenticationServices(List<AuthenticationService> authenticationServices)
|
||||||
{
|
{
|
||||||
this.authenticationServices = authenticationServices;
|
this.authenticationServices = authenticationServices;
|
||||||
@@ -79,6 +81,7 @@ public class ChainingAuthenticationServiceImpl extends AbstractAuthenticationSer
|
|||||||
return mutableAuthenticationService;
|
return mutableAuthenticationService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setMutableAuthenticationService(AuthenticationService mutableAuthenticationService)
|
public void setMutableAuthenticationService(AuthenticationService mutableAuthenticationService)
|
||||||
{
|
{
|
||||||
this.mutableAuthenticationService = mutableAuthenticationService;
|
this.mutableAuthenticationService = mutableAuthenticationService;
|
||||||
|
@@ -30,6 +30,7 @@ import net.sf.acegisecurity.UserDetails;
|
|||||||
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
|
import net.sf.acegisecurity.providers.dao.UsernameNotFoundException;
|
||||||
|
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.springframework.dao.DataAccessException;
|
import org.springframework.dao.DataAccessException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -429,81 +430,97 @@ public class DefaultMutableAuthenticationDao implements MutableAuthenticationDao
|
|||||||
// Bean IOC //
|
// Bean IOC //
|
||||||
// -------- //
|
// -------- //
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowCreateUser(boolean allowCreateUser)
|
public void setAllowCreateUser(boolean allowCreateUser)
|
||||||
{
|
{
|
||||||
this.allowCreateUser = allowCreateUser;
|
this.allowCreateUser = allowCreateUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowDeleteUser(boolean allowDeleteUser)
|
public void setAllowDeleteUser(boolean allowDeleteUser)
|
||||||
{
|
{
|
||||||
this.allowDeleteUser = allowDeleteUser;
|
this.allowDeleteUser = allowDeleteUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowGetAccountExpiryDate(boolean allowGetAccountExpiryDate)
|
public void setAllowGetAccountExpiryDate(boolean allowGetAccountExpiryDate)
|
||||||
{
|
{
|
||||||
this.allowGetAccountExpiryDate = allowGetAccountExpiryDate;
|
this.allowGetAccountExpiryDate = allowGetAccountExpiryDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowGetAccountHasExpired(boolean allowGetAccountHasExpired)
|
public void setAllowGetAccountHasExpired(boolean allowGetAccountHasExpired)
|
||||||
{
|
{
|
||||||
this.allowGetAccountHasExpired = allowGetAccountHasExpired;
|
this.allowGetAccountHasExpired = allowGetAccountHasExpired;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowGetAccountLocked(boolean allowGetAccountLocked)
|
public void setAllowGetAccountLocked(boolean allowGetAccountLocked)
|
||||||
{
|
{
|
||||||
this.allowGetAccountLocked = allowGetAccountLocked;
|
this.allowGetAccountLocked = allowGetAccountLocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowGetCredentialsExpire(boolean allowGetCredentialsExpire)
|
public void setAllowGetCredentialsExpire(boolean allowGetCredentialsExpire)
|
||||||
{
|
{
|
||||||
this.allowGetCredentialsExpire = allowGetCredentialsExpire;
|
this.allowGetCredentialsExpire = allowGetCredentialsExpire;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowGetCredentialsExpiryDate(boolean allowGetCredentialsExpiryDate)
|
public void setAllowGetCredentialsExpiryDate(boolean allowGetCredentialsExpiryDate)
|
||||||
{
|
{
|
||||||
this.allowGetCredentialsExpiryDate = allowGetCredentialsExpiryDate;
|
this.allowGetCredentialsExpiryDate = allowGetCredentialsExpiryDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowGetCredentialsHaveExpired(boolean allowGetCredentialsHaveExpired)
|
public void setAllowGetCredentialsHaveExpired(boolean allowGetCredentialsHaveExpired)
|
||||||
{
|
{
|
||||||
this.allowGetCredentialsHaveExpired = allowGetCredentialsHaveExpired;
|
this.allowGetCredentialsHaveExpired = allowGetCredentialsHaveExpired;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowGetEnabled(boolean allowGetEnabled)
|
public void setAllowGetEnabled(boolean allowGetEnabled)
|
||||||
{
|
{
|
||||||
this.allowGetEnabled = allowGetEnabled;
|
this.allowGetEnabled = allowGetEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowSetAccountExpires(boolean allowSetAccountExpires)
|
public void setAllowSetAccountExpires(boolean allowSetAccountExpires)
|
||||||
{
|
{
|
||||||
this.allowSetAccountExpires = allowSetAccountExpires;
|
this.allowSetAccountExpires = allowSetAccountExpires;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowSetAccountExpiryDate(boolean allowSetAccountExpiryDate)
|
public void setAllowSetAccountExpiryDate(boolean allowSetAccountExpiryDate)
|
||||||
{
|
{
|
||||||
this.allowSetAccountExpiryDate = allowSetAccountExpiryDate;
|
this.allowSetAccountExpiryDate = allowSetAccountExpiryDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowSetAccountLocked(boolean allowSetAccountLocked)
|
public void setAllowSetAccountLocked(boolean allowSetAccountLocked)
|
||||||
{
|
{
|
||||||
this.allowSetAccountLocked = allowSetAccountLocked;
|
this.allowSetAccountLocked = allowSetAccountLocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowSetCredentialsExpire(boolean allowSetCredentialsExpire)
|
public void setAllowSetCredentialsExpire(boolean allowSetCredentialsExpire)
|
||||||
{
|
{
|
||||||
this.allowSetCredentialsExpire = allowSetCredentialsExpire;
|
this.allowSetCredentialsExpire = allowSetCredentialsExpire;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowSetCredentialsExpiryDate(boolean allowSetCredentialsExpiryDate)
|
public void setAllowSetCredentialsExpiryDate(boolean allowSetCredentialsExpiryDate)
|
||||||
{
|
{
|
||||||
this.allowSetCredentialsExpiryDate = allowSetCredentialsExpiryDate;
|
this.allowSetCredentialsExpiryDate = allowSetCredentialsExpiryDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowSetEnabled(boolean allowSetEnabled)
|
public void setAllowSetEnabled(boolean allowSetEnabled)
|
||||||
{
|
{
|
||||||
this.allowSetEnabled = allowSetEnabled;
|
this.allowSetEnabled = allowSetEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowUpdateUser(boolean allowUpdateUser)
|
public void setAllowUpdateUser(boolean allowUpdateUser)
|
||||||
{
|
{
|
||||||
this.allowUpdateUser = allowUpdateUser;
|
this.allowUpdateUser = allowUpdateUser;
|
||||||
|
@@ -41,6 +41,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
|
|||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.tenant.TenantService;
|
import org.alfresco.repo.tenant.TenantService;
|
||||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||||
@@ -82,6 +83,7 @@ public class RepositoryAuthenticationDao implements MutableAuthenticationDao
|
|||||||
return userNamesAreCaseSensitive;
|
return userNamesAreCaseSensitive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive)
|
public void setUserNamesAreCaseSensitive(boolean userNamesAreCaseSensitive)
|
||||||
{
|
{
|
||||||
this.userNamesAreCaseSensitive = userNamesAreCaseSensitive;
|
this.userNamesAreCaseSensitive = userNamesAreCaseSensitive;
|
||||||
|
@@ -40,6 +40,7 @@ import javax.security.sasl.RealmCallback;
|
|||||||
import org.alfresco.i18n.I18NUtil;
|
import org.alfresco.i18n.I18NUtil;
|
||||||
import org.alfresco.repo.security.authentication.AbstractAuthenticationComponent;
|
import org.alfresco.repo.security.authentication.AbstractAuthenticationComponent;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JAAS based authentication
|
* JAAS based authentication
|
||||||
@@ -103,12 +104,14 @@ public class JAASAuthenticationComponent extends AbstractAuthenticationComponent
|
|||||||
|
|
||||||
// Springification
|
// Springification
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setJaasConfigEntryName(String jaasConfigEntryName)
|
public void setJaasConfigEntryName(String jaasConfigEntryName)
|
||||||
{
|
{
|
||||||
this.jaasConfigEntryName = jaasConfigEntryName;
|
this.jaasConfigEntryName = jaasConfigEntryName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setRealm(String realm)
|
public void setRealm(String realm)
|
||||||
{
|
{
|
||||||
this.realm = realm;
|
this.realm = realm;
|
||||||
|
@@ -29,6 +29,7 @@ import javax.naming.directory.InitialDirContext;
|
|||||||
|
|
||||||
import org.alfresco.repo.security.authentication.AbstractAuthenticationComponent;
|
import org.alfresco.repo.security.authentication.AbstractAuthenticationComponent;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently expects the cn name of the user which is in a fixed location.
|
* Currently expects the cn name of the user which is in a fixed location.
|
||||||
@@ -50,21 +51,25 @@ public class LDAPAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)
|
public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)
|
||||||
{
|
{
|
||||||
this.ldapInitialContextFactory = ldapInitialDirContextFactory;
|
this.ldapInitialContextFactory = ldapInitialDirContextFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setUserNameFormat(String userNameFormat)
|
public void setUserNameFormat(String userNameFormat)
|
||||||
{
|
{
|
||||||
this.userNameFormat = userNameFormat;
|
this.userNameFormat = userNameFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setEscapeCommasInBind(boolean escapeCommasInBind)
|
public void setEscapeCommasInBind(boolean escapeCommasInBind)
|
||||||
{
|
{
|
||||||
this.escapeCommasInBind = escapeCommasInBind;
|
this.escapeCommasInBind = escapeCommasInBind;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setEscapeCommasInUid(boolean escapeCommasInUid)
|
public void setEscapeCommasInUid(boolean escapeCommasInUid)
|
||||||
{
|
{
|
||||||
this.escapeCommasInUid = escapeCommasInUid;
|
this.escapeCommasInUid = escapeCommasInUid;
|
||||||
|
@@ -38,6 +38,7 @@ import javax.naming.directory.BasicAttributes;
|
|||||||
import javax.naming.directory.InitialDirContext;
|
import javax.naming.directory.InitialDirContext;
|
||||||
|
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.alfresco.util.ApplicationContextHelper;
|
import org.alfresco.util.ApplicationContextHelper;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
@@ -60,8 +61,8 @@ public class LDAPInitialDirContextFactoryImpl implements LDAPInitialDirContextFa
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setInitialDirContextEnvironment(Map<String, String> initialDirContextEnvironment)
|
public void setInitialDirContextEnvironment(Map<String, String> initialDirContextEnvironment)
|
||||||
|
|
||||||
{
|
{
|
||||||
this.initialDirContextEnvironment = initialDirContextEnvironment;
|
this.initialDirContextEnvironment = initialDirContextEnvironment;
|
||||||
}
|
}
|
||||||
@@ -236,7 +237,8 @@ public class LDAPInitialDirContextFactoryImpl implements LDAPInitialDirContextFa
|
|||||||
}
|
}
|
||||||
catch (NamingException nx)
|
catch (NamingException nx)
|
||||||
{
|
{
|
||||||
throw new AuthenticationException("Unable to connect to LDAP Server; check LDAP configuration", nx);
|
logger.error("Unable to connect to LDAP Server; check LDAP configuration", nx);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simple DN and password
|
// Simple DN and password
|
||||||
|
@@ -44,6 +44,7 @@ import javax.transaction.UserTransaction;
|
|||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.repo.importer.ExportSource;
|
import org.alfresco.repo.importer.ExportSource;
|
||||||
import org.alfresco.repo.importer.ExportSourceImporterException;
|
import org.alfresco.repo.importer.ExportSourceImporterException;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.alfresco.service.cmr.security.PersonService;
|
import org.alfresco.service.cmr.security.PersonService;
|
||||||
import org.alfresco.service.namespace.NamespaceService;
|
import org.alfresco.service.namespace.NamespaceService;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
@@ -84,21 +85,25 @@ public class LDAPPersonExportSource implements ExportSource
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setPersonQuery(String personQuery)
|
public void setPersonQuery(String personQuery)
|
||||||
{
|
{
|
||||||
this.personQuery = personQuery;
|
this.personQuery = personQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setSearchBase(String searchBase)
|
public void setSearchBase(String searchBase)
|
||||||
{
|
{
|
||||||
this.searchBase = searchBase;
|
this.searchBase = searchBase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setUserIdAttributeName(String userIdAttributeName)
|
public void setUserIdAttributeName(String userIdAttributeName)
|
||||||
{
|
{
|
||||||
this.userIdAttributeName = userIdAttributeName;
|
this.userIdAttributeName = userIdAttributeName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)
|
public void setLDAPInitialDirContextFactory(LDAPInitialDirContextFactory ldapInitialDirContextFactory)
|
||||||
{
|
{
|
||||||
this.ldapInitialContextFactory = ldapInitialDirContextFactory;
|
this.ldapInitialContextFactory = ldapInitialDirContextFactory;
|
||||||
@@ -109,6 +114,7 @@ public class LDAPPersonExportSource implements ExportSource
|
|||||||
this.personService = personService;
|
this.personService = personService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAttributeDefaults(Map<String, String> attributeDefaults)
|
public void setAttributeDefaults(Map<String, String> attributeDefaults)
|
||||||
{
|
{
|
||||||
this.attributeDefaults = attributeDefaults;
|
this.attributeDefaults = attributeDefaults;
|
||||||
@@ -119,11 +125,13 @@ public class LDAPPersonExportSource implements ExportSource
|
|||||||
this.namespaceService = namespaceService;
|
this.namespaceService = namespaceService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAttributeMapping(Map<String, String> attributeMapping)
|
public void setAttributeMapping(Map<String, String> attributeMapping)
|
||||||
{
|
{
|
||||||
this.attributeMapping = attributeMapping;
|
this.attributeMapping = attributeMapping;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Managed(category="Security")
|
||||||
public void setErrorOnMissingUID(boolean errorOnMissingUID)
|
public void setErrorOnMissingUID(boolean errorOnMissingUID)
|
||||||
{
|
{
|
||||||
this.errorOnMissingUID = errorOnMissingUID;
|
this.errorOnMissingUID = errorOnMissingUID;
|
||||||
|
@@ -56,6 +56,7 @@ import org.alfresco.model.ContentModel;
|
|||||||
import org.alfresco.repo.security.authentication.AbstractAuthenticationComponent;
|
import org.alfresco.repo.security.authentication.AbstractAuthenticationComponent;
|
||||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||||
import org.alfresco.repo.security.authentication.NTLMMode;
|
import org.alfresco.repo.security.authentication.NTLMMode;
|
||||||
|
import org.alfresco.service.Managed;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
import org.alfresco.service.cmr.repository.NodeService;
|
||||||
import org.alfresco.service.cmr.security.NoSuchPersonException;
|
import org.alfresco.service.cmr.security.NoSuchPersonException;
|
||||||
@@ -281,6 +282,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param domain String
|
* @param domain String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setDomain(String domain) {
|
public void setDomain(String domain) {
|
||||||
|
|
||||||
// Check if the passthru server list is already configured
|
// Check if the passthru server list is already configured
|
||||||
@@ -305,6 +307,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param servers String
|
* @param servers String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setServers(String servers) {
|
public void setServers(String servers) {
|
||||||
|
|
||||||
// Check if the passthru server list is already configured
|
// Check if the passthru server list is already configured
|
||||||
@@ -322,6 +325,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param useLocal String
|
* @param useLocal String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setUseLocalServer(String useLocal)
|
public void setUseLocalServer(String useLocal)
|
||||||
{
|
{
|
||||||
// Check if the local server should be used for authentication
|
// Check if the local server should be used for authentication
|
||||||
@@ -376,6 +380,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param guest String
|
* @param guest String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setGuestAccess(String guest)
|
public void setGuestAccess(String guest)
|
||||||
{
|
{
|
||||||
m_allowGuest = Boolean.parseBoolean(guest);
|
m_allowGuest = Boolean.parseBoolean(guest);
|
||||||
@@ -386,6 +391,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param auth String
|
* @param auth String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setAllowAuthUserAsGuest(String auth)
|
public void setAllowAuthUserAsGuest(String auth)
|
||||||
{
|
{
|
||||||
m_allowAuthUserAsGuest = Boolean.parseBoolean(auth);
|
m_allowAuthUserAsGuest = Boolean.parseBoolean(auth);
|
||||||
@@ -396,6 +402,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param nullDomain String
|
* @param nullDomain String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setNullDomainUseAnyServer(String nullDomain)
|
public void setNullDomainUseAnyServer(String nullDomain)
|
||||||
{
|
{
|
||||||
m_nullDomainUseAnyServer = Boolean.parseBoolean(nullDomain);
|
m_nullDomainUseAnyServer = Boolean.parseBoolean(nullDomain);
|
||||||
@@ -410,6 +417,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param providerClass String
|
* @param providerClass String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setJCEProvider(String providerClass)
|
public void setJCEProvider(String providerClass)
|
||||||
{
|
{
|
||||||
// Set the JCE provider, required to provide various encryption/hashing algorithms not available
|
// Set the JCE provider, required to provide various encryption/hashing algorithms not available
|
||||||
@@ -457,6 +465,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param sessTmo String
|
* @param sessTmo String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setSessionTimeout(String sessTmo)
|
public void setSessionTimeout(String sessTmo)
|
||||||
{
|
{
|
||||||
// Convert to an integer value and range check the timeout value
|
// Convert to an integer value and range check the timeout value
|
||||||
@@ -489,6 +498,7 @@ public class NTLMAuthenticationComponentImpl extends AbstractAuthenticationCompo
|
|||||||
*
|
*
|
||||||
* @param protoOrder String
|
* @param protoOrder String
|
||||||
*/
|
*/
|
||||||
|
@Managed(category="Security")
|
||||||
public void setProtocolOrder(String protoOrder)
|
public void setProtocolOrder(String protoOrder)
|
||||||
{
|
{
|
||||||
// Parse the protocol order list
|
// Parse the protocol order list
|
||||||
|
49
source/java/org/alfresco/service/Managed.java
Normal file
49
source/java/org/alfresco/service/Managed.java
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
|
* As a special exception to the terms and conditions of version 2.0 of
|
||||||
|
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||||
|
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||||
|
* FLOSS exception. You should have received a copy of the text describing
|
||||||
|
* the FLOSS exception, and it is also available here:
|
||||||
|
* http://www.alfresco.com/legal/licensing"
|
||||||
|
*/
|
||||||
|
package org.alfresco.service;
|
||||||
|
|
||||||
|
import java.lang.annotation.Documented;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A Marker annotation for setter methods we want to be exposed through JMX.
|
||||||
|
*
|
||||||
|
* @author dward
|
||||||
|
*/
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Documented
|
||||||
|
public @interface Managed
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A textual label used to group related beans together
|
||||||
|
*
|
||||||
|
* @return the category
|
||||||
|
*/
|
||||||
|
String category();
|
||||||
|
}
|
Reference in New Issue
Block a user