From 712e43d266148e1d30ada25df1f7a6a3beab56f8 Mon Sep 17 00:00:00 2001 From: pb Date: Sun, 21 Dec 2008 11:49:37 +0000 Subject: [PATCH] incorporate several APLAWS patches for ccm-ldn-atoz: r1741: Changed AtoZ to not hide a category when an alias has been defined for it; changed AtoZ to allow more than one alias to be defined for a category r1742: Added Category name in CategoryProviderAliasList.generateXML() r1743: Fixed AtoZCategoryAlias.getCategory() r1744: Changed CategoryProviderAliasForm to use the Ajax category tree r1747: Relaxed version requirements for ccm-ldn-aplaws r1750: Added AtoZCategoryProvider.excludeBlackListTypes() 1751: Bumped version (release) number git-svn-id: https://svn.libreccm.org/ccm/trunk@65 8810af33-2d31-482b-a856-94f89814c4df --- ccm-ldn-atoz/.classpath | 1 + ccm-ldn-atoz/application.xml | 5 +- .../london/atoz/AtoZCategoryProvider.pdl | 92 ++++++++----------- .../src/WEB-INF/resources/atoz-adapters.xml | 10 ++ ccm-ldn-atoz/src/ccm-ldn-atoz.upgrade | 3 + .../london/atoz/AtoZCategoryProvider.java | 32 +++++-- .../arsdigita/london/atoz/Initializer.java | 37 +++++--- .../ui/admin/CategoryProviderAliasForm.java | 38 +++----- .../ui/admin/CategoryProviderAliasList.java | 15 ++- .../web/__ccm__/apps/atoz/xsl/index.xsl | 37 +++++++- 10 files changed, 163 insertions(+), 107 deletions(-) diff --git a/ccm-ldn-atoz/.classpath b/ccm-ldn-atoz/.classpath index cd815ef8c..5b2c3d3bc 100755 --- a/ccm-ldn-atoz/.classpath +++ b/ccm-ldn-atoz/.classpath @@ -9,5 +9,6 @@ + diff --git a/ccm-ldn-atoz/application.xml b/ccm-ldn-atoz/application.xml index ba7a61374..483fc0ea0 100755 --- a/ccm-ldn-atoz/application.xml +++ b/ccm-ldn-atoz/application.xml @@ -2,11 +2,12 @@ + version="6.6.0" + release="4"> + diff --git a/ccm-ldn-atoz/pdl/com/arsdigita/london/atoz/AtoZCategoryProvider.pdl b/ccm-ldn-atoz/pdl/com/arsdigita/london/atoz/AtoZCategoryProvider.pdl index ebf737d41..90fb2f5cb 100755 --- a/ccm-ldn-atoz/pdl/com/arsdigita/london/atoz/AtoZCategoryProvider.pdl +++ b/ccm-ldn-atoz/pdl/com/arsdigita/london/atoz/AtoZCategoryProvider.pdl @@ -26,6 +26,18 @@ object type AtoZCategoryProvider extends AtoZProvider { reference key (atoz_cat_provider.provider_id); } +object type AtoZCategoryAlias { + BigDecimal[1..1] id = atoz_cat_aliases.object_id; + + Category[1..1] category = + join atoz_cat_aliases.category_id to cat_categories.category_id; + + String[1..1] letter = atoz_cat_aliases.letter CHAR(1); + String[1..1] title = atoz_cat_aliases.title VARCHAR(200); + + object key (id); +} + association { AtoZCategoryProvider[0..n] atozProvider1 = join cat_categories.category_id to atoz_cat_blacklist_map.category_id, @@ -38,16 +50,12 @@ association { } association { - AtoZCategoryProvider[0..n] atozProvider2 = join cat_categories.category_id - to atoz_cat_alias_map.category_id, - join atoz_cat_alias_map.provider_id - to atoz_cat_provider.provider_id; - Category[0..n] atozAliases = join atoz_cat_provider.provider_id - to atoz_cat_alias_map.provider_id, - join atoz_cat_alias_map.category_id - to cat_categories.category_id; - String[1..1] letter = atoz_cat_alias_map.letter CHAR(1); - String[1..1] title = atoz_cat_alias_map.title VARCHAR(200); + AtoZCategoryProvider[1..1] provider = + join atoz_cat_aliases.provider_id + to atoz_cat_provider.provider_id; + component AtoZCategoryAlias[0..n] aliases = + join atoz_cat_provider.provider_id + to atoz_cat_aliases.provider_id; } association { @@ -100,12 +108,6 @@ query getAtomicCategoryEntries { where b.category_id = c.category_id and b.provider_id = :providerID ) - and not exists ( - select 1 - from atoz_cat_alias_map b - where b.category_id = c.category_id - and b.provider_id = :providerID - ) and not exists ( select 1 from atoz_cat_ct_blacklist_map b, cat_object_category_map m, @@ -121,16 +123,16 @@ query getAtomicCategoryEntries { union select c.category_id as id, a.object_type as object_type, - m.title as title, + ca.title as title, c.description as description, - lower(m.letter) as sort_key + lower(ca.letter) as sort_key from cat_categories c, acs_objects a, - atoz_cat_alias_map m - where c.category_id = m.category_id + atoz_cat_aliases ca + where c.category_id = ca.category_id and c.category_id = a.object_id and c.enabled_p = '1' - and m.provider_id = :providerID + and ca.provider_id = :providerID } map { id = id; objectType = object_type; @@ -178,12 +180,6 @@ query getAtomicCategoryEntriesForRootCategory { ) and i2.subcategory_id = c.category_id ) - and not exists ( - select 1 - from atoz_cat_alias_map b - where b.category_id = c.category_id - and b.provider_id = :providerID - ) and not exists ( select 1 from atoz_cat_ct_blacklist_map b, cat_object_category_map m, @@ -199,16 +195,16 @@ query getAtomicCategoryEntriesForRootCategory { union select c.category_id as id, a.object_type as object_type, - m.title as title, + ca.title as title, c.description as description, - lower(m.letter) as sort_key + lower(ca.letter) as sort_key from cat_categories c, acs_objects a, - atoz_cat_alias_map m - where c.category_id = m.category_id + atoz_cat_aliases ca + where c.category_id = ca.category_id and c.category_id = a.object_id and c.enabled_p = '1' - and m.provider_id = :providerID + and ca.provider_id = :providerID } map { id = id; objectType = object_type; @@ -257,12 +253,6 @@ query getAtomicFilteredCategoryEntries { where b.category_id = c.category_id and b.provider_id = :providerID ) - and not exists ( - select 1 - from atoz_cat_alias_map b - where b.category_id = c.category_id - and b.provider_id = :providerID - ) and not exists ( select 1 from atoz_cat_ct_blacklist_map b, cat_object_category_map m, @@ -283,16 +273,16 @@ query getAtomicFilteredCategoryEntries { union select c.category_id as id, a.object_type as object_type, - m.title as title, + ca.title as title, c.description as description, - lower(m.letter) as sort_key + lower(ca.letter) as sort_key from cat_categories c, acs_objects a, - atoz_cat_alias_map m - where c.category_id = m.category_id + atoz_cat_aliases ca + where c.category_id = ca.category_id and c.category_id = a.object_id and c.enabled_p = '1' - and m.provider_id = :providerID + and ca.provider_id = :providerID } map { id = id; objectType = object_type; @@ -338,12 +328,6 @@ query getAtomicFilteredCategoryEntriesForRootCategory { ) and i2.subcategory_id = c.category_id ) - and not exists ( - select 1 - from atoz_cat_alias_map b - where b.category_id = c.category_id - and b.provider_id = :providerID - ) and not exists ( select 1 from atoz_cat_ct_blacklist_map b, cat_object_category_map m, @@ -364,16 +348,16 @@ query getAtomicFilteredCategoryEntriesForRootCategory { union select c.category_id as id, a.object_type as object_type, - m.title as title, + ca.title as title, c.description as description, - lower(m.letter) as sort_key + lower(ca.letter) as sort_key from cat_categories c, acs_objects a, - atoz_cat_alias_map m - where c.category_id = m.category_id + atoz_cat_aliases ca + where c.category_id = ca.category_id and c.category_id = a.object_id and c.enabled_p = '1' - and m.provider_id = :providerID + and ca.provider_id = :providerID } map { id = id; objectType = object_type; diff --git a/ccm-ldn-atoz/src/WEB-INF/resources/atoz-adapters.xml b/ccm-ldn-atoz/src/WEB-INF/resources/atoz-adapters.xml index fe4af64aa..429fe0928 100755 --- a/ccm-ldn-atoz/src/WEB-INF/resources/atoz-adapters.xml +++ b/ccm-ldn-atoz/src/WEB-INF/resources/atoz-adapters.xml @@ -105,6 +105,15 @@ + + + + + + + + + @@ -118,6 +127,7 @@ --> +