01: /*
02: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
03: *
04: * Redistribution and use in source and binary forms, with or without
05: * modification, are permitted provided that the following conditions
06: * are met:
07: *
08: * - Redistributions of source code must retain the above copyright
09: * notice, this list of conditions and the following disclaimer.
10: *
11: * - Redistribution in binary form must reproduce the above copyright
12: * notice, this list of conditions and the following disclaimer in
13: * the documentation and/or other materials provided with the
14: * distribution.
15: *
16: * Neither the name of Sun Microsystems, Inc. or the names of
17: * contributors may be used to endorse or promote products derived
18: * from this software without specific prior written permission.
19: *
20: * This software is provided "AS IS," without a warranty of any
21: * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
22: * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
23: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
24: * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
25: * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
26: * DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
27: * OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
28: * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
29: * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
30: * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE,
31: * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
32: *
33: * You acknowledge that Software is not designed, licensed or intended
34: * any nuclear facility.
35: */
36:
37: package com.sun.portal.community.template;
38:
39: import java.util.Set;
40: import java.util.Map;
41: import java.util.Locale;
42:
43: /**
44: * This is a stateless bean that contains meta data associated with a
45: * particular template. Note that this class does not contain the actual
46: * content of the template. <code>Template</code> on the other hand
47: * contains the actual conten as well as the meta data.
48: */
49: public interface TemplateDescriptor {
50:
51: /**
52: * Get ID of the template.
53: *
54: * @return ID of the template
55: */
56: public String getId();
57:
58: /**
59: * Get name of the template.
60: *
61: * @return name of the template
62: */
63: public String getName();
64:
65: /**
66: * Get description of the template for the given locale.
67: *
68: * @return description of the template
69: */
70: public String getDescription();
71:
72: /**
73: * Get URL of the preview image.
74: *
75: * @return URL of the preview image associated with the template or null
76: * if there is no image associated
77: */
78: public String getPreviewImageURI();
79:
80: /**
81: * Get tokens used in the template.
82: *
83: * @return tokens used in the template
84: */
85: public Set getTokens();
86:
87: /**
88: * Get <code>String</code> representation of the template - Used for debugging.
89: *
90: * @return String representation of the template
91: */
92: public String toString();
93:
94: }
|