001/* 002 * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Nuxeo - initial API and implementation 016 * 017 * $Id$ 018 */ 019 020package org.nuxeo.ecm.platform.content.template.service; 021 022import java.io.Serializable; 023import java.util.ArrayList; 024import java.util.List; 025 026import org.nuxeo.common.xmap.annotation.XNode; 027import org.nuxeo.common.xmap.annotation.XNodeList; 028import org.nuxeo.common.xmap.annotation.XObject; 029 030/** 031 * Template item descriptor. Immutable. 032 */ 033@XObject(value = "templateItem") 034public class TemplateItemDescriptor implements Serializable { 035 036 private static final long serialVersionUID = 18765764747899L; 037 038 @XNode("@typeName") 039 private String typeName; 040 041 @XNode("@id") 042 private String id; 043 044 @XNode("@title") 045 private String title; 046 047 @XNode("@path") 048 private String path; 049 050 @XNode("@description") 051 private String description; 052 053 // Declared as ArrayList to be serializable. 054 @XNodeList(value = "acl/ace", type = ArrayList.class, componentType = ACEDescriptor.class) 055 public List<ACEDescriptor> acl; 056 057 @XNodeList(value = "properties/property", type = ArrayList.class, componentType = PropertyDescriptor.class) 058 public List<PropertyDescriptor> properties; 059 060 @XNodeList(value = "notifications/notification", type = ArrayList.class, componentType = NotificationDescriptor.class) 061 public List<NotificationDescriptor> notifications; 062 063 public String getPath() { 064 return path; 065 } 066 067 public String getDescription() { 068 return description; 069 } 070 071 public String getId() { 072 return id; 073 } 074 075 public String getTypeName() { 076 return typeName; 077 } 078 079 public String getTitle() { 080 return title; 081 } 082 083 public List<ACEDescriptor> getAcl() { 084 return acl; 085 } 086 087 public List<PropertyDescriptor> getProperties() { 088 return properties; 089 } 090 091 public List<NotificationDescriptor> getNotifications() { 092 return notifications; 093 } 094 095}