Erste Fassung update script
git-svn-id: https://svn.libreccm.org/ccm/trunk@1460 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
83926267ac
commit
fdfbfe733c
|
|
@ -1,8 +1,8 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||||
name="ccm-rssfeed"
|
name="ccm-rssfeed"
|
||||||
prettyName="RSS"
|
prettyName="RSS Feed"
|
||||||
version="6.6.0"
|
version="6.6.1"
|
||||||
release="1"
|
release="1"
|
||||||
webapp="ROOT">
|
webapp="ROOT">
|
||||||
<ccm:dependencies>
|
<ccm:dependencies>
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,31 @@
|
||||||
//
|
//
|
||||||
// Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
// Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
|
||||||
//
|
|
||||||
// The contents of this file are subject to the ArsDigita Public
|
|
||||||
// License (the "License"); you may not use this file except in
|
|
||||||
// compliance with the License. You may obtain a copy of
|
|
||||||
// the License at http://www.arsdigita.com/ADPL.txt
|
|
||||||
//
|
|
||||||
// Software distributed under the License is distributed on an "AS
|
|
||||||
// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
||||||
// implied. See the License for the specific language governing
|
|
||||||
// rights and limitations under the License.
|
|
||||||
//
|
//
|
||||||
|
// This library is free software; you can redistribute it and/or
|
||||||
|
// modify it under the terms of the GNU Lesser General Public License
|
||||||
|
// as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
// the License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This library is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
// Lesser General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
|
// License along with this library; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
model com.arsdigita.london.rss;
|
model com.arsdigita.rssfeed;
|
||||||
|
|
||||||
import com.arsdigita.kernel.*;
|
import com.arsdigita.kernel.*;
|
||||||
import com.arsdigita.cms.*;
|
import com.arsdigita.cms.*;
|
||||||
|
|
||||||
object type Feed extends ACSObject {
|
object type Feed extends ACSObject {
|
||||||
String[1..1] title = rss_feeds.title VARCHAR(50);
|
String[1..1] title = rssfeed_feeds.title VARCHAR(50);
|
||||||
unique String[1..1] url = rss_feeds.url VARCHAR(250);
|
unique String[1..1] url = rssfeed_feeds.url VARCHAR(250);
|
||||||
String[1..1] description = rss_feeds.description VARCHAR(500);
|
String[1..1] description = rssfeed_feeds.description VARCHAR(500);
|
||||||
Boolean[1..1] isProvider = rss_feeds.is_provider BIT;
|
Boolean[1..1] isProvider = rssfeed_feeds.is_provider BIT;
|
||||||
|
|
||||||
reference key( rss_feeds.feed_id );
|
reference key( rssfeed_feeds.feed_id );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,13 @@
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
model com.arsdigita.london.rss;
|
model com.arsdigita.rssfeed;
|
||||||
|
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
|
|
||||||
object type RSS extends Application {
|
object type RSSFeed extends Application {
|
||||||
reference key (rss_app.application_id);
|
// nothing to persist yet
|
||||||
|
// there is only one instance of RSSFeed and
|
||||||
|
// no instance specific settings about to be persisted.
|
||||||
|
// reference key (rssfeed_app.application_id);
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $Id: drop_app_table.sql pboy $
|
||||||
|
|
||||||
|
-- drops table rss_app which just contained application type id and is
|
||||||
|
-- never used for any action.
|
||||||
|
|
||||||
|
drop table rss_app ;
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy. All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $Id: remove_legacy_entries.sql $
|
||||||
|
|
||||||
|
-- RSFeed is now initialized as a legacy free type of application so
|
||||||
|
-- entries in tables apm_package_types are no longer needed.
|
||||||
|
|
||||||
|
|
||||||
|
-- in case there may be several application instances!
|
||||||
|
|
||||||
|
-- delete from object_context all entries referring to node_id in site_nodes
|
||||||
|
delete from object_context
|
||||||
|
where object_id in
|
||||||
|
(select node_id from site_nodes object_id where object_id in
|
||||||
|
( select package_id from applications where application_type_id =
|
||||||
|
(select application_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%rssfeed.RSSFeed%')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- delete from acs_objects all entries referring to node_id in site_nodes
|
||||||
|
alter table site_nodes drop constraint site_nodes_node_id_f_n1m2y ;
|
||||||
|
delete from acs_objects
|
||||||
|
where object_id in
|
||||||
|
(select node_id from site_nodes where object_id in
|
||||||
|
( select package_id from applications where application_type_id =
|
||||||
|
(select application_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%rssfeed.RSSFeed%')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
-- delete all entries in site_nodes referring to a subsite instance
|
||||||
|
delete from site_nodes
|
||||||
|
where object_id in
|
||||||
|
(select package_id from applications where application_type_id =
|
||||||
|
(select application_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like '%rssfeed.RSSFeed%')
|
||||||
|
);
|
||||||
|
alter table site_nodes add constraint site_nodes_node_id_f_n1m2y
|
||||||
|
FOREIGN KEY (node_id)
|
||||||
|
REFERENCES acs_objects (object_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- delete from object_context all entries referring to package_id in apm_packages
|
||||||
|
delete from object_context
|
||||||
|
where object_id in
|
||||||
|
(select package_id from apm_packages where package_type_id =
|
||||||
|
(select package_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like 'com.arsdigita.rssfeed.RSSFeed')
|
||||||
|
);
|
||||||
|
|
||||||
|
-- delete from acs_objects all entries referring to package_id in apm_packages
|
||||||
|
alter table apm_packages drop constraint apm_package_package_id_f_46may ;
|
||||||
|
alter table applications drop constraint application_package_id_f_cdaho ;
|
||||||
|
delete from acs_objects
|
||||||
|
where object_id in
|
||||||
|
(select package_id from apm_packages where package_type_id =
|
||||||
|
(select package_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like 'com.arsdigita.rssfeed.RSSFeed')
|
||||||
|
);
|
||||||
|
|
||||||
|
-- delete all entries for subsite instances in apm_packages
|
||||||
|
-- identified by package_type_id in application_types
|
||||||
|
delete from apm_packages
|
||||||
|
where package_type_id =
|
||||||
|
(select package_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like 'com.arsdigita.rssfeed.RSSFeed') ;
|
||||||
|
|
||||||
|
-- there seem to be no intries for a apm_packages_types entry (row) in
|
||||||
|
-- acs_objects or object_context!
|
||||||
|
|
||||||
|
-- delete all entries for subsite in apm_package_types identified by
|
||||||
|
-- package_type_id in application_types
|
||||||
|
alter table application_types drop constraint applica_typ_pac_typ_id_f_v80ma ;
|
||||||
|
delete from apm_package_types
|
||||||
|
where package_type_id =
|
||||||
|
(select package_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like 'com.arsdigita.rssfeed.RSSFeed') ;
|
||||||
|
|
||||||
|
|
||||||
|
-- set package_id to null for all entries referring to a subsite instance
|
||||||
|
-- (indicating a new legacy free application)
|
||||||
|
update applications
|
||||||
|
set package_id = null
|
||||||
|
where application_type_id =
|
||||||
|
(select application_type_id from application_types
|
||||||
|
where object_type
|
||||||
|
like 'com.arsdigita.rssfeed.RSSFeed') ;
|
||||||
|
|
||||||
|
-- set package_id to null for all entries referring to a subsite instance
|
||||||
|
-- (indicating a new legacy free application)
|
||||||
|
update application_types
|
||||||
|
set package_type_id = null
|
||||||
|
where object_type like 'com.arsdigita.rssfeed.RSSFeed' ;
|
||||||
|
|
||||||
|
alter table application_types add constraint applica_typ_pac_typ_id_f_v80ma
|
||||||
|
FOREIGN KEY (package_type_id)
|
||||||
|
REFERENCES apm_package_types (package_type_id)
|
||||||
|
MATCH SIMPLE ON UPDATE NO ACTION ON DELETE NO ACTION ;
|
||||||
|
alter table applications add constraint application_package_id_f_cdaho
|
||||||
|
FOREIGN KEY (package_id)
|
||||||
|
REFERENCES apm_packages (package_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION ;
|
||||||
|
alter table apm_packages add constraint apm_package_package_id_f_46may
|
||||||
|
FOREIGN KEY (package_id)
|
||||||
|
REFERENCES acs_objects (object_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION ;
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $Id: ren_sites_table.sql pboy $
|
||||||
|
|
||||||
|
-- rename table subsite_site to subsite_sites following ccm naming conventions
|
||||||
|
-- to make maintenance tasks easier
|
||||||
|
|
||||||
|
|
||||||
|
alter table rss_feeds drop constraint rss_feeds_feed_id_p_rm_i5 ;
|
||||||
|
alter table rss_feeds drop constraint rss_feeds_feed_id_f_2lk3l ;
|
||||||
|
alter table rss_feeds drop constraint rss_feeds_url_u_3ul6f ;
|
||||||
|
|
||||||
|
alter table rss_feeds RENAME TO rssfeed_feeds ;
|
||||||
|
|
||||||
|
alter table rssfeed_feeds
|
||||||
|
add constraint rssfeed_feeds_feed_id_p_493us PRIMARY KEY (feed_id) ;
|
||||||
|
alter table rssfeed_feeds
|
||||||
|
add constraint rssfeed_feeds_feed_id_f_i4i5z FOREIGN KEY (feed_id)
|
||||||
|
REFERENCES acs_objects (object_id) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||||
|
alter table rssfeed_feeds
|
||||||
|
add constraint rssfeed_feeds_url_u_6xy5m UNIQUE(url) ;
|
||||||
|
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $Id: upd_system_tables.sql pboy $
|
||||||
|
|
||||||
|
-- adjust various system tables to the new name of application subsite
|
||||||
|
|
||||||
|
alter table init_requirements drop constraint init_requirements_init_f_cmmdn ;
|
||||||
|
|
||||||
|
alter table init_requirements drop constraint init_require_requ_init_f_i6rgg ;
|
||||||
|
|
||||||
|
update inits
|
||||||
|
set class_name=replace(class_name,'london.rss', 'rssfeed')
|
||||||
|
where class_name like '%london.rss%' ;
|
||||||
|
|
||||||
|
update init_requirements
|
||||||
|
set init=replace(init,'london.rss', 'rssfeed')
|
||||||
|
where init like '%london.rss%' ;
|
||||||
|
|
||||||
|
update init_requirements
|
||||||
|
set required_init=replace(required_init,'london.rss', 'rssfeed')
|
||||||
|
where required_init like '%london.rss%' ;
|
||||||
|
|
||||||
|
ALTER TABLE ONLY init_requirements
|
||||||
|
ADD CONSTRAINT init_requirements_init_f_cmmdn FOREIGN KEY (init)
|
||||||
|
REFERENCES inits (class_name) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||||
|
|
||||||
|
ALTER TABLE init_requirements
|
||||||
|
ADD CONSTRAINT init_require_requ_init_f_i6rgg FOREIGN KEY (required_init)
|
||||||
|
REFERENCES inits (class_name) MATCH SIMPLE
|
||||||
|
ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||||
|
|
||||||
|
|
||||||
|
update application_types
|
||||||
|
set object_type=replace(object_type,'london.rss', 'rssfeed')
|
||||||
|
where object_type like '%london.rss%' ;
|
||||||
|
|
||||||
|
-- table applications doesn't require an update
|
||||||
|
|
||||||
|
-- table apm_package_types doesn't require an update
|
||||||
|
|
||||||
|
-- table apm_packages doesn't require an update either
|
||||||
|
-- table site_nodes doesn't require an update either
|
||||||
|
|
||||||
|
|
||||||
|
-- update application type in acs_objects
|
||||||
|
update acs_objects
|
||||||
|
set (object_type,default_domain_class) =
|
||||||
|
(replace(object_type,'london.rss', 'rssfeed') ,
|
||||||
|
replace(default_domain_class,'london.rss', 'rssfeed') )
|
||||||
|
where object_type like '%london.rss%' ;
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $DateTime: 2011/03/27 23:15:09 $
|
||||||
|
-- $Id: oracle-se-6.6.0-6.6.1 pboy $
|
||||||
|
|
||||||
|
-- drop table subsite_app - not needed anyway
|
||||||
|
@@ default/6.6.0-6.6.1/drop_app_table.sql
|
||||||
|
-- rename table containing defined subsites following ccm naming conventions
|
||||||
|
@@ default/6.6.0-6.6.1/ren_sites_table.sql
|
||||||
|
-- rename application from london.subsite to subsite
|
||||||
|
@@ default/6.6.0-6.6.1/upd_system_tables.sql
|
||||||
|
-- remove legacy compatible bits
|
||||||
|
@@ default/6.6.0-6.6.1/remove_legacy_entries.sql
|
||||||
|
-- adjust class name in content_sections table
|
||||||
|
@@ default/6.6.0-6.6.1/upd_cms_tables.sql
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
--
|
||||||
|
-- Copyright (C) 2011 Peter Boy All Rights Reserved.
|
||||||
|
--
|
||||||
|
-- This library is free software; you can redistribute it and/or
|
||||||
|
-- modify it under the terms of the GNU Lesser General Public License
|
||||||
|
-- as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
-- the License, or (at your option) any later version.
|
||||||
|
--
|
||||||
|
-- This library is distributed in the hope that it will be useful,
|
||||||
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
-- Lesser General Public License for more details.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU Lesser General Public
|
||||||
|
-- License along with this library; if not, write to the Free Software
|
||||||
|
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
--
|
||||||
|
-- $DateTime: 2010/11/10 23:15:09 $
|
||||||
|
|
||||||
|
\echo Red Hat Enterprise ccm-subsite 6.6.0 -> 6.6.1 Upgrade Script (PostgreSQL)
|
||||||
|
|
||||||
|
begin;
|
||||||
|
|
||||||
|
-- drop table rss_app - not needed anyway
|
||||||
|
\i default/6.6.0-6.6.1/drop_app_table.sql
|
||||||
|
|
||||||
|
-- rename table containing defined feeds following ccm naming conventions
|
||||||
|
\i default/6.6.0-6.6.1/ren_sites_table.sql
|
||||||
|
|
||||||
|
-- rename application from london.subsite to subsite
|
||||||
|
\i default/6.6.0-6.6.1/upd_system_tables.sql
|
||||||
|
|
||||||
|
-- remove legacy compatible bits
|
||||||
|
\i default/6.6.0-6.6.1/remove_legacy_entries.sql
|
||||||
|
|
||||||
|
|
||||||
|
commit;
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<registry>
|
<registry>
|
||||||
<config class="com.arsdigita.rssfeed.RSSConfig"
|
<config class="com.arsdigita.rssfeed.RSSFeedConfig"
|
||||||
storage="ccm-rssfeed/rss.properties"/>
|
storage="ccm-rssfeed/rss.properties"/>
|
||||||
</registry>
|
</registry>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<upgrade>
|
||||||
|
<version from="6.6.0" to="6.6.1">
|
||||||
|
<script sql="ccm-rssfeed/upgrade/::database::-6.6.0-6.6.1.sql"/>
|
||||||
|
</version>
|
||||||
|
</upgrade>
|
||||||
|
|
@ -1,3 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
package com.arsdigita.rssfeed;
|
package com.arsdigita.rssfeed;
|
||||||
|
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
|
|
@ -18,7 +36,7 @@ import com.arsdigita.persistence.DataCollection;
|
||||||
public class Feed extends ACSObject {
|
public class Feed extends ACSObject {
|
||||||
|
|
||||||
public static final String BASE_DATA_OBJECT_TYPE
|
public static final String BASE_DATA_OBJECT_TYPE
|
||||||
= "com.arsdigita.london.rss.Feed";
|
= "com.arsdigita.rssfeed.Feed";
|
||||||
|
|
||||||
// Attributes
|
// Attributes
|
||||||
public static final String TITLE = "title";
|
public static final String TITLE = "title";
|
||||||
|
|
@ -26,24 +44,44 @@ public class Feed extends ACSObject {
|
||||||
public static final String DESCRIPTION = "description";
|
public static final String DESCRIPTION = "description";
|
||||||
public static final String IS_PROVIDER = "isProvider";
|
public static final String IS_PROVIDER = "isProvider";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
public Feed() {
|
public Feed() {
|
||||||
super(BASE_DATA_OBJECT_TYPE);
|
super(BASE_DATA_OBJECT_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
public Feed(BigDecimal id)
|
public Feed(BigDecimal id)
|
||||||
throws DataObjectNotFoundException {
|
throws DataObjectNotFoundException {
|
||||||
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
this(new OID(BASE_DATA_OBJECT_TYPE, id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
public Feed(DataObject obj) {
|
public Feed(DataObject obj) {
|
||||||
super(obj);
|
super(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*/
|
||||||
public Feed(OID oid)
|
public Feed(OID oid)
|
||||||
throws DataObjectNotFoundException {
|
throws DataObjectNotFoundException {
|
||||||
super(oid);
|
super(oid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* @param title
|
||||||
|
* @param desc
|
||||||
|
* @param provider
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static Feed create(String url,
|
public static Feed create(String url,
|
||||||
String title,
|
String title,
|
||||||
String desc,
|
String desc,
|
||||||
|
|
@ -58,6 +96,12 @@ public class Feed extends ACSObject {
|
||||||
return feed;
|
return feed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
* @throws DataObjectNotFoundException
|
||||||
|
*/
|
||||||
public static Feed retrieve(BigDecimal id)
|
public static Feed retrieve(BigDecimal id)
|
||||||
throws DataObjectNotFoundException {
|
throws DataObjectNotFoundException {
|
||||||
|
|
||||||
|
|
@ -75,8 +119,15 @@ public class Feed extends ACSObject {
|
||||||
throw new DataObjectNotFoundException("cannot find feed " + id);
|
throw new DataObjectNotFoundException("cannot find feed " + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
* @throws DataObjectNotFoundException
|
||||||
|
*/
|
||||||
public static Feed retrieve(String url)
|
public static Feed retrieve(String url)
|
||||||
throws DataObjectNotFoundException {
|
throws DataObjectNotFoundException {
|
||||||
|
|
||||||
Session session = SessionManager.getSession();
|
Session session = SessionManager.getSession();
|
||||||
DataCollection feed = session.retrieve(BASE_DATA_OBJECT_TYPE);
|
DataCollection feed = session.retrieve(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
@ -92,6 +143,11 @@ public class Feed extends ACSObject {
|
||||||
throw new DataObjectNotFoundException("cannot find feed" + url);
|
throw new DataObjectNotFoundException("cannot find feed" + url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static FeedCollection retrieveAll() {
|
public static FeedCollection retrieveAll() {
|
||||||
Session session = SessionManager.getSession();
|
Session session = SessionManager.getSession();
|
||||||
DataCollection feeds = session.retrieve(BASE_DATA_OBJECT_TYPE);
|
DataCollection feeds = session.retrieve(BASE_DATA_OBJECT_TYPE);
|
||||||
|
|
@ -103,6 +159,7 @@ public class Feed extends ACSObject {
|
||||||
* Accessor to the base object type.
|
* Accessor to the base object type.
|
||||||
* @return The fully qualified name of the supporting data object.
|
* @return The fully qualified name of the supporting data object.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getBaseDataObjectType() {
|
public String getBaseDataObjectType() {
|
||||||
return BASE_DATA_OBJECT_TYPE;
|
return BASE_DATA_OBJECT_TYPE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* The contents of this file are subject to the ArsDigita Public
|
* This library is free software; you can redistribute it and/or
|
||||||
* License (the "License"); you may not use this file except in
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
* compliance with the License. You may obtain a copy of
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
* the License at http://www.arsdigita.com/ADPL.txt
|
* the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Software distributed under the License is distributed on an "AS
|
* This library is distributed in the hope that it will be useful,
|
||||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* implied. See the License for the specific language governing
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* rights and limitations under the License.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.arsdigita.rssfeed;
|
package com.arsdigita.rssfeed;
|
||||||
|
|
@ -28,8 +31,12 @@ import java.math.BigDecimal;
|
||||||
* @version $Id: FeedCollection.java 287 2005-02-22 00:29:02Z sskracic $
|
* @version $Id: FeedCollection.java 287 2005-02-22 00:29:02Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class FeedCollection extends DomainCollection {
|
public class FeedCollection extends DomainCollection {
|
||||||
public static final String versionId = "$Id: FeedCollection.java 287 2005-02-22 00:29:02Z sskracic $ by $Author: sskracic $, $DateTime: 2003/10/22 07:27:00 $";
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param dataCollection
|
||||||
|
*/
|
||||||
protected FeedCollection(DataCollection dataCollection) {
|
protected FeedCollection(DataCollection dataCollection) {
|
||||||
super(dataCollection);
|
super(dataCollection);
|
||||||
}
|
}
|
||||||
|
|
@ -54,6 +61,7 @@ public class FeedCollection extends DomainCollection {
|
||||||
* @return the domain object for the current row.
|
* @return the domain object for the current row.
|
||||||
* @post return != null
|
* @post return != null
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public DomainObject getDomainObject() {
|
public DomainObject getDomainObject() {
|
||||||
DomainObject domainObject = getFeed();
|
DomainObject domainObject = getFeed();
|
||||||
|
|
||||||
|
|
@ -78,6 +86,10 @@ public class FeedCollection extends DomainCollection {
|
||||||
return portal;
|
return portal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param filter
|
||||||
|
*/
|
||||||
public void filterACSJFeeds(boolean filter) {
|
public void filterACSJFeeds(boolean filter) {
|
||||||
m_dataCollection.addEqualsFilter(Feed.IS_PROVIDER, new Boolean(filter));
|
m_dataCollection.addEqualsFilter(Feed.IS_PROVIDER, new Boolean(filter));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ import com.arsdigita.rssfeed.portlet.WorkspaceDirectoryPortlet;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The RSS initializer.
|
* Initializes the RSSFeed application
|
||||||
*
|
*
|
||||||
* @author Justin Ross <jross@redhat.com>
|
* @author Justin Ross <jross@redhat.com>
|
||||||
* @version $Id: Initializer.java 758 2005-09-02 14:26:56Z sskracic $
|
* @version $Id: Initializer.java 758 2005-09-02 14:26:56Z sskracic $
|
||||||
|
|
@ -50,10 +50,9 @@ public class Initializer extends CompoundInitializer {
|
||||||
|
|
||||||
add(new PDLInitializer
|
add(new PDLInitializer
|
||||||
(new ManifestSource
|
(new ManifestSource
|
||||||
("ccm-ldn-rss.pdl.mf",
|
("ccm-rssfeed.pdl.mf",
|
||||||
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
new NameFilter(DbHelper.getDatabaseSuffix(database), "pdl"))));
|
||||||
|
|
||||||
// add(new LegacyInitializer("com/arsdigita/london/rss/enterprise.init"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -62,15 +61,14 @@ public class Initializer extends CompoundInitializer {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void init(DomainInitEvent e) {
|
public void init(DomainInitEvent e) {
|
||||||
|
|
||||||
super.init(e);
|
super.init(e);
|
||||||
|
|
||||||
// Prerequisite to access a RSS channel instance
|
// Prerequisite to access a RSSFeed channel instance
|
||||||
DomainObjectFactory.registerInstantiator(
|
DomainObjectFactory.registerInstantiator(
|
||||||
RSS.BASE_DATA_OBJECT_TYPE, new ACSObjectInstantiator() {
|
RSSFeed.BASE_DATA_OBJECT_TYPE, new ACSObjectInstantiator() {
|
||||||
@Override
|
@Override
|
||||||
public DomainObject doNewInstance(DataObject dataObject) {
|
public DomainObject doNewInstance(DataObject dataObject) {
|
||||||
return new RSS(dataObject);
|
return new RSSFeed(dataObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -37,15 +37,22 @@ import com.arsdigita.web.URL;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loader.
|
* Executes nonrecurring at install time and loads (installs and initializes)
|
||||||
|
* the ccm-rssfeed package persistently into database.
|
||||||
*
|
*
|
||||||
* @author Justin Ross <jross@redhat.com>
|
* @author Justin Ross <jross@redhat.com>
|
||||||
|
* @author Peter Boy <pboy@barkhof.uni-bremen.de>
|
||||||
* @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $
|
* @version $Id: Loader.java 758 2005-09-02 14:26:56Z sskracic $
|
||||||
*/
|
*/
|
||||||
public class Loader extends PackageLoader {
|
public class Loader extends PackageLoader {
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(Loader.class);
|
private static final Logger s_log = Logger.getLogger(Loader.class);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run script invoked by com.arsdigita.packing loader script.
|
||||||
|
*
|
||||||
|
* @param ctx
|
||||||
|
*/
|
||||||
public void run(final ScriptContext ctx) {
|
public void run(final ScriptContext ctx) {
|
||||||
|
|
||||||
new KernelExcursion() {
|
new KernelExcursion() {
|
||||||
|
|
@ -54,7 +61,7 @@ public class Loader extends PackageLoader {
|
||||||
|
|
||||||
// CatgegoryPurpose is deprecated and replaced by terms in
|
// CatgegoryPurpose is deprecated and replaced by terms in
|
||||||
// some way. So this step may be ommitted.
|
// some way. So this step may be ommitted.
|
||||||
String catKey = RSS.getConfig().getCategoryKey();
|
String catKey = RSSFeed.getConfig().getCategoryKey();
|
||||||
s_log.info("Setting RSS Category Key to " + catKey + ".");
|
s_log.info("Setting RSS Category Key to " + catKey + ".");
|
||||||
if (!CategoryPurpose.purposeExists(catKey)) {
|
if (!CategoryPurpose.purposeExists(catKey)) {
|
||||||
(new CategoryPurpose(catKey, "RSS Feed")).save();
|
(new CategoryPurpose(catKey, "RSS Feed")).save();
|
||||||
|
|
@ -78,38 +85,54 @@ public class Loader extends PackageLoader {
|
||||||
* (old style) compatible applicaiton.
|
* (old style) compatible applicaiton.
|
||||||
*/
|
*/
|
||||||
public void setupChannelControlCenter() {
|
public void setupChannelControlCenter() {
|
||||||
|
|
||||||
/*
|
|
||||||
ApplicationSetup setup = new ApplicationSetup(s_log);
|
|
||||||
|
|
||||||
setup.setApplicationObjectType(RSS.BASE_DATA_OBJECT_TYPE);
|
// Old way to setup of a new style legacy compatible application.
|
||||||
|
// Kept until transistion to new style legacy free application is
|
||||||
|
// completed for easy reference and debugging. Delete thereafter!
|
||||||
|
/* ApplicationSetup setup = new ApplicationSetup(s_log);
|
||||||
|
|
||||||
|
setup.setApplicationObjectType(RSSFeed.BASE_DATA_OBJECT_TYPE);
|
||||||
setup.setKey("rss");
|
setup.setKey("rss");
|
||||||
setup.setTitle("RSS Channels");
|
setup.setTitle("RSSFeed Channels");
|
||||||
setup.setDescription("RSS Channels");
|
setup.setDescription("RSSFeed Channels");
|
||||||
setup.setSingleton(true);
|
setup.setSingleton(true);
|
||||||
setup.setInstantiator(new ACSObjectInstantiator() {
|
setup.setInstantiator(new ACSObjectInstantiator() {
|
||||||
@Override
|
@Override
|
||||||
public DomainObject doNewInstance(DataObject dataObject) {
|
public DomainObject doNewInstance(DataObject dataObject) {
|
||||||
return new RSS(dataObject);
|
return new RSSFeed(dataObject);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ApplicationType type = setup.run();
|
ApplicationType type = setup.run();
|
||||||
type.save();
|
type.save(); */
|
||||||
*/
|
|
||||||
ApplicationType type = ApplicationType.createApplicationType(
|
// Old way to setup of a new style legacy compatible application.
|
||||||
|
// Kept until transistion to new style legacy free application is
|
||||||
|
// completed for easy reference and debugging. Delete thereafter!
|
||||||
|
/* ApplicationType type = ApplicationType.createApplicationType(
|
||||||
"rss",
|
"rss",
|
||||||
"RSS Channels",
|
"RSS Channels",
|
||||||
RSS.BASE_DATA_OBJECT_TYPE);
|
RSSFeed.BASE_DATA_OBJECT_TYPE);
|
||||||
type.setDescription("RSS Channels");
|
type.setDescription("RSS Channels"); */
|
||||||
|
|
||||||
|
/* Create legacy-free application type
|
||||||
if (!Application.isInstalled(RSS.BASE_DATA_OBJECT_TYPE,
|
* NOTE: The wording in the title parameter of ApplicationType
|
||||||
|
* determines the name of the subdirectory for the XSL stylesheets.
|
||||||
|
* It gets "urlized", i.e. trimming leading and trailing blanks and
|
||||||
|
* replacing blanks between words and illegal characters with an
|
||||||
|
* hyphen and converted to lower case.
|
||||||
|
* "RSSFeed" will become "rssfeed". */
|
||||||
|
ApplicationType type = new ApplicationType(
|
||||||
|
"RSSFeed",
|
||||||
|
RSSFeed.BASE_DATA_OBJECT_TYPE );
|
||||||
|
type.setDescription("CCM RSS Feed");
|
||||||
|
|
||||||
|
if (!Application.isInstalled(RSSFeed.BASE_DATA_OBJECT_TYPE,
|
||||||
"/channels/")) {
|
"/channels/")) {
|
||||||
Application app =
|
Application app = Application
|
||||||
Application.createApplication(type,
|
.createApplication(type,
|
||||||
"channels",
|
"channels",
|
||||||
"RSS",
|
"RSS",
|
||||||
null);
|
null);
|
||||||
app.save();
|
app.save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,39 +25,37 @@ import com.arsdigita.web.Application;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class of the RSS application (module).
|
* Base class of the RSSFeed application (module).
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RSS extends Application {
|
public class RSSFeed extends Application {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(RSS.class);
|
/** A logger instance to assist debugging. */
|
||||||
|
private static final Logger logger = Logger.getLogger(RSSFeed.class);
|
||||||
|
|
||||||
|
// pdl stuff (constants)
|
||||||
public static final String BASE_DATA_OBJECT_TYPE
|
public static final String BASE_DATA_OBJECT_TYPE
|
||||||
= "com.arsdigita.london.rss.RSS";
|
= "com.arsdigita.rssfeed.RSSFeed";
|
||||||
|
|
||||||
private static final RSSConfig s_config = new RSSConfig();
|
/** Config object containing various parameter */
|
||||||
|
private static final RSSFeedConfig s_config = RSSFeedConfig.getConfig();
|
||||||
|
|
||||||
static {
|
|
||||||
logger.debug("Static initalizer starting...");
|
|
||||||
s_config.load();
|
|
||||||
logger.debug("Static initalizer finished.");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the configuration record for code in the rss package.
|
* Provides the configuration record for client classes.
|
||||||
*
|
*
|
||||||
* @return A <code>RSSConfig</code> configuration record; it
|
* @return A <code>RSSFeedConfig</code> configuration record; it
|
||||||
* cannot be null
|
* cannot be null
|
||||||
*/
|
*/
|
||||||
public static final RSSConfig getConfig() {
|
public static RSSFeedConfig getConfig() {
|
||||||
return s_config;
|
return s_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RSS(DataObject obj) {
|
public RSSFeed(DataObject obj) {
|
||||||
super(obj);
|
super(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public RSS(OID oid) {
|
public RSSFeed(OID oid) {
|
||||||
super(oid);
|
super(oid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,7 +64,7 @@ public class RSS extends Application {
|
||||||
// * web application context
|
// * web application context
|
||||||
// */
|
// */
|
||||||
// public String getContextPath() {
|
// public String getContextPath() {
|
||||||
// return "/ccm-ldn-rss";
|
// return "/ccm-rssfeed";
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -85,14 +83,15 @@ public class RSS extends Application {
|
||||||
* <servlet-name>rss-files</servlet-name>
|
* <servlet-name>rss-files</servlet-name>
|
||||||
* <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
* <servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
||||||
* <init-param>
|
* <init-param>
|
||||||
|
* <!-- where to find the jsp files -->
|
||||||
* <param-name>template-path</param-name>
|
* <param-name>template-path</param-name>
|
||||||
* <param-value>/templates/ccm-ldn-rss</param-value>
|
* <param-value>/templates/ccm-rssfeed</param-value>
|
||||||
* </init-param>
|
* </init-param>
|
||||||
* </servlet>
|
* </servlet>
|
||||||
*
|
*
|
||||||
* <servlet-mapping>
|
* <servlet-mapping>
|
||||||
* <servlet-name>rss-files</servlet-name>
|
* <servlet-name>rssfeed-files</servlet-name>
|
||||||
* <url-pattern>/ccm-ldn-rss/files/*</url-pattern>
|
* <url-pattern>/ccm-rssfeed/files/*</url-pattern>
|
||||||
* </servlet-mapping>
|
* </servlet-mapping>
|
||||||
*
|
*
|
||||||
* @return path name to the applications servlet/JSP
|
* @return path name to the applications servlet/JSP
|
||||||
|
|
@ -100,6 +99,6 @@ public class RSS extends Application {
|
||||||
public String getServletPath() {
|
public String getServletPath() {
|
||||||
// sufficient if execute in its own web context
|
// sufficient if execute in its own web context
|
||||||
// return "/files";
|
// return "/files";
|
||||||
return "/ccm-ldn-rss/files";
|
return "/ccm-rssfeed/files";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -27,22 +27,49 @@ import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The file that contains all configuration information for
|
* The file that contains all configuration information for
|
||||||
* the RSS application.
|
* the RSSFeed application.
|
||||||
* @version $Id: RSSConfig.java 1319 2006-09-15 10:52:49Z apevec $
|
* @version $Id: RSSFeedConfig.java 1319 2006-09-15 10:52:49Z apevec $
|
||||||
*/
|
*/
|
||||||
public final class RSSConfig extends AbstractConfig {
|
public final class RSSFeedConfig extends AbstractConfig {
|
||||||
|
|
||||||
private static final Logger s_log = Logger.getLogger(RSSConfig.class);
|
/** A logger instance to assist debugging. */
|
||||||
|
private static final Logger s_log = Logger.getLogger(RSSFeedConfig.class);
|
||||||
|
|
||||||
|
/** Singelton config object. */
|
||||||
|
private static RSSFeedConfig s_conf;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gain a RSSFeedConfig object.
|
||||||
|
*
|
||||||
|
* Singelton pattern, don't instantiate a config object using the
|
||||||
|
* constructor directly!
|
||||||
|
* use RSSFeedConfig.getConfig(); instead
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static synchronized RSSFeedConfig getConfig() {
|
||||||
|
if (s_conf == null) {
|
||||||
|
s_conf = new RSSFeedConfig();
|
||||||
|
s_conf.load();
|
||||||
|
}
|
||||||
|
|
||||||
|
return s_conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ////////////////////////////////////////////////////////////////////////
|
||||||
|
// Set of configuration parameters
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
private final Parameter m_categoryKey= new RSSCategoryKeyParameter
|
private final Parameter m_categoryKey= new RSSCategoryKeyParameter
|
||||||
("com.arsdigita.london.rss.categoryKey", Parameter.REQUIRED, "RSS");
|
("com.arsdigita.rssfeed.categoryKey", Parameter.REQUIRED, "RSS");
|
||||||
/** */
|
/** */
|
||||||
private final Parameter m_processingInstruction_xslt= new StringParameter
|
private final Parameter m_processingInstruction_xslt= new StringParameter
|
||||||
("com.arsdigita.london.rss.processingInstruction_xslt",
|
("com.arsdigita.rssfeed.processingInstruction_xslt",
|
||||||
Parameter.OPTIONAL, null);
|
Parameter.OPTIONAL, null);
|
||||||
|
|
||||||
public RSSConfig() {
|
/**
|
||||||
|
* Constructor initializes class.
|
||||||
|
*/
|
||||||
|
public RSSFeedConfig() {
|
||||||
|
|
||||||
register(m_categoryKey);
|
register(m_categoryKey);
|
||||||
register(m_processingInstruction_xslt);
|
register(m_processingInstruction_xslt);
|
||||||
|
|
@ -67,6 +94,7 @@ public final class RSSConfig extends AbstractConfig {
|
||||||
super(name, multiplicity, defaalt);
|
super(name, multiplicity, defaalt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void doValidate(final Object value, final ErrorList errors) {
|
public void doValidate(final Object value, final ErrorList errors) {
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
String key = (String)value;
|
String key = (String)value;
|
||||||
|
|
@ -33,13 +33,22 @@ import org.apache.log4j.Logger;
|
||||||
|
|
||||||
public class RSSFileResolver extends DefaultApplicationFileResolver {
|
public class RSSFileResolver extends DefaultApplicationFileResolver {
|
||||||
|
|
||||||
private static final Logger s_log =
|
private static final Logger s_log = Logger.getLogger(RSSFileResolver.class);
|
||||||
Logger.getLogger(RSSFileResolver.class);
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param templatePath
|
||||||
|
* @param sreq
|
||||||
|
* @param sresp
|
||||||
|
* @param app
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
public RequestDispatcher resolve(String templatePath,
|
public RequestDispatcher resolve(String templatePath,
|
||||||
HttpServletRequest sreq,
|
HttpServletRequest sreq,
|
||||||
HttpServletResponse sresp,
|
HttpServletResponse sresp,
|
||||||
Application app) {
|
Application app) {
|
||||||
|
|
||||||
String[] webapps = new String[] {
|
String[] webapps = new String[] {
|
||||||
app.getContextPath(), "ROOT"
|
app.getContextPath(), "ROOT"
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,17 @@ import com.arsdigita.util.UncheckedWrapperException;
|
||||||
* change, possibly beyond all recognition.
|
* change, possibly beyond all recognition.
|
||||||
*/
|
*/
|
||||||
public class RSSRenderer {
|
public class RSSRenderer {
|
||||||
|
|
||||||
public final static org.jdom.Namespace s_rdfNS = org.jdom.Namespace.getNamespace
|
public final static org.jdom.Namespace s_rdfNS = org.jdom.Namespace.getNamespace
|
||||||
( "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" );
|
( "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" );
|
||||||
public final static org.jdom.Namespace s_rssNS = org.jdom.Namespace.getNamespace
|
public final static org.jdom.Namespace s_rssNS = org.jdom.Namespace.getNamespace
|
||||||
( "http://purl.org/rss/1.0/" );
|
( "http://purl.org/rss/1.0/" );
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param channel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static org.jdom.Element generateJDOM(RSSChannel channel) {
|
public static org.jdom.Element generateJDOM(RSSChannel channel) {
|
||||||
// rdf is the root element
|
// rdf is the root element
|
||||||
org.jdom.Element rdfEl = new org.jdom.Element( "RDF", "rdf", s_rdfNS.getURI() );
|
org.jdom.Element rdfEl = new org.jdom.Element( "RDF", "rdf", s_rdfNS.getURI() );
|
||||||
|
|
@ -120,6 +126,11 @@ public class RSSRenderer {
|
||||||
return rdfEl;
|
return rdfEl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param channel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static org.w3c.dom.Element generateDOM(RSSChannel channel) {
|
public static org.w3c.dom.Element generateDOM(RSSChannel channel) {
|
||||||
org.jdom.Element jdomContent = RSSRenderer.generateJDOM(channel);
|
org.jdom.Element jdomContent = RSSRenderer.generateJDOM(channel);
|
||||||
org.jdom.output.DOMOutputter convertor = new org.jdom.output.DOMOutputter();
|
org.jdom.output.DOMOutputter convertor = new org.jdom.output.DOMOutputter();
|
||||||
|
|
@ -135,16 +146,30 @@ public class RSSRenderer {
|
||||||
return domContent;
|
return domContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param channel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static Element generateXML(RSSChannel channel) {
|
public static Element generateXML(RSSChannel channel) {
|
||||||
org.w3c.dom.Element domContent = generateDOM(channel);
|
org.w3c.dom.Element domContent = generateDOM(channel);
|
||||||
|
|
||||||
return new WrapperElement(domContent);
|
return new WrapperElement(domContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private static class WrapperElement extends Element {
|
private static class WrapperElement extends Element {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param element
|
||||||
|
*/
|
||||||
public WrapperElement(org.w3c.dom.Element element) {
|
public WrapperElement(org.w3c.dom.Element element) {
|
||||||
m_element = element;
|
m_element = element;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@ import org.jdom.Namespace;
|
||||||
import org.jdom.output.XMLOutputter;
|
import org.jdom.output.XMLOutputter;
|
||||||
import org.jdom.ProcessingInstruction;
|
import org.jdom.ProcessingInstruction;
|
||||||
import com.arsdigita.kernel.User;
|
import com.arsdigita.kernel.User;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Methods for generating RSS Channels & Items.
|
* Methods for generating RSS Channels & Items.
|
||||||
*
|
*
|
||||||
|
|
@ -63,18 +65,13 @@ import com.arsdigita.kernel.User;
|
||||||
* @version $Revision: #17 $, $Date: 2004/03/29 $
|
* @version $Revision: #17 $, $Date: 2004/03/29 $
|
||||||
*/
|
*/
|
||||||
public class RSSService {
|
public class RSSService {
|
||||||
|
|
||||||
private static org.apache.log4j.Logger s_log =
|
private static org.apache.log4j.Logger s_log =
|
||||||
org.apache.log4j.Logger.getLogger(RSSService.class);
|
org.apache.log4j.Logger.getLogger(RSSService.class);
|
||||||
|
|
||||||
private static final RSSConfig s_config = new RSSConfig();
|
private static final RSSFeedConfig s_config = RSSFeedConfig.getConfig();
|
||||||
|
|
||||||
static {
|
public static RSSFeedConfig getConfig() {
|
||||||
s_log.debug("Static initalizer starting...");
|
|
||||||
s_config.load();
|
|
||||||
s_log.debug("Static initalizer finished.");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static RSSConfig getConfig() {
|
|
||||||
return s_config;
|
return s_config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,14 @@ public class SimpleRSSChannel implements RSSChannel {
|
||||||
private RSSImage m_image;
|
private RSSImage m_image;
|
||||||
private RSSItemCollection m_items;
|
private RSSItemCollection m_items;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param title
|
||||||
|
* @param link
|
||||||
|
* @param description
|
||||||
|
* @param image
|
||||||
|
* @param items
|
||||||
|
*/
|
||||||
public SimpleRSSChannel(String title,
|
public SimpleRSSChannel(String title,
|
||||||
String link,
|
String link,
|
||||||
String description,
|
String description,
|
||||||
|
|
@ -42,22 +50,42 @@ public class SimpleRSSChannel implements RSSChannel {
|
||||||
m_items = items;
|
m_items = items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return m_title;
|
return m_title;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getLink() {
|
public String getLink() {
|
||||||
return m_link;
|
return m_link;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return m_description;
|
return m_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public RSSImage getImage() {
|
public RSSImage getImage() {
|
||||||
return m_image;
|
return m_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public RSSItemCollection getItems() {
|
public RSSItemCollection getItems() {
|
||||||
return m_items;
|
return m_items;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,17 @@ import com.arsdigita.util.UncheckedWrapperException;
|
||||||
* @version $Revision: #6 $, $Date: 2004/01/21 $
|
* @version $Revision: #6 $, $Date: 2004/01/21 $
|
||||||
*/
|
*/
|
||||||
public class ChannelIndex implements com.arsdigita.dispatcher.Dispatcher {
|
public class ChannelIndex implements com.arsdigita.dispatcher.Dispatcher {
|
||||||
private static Logger s_log =
|
|
||||||
Logger.getLogger(ChannelIndex.class);
|
private static Logger s_log = Logger.getLogger(ChannelIndex.class);
|
||||||
|
|
||||||
private BigDecimal m_catId;
|
private BigDecimal m_catId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an index of RSS Channels available for the specified category
|
* Create an index of RSS Channels available for the specified category
|
||||||
* and its children.
|
* and its children.
|
||||||
*/
|
*/
|
||||||
public ChannelIndex() {
|
public ChannelIndex() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* The contents of this file are subject to the ArsDigita Public
|
* This library is free software; you can redistribute it and/or
|
||||||
* License (the "License"); you may not use this file except in
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
* compliance with the License. You may obtain a copy of
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
* the License at http://www.arsdigita.com/ADPL.txt
|
* the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Software distributed under the License is distributed on an "AS
|
* This library is distributed in the hope that it will be useful,
|
||||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* implied. See the License for the specific language governing
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* rights and limitations under the License.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.arsdigita.rssfeed.ui;
|
package com.arsdigita.rssfeed.ui;
|
||||||
|
|
@ -35,6 +38,7 @@ public abstract class RSSComponent extends SimpleComponent {
|
||||||
|
|
||||||
protected abstract RSSChannel getChannel(PageState state);
|
protected abstract RSSChannel getChannel(PageState state);
|
||||||
|
|
||||||
|
@Override
|
||||||
public void generateXML(PageState state,
|
public void generateXML(PageState state,
|
||||||
Element parent) {
|
Element parent) {
|
||||||
Element content = parent.newChildElement(m_element,
|
Element content = parent.newChildElement(m_element,
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* The contents of this file are subject to the ArsDigita Public
|
* This library is free software; you can redistribute it and/or
|
||||||
* License (the "License"); you may not use this file except in
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
* compliance with the License. You may obtain a copy of
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
* the License at http://www.arsdigita.com/ADPL.txt
|
* the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Software distributed under the License is distributed on an "AS
|
* This library is distributed in the hope that it will be useful,
|
||||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* implied. See the License for the specific language governing
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* rights and limitations under the License.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.arsdigita.rssfeed.ui;
|
package com.arsdigita.rssfeed.ui;
|
||||||
|
|
@ -23,15 +26,27 @@ import com.arsdigita.rssfeed.RSSChannel;
|
||||||
// import com.arsdigita.london.rss.ui.RSSComponent;
|
// import com.arsdigita.london.rss.ui.RSSComponent;
|
||||||
import com.arsdigita.web.Application;
|
import com.arsdigita.web.Application;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class WorkspaceDirectoryComponent extends RSSComponent {
|
public class WorkspaceDirectoryComponent extends RSSComponent {
|
||||||
|
|
||||||
public static final String PORTAL_XML_NS = "http://www.uk.arsdigita.com/portal/1.0";
|
public static final String PORTAL_XML_NS = "http://www.uk.arsdigita.com/portal/1.0";
|
||||||
|
|
||||||
public WorkspaceDirectoryComponent() {
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public WorkspaceDirectoryComponent() {
|
||||||
super("portal:workspaceDirectory", PORTAL_XML_NS);
|
super("portal:workspaceDirectory", PORTAL_XML_NS);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected RSSChannel getChannel(PageState pageState) {
|
/**
|
||||||
|
*
|
||||||
|
* @param pageState
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected RSSChannel getChannel(PageState pageState) {
|
||||||
Application current = (Application) Kernel.getContext().getResource();
|
Application current = (Application) Kernel.getContext().getResource();
|
||||||
|
|
||||||
WorkspaceDirectoryChannel channel = new WorkspaceDirectoryChannel(
|
WorkspaceDirectoryChannel channel = new WorkspaceDirectoryChannel(
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* The contents of this file are subject to the ArsDigita Public
|
* This library is free software; you can redistribute it and/or
|
||||||
* License (the "License"); you may not use this file except in
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
* compliance with the License. You may obtain a copy of
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
* the License at http://www.arsdigita.com/ADPL.txt
|
* the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Software distributed under the License is distributed on an "AS
|
* This library is distributed in the hope that it will be useful,
|
||||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* implied. See the License for the specific language governing
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* rights and limitations under the License.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -89,25 +92,35 @@ public abstract class FeedForm extends Form {
|
||||||
protected abstract void setURL(PageState state,
|
protected abstract void setURL(PageState state,
|
||||||
String url);
|
String url);
|
||||||
|
|
||||||
private class FeedFormInitListener implements FormInitListener {
|
|
||||||
public void init(FormSectionEvent e)
|
|
||||||
throws FormProcessException {
|
|
||||||
|
|
||||||
PageState state = e.getPageState();
|
|
||||||
|
|
||||||
if (m_feed.isSelected(state)) {
|
/**
|
||||||
Feed feed = m_feed.getSelectedFeed(state);
|
*
|
||||||
m_title.setValue(state, feed.getTitle());
|
*/
|
||||||
m_desc.setValue(state, feed.getDescription());
|
private class FeedFormInitListener implements FormInitListener {
|
||||||
setURL(state, feed.getURL());
|
|
||||||
} else {
|
public void init(FormSectionEvent e)
|
||||||
m_title.setValue(state, null);
|
throws FormProcessException {
|
||||||
m_desc.setValue(state, null);
|
|
||||||
setURL(state, null);
|
PageState state = e.getPageState();
|
||||||
}
|
|
||||||
}
|
if (m_feed.isSelected(state)) {
|
||||||
|
Feed feed = m_feed.getSelectedFeed(state);
|
||||||
|
m_title.setValue(state, feed.getTitle());
|
||||||
|
m_desc.setValue(state, feed.getDescription());
|
||||||
|
setURL(state, feed.getURL());
|
||||||
|
} else {
|
||||||
|
m_title.setValue(state, null);
|
||||||
|
m_desc.setValue(state, null);
|
||||||
|
setURL(state, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
private class FeedFormValidationListener implements FormValidationListener {
|
private class FeedFormValidationListener implements FormValidationListener {
|
||||||
public void validate(FormSectionEvent e)
|
public void validate(FormSectionEvent e)
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* The contents of this file are subject to the ArsDigita Public
|
* This library is free software; you can redistribute it and/or
|
||||||
* License (the "License"); you may not use this file except in
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
* compliance with the License. You may obtain a copy of
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
* the License at http://www.arsdigita.com/ADPL.txt
|
* the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Software distributed under the License is distributed on an "AS
|
* This library is distributed in the hope that it will be useful,
|
||||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* implied. See the License for the specific language governing
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* rights and limitations under the License.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -22,15 +25,29 @@ import com.arsdigita.kernel.ui.ACSObjectSelectionModel;
|
||||||
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
import com.arsdigita.bebop.parameters.BigDecimalParameter;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class FeedSelectionModel extends ACSObjectSelectionModel {
|
public class FeedSelectionModel extends ACSObjectSelectionModel {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param param
|
||||||
|
*/
|
||||||
public FeedSelectionModel(BigDecimalParameter param) {
|
public FeedSelectionModel(BigDecimalParameter param) {
|
||||||
super(Feed.class.getName(),
|
super(Feed.class.getName(),
|
||||||
Feed.BASE_DATA_OBJECT_TYPE,
|
Feed.BASE_DATA_OBJECT_TYPE,
|
||||||
param);
|
param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param state
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public Feed getSelectedFeed(PageState state) {
|
public Feed getSelectedFeed(PageState state) {
|
||||||
return (Feed)getSelectedObject(state);
|
return (Feed)getSelectedObject(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 ArsDigita Corporation. All Rights Reserved.
|
* Copyright (C) 2001-2004 Red Hat Inc. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* The contents of this file are subject to the ArsDigita Public
|
* This library is free software; you can redistribute it and/or
|
||||||
* License (the "License"); you may not use this file except in
|
* modify it under the terms of the GNU Lesser General Public License
|
||||||
* compliance with the License. You may obtain a copy of
|
* as published by the Free Software Foundation; either version 2.1 of
|
||||||
* the License at http://www.arsdigita.com/ADPL.txt
|
* the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* Software distributed under the License is distributed on an "AS
|
* This library is distributed in the hope that it will be useful,
|
||||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* implied. See the License for the specific language governing
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* rights and limitations under the License.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -24,6 +27,10 @@ import com.arsdigita.bebop.Form;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class FeedsPanel extends BoxPanel {
|
public class FeedsPanel extends BoxPanel {
|
||||||
|
|
||||||
private Table m_provider_feeds;
|
private Table m_provider_feeds;
|
||||||
|
|
@ -36,26 +43,30 @@ public class FeedsPanel extends BoxPanel {
|
||||||
private FeedSelectionModel m_external_model;
|
private FeedSelectionModel m_external_model;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
public FeedsPanel() {
|
public FeedsPanel() {
|
||||||
super(BoxPanel.VERTICAL);
|
super(BoxPanel.VERTICAL);
|
||||||
|
|
||||||
m_provider_model = new FeedSelectionModel(new BigDecimalParameter("provider"));
|
m_provider_model =
|
||||||
m_external_model = new FeedSelectionModel(new BigDecimalParameter("external"));
|
new FeedSelectionModel(new BigDecimalParameter("provider"));
|
||||||
|
m_external_model =
|
||||||
|
new FeedSelectionModel(new BigDecimalParameter("external"));
|
||||||
|
|
||||||
m_provider_feeds = new FeedsTable(m_provider_model, true);
|
m_provider_feeds = new FeedsTable(m_provider_model, true);
|
||||||
m_external_feeds = new FeedsTable(m_external_model, false);
|
m_external_feeds = new FeedsTable(m_external_model, false);
|
||||||
|
|
||||||
m_provider_form = new ProviderFeedForm(m_provider_model);
|
m_provider_form = new ProviderFeedForm(m_provider_model);
|
||||||
m_external_form = new ExternalFeedForm(m_external_model);
|
m_external_form = new ExternalFeedForm(m_external_model);
|
||||||
|
|
||||||
add(new Label("Feed Providers",
|
add(new Label("Feed Providers",Label.BOLD));
|
||||||
Label.BOLD));
|
add(m_provider_feeds);
|
||||||
add(m_provider_feeds);
|
add(m_provider_form);
|
||||||
add(m_provider_form);
|
|
||||||
|
add(new Label("External Feeds",Label.BOLD));
|
||||||
add(new Label("External Feeds",
|
add(m_external_feeds);
|
||||||
Label.BOLD));
|
add(m_external_form);
|
||||||
add(m_external_feeds);
|
|
||||||
add(m_external_form);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@
|
||||||
</jsp:scriptlet>
|
</jsp:scriptlet>
|
||||||
|
|
||||||
<define:page name="rssPage" application="rss"
|
<define:page name="rssPage" application="rss"
|
||||||
title="RSS Channel Admin" cache="true">
|
title="RSSFeed Channel Admin" cache="true">
|
||||||
|
|
||||||
<define:component name="admin" classname="com.arsdigita.london.rss.ui.admin.FeedsPanel"/>
|
<define:component name="admin" classname="com.arsdigita.rssfeed.ui.admin.FeedsPanel"/>
|
||||||
|
|
||||||
<jsp:scriptlet>
|
<jsp:scriptlet>
|
||||||
rssPage.addRequestListener(new ApplicationAuthenticationListener());
|
rssPage.addRequestListener(new ApplicationAuthenticationListener());
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
version="1.2">
|
version="1.2">
|
||||||
<!-- This page is used by class in method getChannel(PageState pageState)
|
<!-- This page is used by class in method getChannel(PageState pageState)
|
||||||
com.arsdigita.portalworkspace.ui.WorkspaceDirectoryComponent
|
com.arsdigita.portalworkspace.ui.WorkspaceDirectoryComponent
|
||||||
Probably part of the ccm-ldn-rss WorkspaceDirectoryPortlet portlet. -->
|
Probably part of the ccm-rssfeed WorkspaceDirectoryPortlet portlet. -->
|
||||||
|
|
||||||
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
version="1.2">
|
version="1.2">
|
||||||
|
|
||||||
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
||||||
<jsp:directive.page import="com.arsdigita.london.rss.ui.FeedGenerator"/>
|
<jsp:directive.page import="com.arsdigita.rssfeed.ui.FeedGenerator"/>
|
||||||
|
|
||||||
<jsp:scriptlet>
|
<jsp:scriptlet>
|
||||||
DispatcherHelper.cacheDisable(response);
|
DispatcherHelper.cacheDisable(response);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
version="1.2">
|
version="1.2">
|
||||||
|
|
||||||
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
||||||
<jsp:directive.page import="com.arsdigita.london.rss.ui.ChannelGenerator"/>
|
<jsp:directive.page import="com.arsdigita.rssfeed.ui.ChannelGenerator"/>
|
||||||
|
|
||||||
<jsp:scriptlet>
|
<jsp:scriptlet>
|
||||||
DispatcherHelper.cacheDisable(response);
|
DispatcherHelper.cacheDisable(response);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
version="1.2">
|
version="1.2">
|
||||||
|
|
||||||
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
||||||
<jsp:directive.page import="com.arsdigita.london.rss.ui.FeedGenerator"/>
|
<jsp:directive.page import="com.arsdigita.rssfeed.ui.FeedGenerator"/>
|
||||||
|
|
||||||
<jsp:scriptlet>
|
<jsp:scriptlet>
|
||||||
DispatcherHelper.cacheDisable(response);
|
DispatcherHelper.cacheDisable(response);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
version="1.2">
|
version="1.2">
|
||||||
|
|
||||||
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
|
||||||
<jsp:directive.page import="com.arsdigita.london.rss.ui.ChannelIndex"/>
|
<jsp:directive.page import="com.arsdigita.rssfeed.ui.ChannelIndex"/>
|
||||||
|
|
||||||
<jsp:scriptlet>
|
<jsp:scriptlet>
|
||||||
DispatcherHelper.cacheDisable(response);
|
DispatcherHelper.cacheDisable(response);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue