View Javadoc

1   /**
2    * Copyright (C) 2005-2009 Alfresco Software Limited.
3    *
4    * This file is part of the Spring Surf Extension project.
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *  http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  package org.springframework.extensions.surf.types;
20  
21  import org.springframework.extensions.surf.ModelObject;
22  import org.springframework.extensions.surf.RequestContext;
23  
24  /**
25   * Interface for a PageAssociation object type
26   * 
27   * @author muzquiano
28   */
29  public interface PageAssociation extends ModelObject
30  {
31      // type
32      public static String TYPE_ID = "page-association";
33      
34      // properties
35      public static String PROP_SOURCE_ID = "source-id";
36      public static String PROP_DEST_ID = "dest-id";
37      public static String PROP_ASSOC_TYPE = "assoc-type";
38      public static String PROP_ORDER_ID = "order-id";
39  
40      // values
41      public static String CHILD_ASSOCIATION_TYPE_ID = "child";
42  
43      /* (non-Javadoc)
44       * @see org.alfresco.web.framework.ModelObject#getTypeId()
45       */
46      public String getTypeId(); 
47  
48      /**
49       * Gets the source id.
50       * 
51       * @return the source id
52       */
53      public String getSourceId();
54  
55      /**
56       * Sets the source id.
57       * 
58       * @param sourceId the new source id
59       */
60      public void setSourceId(String sourceId);
61  
62      /**
63       * Gets the dest id.
64       * 
65       * @return the dest id
66       */
67      public String getDestId();
68  
69      /**
70       * Sets the dest id.
71       * 
72       * @param destId the new dest id
73       */
74      public void setDestId(String destId);
75  
76      /**
77       * Gets the association type.
78       * 
79       * @return the association type
80       */
81      public String getAssociationType();
82  
83      /**
84       * Sets the association type.
85       * 
86       * @param associationType the new association type
87       */
88      public void setAssociationType(String associationType);
89  
90      /**
91       * Gets the order id.
92       * 
93       * @return the order id
94       */
95      public String getOrderId();
96  
97      /**
98       * Sets the order id.
99       * 
100      * @param orderId the new order id
101      */
102     public void setOrderId(String orderId);
103 
104     // Helpers
105 
106     /**
107      * Gets the source page.
108      * 
109      * @param context the context
110      * 
111      * @return the source page
112      */
113     public Page getSourcePage(RequestContext context);
114 
115     /**
116      * Gets the dest object.
117      * 
118      * @param context the context
119      * 
120      * @return the dest object
121      */
122     public Page getDestPage(RequestContext context);
123     
124 }