8. Araxis Merge File Comparison Report

Produced by Araxis Merge on Fri Oct 19 14:25:20 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.

8.1 Files compared

#FileLocationLast Modified
1eventlistener.incC:\jahia\template_diff\V2_JAHIA_5_0_0\src\jsp\blogsFri Oct 19 14:18:35 2007 UTC
2eventlistener.incC:\jahia\template_diff\V2_JAHIA_5_0_3\src\jsp\blogsFri Oct 19 14:16:50 2007 UTC

8.2 Comparison summary

DescriptionBetween
Files 1 and 2
BlocksLines
Unchanged116
Changed1144
Inserted00
Removed00

8.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

8.4 Active regular expressions

No regular expressions were active.

8.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 ( "blogs".equals(theContainer.getDefinition().getName()) ){  
19     if ( "addContainerEngineAfterInit".equals(eventName) ) {  
20         logger.debug("Start eventlistner for event addContainerEngineAfterInit for blogs");  
21         // we want to init the page field  
22         JahiaField theField = theContainer.getField("blogPage");  
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.getSessionState().setAttribute("Page_Field.PageBeans", pageBeans);  
30         }  
31   
32         // Verify if this page field was not already edited in this session.  
33         pageBean = (JahiaPageEngineTempBean)pageBeans.get(theField.getDefinition().getName());  
34   
35         if (pageBean == null) {  
36             JahiaPage currentPage = jParams.getPage();  
37             String currentTemplateName = currentPage.getPageTemplate().getName();  
38             logger.debug("Current templates = " + currentTemplateName);  
39             String defaultTemplate = "";  
40             if ("Blog listing".equals(currentTemplateName)) {  
41                 defaultTemplate = "Blog";  
42             }  
43             logger.debug("defaultTemplate is [" + defaultTemplate + "]");  
44             if (! "".equals(defaultTemplate)) {  
45                 JahiaPageDefinition pageDef = ServicesRegistry.getInstance().getJahiaPageTemplateService()  
46                     .lookupPageTemplateByName (defaultTemplate, jParams.getSiteID());  
47                 logger.debug("pageDef ID is [" + pageDef.getID() + "]");  
48   
49                 // First call or recall of engine.  
50                 jParams.getSessionState().removeAttribute(SelectPage_Engine.SESSION_PARAMS);  
51                 if (theField.getObject() == null) { // Is it a new page ?  
52                     logger.debug("First call or recall of engine. This is a new page");  
53                     boolean isLinkOnly = theField.getValue().toLowerCase().indexOf("jahia_linkonly") != -1;  
54                     pageBean = new JahiaPageEngineTempBean(  
55                             -1, // Page ID  
56                             theField.getJahiaID(),  
57                             theField.getPageID(),  
58                             isLinkOnly ? JahiaPage.TYPE_URL : // URL type per default  
59                                          JahiaPage.TYPE_DIRECT, // or create a new page per default  
60                             pageDef.getID(),  
61                             "http://", // URL undefined  
62                             -1, // Link ID undefined  
63                             jParams.getUser().getUserKey(),  
64                             theField.getID()); // value should be < 0 if new field.  
65                     pageBean.setOperation(isLinkOnly ? Page_Field.LINK_URL : Page_Field.CREATE_PAGE);  
66                        pageBean.sharedTitle(true);  
67                     pageBeans.put("blogPage", pageBean);  
68                 }  
69             }  
70         }  
71     } else if ( "containerAdded".equals(eventName) ) {  
72         JahiaPage blogPage = (JahiaPage) theContainer.getFieldObject("blogPage");  
73         if (blogPage != null) {  
74             logger.debug("Activate blogPage ["+blogPage.getID()+"]");  
75             // container validation  
76             ArrayList locales = jParams.getSite().  
77                                 getLanguageSettingsAsLocales(true);  
78             Vector languageCodes = new Vector();  
79             for (int j = 0; j < locales.size(); j++) {  
80                 Locale loc = (Locale) locales.get(j);  
81                 languageCodes.add(loc.toString());  
82             }  
83             ContentPage.getPage(blogPage.getID()).activate(  
84                 new HashSet(languageCodes), // languageCodes  
85                 true, //versioningActive,  
86                 ServicesRegistry.getInstance().getJahiaVersionService().  
87                 getSiteSaveVersion(jParams.getSiteID()), // saveVersion  
88                 jParams.getUser(),  
89                 jParams,  
90                 new StateModificationContext(new ContentPageKey(blogPage.  
91                 getID()), new HashSet(languageCodes)) //stateModifContext  
92             );  
93   
94         }  
95     }  
96 }  
97   
98 if ( "entries".equals(theContainer.getDefinition().getName()) ){  
99     if ( "addContainerEngineAfterInit".equals(eventName) ) {  
100         logger.debug("Start eventlistner for event addContainerEngineAfterInit for entries Container List");  
101   
102         JahiaField theField = theContainer.getField("date");  
103         if (theField.getObject() == null) {  
104             Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));  
105             long now = cal.getTime().getTime();  
106             String nowStr = String.valueOf(now);  
107             theField.setObject(nowStr);  
108             feh.addUpdatedField(theField.getID(), theField.getLanguageCode());  
109             logger.debug("Adding updated field #" + theField.getID() + " for language code [" + theField.getLanguageCode() + "]");  
110             updatedFields.add(new Integer(theField.getID()));  
111             logger.debug("Set value for field [date] to : [" + theField.getObject() +"]");  
112         }  
113         theField = theContainer.getField("author");  
114         if (theField.getObject() == null) {  
115             String author = jParams.getUser().getUserKey();  
116             theField.setObject(author);  
117             feh.addUpdatedField(theField.getID(), theField.getLanguageCode());  
118             updatedFields.add(new Integer(theField.getID()));  
119             logger.debug("Set value for field [author] to [" + theField.getObject() + "]");  
120         } else if ("".equals(theField.getObject())) {  
121             String author = jParams.getUser().getUserKey();  
122             theField.setObject(author);  
123             feh.addUpdatedField(theField.getID(), theField.getLanguageCode());  
124             updatedFields.add(new Integer(theField.getID()));  
125             logger.debug("Set value for field [author] to [" + theField.getObject() + "]");  
126         }  
127     } else if ( "containerAdded".equals(eventName) ) {  
128         logger.debug("Activate container ["+theContainer.getID()+"]");  
129         // container validation  
130         Set languageCodes = new HashSet();  
131         languageCodes.add(ContentObject.SHARED_LANGUAGE);  
132         languageCodes.add(jParams.getLocale().toString());  
133   
134         JahiaSaveVersion saveVersion =  
135             ServicesRegistry.getInstance().getJahiaVersionService().  
136                 getSiteSaveVersion(jParams.getSiteID());  
137   
138         StateModificationContext smc = new StateModificationContext(  
139             new ContentContainerKey(theContainer.getID()), languageCodes);  
140         smc.setDescendingInSubPages(false);  
141   
142         Enumeration childs = theContainer.getFields();  
143         while (childs.hasMoreElements()) {  
144             JahiaField child = (JahiaField)childs.nextElement();  
145             ContentField field = child.getContentField();  
146             if (field != null) {  
147                 field.activate(languageCodes, saveVersion.getVersionID(),jParams, smc);  
148             }  
149         }  
150         JahiaContainersService jahiaContainersService =  
151             ServicesRegistry.getInstance().getJahiaContainersService();  
152         if (jahiaContainersService != null) {  
153             ActivationTestResults atr = jahiaContainersService.activateStagedContainer(languageCodes,theContainer.getID(),  
154                 jParams.getUser(), saveVersion, jParams, smc);  
155             logger.debug("ActivationTestResults is " + atr.toString());  
156         }  
157     }  
158 }  
159 %>