28. Araxis Merge File Comparison Report

Produced by Araxis Merge on Fri Oct 19 14:26:01 2007 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Internet Explorer. For optimum results when printing this report, enable printing of background images and colours in your browser and use landscape orientation.

28.1 Files compared

#FileLocationLast Modified
1eventlistener.incC:\jahia\template_diff\V2_JAHIA_5_0_2\src\jsp\docFri Oct 19 14:17:29 2007 UTC
2eventlistener.incC:\jahia\template_diff\V2_JAHIA_5_0_3\src\jsp\docFri Oct 19 14:16:50 2007 UTC

28.2 Comparison summary

DescriptionBetween
Files 1 and 2
BlocksLines
Unchanged116
Changed1193
Inserted00
Removed00

28.3 Comparison options

WhitespaceAll differences in whitespace within lines are ignored
Character caseDifferences in character case are significant
Line endingsDifferences in line endings (CR and LF characters) are ignored
CR/LF charactersHidden in comparison detail

28.4 Active regular expressions

No regular expressions were active.

28.5 Comparison detail

1 <%-- 1 <%--
2 Copyright 2002-2006 Jahia Ltd 2 Copyright 2002-2006 Jahia Ltd
3  3 
4 Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDDL),  4 Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDDL),
5 Version 1.0 (the "License"), or (at your option) any later version; you may  5 Version 1.0 (the "License"), or (at your option) any later version; you may
6 not use this file except in compliance with the License. You should have  6 not use this file except in compliance with the License. You should have
7 received a copy of the License along with this program; if not, you may obtain  7 received a copy of the License along with this program; if not, you may obtain
8 a copy of the License at  8 a copy of the License at
9  9 
10  http://www.jahia.org/license/ 10  http://www.jahia.org/license/
11  11 
12 Unless required by applicable law or agreed to in writing, software  12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,  13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and  15 See the License for the specific language governing permissions and
16 limitations under the License. 16 limitations under the License.
17 --%><% 17 --%> 
18 if ( "directoryDocContainer".equals(theContainer.getDefinition().getName()) ){  
19     if ( "addContainerEngineAfterInit".equals(eventName) ) {  
20   
21         // we want to init the page field  
22         JahiaField theField = theContainer.getField("directoryDocPage");  
23         JahiaPageEngineTempBean pageBean = null;  
24   
25         HashMap pageBeans = (HashMap)jParams.  
26                 getSessionState().getAttribute("Page_Field.PageBeans");  
27         if ( pageBeans == null ){  
28             pageBeans = new HashMap();  
29             jParams.  
30                 getSessionState().setAttribute("Page_Field.PageBeans", pageBeans);  
31         }  
32   
33         // Verify if this page field was not already edited in this session.  
34         pageBean = (JahiaPageEngineTempBean)pageBeans.get(theField.getDefinition().getName());  
35   
36         String creator = null;  
37         String creationDate = null;  
38         String lastContributor = null;  
39   
40         if (pageBean == null) {  
41   
42             JahiaPageDefinition pageDef = ServicesRegistry.getInstance().getJahiaPageTemplateService()  
43             .lookupPageTemplateByName ("Document Detail", jParams.getSiteID());  
44   
45             // First call or recall of engine.  
46             jParams.getSessionState().removeAttribute(SelectPage_Engine.SESSION_PARAMS);  
47             if (theField.getObject() == null) { // Is it a new page ?  
48                 boolean isLinkOnly = theField.getValue().toLowerCase().indexOf("jahia_linkonly") != -1;  
49                 pageBean = new JahiaPageEngineTempBean(  
50                         -1, // Page ID  
51                         theField.getJahiaID(),  
52                         theField.getPageID(),  
53                         isLinkOnly ? JahiaPage.TYPE_URL : // URL type per default  
54                                      JahiaPage.TYPE_DIRECT, // or create a new page per default  
55                         pageDef.getID(),  
56                         "http://", // URL undefined  
57                         -1, // Link ID undefined  
58                         jParams.getUser().getUserKey(),  
59                         theField.getID()); // value should be < 0 if new field.  
60                 pageBean.setOperation(isLinkOnly ? Page_Field.LINK_URL : Page_Field.CREATE_PAGE);  
61   
62                    pageBean.sharedTitle(true);  
63   
64             pageBeans.put("directoryDocPage", pageBean);  
65         }  
66   
67     } else {  
68         // check if the current page it a moved one  
69   
70         String operation = jParams.getParameter("operation"); // Value from FORM  
71         int selectedPageID = pageBean.getPageLinkID();  
72         if (jParams.getParameter("shouldSetPageLinkID") != null) {  
73             selectedPageID = SelectPage_Engine.getInstance()  
74                         .getSelectedPageID(jParams.getSessionState());  
75         }  
76   
77         // check if the current page it a moved one  
78         if ( Page_Field.MOVE_PAGE.equals(operation) ){  
79             Integer previousPageID = (Integer)jParams.  
80                 getAttribute("eventlistener.previousPageID");  
81   
82             if ( previousPageID == null  
83                 || previousPageID.intValue() != selectedPageID ){  
84   
85                 previousPageID = new Integer(selectedPageID);  
86                 request.setAttribute("eventlistener.previousPageID",  
87                     previousPageID);  
88   
89                 if ( selectedPageID != -1 ){  
90                     try {  
91                         ContentPage cPage = ContentPage  
92                             .getPage(selectedPageID,false);  
93                         ContentPageField cPageField = (ContentPageField)  
94                             cPage.getParent( jParams.getUser(),  
95                                         jParams.getEntryLoadRequest(),  
96                                         ParamBean.NORMAL);  
97                         if ( cPageField == null ){  
98                             // try to get the active  
99                             EntryLoadRequest lRequest =  
100                                 new EntryLoadRequest(EntryLoadRequest.ACTIVE_WORKFLOW_STATE,0,  
101                                 jParams.getEntryLoadRequest().getLocales());  
102                             cPageField = (ContentPageField)  
103                                 cPage.getParent( jParams.getUser(),  
104                                         lRequest,  
105                                         ParamBean.NORMAL);  
106                         }  
107                         ContentContainer cContainer =  
108                                 (ContentContainer)cPageField  
109                                         .getParent(     jParams.getUser(),  
110                                                     jParams.getEntryLoadRequest(),  
111                                                     ParamBean.NORMAL) ;  
112                         JahiaContainer jContainer =  
113                             cContainer.getJahiaContainer(jParams,  
114                                             jParams.getEntryLoadRequest());  
115   
116                         JahiaField jField;  
117                         String fieldValue = "";  
118   
119                         jField = jContainer.getField("directoryDocType");  
120                         fieldValue = "";  
121                         if ( jField != null && jField.getValue() != null){  
122                             fieldValue = jField.getValue().trim();  
123                         }  
124                         if ( !"".equals(fieldValue) ){  
125                             // we want to set the last publisher  
126                             jField = theContainer.getField("directoryDocType");  
127                             jField.setValue(fieldValue);  
128                             feh.addUpdatedField(jField.getID(), jField.getLanguageCode());  
129                             updatedFields.add(new Integer(jField.getID()));  
130                         }  
131   
132                         jField = jContainer.getField("directoryDocSource");  
133                         fieldValue = "";  
134                         if ( jField != null && jField.getValue() != null){  
135                             fieldValue = jField.getValue().trim();  
136                         }  
137                         if ( !"".equals(fieldValue) ){  
138                             // we want to set the last publisher  
139                             jField = theContainer.getField("directoryDocSource");  
140                             jField.setValue(fieldValue);  
141                             feh.addUpdatedField(jField.getID(), jField.getLanguageCode());  
142                             updatedFields.add(new Integer(jField.getID()));  
143                         }  
144                         jField = jContainer.getField("directoryShortDocDescription");  
145                         fieldValue = "";  
146                         if ( jField != null && jField.getValue() != null){  
147                             fieldValue = jField.getValue().trim();  
148                         }  
149                         if ( !"".equals(fieldValue) ){  
150                             // we want to set the last publisher  
151                             jField = theContainer.getField("directoryShortDocDescription");  
152                             jField.setValue(fieldValue);  
153                             feh.addUpdatedField(jField.getID(), jField.getLanguageCode());  
154                             updatedFields.add(new Integer(jField.getID()));  
155                         }  
156   
157                         ContentDefinition contentDefinition = jContainer.getDefinition();  
158                         ArrayList selectedCategories = new ArrayList();  
159                         Set categories = Category.getObjectCategories(cContainer.getObjectKey());  
160                         Iterator iterator = categories.iterator();  
161                         while ( iterator.hasNext() ){  
162                             Category cat = (Category)iterator.next();  
163                             selectedCategories.add(cat.getKey());  
164                         }  
165   
166                 ArrayList defaultSelectedCategories =  
167                     (ArrayList) session.getAttribute(DEFAULTCATEGORIES_SESSIONKEYPREFIX +  
168                         theContainer.getDefinition().getObjectKey());  
169                         if (defaultSelectedCategories != null) {  
170                             for ( int i=0; i<defaultSelectedCategories.size() ; i++ ){  
171                                 String val = (String)defaultSelectedCategories.get(i);  
172                                     if ( !selectedCategories.contains(val) ){  
173                                         selectedCategories.add(val);  
174                                     }  
175                                 }  
176                             }  
177                             engineMap.put(SELECTEDCATEGORIES_ENGINEMAPKEY, selectedCategories);  
178   
179                             ManageCategories.getInstance().handleActions(jParams, JahiaEngine.LOAD_MODE,  
180                                 engineMap, new ContentContainerKey(jContainer.getID()),  
181                                 jContainer.getDefinition(), false);  
182                         } catch ( Throwable t ){  
183                             t.printStackTrace();  
184                         }  
185                     }  
186                 }  
187             }  
188         }  
189   
190   
191   
192     } else if ( "addContainerEngineBeforeSave".equals(eventName) ) {  
193         // we want set the page title  
194             HashMap pageBeans = (HashMap)jParams.  
195                 getSessionState().getAttribute("Page_Field.PageBeans");  
196             if ( pageBeans != null ){  
197                 // Verify if this page field was not already edited in this session.  
198                 JahiaPageEngineTempBean pageBean =  
199                     (JahiaPageEngineTempBean)pageBeans.get("directoryDocPage");  
200   
201                 if (pageBean != null) {  
202                         // we want to set the title  
203                         pageBeans.put("directoryDocPage", pageBean);  
204                     }  
205         }  
206     }  
207 }  
208 %>