// // 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 // // $Id: Application.pdl 1520 2007-03-22 13:36:04Z chrisgilbert23 $ // $DateTime: 2004/08/16 18:10:38 $ model com.arsdigita.web; import com.arsdigita.kernel.PackageInstance; import com.arsdigita.kernel.PackageType; import com.arsdigita.kernel.Resource; import com.arsdigita.kernel.ResourceType; import com.arsdigita.kernel.permissions.Privilege; import com.arsdigita.portal.Portlet; import com.arsdigita.kernel.Group; // @author Justin Ross (justin@arsdigita.com) // @version $Id: Application.pdl 1520 2007-03-22 13:36:04Z chrisgilbert23 $ object type ApplicationType extends ResourceType { Privilege[0..n] relevantPrivileges = join application_types.application_type_id to application_type_privilege_map.application_type_id, join application_type_privilege_map.privilege to acs_privileges.privilege; Group[0..1] containerGroup = join application_types.container_group_id to groups.group_id; } association { ApplicationType[0..1] providerApplicationType = join application_types.provider_id to application_types.application_type_id; ApplicationType[0..n] dependentApplicationType = join application_types.application_type_id to application_types.provider_id; } association { PackageType[0..1] packageType = join application_types.package_type_id to apm_package_types.package_type_id; ApplicationType[0..n] applicationType = join apm_package_types.package_type_id to application_types.package_type_id; } object type Application extends Resource { String primaryURL = applications.primary_url VARCHAR(4000); Group[0..1] containerGroup = join applications.container_group_id to groups.group_id; } association { PackageInstance[0..1] packageInstance = join applications.package_id to apm_packages.package_id; Application[0..1] application = join apm_packages.package_id to applications.package_id; } query applicationForSiteNodeID { Application application; do { select acs_objects.object_id, acs_objects.object_type, acs_objects.display_name, acs_objects.default_domain_class, applications.parent_application_id, applications.package_id, applications.title, applications.description, applications.primary_url from site_nodes, apm_packages, applications, acs_objects where site_nodes.node_id = :siteNodeID -- joins and site_nodes.object_id = apm_packages.package_id and apm_packages.package_id = applications.package_id and applications.application_id = acs_objects.object_id } map { application.id = acs_objects.object_id; application.objectType = acs_objects.object_type; application.displayName = acs_objects.display_name; application.defaultDomainClass = acs_objects.default_domain_class; application.parentResource.id = applications.parent_application_id; application.packageInstance.id = applications.package_id; application.title = applications.title; application.description = applications.description; application.primaryURL = applications.primary_url; } }