// // 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 // // $Id: SiteNode.pdl 2141 2011-01-16 12:17:15Z pboy $ // $DateTime: 2004/08/16 18:10:38 $ model com.arsdigita.kernel; // SiteNode Object Type Definition // // A "site node" is a node in a URL hierarchy that can be mapped // to an application instance. // // @version "$Id: SiteNode.pdl 2141 2011-01-16 12:17:15Z pboy $" // object type SiteNode extends ACSObject { String name = site_nodes.name VARCHAR(100); String url = site_nodes.url VARCHAR(3000); // If true, it is legal to create child nodes. Boolean[1..1] isDirectory = site_nodes.directory_p BIT; // If true, URLs that are logical children of this node should // be mapped to this node, e.g. "www.arsdigita.com/news/item123" // would be mapped to this node still. Boolean[1..1] isPattern = site_nodes.pattern_p BIT; SiteNode[0..1] parent = join site_nodes.parent_id to site_nodes.node_id; component SiteNode[0..n] children = join site_nodes.node_id to site_nodes.parent_id; PackageInstance[0..1] mountedObject = join site_nodes.object_id to apm_packages.package_id; // Stylesheet[0..n] defaultStyle = join site_nodes.node_id // to acs_stylesheet_node_map.node_id, // join acs_stylesheet_node_map.stylesheet_id // to acs_stylesheets.stylesheet_id; unique (parent, name); reference key ( site_nodes.node_id ); aggressive load (parent.id); } data operation updateSiteNodeDescendants { do { update site_nodes set url = :newPrefix || substr(url, :oldPrefixLength + 1) where url like :oldPrefix || '%' and not node_id = :id } }