| 1 |
|
package org.trails.engine; |
| 2 |
|
|
| 3 |
|
import java.io.Serializable; |
| 4 |
|
|
| 5 |
|
import org.apache.hivemind.util.Defense; |
| 6 |
|
import org.trails.descriptor.CollectionDescriptor; |
| 7 |
|
import org.trails.descriptor.IClassDescriptor; |
| 8 |
|
import org.trails.page.PageType; |
| 9 |
|
|
| 10 |
|
|
| 11 |
|
public class TrailsPagesServiceParameter implements Serializable |
| 12 |
|
{ |
| 13 |
|
|
| 14 |
|
private PageType pageType; |
| 15 |
|
private IClassDescriptor classDescriptor; |
| 16 |
|
private Object model; |
| 17 |
|
private CollectionDescriptor associationDescriptor; |
| 18 |
|
private Object parent; |
| 19 |
|
|
| 20 |
4 |
public TrailsPagesServiceParameter(PageType pageType, IClassDescriptor classDescriptor) |
| 21 |
|
{ |
| 22 |
4 |
Defense.notNull(pageType, "pageName"); |
| 23 |
4 |
Defense.notNull(classDescriptor, "classDescriptor"); |
| 24 |
4 |
this.pageType = pageType; |
| 25 |
4 |
this.classDescriptor = classDescriptor; |
| 26 |
4 |
} |
| 27 |
|
|
| 28 |
|
public TrailsPagesServiceParameter(PageType pageType, IClassDescriptor classDescriptor, Object model) |
| 29 |
|
{ |
| 30 |
4 |
this(pageType, classDescriptor); |
| 31 |
4 |
this.model = model; |
| 32 |
4 |
} |
| 33 |
|
|
| 34 |
|
public TrailsPagesServiceParameter(PageType pageType, IClassDescriptor classDescriptor, Object model, CollectionDescriptor associationDescriptor, Object parent) |
| 35 |
|
{ |
| 36 |
4 |
this(pageType, classDescriptor, model); |
| 37 |
4 |
this.associationDescriptor = associationDescriptor; |
| 38 |
4 |
this.parent = parent; |
| 39 |
4 |
} |
| 40 |
|
|
| 41 |
|
public PageType getPageType() |
| 42 |
|
{ |
| 43 |
0 |
return pageType; |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
public IClassDescriptor getClassDescriptor() |
| 47 |
|
{ |
| 48 |
0 |
return classDescriptor; |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
public Object getModel() |
| 52 |
|
{ |
| 53 |
0 |
return model; |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
public CollectionDescriptor getAssociationDescriptor() |
| 57 |
|
{ |
| 58 |
0 |
return associationDescriptor; |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
public Object getParent() |
| 62 |
|
{ |
| 63 |
0 |
return parent; |
| 64 |
|
} |
| 65 |
|
} |