01: package org.jasig.portal.channels.jsp.tree;
02:
03: /**
04: * A base class for surrogates providing default functionality that can be used
05: * by subclasses if appropriate and alleviating them from having to implement
06: * identical methods to conform to the ISurrogate interface.
07: *
08: * @author Mark Boyd
09: */
10: public abstract class BaseSurrogateImpl implements ISurrogate {
11:
12: /**
13: * Returns null meaning that the domain object has no aspects.
14: */
15: public Object[] getAspects(Object o) {
16: return null;
17: }
18:
19: /**
20: * Returns null meaning that the domain object has no children.
21: */
22: public Object[] getChildren(Object o) {
23: return null;
24: }
25:
26: /**
27: * Returns null meaning that the domain object has no object specific label
28: * data for use in custome rendering.
29: */
30: public Object getLabelData(Object o) {
31: return null;
32: }
33:
34: /**
35: * Returns false meaning that the domain object has no aspects.
36: */
37: public boolean hasAspects(Object o) {
38: return false;
39: }
40:
41: /**
42: * Returns false meaning that the domain object has no children.
43: */
44: public boolean hasChildren(Object o) {
45: return false;
46: }
47:
48: /**
49: * Returns false meaning that the domain object can't contain children.
50: */
51: public boolean canContainChildren(Object o) {
52: return false;
53: }
54: }
|