Alle applications aus core werden jetzt als new style legacy free apps initialisiert. sitemap ist demnächst komplett überflüssig, da die Routine nur Anwendungen aus sitenode listet. Permissions funktioniert wieder. Update Skript ccm-core 6.6.3 -> 6.6.4 inkludiert.
git-svn-id: https://svn.libreccm.org/ccm/trunk@1516 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
9cc5a910f9
commit
280e924978
|
|
@ -122,6 +122,26 @@
|
|||
<servlet-class>com.arsdigita.versioning.VersioningServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webdevsupport</servlet-name>
|
||||
<servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.sitemap.SiteMapServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class>
|
||||
|
|
@ -270,7 +290,7 @@
|
|||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<!-- module ccm-ldn-subsite - servlet declarations BEGIN -->
|
||||
<!-- module ccm-subsite - servlet declarations BEGIN -->
|
||||
<servlet>
|
||||
<servlet-name>subsite-files</servlet-name>
|
||||
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
||||
|
|
@ -279,7 +299,7 @@
|
|||
<param-value>/templates/ccm-subsite</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
<!-- module ccm-ldn-subsite - servlet declarations END -->
|
||||
<!-- module ccm-subsite - servlet declarations END -->
|
||||
|
||||
<!-- module ccm-ldn-terms - servlet declarations BEGIN -->
|
||||
<servlet>
|
||||
|
|
@ -372,12 +392,12 @@
|
|||
<url-pattern>/ccm-ldn-shortcuts/files/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- module ccm-ldn-subsite - servlet mappings BEGIN -->
|
||||
<!-- module ccm-subsite - servlet mappings BEGIN -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>subsite-files</servlet-name>
|
||||
<url-pattern>/ccm-subsite/files/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<!-- module ccm-ldn-subsite - servlet mappings END -->
|
||||
<!-- module ccm-subsite - servlet mappings END -->
|
||||
|
||||
<!-- module ccm-ldn-terms - servlet mappings BEGIN -->
|
||||
<servlet-mapping>
|
||||
|
|
@ -439,6 +459,26 @@
|
|||
<url-pattern>/versioning/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webdevsupport</servlet-name>
|
||||
<url-pattern>/webdevsupport/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<url-pattern>/admin/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<url-pattern>/admin-sitemap/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<url-pattern>/admin-permissions/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<url-pattern>/redirect/*</url-pattern>
|
||||
|
|
|
|||
|
|
@ -122,6 +122,26 @@
|
|||
<servlet-class>com.arsdigita.versioning.VersioningServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webdevsupport</servlet-name>
|
||||
<servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.sitemap.SiteMapServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class>
|
||||
|
|
@ -270,7 +290,7 @@
|
|||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<!-- module ccm-ldn-subsite - servlet declarations BEGIN -->
|
||||
<!-- module ccm-subsite - servlet declarations BEGIN -->
|
||||
<servlet>
|
||||
<servlet-name>subsite-files</servlet-name>
|
||||
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
||||
|
|
@ -279,7 +299,7 @@
|
|||
<param-value>/templates/ccm-subsite</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
<!-- module ccm-ldn-subsite - servlet declarations END -->
|
||||
<!-- module ccm-subsite - servlet declarations END -->
|
||||
|
||||
<!-- module ccm-ldn-terms - servlet declarations BEGIN -->
|
||||
<servlet>
|
||||
|
|
@ -372,12 +392,12 @@
|
|||
<url-pattern>/ccm-ldn-shortcuts/files/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- module ccm-ldn-subsite - servlet mappings BEGIN -->
|
||||
<!-- module ccm-subsite - servlet mappings BEGIN -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>subsite-files</servlet-name>
|
||||
<url-pattern>/ccm-subsite/files/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<!-- module ccm-ldn-subsite - servlet mappings END -->
|
||||
<!-- module ccm-subsite - servlet mappings END -->
|
||||
|
||||
<!-- module ccm-ldn-terms - servlet mappings BEGIN -->
|
||||
<servlet-mapping>
|
||||
|
|
@ -439,6 +459,26 @@
|
|||
<url-pattern>/versioning/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webdevsupport</servlet-name>
|
||||
<url-pattern>/webdevsupport/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<url-pattern>/admin/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<url-pattern>/admin-sitemap/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<url-pattern>/admin-permissions/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<url-pattern>/redirect/*</url-pattern>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<ccm:application xmlns:ccm="http://ccm.redhat.com/ccm-project"
|
||||
name="ccm-core"
|
||||
prettyName="Core"
|
||||
version="6.6.3"
|
||||
version="6.6.4"
|
||||
release="1"
|
||||
shared="true"
|
||||
webapp="ROOT"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ model com.arsdigita.ui.admin;
|
|||
import com.arsdigita.web.Application;
|
||||
|
||||
object type Admin extends Application {
|
||||
reference key (admin_app.application_id);
|
||||
// Nothing to store yet
|
||||
// reference key (admin_app.application_id);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,16 @@
|
|||
//
|
||||
// $Id: Permissions.pdl 287 2005-02-22 00:29:02Z sskracic $
|
||||
// $DateTime: 2004/08/16 18:10:38 $
|
||||
|
||||
model com.arsdigita.ui.permissions;
|
||||
|
||||
import com.arsdigita.web.Application;
|
||||
|
||||
object type Permissions extends Application {
|
||||
// Nothing to store yet
|
||||
// reference key (permissions_app.application_id);
|
||||
}
|
||||
|
||||
query PermissionObjects {
|
||||
BigDecimal objectID;
|
||||
do {
|
||||
|
|
|
|||
|
|
@ -22,5 +22,6 @@ model com.arsdigita.ui.sitemap;
|
|||
import com.arsdigita.web.Application;
|
||||
|
||||
object type SiteMap extends Application {
|
||||
reference key (sitemap_app.application_id);
|
||||
// Nothing to store yet
|
||||
// reference key (sitemap_app.application_id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,136 @@
|
|||
--
|
||||
-- Copyright (C) 2012 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_admin_legacy_entries.sql $
|
||||
|
||||
-- Core's admin 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 where object_id in
|
||||
( select package_id from applications where application_type_id =
|
||||
(select application_type_id from application_types
|
||||
where object_type
|
||||
like '%admin.Admin%')
|
||||
)
|
||||
);
|
||||
|
||||
-- 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 '%admin.Admin%')
|
||||
)
|
||||
);
|
||||
|
||||
-- delete all entries in site_nodes referring to an admin 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 '%admin.Admin%')
|
||||
);
|
||||
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 '%admin.Admin%')
|
||||
);
|
||||
|
||||
-- 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 '%admin.Admin%')
|
||||
);
|
||||
|
||||
-- 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 '%admin.Admin%') ;
|
||||
|
||||
-- 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 '%admin.Admin%') ;
|
||||
|
||||
|
||||
-- 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 '%admin.Admin%') ;
|
||||
|
||||
-- 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 '%admin.Admin%' ;
|
||||
|
||||
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 ;
|
||||
|
||||
-- Additionally the Application table admin_app does not provide any
|
||||
-- functionality and is removed.
|
||||
-- New, legacy free application works without a (dummy) Application table
|
||||
drop table admin_app ;
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
--
|
||||
-- Copyright (C) 2012 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_bebop_legacy_entries.sql $
|
||||
|
||||
-- CoreLoader used to load a bebop package_type into database, but without
|
||||
-- mounting any instance or to associate a dispatcher class. Si it never had
|
||||
-- had a function as application.
|
||||
-- entries in tables apm_package_types and apm_packages are no longer needed.
|
||||
|
||||
|
||||
-- in case there may be several application instances!
|
||||
|
||||
-- delete from object_context all entries referring to bebop in apm_package_types
|
||||
delete from object_context
|
||||
where object_id in
|
||||
( select package_id from apm_packages where package_type_id =
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'bebop')
|
||||
);
|
||||
|
||||
-- delete from acs_objects all entries referring to bebop in apm_package_types
|
||||
ALTER TABLE apm_packages DROP CONSTRAINT apm_package_package_id_f_46may;
|
||||
delete from acs_objects
|
||||
where object_id in
|
||||
( select package_id from apm_packages where package_type_id =
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'bebop')
|
||||
);
|
||||
|
||||
-- delete all entries in site_nodes referring to a subsite instance
|
||||
-- NO ENTRIES in site_notes for bebop
|
||||
|
||||
-- delete all entries for bebop instances in apm_packages
|
||||
delete from apm_packages
|
||||
where package_type_id =
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'bebop');
|
||||
|
||||
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;
|
||||
|
||||
-- there seem to be no intries for a apm_packages_types entry (row) in
|
||||
-- acs_objects or object_context!
|
||||
|
||||
-- delete all entries in apm_package_types identified by key bebop
|
||||
delete from apm_package_types
|
||||
where package_key like 'bebop' ;
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
--
|
||||
-- Copyright (C) 2012 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_ds_legacy_entries.sql $
|
||||
|
||||
|
||||
-- CoreLoader used to load a webdeveloper support as old style, kernel.package
|
||||
-- based application into database.
|
||||
-- The old style application is completely removed (and reinstalled als new
|
||||
-- style, legacy free application by Java upgrade script).
|
||||
|
||||
|
||||
|
||||
-- delete from object_context all entries referring to DS node_id in site_nodes
|
||||
delete from object_context
|
||||
where object_id in
|
||||
(select node_id from site_nodes where object_id in
|
||||
(select package_id from apm_packages where package_type_id in
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'webdev-support')
|
||||
)
|
||||
);
|
||||
|
||||
-- delete from acs_objects all entries referring to DS 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 apm_packages where package_type_id in
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'webdev-support')
|
||||
)
|
||||
);
|
||||
|
||||
-- delete all entries in site_nodes referring to a DS instance
|
||||
delete from site_nodes
|
||||
where object_id in
|
||||
(select package_id from apm_packages where package_type_id in
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'webdev-support')
|
||||
);
|
||||
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 DS 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 apm_package_types
|
||||
where package_key like 'webdev-support')
|
||||
);
|
||||
|
||||
-- delete from acs_objects all entries referring to DS in apm_packages
|
||||
ALTER TABLE apm_packages DROP CONSTRAINT apm_package_package_id_f_46may;
|
||||
delete from acs_objects
|
||||
where object_id in
|
||||
( select package_id from apm_packages where package_type_id =
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'webdev-support')
|
||||
);
|
||||
|
||||
-- delete all entries for DS instances in apm_packages
|
||||
delete from apm_packages
|
||||
where package_type_id =
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'webdev-support');
|
||||
|
||||
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;
|
||||
|
||||
-- there seem to be no intries for a apm_packages_types entry (row) in
|
||||
-- acs_objects or object_context!
|
||||
|
||||
-- delete all entries in apm_package_types identified by key bebop
|
||||
delete from apm_package_types
|
||||
where package_key like 'webdev-support' ;
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
--
|
||||
-- Copyright (C) 2012 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_permissions_legacy_entries.sql $
|
||||
|
||||
|
||||
-- CoreLoader used to load a permissions as old style, kernel.package
|
||||
-- based application into database.
|
||||
-- The old style application is completely removed (and reinstalled als new
|
||||
-- style, legacy free application by Java upgrade script).
|
||||
|
||||
|
||||
|
||||
-- delete from object_context all entries referring to DS node_id in site_nodes
|
||||
delete from object_context
|
||||
where object_id in
|
||||
(select node_id from site_nodes where object_id in
|
||||
(select package_id from apm_packages where package_type_id in
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'acs-permissions')
|
||||
)
|
||||
);
|
||||
|
||||
-- delete from acs_objects all entries referring to DS 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 apm_packages where package_type_id in
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'acs-permissions')
|
||||
)
|
||||
);
|
||||
|
||||
-- delete all entries in site_nodes referring to a DS instance
|
||||
delete from site_nodes
|
||||
where object_id in
|
||||
(select package_id from apm_packages where package_type_id in
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'acs-permissions')
|
||||
);
|
||||
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 DS 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 apm_package_types
|
||||
where package_key like 'acs-permissions')
|
||||
);
|
||||
|
||||
-- delete from acs_objects all entries referring to DS in apm_packages
|
||||
ALTER TABLE apm_packages DROP CONSTRAINT apm_package_package_id_f_46may;
|
||||
delete from acs_objects
|
||||
where object_id in
|
||||
( select package_id from apm_packages where package_type_id =
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'acs-permissions')
|
||||
);
|
||||
|
||||
-- delete all entries for DS instances in apm_packages
|
||||
delete from apm_packages
|
||||
where package_type_id =
|
||||
(select package_type_id from apm_package_types
|
||||
where package_key like 'acs-permissions');
|
||||
|
||||
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;
|
||||
|
||||
-- there seem to be no intries for a apm_packages_types entry (row) in
|
||||
-- acs_objects or object_context!
|
||||
|
||||
-- delete all entries in apm_package_types identified by key bebop
|
||||
delete from apm_package_types
|
||||
where package_key like 'acs-permissions' ;
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
--
|
||||
-- Copyright (C) 2012 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_sitemap_legacy_entries.sql $
|
||||
|
||||
-- Core's sitemap is now initialized as a legacy free type of application so
|
||||
-- entries in tables apm_package_types are no longer needed.
|
||||
-- (it used to be initialized as a new, legacy compatible application)
|
||||
|
||||
|
||||
-- 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 where object_id in
|
||||
( select package_id from applications where application_type_id =
|
||||
(select application_type_id from application_types
|
||||
where object_type
|
||||
like '%sitemap.SiteMap%')
|
||||
)
|
||||
);
|
||||
|
||||
-- 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 '%sitemap.SiteMap%')
|
||||
)
|
||||
);
|
||||
|
||||
-- delete all entries in site_nodes referring to an admin 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 '%sitemap.SiteMap%')
|
||||
);
|
||||
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 '%sitemap.SiteMap%')
|
||||
);
|
||||
|
||||
-- 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 '%sitemap.SiteMap%')
|
||||
);
|
||||
|
||||
-- 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 '%sitemap.SiteMap%') ;
|
||||
|
||||
-- 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 '%sitemap.SiteMap%') ;
|
||||
|
||||
|
||||
-- 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 '%sitemap.SiteMap%') ;
|
||||
|
||||
-- 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 '%sitemap.SiteMap%' ;
|
||||
|
||||
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 ;
|
||||
|
||||
-- Additionally the Application table admin_app does not provide any
|
||||
-- functionality and is removed.
|
||||
-- New, legacy free application works without a (dummy) Application table
|
||||
drop table sitemap_app ;
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
--
|
||||
-- Copyright (C) 2008 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: oracle-se-6.6.3-6.6.4.sql 293 2012-02-07 15:10:39Z pboy $
|
||||
|
||||
PROMPT Red Hat Enterprise CORE 6.6.3 -> 6.6.4 Upgrade Script (Oracle)
|
||||
|
||||
--
|
||||
|
||||
-- Remove bebop entries in apm_package* which are not used anymore.
|
||||
@@ default/6.6.3-6.6.4/remove_bebop_legacy_entries.sql
|
||||
|
||||
-- Remove DS entries in apm_package* which are not used anymore.
|
||||
@@ default/6.6.3-6.6.4/remove_ds_legacy_entries.sql
|
||||
|
||||
-- Remove admin entries in apm_package* which are not used anymore.
|
||||
@@ default/6.6.3-6.6.4/remove_admin_legacy_entries.sql
|
||||
|
||||
-- Remove sitemap entries in apm_package* which are not used anymore.
|
||||
@@ default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql
|
||||
|
||||
-- Remove permissions entries in apm_package* which are not used anymore.
|
||||
@@ default/6.6.3-6.6.4/remove_permissions_legacy_entries.sql
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
--
|
||||
-- Copyright (C) 2012 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: 2012/02/10 23:15:09 $
|
||||
|
||||
\echo Red Hat Enterprise CORE 6.6.3 -> 6.6.4 Upgrade Script (PostgreSQL)
|
||||
|
||||
--
|
||||
--
|
||||
|
||||
begin;
|
||||
|
||||
-- Remove bebop entries in apm_package* which are not used anymore.
|
||||
\i default/6.6.3-6.6.4/remove_bebop_legacy_entries.sql
|
||||
|
||||
-- Remove ds entries in apm_package* which are not used anymore.
|
||||
\i default/6.6.3-6.6.4/remove_ds_legacy_entries.sql
|
||||
|
||||
-- Remove admin entries in apm_package* which are not used anymore.
|
||||
\i default/6.6.3-6.6.4/remove_admin_legacy_entries.sql
|
||||
|
||||
-- Remove sitemap entries in apm_package* which are not used anymore.
|
||||
\i default/6.6.3-6.6.4/remove_sitemap_legacy_entries.sql
|
||||
|
||||
-- Remove permissions entries in apm_package* which are not used anymore.
|
||||
\i default/6.6.3-6.6.4/remove_permissions_legacy_entries.sql
|
||||
|
||||
commit;
|
||||
|
|
@ -43,4 +43,11 @@
|
|||
<version from="6.6.2" to="6.6.3">
|
||||
<script sql="ccm-core/upgrade/::database::-6.6.2-6.6.3.sql"/>
|
||||
</version>
|
||||
<version from="6.6.3" to="6.6.4">
|
||||
<!-- Refactor DS from package based loading to appl. style -->
|
||||
<!-- First: remove all legacy type entries -->
|
||||
<script sql="ccm-core/upgrade/::database::-6.6.3-6.6.4.sql"/>
|
||||
<!-- Second:reinstall WebDS as a new style legacy free app -->
|
||||
<script class="com.arsdigita.core.upgrade.Upgrade664"/>
|
||||
</version>
|
||||
</upgrade>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ public class BigDecimalParameter extends ParameterModel {
|
|||
return transformSingleValue(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object unmarshal(String encoded)
|
||||
throws IllegalArgumentException {
|
||||
|
||||
|
|
@ -51,6 +52,7 @@ public class BigDecimalParameter extends ParameterModel {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getValueClass() {
|
||||
return BigDecimal.class;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import com.arsdigita.search.converter.OOConverter;
|
|||
import com.arsdigita.search.converter.WordConverter;
|
||||
import com.arsdigita.search.converter.TextConverter;
|
||||
|
||||
import com.arsdigita.ui.permissions.Permissions;
|
||||
import com.arsdigita.webdevsupport.WebDevSupport;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -168,6 +169,15 @@ public class Initializer extends CompoundInitializer {
|
|||
}
|
||||
});
|
||||
|
||||
e.getFactory().registerInstantiator
|
||||
(Permissions.BASE_DATA_OBJECT_TYPE,
|
||||
new ACSObjectInstantiator() {
|
||||
@Override
|
||||
public DomainObject doNewInstance(final DataObject data) {
|
||||
return new Permissions(data);
|
||||
}
|
||||
});
|
||||
|
||||
e.getFactory().registerInstantiator
|
||||
(BasicAuditTrail.BASE_DATA_OBJECT_TYPE,
|
||||
new DomainObjectInstantiator() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,112 @@
|
|||
/*
|
||||
* Copyright (C) 2011 Peter Boy <pb@zes.uni-bremen.de>. 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.core.upgrade;
|
||||
|
||||
import com.arsdigita.loader.CoreLoader;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.kernel.KernelExcursion;
|
||||
import com.arsdigita.kernel.PackageInstance;
|
||||
import com.arsdigita.kernel.PackageInstanceCollection;
|
||||
import com.arsdigita.kernel.PackageType;
|
||||
import com.arsdigita.kernel.Resource;
|
||||
import com.arsdigita.kernel.ResourceType;
|
||||
import com.arsdigita.packaging.Program;
|
||||
import com.arsdigita.persistence.Session;
|
||||
import com.arsdigita.persistence.SessionManager;
|
||||
import com.arsdigita.persistence.TransactionContext;
|
||||
import com.arsdigita.util.StringUtils;
|
||||
import com.arsdigita.web.Application;
|
||||
import com.arsdigita.web.ApplicationType;
|
||||
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Update ccm-core from version 6.6.3 to 6.6.4 where CoreLoader has been
|
||||
* refactored to use (new style) applications in package
|
||||
* com.arsdigita.webdeveloper
|
||||
* instead of old style package type / sitenode applications based on
|
||||
* com.arsdigita.kermel.[Package* & SiteNode].
|
||||
*
|
||||
* Refactored core packages are now loaded using new style application classes.
|
||||
*
|
||||
* The task at hand is to add the necessary table entries to the tables
|
||||
* application_types and applications using the information already existing
|
||||
* (by old style initialization) in apm_package_types, site_nodes, and apm_packages.
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class Upgrade664 extends Program {
|
||||
|
||||
private static Logger s_log = Logger.getLogger(Upgrade664.class);
|
||||
|
||||
/**
|
||||
/* Constructor constructs a program object which initializes the CCM
|
||||
* runtime system and enables concatenation, so a following SQL script
|
||||
* may be executed.
|
||||
*/
|
||||
public Upgrade664() {
|
||||
super("Upgrade664", "1.0.0", "",true,true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The mandatory main method
|
||||
* @param args
|
||||
*/
|
||||
public static void main(final String[] args) {
|
||||
new Upgrade664().run(args);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Worker method. Adds new style application entries.
|
||||
*
|
||||
* @param cmdLine
|
||||
*/
|
||||
public void doRun(CommandLine cmdLine) {
|
||||
|
||||
new KernelExcursion() {
|
||||
public void excurse() {
|
||||
setEffectiveParty(Kernel.getSystemParty());
|
||||
final Session session = SessionManager.getSession();
|
||||
final TransactionContext tc = session.getTransactionContext();
|
||||
tc.beginTxn();
|
||||
|
||||
|
||||
// Update core WebDeveloperSupport
|
||||
// Create a (new type, legacy free) web.ApplicationType type
|
||||
// application
|
||||
CoreLoader.loadWebDev();
|
||||
|
||||
|
||||
// Update core permission support
|
||||
// Create a (new type, legacy free) web.ApplicationType type
|
||||
// application
|
||||
CoreLoader.loadPermissionsApp();
|
||||
|
||||
|
||||
tc.commitTxn();
|
||||
}
|
||||
}.run();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -28,7 +28,6 @@ import com.arsdigita.kernel.PackageInstance;
|
|||
import com.arsdigita.kernel.PackageType;
|
||||
import com.arsdigita.kernel.ResourceType;
|
||||
import com.arsdigita.kernel.SiteNode;
|
||||
// import com.arsdigita.kernel.Stylesheet;
|
||||
import com.arsdigita.kernel.User;
|
||||
import com.arsdigita.kernel.UserAuthentication;
|
||||
import com.arsdigita.kernel.permissions.PermissionService;
|
||||
|
|
@ -43,6 +42,7 @@ import com.arsdigita.portal.Portal;
|
|||
import com.arsdigita.runtime.ConfigError;
|
||||
import com.arsdigita.runtime.ScriptContext;
|
||||
import com.arsdigita.ui.admin.Admin;
|
||||
import com.arsdigita.ui.permissions.Permissions;
|
||||
import com.arsdigita.ui.sitemap.SiteMap;
|
||||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.util.StringUtils;
|
||||
|
|
@ -269,18 +269,28 @@ public class CoreLoader extends PackageLoader {
|
|||
|
||||
s_log.debug("CoreLoader: Going to execute loadSubsite().");
|
||||
loadSubsite(loadKernel());
|
||||
// !! s_log.debug("CoreLoader: Going to execute loadBebop().");
|
||||
|
||||
// !! s_log.debug("CoreLoader: Going to execute loadBebop().");
|
||||
// !! loadBebop();
|
||||
|
||||
s_log.debug("CoreLoader: Going to execute loadWebDev().");
|
||||
loadWebDev();
|
||||
loadWebDev(); // new style legacy free
|
||||
|
||||
s_log.debug("CoreLoader: Going to execute loadAdminApp().");
|
||||
loadAdminApp();
|
||||
|
||||
s_log.debug("CoreLoader: Going to execute loadSiteMapAdminApp().");
|
||||
loadSiteMapAdminApp(loadAdminApp());
|
||||
s_log.debug("CoreLoader: Going to execute loadPermissionsSiteNode().");
|
||||
loadPermissionsSiteNode();
|
||||
loadSiteMapAdminApp(null);
|
||||
|
||||
s_log.debug("CoreLoader: Going to execute loadPermissionsApp().");
|
||||
loadPermissionsApp(); // new style legacy free
|
||||
|
||||
s_log.debug("CoreLoader: Going to execute loadPortal().");
|
||||
loadPortal();
|
||||
|
||||
s_log.debug("CoreLoader: Going to execute loadMimeTypes().");
|
||||
loadMimeTypes();
|
||||
|
||||
s_log.debug("CoreLoader: Going to execute loadGlobalization().");
|
||||
loadGlobalization();
|
||||
|
||||
|
|
@ -440,6 +450,9 @@ public class CoreLoader extends PackageLoader {
|
|||
}
|
||||
|
||||
// Not really used. Commented out in run() method
|
||||
// NOTE: There is no dispatcher class assoziated and no mount (i.e. no
|
||||
// site_nodes entry creeated).
|
||||
// Update script 6.6.3 - 6.6.4 removes entries.
|
||||
/*
|
||||
private void loadBebop() {
|
||||
// Create Package Types and Instances
|
||||
|
|
@ -452,90 +465,123 @@ public class CoreLoader extends PackageLoader {
|
|||
}
|
||||
*/
|
||||
|
||||
private void loadWebDev() {
|
||||
// Add the package type to the database
|
||||
|
||||
/* LEGACY COMPATIBLE application type */
|
||||
ApplicationType webDevType = ApplicationType
|
||||
.createApplicationType("webdev-support",
|
||||
"WebDeveloper Support",
|
||||
WebDevSupport.BASE_DATA_OBJECT_TYPE);
|
||||
webDevType.setDispatcherClass("com.arsdigita.webdevsupport.Dispatcher");
|
||||
/**
|
||||
* Loads WebDeveloperSupport as a new style, legacy free application into
|
||||
* database and instantiate the (only) application instance.
|
||||
*
|
||||
* Public static access needed by upgrade script Upgrade664
|
||||
* @return webDevType ApplicationType
|
||||
*/
|
||||
public static void loadWebDev() {
|
||||
|
||||
/* LEGACY FREE application type */
|
||||
// ApplicationType webDevType =
|
||||
// new ApplicationType("WebDev Support",
|
||||
// WebDevSupport.BASE_DATA_OBJECT_TYPE );
|
||||
|
||||
|
||||
/* Legacy free / compatible INDEPENDENT application properties */
|
||||
ApplicationType webDevType =
|
||||
new ApplicationType("WebDev Support",
|
||||
WebDevSupport.BASE_DATA_OBJECT_TYPE );
|
||||
webDevType.setDescription("WebDeveloper Support application");
|
||||
webDevType.save();
|
||||
|
||||
|
||||
// create application instance as a legacy free or legacy comp. app.
|
||||
// Whether a legacy compatible or a legacy free application is
|
||||
// created depends on the type of ApplicationType above. No need to
|
||||
// modify anything here
|
||||
Application webDev = Application.createApplication(webDevType,
|
||||
"ds",
|
||||
"WebDeveloper Support",
|
||||
null);
|
||||
webDev.setDescription("The default WEB developer service instance.");
|
||||
webDev.save();
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Application loadAdminApp() {
|
||||
ApplicationType adminType = ApplicationType
|
||||
.createApplicationType("admin",
|
||||
"CCM Admin Application",
|
||||
Admin.BASE_DATA_OBJECT_TYPE);
|
||||
adminType.setDispatcherClass("com.arsdigita.ui.admin.AdminDispatcher");
|
||||
// ApplicationType adminType = ApplicationType
|
||||
// .createApplicationType("admin",
|
||||
// "CCM Admin Application",
|
||||
// Admin.BASE_DATA_OBJECT_TYPE);
|
||||
// adminType.setDispatcherClass("com.arsdigita.ui.admin.AdminDispatcher");
|
||||
|
||||
ApplicationType adminType =
|
||||
new ApplicationType("admin",
|
||||
Admin.BASE_DATA_OBJECT_TYPE );
|
||||
adminType.setDescription("CCM user and group administration");
|
||||
adminType.save();
|
||||
|
||||
|
||||
|
||||
|
||||
Application admin = Application.createApplication(adminType,
|
||||
"admin",
|
||||
"CCM Admin",
|
||||
null);
|
||||
admin.setDescription("CCM user and group administration instance");
|
||||
|
||||
return admin;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param parent
|
||||
*/
|
||||
private void loadSiteMapAdminApp(Application parent) {
|
||||
ApplicationType sitemapType = ApplicationType
|
||||
.createApplicationType("sitemap",
|
||||
"SiteMap Admin Application",
|
||||
SiteMap.BASE_DATA_OBJECT_TYPE);
|
||||
sitemapType.setDispatcherClass("com.arsdigita.ui.sitemap.SiteMapDispatcher");
|
||||
sitemapType.setDescription("CCM sitemap administration");
|
||||
|
||||
// ApplicationType sitemapType = ApplicationType
|
||||
// .createApplicationType("sitemap",
|
||||
// "SiteMap Admin Application",
|
||||
// SiteMap.BASE_DATA_OBJECT_TYPE);
|
||||
// sitemapType.setDispatcherClass("com.arsdigita.ui.sitemap.SiteMapDispatcher");
|
||||
|
||||
/* 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.
|
||||
* Example: "Sitemap" will become "sitemap".
|
||||
*/
|
||||
ApplicationType sitemapType =
|
||||
new ApplicationType("Sitemap",
|
||||
SiteMap.BASE_DATA_OBJECT_TYPE );
|
||||
|
||||
sitemapType.setDescription("CCM sitemap administration");
|
||||
|
||||
Application sitemap = Application.createApplication(sitemapType,
|
||||
"sitemap",
|
||||
"CCM Admin Sitemap",
|
||||
parent);
|
||||
sitemap.setDescription("CCM sitemap administration instance");
|
||||
}
|
||||
|
||||
private void loadPermissionsSiteNode() {
|
||||
SiteNode permissionsNode = SiteNode.createSiteNode("permissions");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static void loadPermissionsApp() {
|
||||
|
||||
PackageType permissionsType;
|
||||
try {
|
||||
permissionsType = PackageType.findByKey("acs-permissions");
|
||||
} catch (DataObjectNotFoundException e) {
|
||||
permissionsType = PackageType.create
|
||||
("acs-permissions", "ACS Permissions Package",
|
||||
"ACS Permissions Packages", "http://arsdigita.com/acs-permissions");
|
||||
}
|
||||
/* 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.
|
||||
* Example: "Permissions" will become "permissions".
|
||||
*/
|
||||
ApplicationType type =
|
||||
new ApplicationType("Permissions",
|
||||
Permissions.BASE_DATA_OBJECT_TYPE );
|
||||
type.setDescription("CCM permissions administration");
|
||||
type.save();
|
||||
|
||||
Application app = Application.createApplication(type,
|
||||
"permissions",
|
||||
"CCM Permissions",
|
||||
null);
|
||||
app.setDescription("CCM permissions administration instance");
|
||||
app.save();
|
||||
|
||||
permissionsType.setDispatcherClass
|
||||
("com.arsdigita.ui.permissions.PermissionsDispatcher");
|
||||
|
||||
// Mount instances.
|
||||
PackageInstance permissionsInstance =
|
||||
permissionsType.createInstance("ACS Permissions");
|
||||
permissionsNode.mountPackage(permissionsInstance);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -547,7 +593,7 @@ public class CoreLoader extends PackageLoader {
|
|||
// therefore actually creates a sort of new style legacy free
|
||||
// application type
|
||||
ResourceType type = ResourceType.createResourceType
|
||||
("Portal", Portal.BASE_DATA_OBJECT_TYPE);
|
||||
("Portal", Portal.BASE_DATA_OBJECT_TYPE);
|
||||
type.setDescription("A Portal!");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-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.lucene;
|
||||
|
||||
/**
|
||||
* @deprecated moved to com.arsdigita.search.lucene
|
||||
* @see com.arsdigita.search.lucene.Adapter
|
||||
**/
|
||||
public abstract class Adapter
|
||||
extends com.arsdigita.search.lucene.Adapter {
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-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.lucene;
|
||||
|
||||
import org.apache.lucene.search.Filter;
|
||||
import org.apache.lucene.search.Query;
|
||||
|
||||
/**
|
||||
* @deprecated moved to com.arsdigita.search.lucene
|
||||
* @see com.arsdigita.search.lucene.LuceneSearch
|
||||
**/
|
||||
public class LuceneSearch
|
||||
extends com.arsdigita.search.lucene.LuceneSearch {
|
||||
|
||||
/**
|
||||
* Search over all objects in the system. Returns objects that matches
|
||||
* the search string.
|
||||
*
|
||||
* @param searchString user specified search string
|
||||
**/
|
||||
public LuceneSearch(String searchString) {
|
||||
super(searchString);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for a specific ACS object and search string.
|
||||
*
|
||||
* @param searchString user specified search string
|
||||
* @param objectType ACS object type
|
||||
**/
|
||||
public LuceneSearch(String searchString, String objectType) {
|
||||
super(searchString, objectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search over all objects in the system using a filter
|
||||
*
|
||||
* @param searchString user specified search string
|
||||
* @param f a filter
|
||||
**/
|
||||
public LuceneSearch(String searchString, Filter f) {
|
||||
super(searchString, f);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search given a preformed query.
|
||||
*
|
||||
* @param q a performed query
|
||||
**/
|
||||
public LuceneSearch(Query q) {
|
||||
super(q);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-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.lucene;
|
||||
|
||||
/**
|
||||
* @deprecated moved to com.arsdigita.search.lucene
|
||||
* @see com.arsdigita.search.lucene.Registry
|
||||
**/
|
||||
public class ObjectTypeFilter
|
||||
extends com.arsdigita.search.lucene.ObjectTypeFilter {
|
||||
|
||||
public ObjectTypeFilter(String objectType) {
|
||||
super(objectType);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-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.lucene;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated moved to com.arsdigita.search.lucene
|
||||
* @see com.arsdigita.search.lucene.Registry
|
||||
**/
|
||||
public class Registry
|
||||
extends com.arsdigita.search.lucene.Registry {
|
||||
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-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.lucene;
|
||||
|
||||
import com.arsdigita.persistence.metadata.ObjectType;
|
||||
import com.arsdigita.persistence.metadata.Property;
|
||||
|
||||
/**
|
||||
* @deprecated moved to com.arsdigita.search.lucene
|
||||
* @see com.arsdigita.search.lucene.StandardAdapter
|
||||
**/
|
||||
public class StandardAdapter
|
||||
extends com.arsdigita.search.lucene.StandardAdapter {
|
||||
|
||||
|
||||
public StandardAdapter(ObjectType type,
|
||||
Property id,
|
||||
Property title,
|
||||
Property summary,
|
||||
Property[] content) {
|
||||
super(type, id, title, summary, content);
|
||||
}
|
||||
|
||||
public StandardAdapter(ObjectType type,
|
||||
String id,
|
||||
String title,
|
||||
String summary,
|
||||
String[] content) {
|
||||
super(type, id, title, summary, content);
|
||||
}
|
||||
public StandardAdapter(String type,
|
||||
String id,
|
||||
String title,
|
||||
String summary,
|
||||
String[] content) {
|
||||
super(type, id, title, summary, content);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-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.lucene;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated moved to com.arsdigita.search.lucene
|
||||
* @see com.arsdigita.search.lucene.TypeSpecificFilter
|
||||
**/
|
||||
public class TypeSpecificFilter
|
||||
extends com.arsdigita.search.lucene.TypeSpecificFilter {
|
||||
|
||||
/**
|
||||
* Creates a new lucene <code>Filter</code> that filters search results
|
||||
* based on whether the "type-specific field" matches the terms supplied in
|
||||
* the <code>typeSpecificInfo</code> argument.
|
||||
*
|
||||
* @param typeSpecificInfo the object type to filter on
|
||||
*
|
||||
**/
|
||||
public TypeSpecificFilter(String typeSpecificInfo) {
|
||||
super(typeSpecificInfo);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>com.arsdigita.lucene</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<p>
|
||||
This package is now deprecated. The classes present here are now
|
||||
merely stubs extending those in the <code>com.arsdigita.search.lucene</code>
|
||||
package. These stubs will be removed in the next release.
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -37,12 +37,20 @@ public class Admin extends Application {
|
|||
private static final Logger s_log = Logger.getLogger(Admin.class);
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE
|
||||
= "com.arsdigita.ui.admin.Admin";
|
||||
= "com.arsdigita.ui.admin.Admin";
|
||||
|
||||
/**
|
||||
* Constructor retrieves application based on its data object
|
||||
* @param obj
|
||||
*/
|
||||
public Admin(DataObject obj) {
|
||||
super(obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor retrieves application based on its OID
|
||||
* @param obj
|
||||
*/
|
||||
public Admin(OID oid)
|
||||
throws DataObjectNotFoundException {
|
||||
|
||||
|
|
@ -65,4 +73,25 @@ public class Admin extends Application {
|
|||
apps.close();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Getter to retrieve the base database object type name
|
||||
*
|
||||
* @return base data aoject type as String
|
||||
*/
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public String getServletPath() {
|
||||
return "/admin";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@ interface AdminConstants {
|
|||
(new GlobalizedMessage("ui.admin.tab.group.title",
|
||||
BUNDLE_NAME));
|
||||
|
||||
Label SITEMAP_TAB_TITLE = new Label
|
||||
(new GlobalizedMessage("ui.admin.tab.sitemap.title",
|
||||
BUNDLE_NAME));
|
||||
|
||||
GlobalizedMessage USER_NAVBAR_TITLE =
|
||||
new GlobalizedMessage("ui.admin.tab.user.navbartitle",
|
||||
BUNDLE_NAME);
|
||||
|
|
@ -100,6 +104,9 @@ interface AdminConstants {
|
|||
BigDecimalParameter GROUP_ID_PARAM =
|
||||
new BigDecimalParameter("group_id");
|
||||
|
||||
BigDecimalParameter SITEMAP_ID_PARAM =
|
||||
new BigDecimalParameter("sitemap_id");
|
||||
|
||||
BigDecimalParameter USER_ID_PARAM =
|
||||
new BigDecimalParameter("user_id");
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ public class AdminDispatcher extends SubsiteDispatcher
|
|||
new UserSearchPane(userSplitPanel, browsePane));
|
||||
userSplitPanel.addTab(USER_TAB_CREATE_USER,
|
||||
new CreateUserPane(userSplitPanel));
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Create group administration panel
|
||||
*/
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
/*
|
||||
* Copyright (C) 2012 Peter Boy <pb@zes.uni-bremen.de> 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.ui.admin;
|
||||
|
||||
import com.arsdigita.bebop.Page;
|
||||
import com.arsdigita.bebop.PageFactory;
|
||||
import com.arsdigita.bebop.TabbedPane;
|
||||
import com.arsdigita.dispatcher.AccessDeniedException;
|
||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.kernel.Party;
|
||||
import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||
import com.arsdigita.kernel.permissions.PermissionService;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.templating.PresentationManager;
|
||||
import com.arsdigita.templating.Templating;
|
||||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.web.Application;
|
||||
import com.arsdigita.web.BaseApplicationServlet;
|
||||
import com.arsdigita.web.LoginSignal;
|
||||
import com.arsdigita.xml.Document;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
// We need NonEscapedTableCellRenderer
|
||||
// Currently part of (thisPackage) Dispatcher.java
|
||||
// When the class will we deleted we must copy first!
|
||||
|
||||
/**
|
||||
* Web Developer Support Application Servlet class, central entry point to
|
||||
* create and process the applications UI.
|
||||
*
|
||||
* We should have subclassed BebopApplicationServlet but couldn't overwrite
|
||||
* doService() method to add permission checking. So we use our own page
|
||||
* mapping. The general logic is the same as for BebopApplicationServlet.
|
||||
* {@see com.arsdigita.bebop.page.BebopApplicationServlet}
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class AdminServlet extends BaseApplicationServlet
|
||||
implements AdminConstants{
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(
|
||||
AdminServlet.class.getName());
|
||||
|
||||
/** URL (pathinfo) -> Page object mapping. Based on it (and the http
|
||||
* request url) the doService method to selects a page to display */
|
||||
private final Map m_pages = new HashMap();
|
||||
|
||||
|
||||
/**
|
||||
* User extension point, overwrite this method to setup a URL - page mapping
|
||||
*
|
||||
* @throws ServletException
|
||||
*/
|
||||
@Override
|
||||
public void doInit() throws ServletException {
|
||||
|
||||
addPage("/", buildAdminIndexPage()); // index page at address ~/ds
|
||||
// addPage("/index.jsp", buildIndexPage()); // index page at address ~/ds
|
||||
|
||||
// addPage("/log4j", buildLog4jPage()); // Logger Adjuster at addr. ~/ds/log4j
|
||||
// addPage("/config", buildConfigPage()); // config browser @ ~/ds/config
|
||||
// cache table browser @ ~/ds/cache-table
|
||||
// addPage("/cache-table", buildCacheTablePage());
|
||||
|
||||
// XXXX!!
|
||||
// QueryLog is a class of its own in webdevsupport, based upon
|
||||
// dispatcher.Disp and prints out all queries in a request
|
||||
// put("query-log", new QueryLog());
|
||||
|
||||
// addPage("/request-info", buildRequestInfoPage());
|
||||
// addPage("/query-info", buildQueryInfoPage());
|
||||
// addPage("/query-plan", buildQueryPlanPage());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Central service method, checks for required permission, determines the
|
||||
* requested page and passes the page object to PresentationManager.
|
||||
*/
|
||||
public final void doService(HttpServletRequest sreq,
|
||||
HttpServletResponse sresp,
|
||||
Application app)
|
||||
throws ServletException, IOException {
|
||||
|
||||
|
||||
|
||||
// /////// Some preparational steps ///////////////
|
||||
|
||||
/* Determine access privilege: only logged in users may access DS */
|
||||
Party party = Kernel.getContext().getParty();
|
||||
if (party == null) {
|
||||
throw new LoginSignal(sreq);
|
||||
}
|
||||
/* Determine access privilege: Admin privileges must be granted */
|
||||
PermissionDescriptor admin = new PermissionDescriptor
|
||||
(PrivilegeDescriptor.ADMIN, app, party);
|
||||
if (!PermissionService.checkPermission(admin)) {
|
||||
throw new AccessDeniedException("User is not an administrator");
|
||||
}
|
||||
/* Want admin to always show the latest stuff... */
|
||||
DispatcherHelper.cacheDisable(sresp);
|
||||
|
||||
|
||||
// /////// Everything OK here - DO IT ///////////////
|
||||
|
||||
String pathInfo = sreq.getPathInfo();
|
||||
Assert.exists(pathInfo, "String pathInfo");
|
||||
if (pathInfo.length() > 1 && pathInfo.endsWith("/")) {
|
||||
/* NOTE: ServletAPI specifies, pathInfo may be empty or will
|
||||
* start with a '/' character. It currently carries a
|
||||
* trailing '/' if a "virtual" page, i.e. not a real jsp, but
|
||||
* result of a servlet mapping. But Application requires url
|
||||
* NOT to end with a trailing '/' for legacy free applications. */
|
||||
pathInfo = pathInfo.substring(0, pathInfo.length()-1);
|
||||
}
|
||||
|
||||
final Page page = (Page) m_pages.get(pathInfo);
|
||||
|
||||
if (page != null) {
|
||||
|
||||
final Document doc = page.buildDocument(sreq, sresp);
|
||||
|
||||
PresentationManager pm = Templating.getPresentationManager();
|
||||
pm.servePage(doc, sreq, sresp);
|
||||
|
||||
} else {
|
||||
|
||||
sresp.sendError(404, "No such page for path " + pathInfo);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds one Url-Page mapping to the internal mapping table.
|
||||
*
|
||||
* @param pathInfo url stub for a page to display
|
||||
* @param page Page object to display
|
||||
*/
|
||||
private void addPage(final String pathInfo, final Page page) {
|
||||
|
||||
Assert.exists(pathInfo, String.class);
|
||||
Assert.exists(page, Page.class);
|
||||
// Current Implementation requires pathInfo to start with a leading '/'
|
||||
// SUN Servlet API specifies: "PathInfo *may be empty* or will start
|
||||
// with a '/' character."
|
||||
Assert.isTrue(pathInfo.startsWith("/"), "path starts not with '/'");
|
||||
|
||||
m_pages.put(pathInfo, page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Index page for the admin section
|
||||
*/
|
||||
private Page buildAdminIndexPage() {
|
||||
|
||||
Page p = PageFactory.buildPage("admin", PAGE_TITLE_LABEL);
|
||||
|
||||
p.addGlobalStateParam(USER_ID_PARAM);
|
||||
p.addGlobalStateParam(GROUP_ID_PARAM);
|
||||
// p.addGlobalStateParam(SITEMAP_ID_PARAM);
|
||||
|
||||
/**
|
||||
* Create User split panel.
|
||||
*/
|
||||
AdminSplitPanel userSplitPanel =
|
||||
new AdminSplitPanel(USER_NAVBAR_TITLE);
|
||||
|
||||
UserBrowsePane browsePane = new UserBrowsePane();
|
||||
|
||||
userSplitPanel.addTab(USER_TAB_SUMMARY,
|
||||
new UserSummaryPane(userSplitPanel, browsePane));
|
||||
userSplitPanel.addTab(USER_TAB_BROWSE,
|
||||
browsePane);
|
||||
userSplitPanel.addTab(USER_TAB_SEARCH,
|
||||
new UserSearchPane(userSplitPanel, browsePane));
|
||||
userSplitPanel.addTab(USER_TAB_CREATE_USER,
|
||||
new CreateUserPane(userSplitPanel));
|
||||
|
||||
|
||||
/*
|
||||
* Create group administration panel
|
||||
*/
|
||||
GroupAdministrationTab groupAdministrationTab =
|
||||
new GroupAdministrationTab();
|
||||
|
||||
/*
|
||||
* Create group administration panel
|
||||
*/
|
||||
// SitemapAdministrationTab sitemapAdministrationTab =
|
||||
// new SitemapAdministrationTab();
|
||||
|
||||
// Create the Admin's page tab bar, currently 2 elements: user & groups
|
||||
TabbedPane tb = new TabbedPane();
|
||||
tb.setIdAttr("page-body");
|
||||
|
||||
tb.addTab(USER_TAB_TITLE, userSplitPanel);
|
||||
tb.addTab(GROUP_TAB_TITLE, groupAdministrationTab);
|
||||
// tb.addTab(SITEMAP_TAB_TITLE, sitemapAdministrationTab);
|
||||
|
||||
browsePane.setTabbedPane(tb);
|
||||
browsePane.setGroupAdministrationTab(groupAdministrationTab);
|
||||
// browsePane.setSitemapAdministrationTab(sitemapAdministrationTab);
|
||||
|
||||
p.add(tb);
|
||||
p.lock();
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -108,6 +108,7 @@ class AdminSplitPanel extends BoxPanel implements ChangeListener {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generateXML(PageState ps, Element parent) {
|
||||
super.generateXML(ps, parent);
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,11 @@ class GroupAdministrationTab extends BoxPanel
|
|||
|
||||
private RequestLocal m_group;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param p
|
||||
*/
|
||||
@Override
|
||||
public void register(Page p) {
|
||||
for (int i = 0; i < m_panelList.size(); i++) {
|
||||
p.setVisibleDefault((Component) m_panelList.get(i), false);
|
||||
|
|
@ -89,6 +94,11 @@ class GroupAdministrationTab extends BoxPanel
|
|||
p.setVisibleDefault(m_groupAddPanel, true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ps
|
||||
* @return
|
||||
*/
|
||||
public Group getGroup(PageState ps) {
|
||||
return (Group) m_group.get(ps);
|
||||
}
|
||||
|
|
@ -115,29 +125,33 @@ class GroupAdministrationTab extends BoxPanel
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public GroupAdministrationTab() {
|
||||
setClassAttr("sidebarNavPanel");
|
||||
setAttribute("navbar-title", "Groups");
|
||||
|
||||
m_group = new RequestLocal() {
|
||||
protected Object initialValue(PageState ps) {
|
||||
String key = (String) m_tree.getSelectedKey(ps);
|
||||
@Override
|
||||
protected Object initialValue(PageState ps) {
|
||||
String key = (String) m_tree.getSelectedKey(ps);
|
||||
|
||||
Group group = null;
|
||||
Group group = null;
|
||||
|
||||
if (key != null) {
|
||||
BigDecimal id = new BigDecimal(key);
|
||||
if (key != null) {
|
||||
BigDecimal id = new BigDecimal(key);
|
||||
|
||||
try {
|
||||
group = new Group(id);
|
||||
} catch(DataObjectNotFoundException exc) {
|
||||
// Silently ignore if group does not
|
||||
// exist.
|
||||
}
|
||||
try {
|
||||
group = new Group(id);
|
||||
} catch(DataObjectNotFoundException exc) {
|
||||
// Silently ignore if group does not
|
||||
// exist.
|
||||
}
|
||||
return group;
|
||||
}
|
||||
};
|
||||
return group;
|
||||
}
|
||||
};
|
||||
|
||||
BoxPanel c = new BoxPanel();
|
||||
c.setClassAttr("navbar");
|
||||
|
|
@ -163,8 +177,8 @@ class GroupAdministrationTab extends BoxPanel
|
|||
m_groupAddPanel = buildGroupAddPanel(rightSide);
|
||||
m_panelList.add(m_groupAddPanel);
|
||||
|
||||
m_existingGroupAddPanel = buildExistingGroupAddPanel(rightSide);
|
||||
m_panelList.add(m_existingGroupAddPanel);
|
||||
m_existingGroupAddPanel = buildExistingGroupAddPanel(rightSide);
|
||||
m_panelList.add(m_existingGroupAddPanel);
|
||||
|
||||
m_subMemberPanel = buildMemberListPanel(rightSide);
|
||||
m_panelList.add(m_subMemberPanel);
|
||||
|
|
@ -206,12 +220,17 @@ class GroupAdministrationTab extends BoxPanel
|
|||
m_groupDeleteFailedPanel.setVisible(ps, true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param e
|
||||
*/
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
|
||||
PageState ps = e.getPageState();
|
||||
String key = (String) m_tree.getSelectedKey(ps);
|
||||
// added cg - reset existing group add panel to the search screen when a new group is selected from the tree
|
||||
m_existingGroupAdd.showSearch(ps);
|
||||
// added cg - reset existing group add panel to the search screen
|
||||
// when a new group is selected from the tree
|
||||
m_existingGroupAdd.showSearch(ps);
|
||||
if (key == null || key.equals("-1")) {
|
||||
/**
|
||||
* If root node is selected then display add
|
||||
|
|
@ -291,22 +310,22 @@ class GroupAdministrationTab extends BoxPanel
|
|||
|
||||
List subGroupList = new List(new SubGroupListModelBuilder(this));
|
||||
subGroupList.setCellRenderer(new ListCellRenderer() {
|
||||
public Component getComponent(
|
||||
List list,
|
||||
PageState state,
|
||||
Object value,
|
||||
String key,
|
||||
int index,
|
||||
boolean isSelected) {
|
||||
BoxPanel b = new BoxPanel(BoxPanel.HORIZONTAL);
|
||||
b.add(new Label(((Group) value).getName()));
|
||||
ControlLink removeLink = new ControlLink(REMOVE_SUBGROUP_LABEL);
|
||||
removeLink.setClassAttr("actionLink");
|
||||
b.add(removeLink);
|
||||
return b;
|
||||
}
|
||||
});
|
||||
subGroupList.addActionListener(new ActionListener() {
|
||||
public Component getComponent(List list,
|
||||
PageState state,
|
||||
Object value,
|
||||
String key,
|
||||
int index,
|
||||
boolean isSelected) {
|
||||
BoxPanel b = new BoxPanel(BoxPanel.HORIZONTAL);
|
||||
b.add(new Label(((Group) value).getName()));
|
||||
ControlLink removeLink = new ControlLink(REMOVE_SUBGROUP_LABEL);
|
||||
removeLink.setClassAttr("actionLink");
|
||||
b.add(removeLink);
|
||||
return b;
|
||||
}
|
||||
});
|
||||
|
||||
subGroupList.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
PageState ps = e.getPageState();
|
||||
String key = (String) ((List) e.getSource()).getSelectedKey(ps);
|
||||
|
|
@ -528,22 +547,43 @@ class SubGroupListModelBuilder extends LockableImpl
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* CLASS
|
||||
*
|
||||
*/
|
||||
class SubGroupListModel implements ListModel {
|
||||
|
||||
private GroupCollection m_coll;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param coll
|
||||
*/
|
||||
public SubGroupListModel(GroupCollection coll) {
|
||||
m_coll = coll;
|
||||
m_coll.addOrder("lower(" + Group.DISPLAY_NAME + ") asc");
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Object getElement() {
|
||||
return m_coll.getGroup();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getKey() {
|
||||
return m_coll.getID().toString();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean next() {
|
||||
if (m_coll != null) {
|
||||
return m_coll.next();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.arsdigita.ui.admin;
|
||||
|
||||
import com.arsdigita.bebop.BoxPanel;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.SingleSelectionModel;
|
||||
import com.arsdigita.bebop.SplitPanel;
|
||||
import com.arsdigita.bebop.event.ChangeEvent;
|
||||
import com.arsdigita.bebop.event.ChangeListener;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import com.arsdigita.ui.sitemap.SiteListing;
|
||||
import com.arsdigita.ui.sitemap.SiteMapAdminPane;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class SitemapAdministrationTab extends BoxPanel
|
||||
implements AdminConstants, ChangeListener {
|
||||
|
||||
private GlobalizedMessage m_title;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public SitemapAdministrationTab() {
|
||||
|
||||
// m_title = "TEST für ein neues Pannel";
|
||||
setClassAttr("sidebarNavPanel");
|
||||
setAttribute("navbar-title", "Sitemap");
|
||||
// m_componentList = new ArrayList();
|
||||
// m_keys = new ArrayList();
|
||||
SiteListing listing = new SiteListing();
|
||||
listing.setClassAttr("navbar");
|
||||
|
||||
SingleSelectionModel m = listing.getTree().getSelectionModel();
|
||||
SiteMapAdminPane details = new SiteMapAdminPane(m, listing.getCFGLink());
|
||||
|
||||
BoxPanel box = new BoxPanel();
|
||||
box.setClassAttr("main");
|
||||
box.add(details);
|
||||
|
||||
SplitPanel panel = new SplitPanel();
|
||||
panel.setClassAttr("sidebarNavPanel");
|
||||
panel.setLeftComponent(listing);
|
||||
panel.setRightComponent(box);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param e
|
||||
*/
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
|
||||
PageState ps = e.getPageState();
|
||||
// String key = (String) m_tree.getSelectedKey(ps);
|
||||
// added cg - reset existing group add panel to the search screen
|
||||
// when a new group is selected from the tree
|
||||
// ps.setValue(GROUP_ID_PARAM, new BigDecimal(key));
|
||||
// int selectedIndex = Integer.parseInt((String) m_list.getSelectedKey(ps));
|
||||
// setTab(selectedIndex, ps);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -102,6 +102,7 @@ class UserBrowsePane extends SegmentedPanel
|
|||
private Component m_extremeActionPanel;
|
||||
private Component m_userDeleteFailedPanel;
|
||||
private GroupAdministrationTab m_groupAdministrationTab;
|
||||
private SitemapAdministrationTab m_sitemapAdministrationTab;
|
||||
private TabbedPane m_tabbedPane;
|
||||
|
||||
private List m_groupList = null;
|
||||
|
|
@ -555,6 +556,11 @@ class UserBrowsePane extends SegmentedPanel
|
|||
m_groupAdministrationTab = groupAdministrationTab;
|
||||
}
|
||||
|
||||
public void setSitemapAdministrationTab(SitemapAdministrationTab
|
||||
sitemapAdministrationTab) {
|
||||
m_sitemapAdministrationTab = sitemapAdministrationTab;
|
||||
}
|
||||
|
||||
// This is how we check if a user is banned or not
|
||||
private boolean hasUserPublishedItems(User user) {
|
||||
DataQuery query = user.getSession().retrieveQuery("com.arsdigita.versioning.UserPublications");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
* Copyright (C) 2012 Peter Boy <pb@zes.uni-bremen.de> 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.ui.permissions;
|
||||
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.persistence.DataObject;
|
||||
import com.arsdigita.persistence.OID;
|
||||
import com.arsdigita.web.Application;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
/**
|
||||
* Sitemap administration application. Currently a trivial
|
||||
* subclass of com.arsdigita.web.Application
|
||||
* @see com.arsdigita.web.Application
|
||||
*/
|
||||
public class Permissions extends Application {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(Permissions.class);
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE
|
||||
= "com.arsdigita.ui.permissions.Permissions";
|
||||
|
||||
public Permissions(DataObject obj) {
|
||||
super(obj);
|
||||
}
|
||||
|
||||
public Permissions(OID oid)
|
||||
throws DataObjectNotFoundException {
|
||||
|
||||
super(oid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter to retrieve the base database object type name
|
||||
*
|
||||
* @return base data aoject type as String
|
||||
*/
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServletPath() {
|
||||
return "/admin-permissions";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
/*
|
||||
* Copyright (C) 2012 Peter Boy <pb@zes.uni-bremen.de> 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.ui.permissions;
|
||||
import com.arsdigita.bebop.Label;
|
||||
import com.arsdigita.bebop.Page;
|
||||
import com.arsdigita.bebop.PageFactory;
|
||||
import com.arsdigita.dispatcher.AccessDeniedException;
|
||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.kernel.Party;
|
||||
import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||
import com.arsdigita.kernel.permissions.PermissionService;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.templating.PresentationManager;
|
||||
import com.arsdigita.templating.Templating;
|
||||
import com.arsdigita.ui.login.UserAuthenticationListener;
|
||||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.web.Application;
|
||||
import com.arsdigita.web.BaseApplicationServlet;
|
||||
import com.arsdigita.web.LoginSignal;
|
||||
import com.arsdigita.xml.Document;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Web Developer Support Application Servlet class, central entry point to
|
||||
* create and process the applications UI.
|
||||
*
|
||||
* We should have subclassed BebopApplicationServlet but couldn't overwrite
|
||||
* doService() method to add permission checking. So we use our own page
|
||||
* mapping. The general logic is the same as for BebopApplicationServlet.
|
||||
* {@see com.arsdigita.bebop.page.BebopApplicationServlet}
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class PermissionsServlet extends BaseApplicationServlet
|
||||
implements PermissionsConstants{
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(
|
||||
PermissionsServlet.class.getName());
|
||||
|
||||
public final static String APPLICATION_NAME = "permissions";
|
||||
|
||||
/** URL (pathinfo) -> Page object mapping. Based on it (and the http
|
||||
* request url) the doService method to selects a page to display */
|
||||
private final Map m_pages = new HashMap();
|
||||
|
||||
|
||||
/**
|
||||
* User extension point, overwrite this method to setup a URL - page mapping
|
||||
*
|
||||
* @throws ServletException
|
||||
*/
|
||||
@Override
|
||||
public void doInit() throws ServletException {
|
||||
|
||||
Page index = buildIndexPage();
|
||||
Page single = buildItemPage();
|
||||
|
||||
addPage("/", index);
|
||||
addPage("/index", index);
|
||||
addPage("/one", single);
|
||||
addPage("/grant", single);
|
||||
addPage("/denied", buildDeniedPage());
|
||||
|
||||
// addPage("/", buildAdminIndexPage()); // index page at address ~/ds
|
||||
// addPage("/index.jsp", buildIndexPage()); // index page at address ~/ds
|
||||
|
||||
// addPage("/log4j", buildLog4jPage()); // Logger Adjuster at addr. ~/ds/log4j
|
||||
// addPage("/config", buildConfigPage()); // config browser @ ~/ds/config
|
||||
// cache table browser @ ~/ds/cache-table
|
||||
// addPage("/cache-table", buildCacheTablePage());
|
||||
|
||||
// XXXX!!
|
||||
// QueryLog is a class of its own in webdevsupport, based upon
|
||||
// dispatcher.Disp and prints out all queries in a request
|
||||
// put("query-log", new QueryLog());
|
||||
|
||||
// addPage("/request-info", buildRequestInfoPage());
|
||||
// addPage("/query-info", buildQueryInfoPage());
|
||||
// addPage("/query-plan", buildQueryPlanPage());
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Central service method, checks for required permission, determines the
|
||||
* requested page and passes the page object to PresentationManager.
|
||||
*/
|
||||
public final void doService(HttpServletRequest sreq,
|
||||
HttpServletResponse sresp,
|
||||
Application app)
|
||||
throws ServletException, IOException {
|
||||
|
||||
|
||||
|
||||
// /////// Some preparational steps ///////////////
|
||||
|
||||
/* Determine access privilege: only logged in users may access DS */
|
||||
Party party = Kernel.getContext().getParty();
|
||||
if (party == null) {
|
||||
throw new LoginSignal(sreq);
|
||||
}
|
||||
/* Determine access privilege: Admin privileges must be granted */
|
||||
PermissionDescriptor admin = new PermissionDescriptor
|
||||
(PrivilegeDescriptor.ADMIN, app, party);
|
||||
if (!PermissionService.checkPermission(admin)) {
|
||||
throw new AccessDeniedException("User is not an administrator");
|
||||
}
|
||||
/* Want admin to always show the latest stuff... */
|
||||
DispatcherHelper.cacheDisable(sresp);
|
||||
|
||||
|
||||
// /////// Everything OK here - DO IT ///////////////
|
||||
|
||||
String pathInfo = sreq.getPathInfo();
|
||||
Assert.exists(pathInfo, "String pathInfo");
|
||||
if (pathInfo.length() > 1 && pathInfo.endsWith("/")) {
|
||||
/* NOTE: ServletAPI specifies, pathInfo may be empty or will
|
||||
* start with a '/' character. It currently carries a
|
||||
* trailing '/' if a "virtual" page, i.e. not a real jsp, but
|
||||
* result of a servlet mapping. But Application requires url
|
||||
* NOT to end with a trailing '/' for legacy free applications. */
|
||||
pathInfo = pathInfo.substring(0, pathInfo.length()-1);
|
||||
}
|
||||
|
||||
final Page page = (Page) m_pages.get(pathInfo);
|
||||
|
||||
if (page != null) {
|
||||
|
||||
final Document doc = page.buildDocument(sreq, sresp);
|
||||
|
||||
PresentationManager pm = Templating.getPresentationManager();
|
||||
pm.servePage(doc, sreq, sresp);
|
||||
|
||||
} else {
|
||||
|
||||
sresp.sendError(404, "No such page for path " + pathInfo);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds one Url-Page mapping to the internal mapping table.
|
||||
*
|
||||
* @param pathInfo url stub for a page to display
|
||||
* @param page Page object to display
|
||||
*/
|
||||
private void addPage(final String pathInfo, final Page page) {
|
||||
|
||||
Assert.exists(pathInfo, String.class);
|
||||
Assert.exists(page, Page.class);
|
||||
// Current Implementation requires pathInfo to start with a leading '/'
|
||||
// SUN Servlet API specifies: "PathInfo *may be empty* or will start
|
||||
// with a '/' character."
|
||||
Assert.isTrue(pathInfo.startsWith("/"), "path starts not with '/'");
|
||||
|
||||
m_pages.put(pathInfo, page);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Page buildIndexPage() {
|
||||
Label title = new Label(PERMISSIONS_INDEX);
|
||||
title.setClassAttr("heading");
|
||||
|
||||
Page p = PageFactory.buildPage(APPLICATION_NAME,
|
||||
title);
|
||||
p.addRequestListener(new UserAuthenticationListener());
|
||||
p.add(new IndexPanel());
|
||||
p.lock();
|
||||
return p;
|
||||
}
|
||||
|
||||
private Page buildDeniedPage() {
|
||||
Page p = PageFactory.buildPage(APPLICATION_NAME,
|
||||
new Label(PAGE_DENIED_TITLE));
|
||||
Label label = new Label();
|
||||
label.setClassAttr("AccessDenied");
|
||||
p.add(label);
|
||||
p.lock();
|
||||
return p;
|
||||
}
|
||||
|
||||
private Page buildItemPage() {
|
||||
PermissionsPane pane = new PermissionsPane();
|
||||
|
||||
Page p = PageFactory.buildPage(APPLICATION_NAME,
|
||||
pane.getTitle());
|
||||
p.addRequestListener(new UserAuthenticationListener());
|
||||
p.add(pane);
|
||||
p.lock();
|
||||
return p;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ public class SiteMap extends Application {
|
|||
private static final Logger s_log = Logger.getLogger(SiteMap.class);
|
||||
|
||||
public static final String BASE_DATA_OBJECT_TYPE
|
||||
= "com.arsdigita.ui.sitemap.SiteMap";
|
||||
= "com.arsdigita.ui.sitemap.SiteMap";
|
||||
|
||||
public SiteMap(DataObject obj) {
|
||||
super(obj);
|
||||
|
|
@ -46,4 +46,20 @@ public class SiteMap extends Application {
|
|||
|
||||
super(oid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter to retrieve the base database object type name
|
||||
*
|
||||
* @return base data aoject type as String
|
||||
*/
|
||||
@Override
|
||||
protected String getBaseDataObjectType() {
|
||||
return BASE_DATA_OBJECT_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getServletPath() {
|
||||
return "/admin-sitemap";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* Copyright (C) 2012 Peter Boy <pb@zes.uni-bremen.de> 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.ui.sitemap;
|
||||
|
||||
import com.arsdigita.bebop.BoxPanel;
|
||||
import com.arsdigita.bebop.Page;
|
||||
import com.arsdigita.bebop.PageFactory;
|
||||
import com.arsdigita.bebop.SingleSelectionModel;
|
||||
import com.arsdigita.bebop.SplitPanel;
|
||||
import com.arsdigita.bebop.TabbedPane;
|
||||
import com.arsdigita.dispatcher.AccessDeniedException;
|
||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.kernel.Party;
|
||||
import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||
import com.arsdigita.kernel.permissions.PermissionService;
|
||||
import com.arsdigita.kernel.permissions.PrivilegeDescriptor;
|
||||
import com.arsdigita.templating.PresentationManager;
|
||||
import com.arsdigita.templating.Templating;
|
||||
import com.arsdigita.util.Assert;
|
||||
import com.arsdigita.web.Application;
|
||||
import com.arsdigita.web.BaseApplicationServlet;
|
||||
import com.arsdigita.web.LoginSignal;
|
||||
import com.arsdigita.xml.Document;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* Core admin SiteMap Application Servlet class, central entry point to
|
||||
* create and process the applications UI.
|
||||
*
|
||||
* We should have subclassed BebopApplicationServlet but couldn't overwrite
|
||||
* doService() method to add permission checking. So we use our own page
|
||||
* mapping. The general logic is the same as for BebopApplicationServlet.
|
||||
* {@see com.arsdigita.bebop.page.BebopApplicationServlet}
|
||||
*
|
||||
* @author pb
|
||||
*/
|
||||
public class SiteMapServlet extends BaseApplicationServlet {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(
|
||||
SiteMapServlet.class.getName());
|
||||
|
||||
/** URL (pathinfo) -> Page object mapping. Based on it (and the http
|
||||
* request url) the doService method to selects a page to display */
|
||||
private final Map m_pages = new HashMap();
|
||||
|
||||
|
||||
/**
|
||||
* User extension point, overwrite this method to setup a URL - page mapping
|
||||
*
|
||||
* @throws ServletException
|
||||
*/
|
||||
@Override
|
||||
public void doInit() throws ServletException {
|
||||
|
||||
addPage("/", buildAdminIndexPage()); // index page at address ~/ds
|
||||
// addPage("/index.jsp", buildIndexPage()); // index page at address ~/ds
|
||||
|
||||
// addPage("/log4j", buildLog4jPage()); // Logger Adjuster at addr. ~/ds/log4j
|
||||
// addPage("/config", buildConfigPage()); // config browser @ ~/ds/config
|
||||
// cache table browser @ ~/ds/cache-table
|
||||
// addPage("/cache-table", buildCacheTablePage());
|
||||
|
||||
// XXXX!!
|
||||
// QueryLog is a class of its own in webdevsupport, based upon
|
||||
// dispatcher.Disp and prints out all queries in a request
|
||||
// put("query-log", new QueryLog());
|
||||
|
||||
// addPage("/request-info", buildRequestInfoPage());
|
||||
// addPage("/query-info", buildQueryInfoPage());
|
||||
// addPage("/query-plan", buildQueryPlanPage());
|
||||
|
||||
}
|
||||
/**
|
||||
* Central service method, checks for required permission, determines the
|
||||
* requested page and passes the page object to PresentationManager.
|
||||
*/
|
||||
public final void doService(HttpServletRequest sreq,
|
||||
HttpServletResponse sresp,
|
||||
Application app)
|
||||
throws ServletException, IOException {
|
||||
|
||||
|
||||
|
||||
// /////// Some preparational steps ///////////////
|
||||
|
||||
/* Determine access privilege: only logged in users may access DS */
|
||||
Party party = Kernel.getContext().getParty();
|
||||
if (party == null) {
|
||||
throw new LoginSignal(sreq);
|
||||
}
|
||||
/* Determine access privilege: Admin privileges must be granted */
|
||||
PermissionDescriptor admin = new PermissionDescriptor
|
||||
(PrivilegeDescriptor.ADMIN, app, party);
|
||||
if (!PermissionService.checkPermission(admin)) {
|
||||
throw new AccessDeniedException("User is not an administrator");
|
||||
}
|
||||
/* Want admin to always show the latest stuff... */
|
||||
DispatcherHelper.cacheDisable(sresp);
|
||||
|
||||
|
||||
// /////// Everything OK here - DO IT ///////////////
|
||||
|
||||
String pathInfo = sreq.getPathInfo();
|
||||
Assert.exists(pathInfo, "String pathInfo");
|
||||
if (pathInfo.length() > 1 && pathInfo.endsWith("/")) {
|
||||
/* NOTE: ServletAPI specifies, pathInfo may be empty or will
|
||||
* start with a '/' character. It currently carries a
|
||||
* trailing '/' if a "virtual" page, i.e. not a real jsp, but
|
||||
* result of a servlet mapping. But Application requires url
|
||||
* NOT to end with a trailing '/' for legacy free applications. */
|
||||
pathInfo = pathInfo.substring(0, pathInfo.length()-1);
|
||||
}
|
||||
|
||||
final Page page = (Page) m_pages.get(pathInfo);
|
||||
|
||||
if (page != null) {
|
||||
|
||||
final Document doc = page.buildDocument(sreq, sresp);
|
||||
|
||||
PresentationManager pm = Templating.getPresentationManager();
|
||||
pm.servePage(doc, sreq, sresp);
|
||||
|
||||
} else {
|
||||
|
||||
sresp.sendError(404, "No such page for path " + pathInfo);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds one Url-Page mapping to the internal mapping table.
|
||||
*
|
||||
* @param pathInfo url stub for a page to display
|
||||
* @param page Page object to display
|
||||
*/
|
||||
private void addPage(final String pathInfo, final Page page) {
|
||||
|
||||
Assert.exists(pathInfo, String.class);
|
||||
Assert.exists(page, Page.class);
|
||||
// Current Implementation requires pathInfo to start with a leading '/'
|
||||
// SUN Servlet API specifies: "PathInfo *may be empty* or will start
|
||||
// with a '/' character."
|
||||
Assert.isTrue(pathInfo.startsWith("/"), "path starts not with '/'");
|
||||
|
||||
m_pages.put(pathInfo, page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Index Page for the SiteMap application
|
||||
* @return
|
||||
*/
|
||||
private Page buildAdminIndexPage() {
|
||||
|
||||
Page p = PageFactory.buildPage("admin", "Sitemap Administration");
|
||||
|
||||
SiteListing listing = new SiteListing();
|
||||
listing.setClassAttr("navbar");
|
||||
|
||||
SingleSelectionModel m = listing.getTree().getSelectionModel();
|
||||
SiteMapAdminPane details = new SiteMapAdminPane(m, listing.getCFGLink());
|
||||
|
||||
BoxPanel box = new BoxPanel();
|
||||
box.setClassAttr("main");
|
||||
box.add(details);
|
||||
|
||||
SplitPanel panel = new SplitPanel();
|
||||
panel.setClassAttr("sidebarNavPanel");
|
||||
panel.setLeftComponent(listing);
|
||||
panel.setRightComponent(box);
|
||||
|
||||
p.add(panel);
|
||||
p.lock();
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -65,8 +65,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public abstract class BaseApplicationServlet extends BaseServlet {
|
||||
|
||||
private static Logger s_log = Logger.getLogger
|
||||
(BaseApplicationServlet.class);
|
||||
private static Logger s_log = Logger.getLogger(BaseApplicationServlet.class);
|
||||
|
||||
/**
|
||||
* <p>The ID of the application whose service is requested. This
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ import com.arsdigita.web.LoginSignal;
|
|||
import com.arsdigita.web.ParameterMap;
|
||||
import com.arsdigita.web.RedirectSignal;
|
||||
import com.arsdigita.web.URL;
|
||||
import com.arsdigita.webdevsupport.log4j.CategoryPanel;
|
||||
import com.arsdigita.webdevsupport.config.ConfigList;
|
||||
import com.arsdigita.webdevsupport.ui.CategoryPanel;
|
||||
import com.arsdigita.webdevsupport.ui.ConfigParameterList;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
import java.io.IOException;
|
||||
|
|
@ -270,7 +270,7 @@ public class Dispatcher extends BebopMapDispatcher {
|
|||
*/
|
||||
private Page buildConfigPage() {
|
||||
Page p = PageFactory.buildPage(APP_NAME, "Registry Config");
|
||||
p.add(new ConfigList());
|
||||
p.add(new ConfigParameterList());
|
||||
p.lock();
|
||||
return p;
|
||||
}
|
||||
|
|
@ -810,27 +810,3 @@ public class Dispatcher extends BebopMapDispatcher {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
class NonEscapedTableCellRenderer implements TableCellRenderer {
|
||||
private boolean m_controlLink;
|
||||
public NonEscapedTableCellRenderer(boolean controlLink) {
|
||||
super();
|
||||
m_controlLink = controlLink;
|
||||
}
|
||||
public NonEscapedTableCellRenderer() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
public Component getComponent(Table table, PageState state, Object value,
|
||||
boolean isSelected, Object key,
|
||||
int row, int column) {
|
||||
SimpleContainer c = new SimpleContainer();
|
||||
Label l = new Label((String)value);
|
||||
l.setOutputEscaping(false);
|
||||
c.add(l);
|
||||
if (m_controlLink) {
|
||||
c.add(new ControlLink("download"));
|
||||
}
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
/*
|
||||
* 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.webdevsupport;
|
||||
|
||||
import com.arsdigita.kernel.BaseInitializer;
|
||||
import com.arsdigita.initializer.Configuration;
|
||||
import com.arsdigita.initializer.InitializationException;
|
||||
|
||||
import com.arsdigita.developersupport.DeveloperSupport;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
// ///////////////////////////////////////////////////////////
|
||||
//
|
||||
// Moved to core initializer
|
||||
//
|
||||
// ///////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/**
|
||||
* Initializer
|
||||
*
|
||||
* @version $Revision: #17 $ $Date: 2004/08/16 $
|
||||
*/
|
||||
|
||||
public class LegacyInitializer extends BaseInitializer {
|
||||
|
||||
private Configuration m_conf = new Configuration();
|
||||
|
||||
public final static String ACTIVE = "active";
|
||||
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(LegacyInitializer.class);
|
||||
|
||||
public LegacyInitializer() throws InitializationException {
|
||||
m_conf.initParameter(ACTIVE,
|
||||
"Flag to turn on/off developer support",
|
||||
Boolean.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the configuration object used by this initializer.
|
||||
**/
|
||||
public Configuration getConfiguration() {
|
||||
return m_conf;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called on startup.
|
||||
**/
|
||||
protected void doStartup() {
|
||||
Boolean active = (Boolean)m_conf.getParameter(ACTIVE);
|
||||
if (Boolean.TRUE.equals(active)) {
|
||||
s_log.debug("Registering webdev listener");
|
||||
DeveloperSupport.addListener(WebDevSupport.getInstance());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on shutdown. It's probably not a good idea to depend on this
|
||||
* being called.
|
||||
**/
|
||||
protected void doShutdown() { }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -32,6 +32,7 @@ import com.arsdigita.bebop.Page;
|
|||
import com.arsdigita.bebop.PageFactory;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
import com.arsdigita.bebop.RequestLocal;
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
import com.arsdigita.bebop.Table;
|
||||
import com.arsdigita.bebop.event.ActionEvent;
|
||||
import com.arsdigita.bebop.event.ActionListener;
|
||||
|
|
@ -41,11 +42,13 @@ import com.arsdigita.bebop.parameters.IntegerParameter;
|
|||
import com.arsdigita.bebop.parameters.ParameterModel;
|
||||
import com.arsdigita.bebop.table.AbstractTableModelBuilder;
|
||||
import com.arsdigita.bebop.table.DefaultTableCellRenderer;
|
||||
import com.arsdigita.bebop.table.TableCellRenderer;
|
||||
import com.arsdigita.bebop.table.TableModel;
|
||||
import com.arsdigita.bebop.table.TableModelBuilder;
|
||||
import com.arsdigita.developersupport.DeveloperSupport;
|
||||
import com.arsdigita.dispatcher.AccessDeniedException;
|
||||
import com.arsdigita.dispatcher.DispatcherHelper;
|
||||
import com.arsdigita.dispatcher.RequestContext;
|
||||
import com.arsdigita.kernel.Kernel;
|
||||
import com.arsdigita.kernel.Party;
|
||||
import com.arsdigita.kernel.permissions.PermissionDescriptor;
|
||||
|
|
@ -61,8 +64,8 @@ import com.arsdigita.web.LoginSignal;
|
|||
import com.arsdigita.web.ParameterMap;
|
||||
import com.arsdigita.web.RedirectSignal;
|
||||
import com.arsdigita.web.URL;
|
||||
import com.arsdigita.webdevsupport.config.ConfigList;
|
||||
import com.arsdigita.webdevsupport.log4j.CategoryPanel;
|
||||
import com.arsdigita.webdevsupport.ui.ConfigParameterList;
|
||||
import com.arsdigita.webdevsupport.ui.CategoryPanel;
|
||||
import com.arsdigita.xml.Document;
|
||||
import com.arsdigita.xml.Element;
|
||||
|
||||
|
|
@ -74,9 +77,9 @@ import java.util.ListIterator;
|
|||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
|
|
@ -92,8 +95,8 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class WebDevSupportServlet extends BaseApplicationServlet {
|
||||
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(Dispatcher.class.getName());
|
||||
private static final Logger s_log = Logger.getLogger(
|
||||
WebDevSupportServlet.class.getName());
|
||||
|
||||
public static final String APP_NAME = "ds";
|
||||
|
||||
|
|
@ -119,12 +122,12 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
// cache table browser @ ~/ds/cache-table
|
||||
addPage("/cache-table", buildCacheTablePage());
|
||||
|
||||
// XXXX!!
|
||||
// QueryLog is a class of its own in webdevsupport, based upon dispatcher.Disp
|
||||
// and prints out all queries in a request
|
||||
// put("query-log", new QueryLog());
|
||||
// XXXX!!
|
||||
// QueryLog is a class of its own in webdevsupport, based upon
|
||||
// dispatcher.Disp and prints out all queries in a request
|
||||
// put("query-log", new QueryLog());
|
||||
|
||||
addPage("/request-info", buildInfoPage());
|
||||
addPage("/request-info", buildRequestInfoPage());
|
||||
addPage("/query-info", buildQueryInfoPage());
|
||||
addPage("/query-plan", buildQueryPlanPage());
|
||||
|
||||
|
|
@ -180,8 +183,19 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
pm.servePage(doc, sreq, sresp);
|
||||
|
||||
} else {
|
||||
sresp.sendError(404, "No such page for path " + pathInfo);
|
||||
// throw new IllegalStateException("No such page for path " + pathInfo);
|
||||
if (pathInfo.equals("/query-log")) {
|
||||
|
||||
// special solution for query log to continue to use the
|
||||
// dispatcher based creation of a new page.
|
||||
// Should be refactored asap to use a PageFactory instead!
|
||||
RequestContext ctx = DispatcherHelper.getRequestContext(sreq);
|
||||
new QueryLog().dispatch(sreq, sresp, ctx);
|
||||
|
||||
} else {
|
||||
|
||||
sresp.sendError(404, "No such page for path " + pathInfo);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -213,12 +227,21 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
|
||||
Page p = PageFactory.buildPage(APP_NAME, "Web Developer Support");
|
||||
|
||||
|
||||
// Create a group of 4 permanent links, the first 3 to additional pages
|
||||
// which handle status of logger instances, config properties and cache
|
||||
// tables 1 or 2 to add additional information about requests to this
|
||||
// page.
|
||||
BoxPanel links = new BoxPanel(BoxPanel.VERTICAL);
|
||||
|
||||
links.add(new Link("Log4j Logger Adjuster", "/ds/log4j"));
|
||||
links.add(new Link("Config Browser", "/ds/config"));
|
||||
links.add(new Link("Cache Table Browser", "/ds/cache-table"));
|
||||
|
||||
|
||||
// Creates an (page internal) action link to toggle reqest logging
|
||||
// on/off. If ON additional page content is generated: a list of
|
||||
// available requests (table view)
|
||||
ActionLink enable = new ActionLink("Enable request logging") {
|
||||
@Override
|
||||
public boolean isVisible(PageState state) {
|
||||
|
|
@ -235,7 +258,7 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
}
|
||||
|
||||
});
|
||||
links.add(enable);
|
||||
links.add(enable); // add ActionLink to the link group
|
||||
|
||||
ActionLink disable = new ActionLink("Disable request logging") {
|
||||
@Override
|
||||
|
|
@ -245,7 +268,6 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
&& super.isVisible(state);
|
||||
}
|
||||
};
|
||||
|
||||
disable.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
DeveloperSupport.removeListener(WebDevSupportListener.getInstance());
|
||||
|
|
@ -254,8 +276,14 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
null), true);
|
||||
}
|
||||
});
|
||||
links.add(disable);
|
||||
links.add(disable); // add ActionLink to the link group, only visible
|
||||
// if link enable is toggled ON and no longer visible!
|
||||
|
||||
|
||||
|
||||
// Create a box panel to show additional information about requests
|
||||
// on a on demand base (must ge toggled ON by a link on the link panel)
|
||||
// Visibility depends on the toggle
|
||||
BoxPanel logs = new BoxPanel(BoxPanel.VERTICAL) {
|
||||
@Override
|
||||
public boolean isVisible(PageState state) {
|
||||
|
|
@ -265,6 +293,7 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
}
|
||||
};
|
||||
|
||||
// Adding info line about number of requests to store and show
|
||||
logs.add(new Label("") {
|
||||
@Override
|
||||
public String getLabel(PageState ps) {
|
||||
|
|
@ -274,6 +303,7 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
}
|
||||
});
|
||||
|
||||
// Add aditional toggle whether or not to include hits to ds
|
||||
Label toggle = new Label("") {
|
||||
@Override
|
||||
public String getLabel(PageState ps) {
|
||||
|
|
@ -292,46 +322,154 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
}
|
||||
};
|
||||
|
||||
|
||||
// Add created widgets / controls to the log pannel
|
||||
logs.add(cl);
|
||||
logs.add(new Label("<h3>Available Request Information</h3>", false));
|
||||
logs.add(makeRequestTable());
|
||||
|
||||
// Add all panels to the page and lock
|
||||
p.add(links);
|
||||
p.add(logs);
|
||||
p.lock();
|
||||
return p;
|
||||
|
||||
return p; // page ready to display
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a separate page to show logger instances and its state.
|
||||
* Controlled by the 1. Link on the web developer support index page.
|
||||
*
|
||||
* @return log4j Page object
|
||||
*/
|
||||
private Page buildLog4jPage() {
|
||||
|
||||
Page p = PageFactory.buildPage(APP_NAME, "Log4j Logger Adjuster");
|
||||
|
||||
p.add(new CategoryPanel());
|
||||
p.lock();
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a separate page to show the status of configuration parameters
|
||||
* for every installed package (module).
|
||||
* Controlled by the 2. Link on the web developer support index page.
|
||||
*
|
||||
* @return config Page object
|
||||
*/
|
||||
private Page buildConfigPage() {
|
||||
|
||||
Page p = PageFactory.buildPage(APP_NAME, "Registry Config");
|
||||
p.add(new ConfigList());
|
||||
|
||||
p.add(new ConfigParameterList());
|
||||
p.lock();
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a separate page to show all cache tables in use.
|
||||
* Controlled by the 3. Link on the web developer support page.
|
||||
* @return
|
||||
*/
|
||||
private Page buildCacheTablePage() {
|
||||
|
||||
Page p = PageFactory.buildPage(APP_NAME, "Cache Table Browser");
|
||||
|
||||
p.add(new CacheTableBrowser());
|
||||
p.lock();
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an additional component for the web developer support index page.
|
||||
* Controlled by the 4. link (a toggle) to show request information.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private Table makeRequestTable() {
|
||||
final String[] headers = { "Time", "Duration", "Queries", "IP",
|
||||
"Request", "Extra" };
|
||||
|
||||
TableModelBuilder b = new AbstractTableModelBuilder() {
|
||||
public TableModel makeModel(Table t, PageState s) {
|
||||
return new TableModel() {
|
||||
ListIterator iter =
|
||||
WebDevSupportListener.getInstance().getRequestsReverse();
|
||||
private RequestInfo current = null;
|
||||
|
||||
public int getColumnCount() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
public boolean nextRow() {
|
||||
while (iter.hasPrevious()) {
|
||||
current = (RequestInfo) iter.previous();
|
||||
boolean isdevsupp = current.isDevSupportRequest();
|
||||
if (s_showDSPages || !isdevsupp) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
static final int MAXSTR = 35;
|
||||
public Object getElementAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0: return current.getTime();
|
||||
case 1: return current.getDuration();
|
||||
case 2: return current.getNumQueries()+"";
|
||||
case 3: return current.getIP();
|
||||
case 4: {
|
||||
String req = current.getRequest();
|
||||
if (req.length() > MAXSTR) {
|
||||
return req.substring(0, MAXSTR)+"...";
|
||||
} else {
|
||||
return req;
|
||||
}
|
||||
}
|
||||
case 5:
|
||||
return "[query log]";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Object getKeyAt(int columnIndex) {
|
||||
return new Integer(current.getID());
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Table result = new Table(b, headers);
|
||||
result.getColumn(4).setCellRenderer(new
|
||||
DefaultTableCellRenderer(true));
|
||||
result.getColumn(5).setCellRenderer(new
|
||||
DefaultTableCellRenderer(true));
|
||||
result.addTableActionListener(new TableActionAdapter() {
|
||||
@Override
|
||||
public void cellSelected(TableActionEvent e) {
|
||||
final ParameterMap params = new ParameterMap();
|
||||
params.setParameter("request_id", e.getRowKey());
|
||||
|
||||
if (e.getColumn().intValue() == 4) {
|
||||
throw new RedirectSignal(URL.getDispatcherPath() +
|
||||
"/ds/request-info" + params, true);
|
||||
} else if (e.getColumn().intValue() == 5) {
|
||||
throw new RedirectSignal(URL.getDispatcherPath() +
|
||||
"/ds/query-log" + params, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
Label l = new Label("None");
|
||||
l.setFontWeight(Label.ITALIC);
|
||||
l.setStyleAttr("padding-left: 3em");
|
||||
result.setEmptyView(l);
|
||||
result.setWidth("100%");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private ParameterModel m_request_id = new IntegerParameter("request_id");
|
||||
|
|
@ -340,12 +478,15 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
*
|
||||
* @return info Page object
|
||||
*/
|
||||
private Page buildInfoPage() {
|
||||
private Page buildRequestInfoPage() {
|
||||
|
||||
Page p = PageFactory.buildPage(APP_NAME, "Request Information");
|
||||
|
||||
p.addGlobalStateParam(m_request_id);
|
||||
// p.add(new RequestInfoComponent());
|
||||
p.add(new RequestInfoOverviewHeaderComponent());
|
||||
p.add(makeDatabaseRequestComponent());
|
||||
p.lock();
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
@ -577,88 +718,6 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
return panel;
|
||||
}
|
||||
|
||||
|
||||
private Table makeRequestTable() {
|
||||
final String[] headers = { "Time", "Duration", "Queries", "IP",
|
||||
"Request", "Extra" };
|
||||
|
||||
TableModelBuilder b = new AbstractTableModelBuilder() {
|
||||
public TableModel makeModel(Table t, PageState s) {
|
||||
return new TableModel() {
|
||||
ListIterator iter =
|
||||
WebDevSupportListener.getInstance().getRequestsReverse();
|
||||
private RequestInfo current = null;
|
||||
|
||||
public int getColumnCount() {
|
||||
return 6;
|
||||
}
|
||||
|
||||
public boolean nextRow() {
|
||||
while (iter.hasPrevious()) {
|
||||
current = (RequestInfo) iter.previous();
|
||||
boolean isdevsupp = current.isDevSupportRequest();
|
||||
if (s_showDSPages || !isdevsupp) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
static final int MAXSTR = 35;
|
||||
public Object getElementAt(int columnIndex) {
|
||||
switch (columnIndex) {
|
||||
case 0: return current.getTime();
|
||||
case 1: return current.getDuration();
|
||||
case 2: return current.getNumQueries()+"";
|
||||
case 3: return current.getIP();
|
||||
case 4: {
|
||||
String req = current.getRequest();
|
||||
if (req.length() > MAXSTR) {
|
||||
return req.substring(0, MAXSTR)+"...";
|
||||
} else {
|
||||
return req;
|
||||
}
|
||||
}
|
||||
case 5:
|
||||
return "[query log]";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
public Object getKeyAt(int columnIndex) {
|
||||
return new Integer(current.getID());
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
Table result = new Table(b, headers);
|
||||
result.getColumn(4).setCellRenderer(new
|
||||
DefaultTableCellRenderer(true));
|
||||
result.getColumn(5).setCellRenderer(new
|
||||
DefaultTableCellRenderer(true));
|
||||
result.addTableActionListener(new TableActionAdapter() {
|
||||
@Override
|
||||
public void cellSelected(TableActionEvent e) {
|
||||
final ParameterMap params = new ParameterMap();
|
||||
params.setParameter("request_id", e.getRowKey());
|
||||
|
||||
if (e.getColumn().intValue() == 4) {
|
||||
throw new RedirectSignal(URL.getDispatcherPath() +
|
||||
"/ds/request-info" + params, true);
|
||||
} else if (e.getColumn().intValue() == 5) {
|
||||
throw new RedirectSignal(URL.getDispatcherPath() +
|
||||
"/ds/query-log" + params, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
Label l = new Label("None");
|
||||
l.setFontWeight(Label.ITALIC);
|
||||
l.setStyleAttr("padding-left: 3em");
|
||||
result.setEmptyView(l);
|
||||
result.setWidth("100%");
|
||||
return result;
|
||||
}
|
||||
|
||||
String dashes(int depth) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
while (depth-- > 0) sb.append("--");
|
||||
|
|
@ -681,14 +740,17 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Internal class to create a page component to display summerized
|
||||
* information about a request. It is displayed as a header / summary
|
||||
* paragraph in the top part of the "request Information" page, build by
|
||||
* buildRequestInfoPage method.
|
||||
*/
|
||||
class RequestInfoComponent extends com.arsdigita.bebop.SimpleComponent {
|
||||
class RequestInfoOverviewHeaderComponent extends com.arsdigita.bebop.SimpleComponent {
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public RequestInfoComponent() {
|
||||
public RequestInfoOverviewHeaderComponent() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
|
@ -868,9 +930,36 @@ public class WebDevSupportServlet extends BaseApplicationServlet {
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// We need NonEscapedTableCellRenderer
|
||||
// Currently part of (thisPackage) Dispatcher.java
|
||||
// When the class will we deleted we must copy first!
|
||||
|
||||
/**
|
||||
* Public class
|
||||
*
|
||||
*/
|
||||
class NonEscapedTableCellRenderer implements TableCellRenderer {
|
||||
private boolean m_controlLink;
|
||||
public NonEscapedTableCellRenderer(boolean controlLink) {
|
||||
super();
|
||||
m_controlLink = controlLink;
|
||||
}
|
||||
public NonEscapedTableCellRenderer() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
public Component getComponent(Table table, PageState state, Object value,
|
||||
boolean isSelected, Object key,
|
||||
int row, int column) {
|
||||
SimpleContainer c = new SimpleContainer();
|
||||
Label l = new Label((String)value);
|
||||
l.setOutputEscaping(false);
|
||||
c.add(l);
|
||||
if (m_controlLink) {
|
||||
c.add(new ControlLink("download"));
|
||||
}
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.webdevsupport.log4j;
|
||||
package com.arsdigita.webdevsupport.ui;
|
||||
|
||||
import com.arsdigita.bebop.form.SingleSelect;
|
||||
import com.arsdigita.bebop.form.Option;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.webdevsupport.log4j;
|
||||
package com.arsdigita.webdevsupport.ui;
|
||||
|
||||
import com.arsdigita.bebop.FormProcessException;
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.webdevsupport.log4j;
|
||||
package com.arsdigita.webdevsupport.ui;
|
||||
|
||||
import com.arsdigita.util.LockableImpl;
|
||||
import com.arsdigita.bebop.ControlLink;
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
package com.arsdigita.webdevsupport.config;
|
||||
package com.arsdigita.webdevsupport.ui;
|
||||
|
||||
import com.arsdigita.bebop.SimpleContainer;
|
||||
import com.arsdigita.bebop.PageState;
|
||||
|
|
@ -40,14 +40,18 @@ import java.util.ArrayList;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class ConfigList extends SimpleContainer {
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ConfigParameterList extends SimpleContainer {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger(ConfigList.class);
|
||||
private static final Logger s_log = Logger.getLogger(ConfigParameterList.class);
|
||||
|
||||
|
||||
public static final String XML_NS = "http://xmlns.redhat.com/waf/webdevsupport/1.0";
|
||||
|
||||
public ConfigList() {
|
||||
public ConfigParameterList() {
|
||||
super("devsup:configList",
|
||||
XML_NS);
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
// I18N constants
|
||||
// LANG: "de", ENCODING: UTF-8
|
||||
// Author: Peter Boy, pboy@zes.uni-bremen.de
|
||||
{
|
||||
"definition list": "Definitionsliste",
|
||||
"definition term": "Begriff",
|
||||
"definition description": "Definition"
|
||||
}
|
||||
|
|
@ -4,6 +4,6 @@
|
|||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:import href="../../../../packages/acs-admin/xsl/sitemap_en.xsl"/>
|
||||
<xsl:import href="../../../packages/acs-admin/xsl/sitemap_en.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
-- 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 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
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
-- 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 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
|
||||
|
|
|
|||
|
|
@ -122,6 +122,26 @@
|
|||
<servlet-class>com.arsdigita.versioning.VersioningServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webdevsupport</servlet-name>
|
||||
<servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.sitemap.SiteMapServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class>
|
||||
|
|
@ -439,6 +459,26 @@
|
|||
<url-pattern>/versioning/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webdevsupport</servlet-name>
|
||||
<url-pattern>/webdevsupport/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<url-pattern>/admin/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<url-pattern>/admin-sitemap/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<url-pattern>/admin-permissions/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<url-pattern>/redirect/*</url-pattern>
|
||||
|
|
|
|||
|
|
@ -127,6 +127,21 @@
|
|||
<servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.sitemap.SiteMapServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class>
|
||||
|
|
@ -275,7 +290,7 @@
|
|||
</init-param>
|
||||
</servlet>
|
||||
|
||||
<!-- module ccm-ldn-subsite - servlet declarations BEGIN -->
|
||||
<!-- module ccm-subsite - servlet declarations BEGIN -->
|
||||
<servlet>
|
||||
<servlet-name>subsite-files</servlet-name>
|
||||
<servlet-class>com.arsdigita.web.ApplicationFileServlet</servlet-class>
|
||||
|
|
@ -284,7 +299,7 @@
|
|||
<param-value>/templates/ccm-subsite</param-value>
|
||||
</init-param>
|
||||
</servlet>
|
||||
<!-- module ccm-ldn-subsite - servlet declarations END -->
|
||||
<!-- module ccm-subsite - servlet declarations END -->
|
||||
|
||||
<!-- module ccm-ldn-terms - servlet declarations BEGIN -->
|
||||
<servlet>
|
||||
|
|
@ -377,12 +392,12 @@
|
|||
<url-pattern>/ccm-ldn-shortcuts/files/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<!-- module ccm-ldn-subsite - servlet mappings BEGIN -->
|
||||
<!-- module ccm-subsite - servlet mappings BEGIN -->
|
||||
<servlet-mapping>
|
||||
<servlet-name>subsite-files</servlet-name>
|
||||
<url-pattern>/ccm-subsite/files/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<!-- module ccm-ldn-subsite - servlet mappings END -->
|
||||
<!-- module ccm-subsite - servlet mappings END -->
|
||||
|
||||
<!-- module ccm-ldn-terms - servlet mappings BEGIN -->
|
||||
<servlet-mapping>
|
||||
|
|
@ -449,6 +464,21 @@
|
|||
<url-pattern>/webdevsupport/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<url-pattern>/admin/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<url-pattern>/admin-sitemap/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<url-pattern>/admin-permissions/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<url-pattern>/redirect/*</url-pattern>
|
||||
|
|
|
|||
|
|
@ -122,6 +122,26 @@
|
|||
<servlet-class>com.arsdigita.versioning.VersioningServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webdevsupport</servlet-name>
|
||||
<servlet-class>com.arsdigita.webdevsupport.WebDevSupportServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.admin.AdminServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.sitemap.SiteMapServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<servlet-class>com.arsdigita.ui.permissions.PermissionsServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<servlet-class>com.arsdigita.web.OIDRedirectServlet</servlet-class>
|
||||
|
|
@ -439,6 +459,26 @@
|
|||
<url-pattern>/versioning/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webdevsupport</servlet-name>
|
||||
<url-pattern>/webdevsupport/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin</servlet-name>
|
||||
<url-pattern>/admin/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-sitemap</servlet-name>
|
||||
<url-pattern>/admin-sitemap/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>webadmin-permissions</servlet-name>
|
||||
<url-pattern>/admin-permissions/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>oid-redirect</servlet-name>
|
||||
<url-pattern>/redirect/*</url-pattern>
|
||||
|
|
|
|||
|
|
@ -40,21 +40,43 @@ ccm.bundle.folder=${ccm.project.dir}/ccm-sci-bundle/bundles/devel
|
|||
# ---------------------------------------------------------------------
|
||||
# Update von rel. 1.1.6 auf 1.1.x (trunk)
|
||||
# Müssen NACH dem (regulären) Update 1.1.4 -> 1.1.6 durchgeführt werden
|
||||
# Reihenfolge: hier von OBEN nach UNTEN!
|
||||
# Reihenfolge: hier von UNTEN nach OBEN!
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
# Alle Versionen / Bundles:
|
||||
# (hb r1496 Umbennen ccm-cms ContentSection loaded as legacy free application.
|
||||
#ccm.upgrade.package=ccm-core
|
||||
#ccm.upgrade.from.version=6.6.3
|
||||
#ccm.upgrade.to.version=6.6.4
|
||||
|
||||
# Alle Versionen / Bundles:
|
||||
#ccm.upgrade.package=ccm-ldn-terms
|
||||
#ccm.upgrade.from.version=6.6.1
|
||||
#ccm.upgrade.to.version=6.6.2
|
||||
|
||||
# Alle Versionen / Bundles:
|
||||
# (hb r149? Package ccm-forum loaded as legacy free application.
|
||||
ccm.upgrade.package=ccm-forum
|
||||
ccm.upgrade.from.version=6.6.1
|
||||
ccm.upgrade.to.version=6.6.2
|
||||
|
||||
# Alle Versionen / Bundles:
|
||||
# (hb r1496 Package ccm-cms ContentSection loaded as legacy free application.
|
||||
#ccm.upgrade.package=ccm-cms
|
||||
#ccm.upgrade.from.version=6.6.5
|
||||
#ccm.upgrade.to.version=6.6.6
|
||||
|
||||
# Alle Versionen / Bundles:
|
||||
# (hb r1492 Umbennen ccm-cms Assiciations between generic content type updated.
|
||||
# (hb r1492 Umbennen ccm-cms Associations between generic content type updated.
|
||||
#ccm.upgrade.package=ccm-cms
|
||||
#ccm.upgrade.from.version=6.6.4
|
||||
#ccm.upgrade.to.version=6.6.5
|
||||
|
||||
# Alle Versionen / Bundles:
|
||||
# (hb r13?? Umbennen ccm-ldn-rss nach ccm-rssfeed und legacy free app
|
||||
#ccm.upgrade.package=ccm-rssfeed
|
||||
#ccm.upgrade.from.version=6.6.0
|
||||
#ccm.upgrade.to.version=6.6.1
|
||||
|
||||
# Alle Versionen / Bundles:
|
||||
# (hb r1398 Umbennen ccm-ldn-shortcuts nach ccm-shortcuts und legacy free app)
|
||||
#ccm.upgrade.package=ccm-shortcuts
|
||||
|
|
|
|||
Loading…
Reference in New Issue