KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infoglue > deliver > controllers > kernel > impl > simple > TemplateController


1 /* ===============================================================================
2  *
3  * Part of the InfoGlue Content Management Platform (www.infoglue.org)
4  *
5  * ===============================================================================
6  *
7  * Copyright (C)
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License version 2, as published by the
11  * Free Software Foundation. See the file LICENSE.html for more information.
12  *
13  * This program is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
15  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along with
18  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
19  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
20  *
21  * ===============================================================================
22  */

23   
24 package org.infoglue.deliver.controllers.kernel.impl.simple;
25
26 import java.awt.Color JavaDoc;
27 import java.text.NumberFormat JavaDoc;
28 import java.util.Collection JavaDoc;
29 import java.util.Enumeration JavaDoc;
30 import java.util.List JavaDoc;
31 import java.util.Locale JavaDoc;
32 import java.util.Map JavaDoc;
33 import java.util.Vector JavaDoc;
34
35 import javax.servlet.http.HttpServletRequest JavaDoc;
36
37 import org.exolab.castor.jdo.Database;
38 import org.infoglue.cms.applications.common.VisualFormatter;
39 import org.infoglue.cms.entities.content.ContentVO;
40 import org.infoglue.cms.entities.content.ContentVersionVO;
41 import org.infoglue.cms.entities.management.ContentTypeDefinitionVO;
42 import org.infoglue.cms.entities.management.LanguageVO;
43 import org.infoglue.cms.entities.structure.SiteNodeVO;
44 import org.infoglue.cms.exception.SystemException;
45 import org.infoglue.cms.security.InfoGluePrincipal;
46 import org.infoglue.cms.util.DesEncryptionHelper;
47 import org.infoglue.deliver.applications.databeans.DatabaseWrapper;
48 import org.infoglue.deliver.applications.databeans.DeliveryContext;
49 import org.infoglue.deliver.applications.databeans.WebPage;
50 import org.infoglue.deliver.util.BrowserBean;
51 import org.infoglue.deliver.util.MathHelper;
52 import org.infoglue.deliver.util.ObjectConverter;
53 import org.infoglue.deliver.util.charts.ChartHelper;
54 import org.infoglue.deliver.util.graphics.ColorHelper;
55 import org.infoglue.deliver.util.graphics.FontHelper;
56 import org.infoglue.deliver.util.rss.RssHelper;
57 import org.infoglue.deliver.util.webservices.WebServiceHelper;
58
59
60 /**
61  * @author Mattias Bogeblad
62  */

63 public interface TemplateController
64 {
65     //public void getDatabaseStatus(String debugMessage);
66

67     /**
68      * Sets the transaction the controller should work within. This is to limit the number of connections we use.
69      */

70     public abstract Database getDatabase() throws SystemException;
71     
72     public abstract DatabaseWrapper getDatabaseWrapper();
73
74     /**
75      * Commits and reopens a database object so we don't have to long transaction.
76      */

77     
78     public abstract void commitDatabase() throws SystemException;
79
80     /**
81      * Add objects to be used in subsequent parsing
82      * like getParsedContentAttribute, include, etc
83      */

84     public abstract void addToContext(String JavaDoc name, Object JavaDoc object);
85
86     /**
87      * Setter for the template to get all the parameters from the user.
88      */

89     public abstract void setStandardRequestParameters(Integer JavaDoc siteNodeId, Integer JavaDoc languageId, Integer JavaDoc contentId);
90
91     /**
92      * Setter for the template to get all the parameters from the user.
93      */

94     public abstract void setHttpRequest(HttpServletRequest JavaDoc request);
95
96     /**
97      * Setter for the bean which contains information about the users browser.
98      */

99     public abstract void setBrowserBean(BrowserBean browserBean);
100
101     /**
102      * Getter for the template attribute name.
103      */

104     public abstract String JavaDoc getTemplateAttributeName();
105
106     /**
107      * Getter for the siteNodeId
108      */

109     public abstract Integer JavaDoc getSiteNodeId();
110
111     /**
112      * Getter for the languageId
113      */

114     public abstract Integer JavaDoc getLanguageId();
115
116     /**
117      * Getter for the contentId
118      */

119     public abstract Integer JavaDoc getContentId();
120
121     /**
122      * This method gets a component logic helper object.
123      */

124     public abstract ComponentLogic getComponentLogic();
125
126     /**
127      * This method gets a component logic helper object.
128      */

129     public abstract void setComponentLogic(ComponentLogic componentLogic);
130
131     /**
132      * This method gets the formatter object that helps with formatting of data.
133      */

134     public abstract VisualFormatter getVisualFormatter();
135
136     /**
137      * This method gets the color utility.
138      */

139     public abstract ColorHelper getColorHelper();
140
141     /**
142      * This method gets the color utility.
143      */

144     public abstract FontHelper getFontHelper();
145
146     /**
147      * This method gets the math utility.
148      */

149     public abstract MathHelper getMathHelper();
150
151     /**
152      * This method gets the math utility.
153      */

154     public abstract ChartHelper getChartHelper();
155
156     /**
157      * This method gets the webservice utility.
158      */

159     public abstract WebServiceHelper getWebServiceHelper();
160
161     /**
162      * This method gets the NumberFormat instance with the proper locale.
163      */

164     public abstract NumberFormat JavaDoc getNumberFormatHelper() throws SystemException;
165
166     /**
167      * This method gets the DesEncryptionHelper.
168      */

169     public DesEncryptionHelper getDesEncryptionHelper();
170
171     /**
172      * This method gets the rss utility.
173      */

174     public RssHelper getRssHelper();
175
176     /**
177      * This method gets the object converter utility.
178      */

179     public abstract ObjectConverter getObjectConverter();
180
181     /**
182      * Getter for the current content
183      */

184     public abstract ContentVO getContent();
185
186     /**
187      * Getter for the current content
188      */

189     public abstract ContentVO getContent(Integer JavaDoc contentId);
190
191     public abstract InfoGluePrincipal getPrincipal();
192
193     /**
194      * This method returns the InfoGlue Principal requested
195      *
196      * @param userName
197      */

198     
199     public abstract InfoGluePrincipal getPrincipal(String JavaDoc userName);
200     
201     /**
202      * Getting a property for the current Principal - used for personalisation.
203      * This method starts with getting the property on the user and if it does not exist we check out the
204      * group-properties as well.
205      */

206     public abstract String JavaDoc getPrincipalPropertyValue(String JavaDoc propertyName);
207
208     /**
209      * Getting a property for the current Principal - used for personalisation.
210      * This method starts with getting the property on the user and if it does not exist we check out the
211      * group-properties as well.
212      */

213     public abstract Map JavaDoc getPrincipalPropertyHashValues(String JavaDoc propertyName);
214
215     /**
216      * Getting a property for the current Principal - used for personalisation.
217      * This method starts with getting the property on the user and if it does not exist we check out the
218      * group-properties as well.
219      */

220     public abstract String JavaDoc getPrincipalPropertyValue(
221             InfoGluePrincipal infoGluePrincipal, String JavaDoc propertyName);
222
223     /**
224      * Getting a property for a Principal - used for personalisation.
225      * This method starts with getting the property on the user and if it does not exist we check out the
226      * group-properties as well.
227      */

228     public abstract Map JavaDoc getPrincipalPropertyHashValues(
229             InfoGluePrincipal infoGluePrincipal, String JavaDoc propertyName);
230
231     /**
232      * Getting a property for a Principal - used for personalisation.
233      * This method starts with getting the property on the user and if it does not exist we check out the
234      * group-properties as well.
235      */

236     public abstract String JavaDoc getPrincipalPropertyValue(
237             InfoGluePrincipal infoGluePrincipal, String JavaDoc propertyName,
238             boolean escapeSpecialCharacters);
239
240     /**
241      * Getting a property for the current Principal - used for personalisation.
242      * This method starts with getting the property on the user and if it does not exist we check out the
243      * group-properties as well.
244      */

245     public abstract String JavaDoc getPrincipalPropertyValue(String JavaDoc propertyName,
246             boolean escapeSpecialCharacters);
247
248     /**
249      * Getting a property for a Principal - used for personalisation.
250      * This method starts with getting the property on the user and if it does not exist we check out the
251      * group-properties as well.
252      */

253     public abstract Map JavaDoc getPrincipalPropertyHashValues(
254             InfoGluePrincipal infoGluePrincipal, String JavaDoc propertyName,
255             boolean escapeSpecialCharacters);
256
257     /**
258      * Getting a property for the current Principal - used for personalisation.
259      * This method starts with getting the property on the user and if it does not exist we check out the
260      * group-properties as well.
261      */

262     public abstract Map JavaDoc getPrincipalPropertyHashValues(String JavaDoc propertyName,
263             boolean escapeSpecialCharacters);
264
265     /**
266      * Getter for request-object
267      */

268     public abstract HttpServletRequest JavaDoc getHttpServletRequest();
269
270
271     /**
272      * Getter for request-parameters
273      */

274     public abstract Enumeration JavaDoc getRequestParamenterNames();
275
276     /**
277      * Getter for request-parameter
278      */

279     public abstract String JavaDoc getRequestParameter(String JavaDoc parameterName);
280
281     /**
282      * Getter for request-parameters
283      */

284     public abstract String JavaDoc[] getRequestParameterValues(String JavaDoc parameterName);
285
286     /**
287      * Getter for the browserBean which supplies information about the users browser, OS and other stuff.
288      */

289     public abstract BrowserBean getBrowserBean();
290
291     /**
292      * Setting to enable us to set initialized versions of the Node and Content delivery Controllers.
293      */

294     public abstract void setDeliveryControllers(
295             NodeDeliveryController nodeDeliveryController,
296             ContentDeliveryController contentDeliveryController,
297             IntegrationDeliveryController integrationDeliveryController);
298
299     /**
300      * This method is just a dummy method used to ensure that we can ensure to not get a decorated attribute
301      * value if OnSiteEdit is on.
302      * */

303     public abstract String JavaDoc getContentAttribute(String JavaDoc contentBindningName, String JavaDoc attributeName, boolean clean);
304
305     /**
306      * This method is just a dummy method used to ensure that we can ensure to
307      * not get a decorated attribute value if OnSiteEdit is on.
308      */

309     public abstract String JavaDoc getContentAttribute(String JavaDoc attributeName,
310             boolean clean);
311
312     /**
313      * This method deliveres a String with the content-attribute asked for a
314      * specific content and ensure not to get decorated attributes if EditOnSite is
315      * turned on.
316      *
317      * @param contentId
318      * the contentId of a content
319      * @param attributeName
320      * the attribute name in the content. (ie. Title, Leadin etc)
321      * @param clean
322      * true if the content should be decorated in the editonsite
323      * working mode. No decoration is made if content-attribute is
324      * empty.
325      * @return the contentAttribute or empty string if none found.
326      */

327     public abstract String JavaDoc getContentAttribute(Integer JavaDoc contentId,
328             String JavaDoc attributeName, boolean clean);
329
330     /**
331      * This method is just a dummy method used to ensure that we can ensure to not get a decorated attribute
332      * value if OnSiteEdit is on.
333      */

334     
335     public abstract String JavaDoc getContentAttribute(Integer JavaDoc contentId,
336             Integer JavaDoc langaugeId, String JavaDoc attributeName, boolean clean);
337
338     /**
339      * This method is just a dummy method used to ensure that we can ensure to not get a decorated attribute
340      * value if OnSiteEdit is on.
341      */

342
343     public String JavaDoc getContentAttributeWithReturningId(Integer JavaDoc contentId,
344             Integer JavaDoc languageId, String JavaDoc attributeName, boolean clean, List JavaDoc contentVersionId);
345
346     /**
347      * This method deliveres a String with the content-attribute asked for if it exists in the content
348      * defined in the url-parameter contentId.
349      */

350     public abstract String JavaDoc getContentAttribute(String JavaDoc attributeName);
351
352     /**
353      * This method deliveres a String with the content-attribute asked for.
354      * As the siteNode can have multiple bindings as well as a content as a parameter this
355      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
356      */

357     public abstract String JavaDoc getContentAttribute(String JavaDoc contentBindningName,
358             String JavaDoc attributeName);
359
360     /**
361      * This method deliveres a String with the content-attribute asked for.
362      * As the siteNode can have multiple bindings as well as a content as a parameter this
363      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
364      */

365     public abstract String JavaDoc getContentAttribute(Integer JavaDoc contentId,
366             String JavaDoc attributeName);
367
368     /**
369      * This method deliveres a String with the content-attribute asked for in the language asked for.
370      * As the siteNode can have multiple bindings as well as a content as a parameter this
371      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
372      */

373     public abstract String JavaDoc getContentAttribute(Integer JavaDoc contentId,
374             Integer JavaDoc languageId, String JavaDoc attributeName);
375      
376
377     /**
378      * This method deliveres a String with the content-attribute asked for after it has been parsed and all special tags have been converted.
379      * As the siteNode can have multiple bindings as well as a content as a parameter this
380      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
381      */

382     public abstract String JavaDoc getParsedContentAttribute(String JavaDoc attributeName);
383
384     /**
385      * This method deliveres a String with the content-attribute asked for after it has been parsed and all special tags have been converted.
386      * As the siteNode can have multiple bindings as well as a content as a parameter this
387      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
388      */

389     public abstract String JavaDoc getParsedContentAttribute(
390             String JavaDoc contentBindningName, String JavaDoc attributeName);
391
392     /**
393      * This method deliveres a String with the content-attribute asked for after it has been parsed and all special tags have been converted.
394      * The attribute is fetched from the specified content.
395      */

396     public abstract String JavaDoc getParsedContentAttribute(Integer JavaDoc contentId,
397             String JavaDoc attributeName);
398
399     /**
400      * This method is just a dummy method used to ensure that we can ensure to not get a decorated attribute
401      * value if OnSiteEdit is on.
402      */

403     public abstract String JavaDoc getParsedContentAttribute(String JavaDoc attributeName,
404             boolean clean);
405
406     /**
407      * This method is just a dummy method used to ensure that we can ensure to not get a decorated attribute
408      * value if OnSiteEdit is on.
409      */

410     public abstract String JavaDoc getParsedContentAttribute(
411             String JavaDoc contentBindningName, String JavaDoc attributeName, boolean clean);
412     
413     /**
414      * This method is just a dummy method used to ensure that we can ensure to not get a decorated attribute
415      * value if OnSiteEdit is on.
416      */

417     public abstract String JavaDoc getParsedContentAttribute(
418             Integer JavaDoc contentId, String JavaDoc attributeName, boolean clean);
419
420     /**
421      * This method is just a dummy method used to ensure that we can ensure to not get a decorated attribute
422      * value if OnSiteEdit is on.
423      */

424     public abstract String JavaDoc getParsedContentAttribute(
425             Integer JavaDoc contentId, Integer JavaDoc languageId, String JavaDoc attributeName, boolean clean);
426
427     /**
428      * This method deliveres a list of strings which represents all assetKeys for a content.
429      */

430     public abstract Collection JavaDoc getAssetKeys(String JavaDoc contentBindningName);
431
432     /**
433      * This method deliveres a list of strings which represents all assetKeys for a content.
434      */

435     public abstract Collection JavaDoc getAssetKeys(Integer JavaDoc contentId);
436
437     /**
438      * This method deliveres a String with the URL to the thumbnail for the digital asset asked for.
439      * This method assumes that the content sent in only has one asset attached.
440      */

441     public abstract String JavaDoc getAssetThumbnailUrl(Integer JavaDoc contentId, int width,
442             int height);
443
444     /**
445      * This method deliveres a String with the URL to the thumbnail for the digital asset asked for.
446      * This method takes a key for the asset you want to make a thumbnail from.
447      */

448     public abstract String JavaDoc getAssetThumbnailUrl(Integer JavaDoc contentId,
449             String JavaDoc assetKey, int width, int height);
450
451     /**
452      * This method deliveres a String with the URL to the thumbnail of the digital asset asked for.
453      * As the siteNode can have multiple bindings as well as a content as a parameter this
454      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
455      */

456     public abstract String JavaDoc getAssetThumbnailUrl(String JavaDoc contentBindningName,
457             int width, int height);
458
459     /**
460      * This method deliveres a String with the URL to the thumbnail of the digital asset asked for.
461      * As the siteNode can have multiple bindings as well as a content as a parameter this
462      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
463      */

464     public abstract String JavaDoc getAssetThumbnailUrl(String JavaDoc contentBindningName,
465             String JavaDoc assetKey, int width, int height);
466
467     /**
468      * This method deliveres a String with the URL to the digital asset asked for.
469      * As the siteNode can have multiple bindings as well as a content as a parameter this
470      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
471      */

472     public abstract String JavaDoc getAssetUrl(String JavaDoc contentBindningName);
473
474     public abstract String JavaDoc getEncodedUrl(String JavaDoc s, String JavaDoc enc);
475
476     /**
477      * This method deliveres a String with the URL to the digital asset asked for.
478      */

479     public abstract String JavaDoc getAssetUrl(Integer JavaDoc contentId);
480
481     /**
482      * This method deliveres a String with the URL to the digital asset asked for.
483      */

484     public abstract String JavaDoc getAssetUrl(Integer JavaDoc contentId, String JavaDoc assetKey);
485
486     /**
487      * This method deliveres a String with the URL to the digital asset asked for.
488      * As the siteNode can have multiple bindings as well as a content as a parameter this
489      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
490      */

491     public abstract String JavaDoc getAssetUrl(String JavaDoc contentBindningName, int index);
492
493     /**
494      * This method deliveres a String with the URL to the digital asset asked for.
495      * As the siteNode can have multiple bindings as well as a content as a parameter this
496      * parameter requires a bindingName which refers to the AvailableServiceBinding.name-attribute.
497      */

498     public abstract String JavaDoc getAssetUrl(String JavaDoc contentBindningName,
499             String JavaDoc assetKey);
500
501     /**
502      * This method deliveres a String with the URL to the digital asset asked for. In this special case the image
503      * is fetched from the article being generated. This means that this method only is of interest if you have attached
504      * assets to either a template or to an content and are useing parsedContentAttribute.
505      */

506     public abstract String JavaDoc getInlineAssetUrl(String JavaDoc assetKey);
507
508     /**
509      * This method deliveres a String with the URL to the digital asset asked for. In this special case the image
510      * is fetched from the article being generated. This means that this method only is of interest if you have attached
511      * assets to either a template or to an content and are useing parsedContentAttribute.
512      */

513     public abstract String JavaDoc getInlineAssetUrl(Integer JavaDoc contentId, String JavaDoc assetKey);
514
515     /*
516      * Provide the same interface for getting asset filesize as for getting url.
517      * This should be refactored soon, to supply a assetVO instead.
518      *
519      */
public abstract Integer JavaDoc getAssetFileSize(Integer JavaDoc contentId);
520
521     public abstract Integer JavaDoc getAssetFileSize(Integer JavaDoc contentId, String JavaDoc assetKey);
522
523     public abstract Integer JavaDoc getAssetFileSize(String JavaDoc contentBindningName,
524             int index);
525
526     public abstract Integer JavaDoc getAssetFileSize(String JavaDoc contentBindningName,
527             String JavaDoc assetKey);
528
529     /**
530      * This method gets a List of related contents defined in an attribute as an xml-definition.
531      * This is an ugly method right now. Later we should have xmlDefinitions that are fully qualified so it can be
532      * used to access other systems than our own.
533      */

534     public abstract List JavaDoc getRelatedContentsByQualifyer(String JavaDoc qualifyerXML);
535
536     /**
537      * This method gets a List of related contents defined in an attribute as an xml-definition.
538      * This is an ugly method right now. Later we should have xmlDefinitions that are fully qualified so it can be
539      * used to access other systems than our own.
540      */

541     public abstract List JavaDoc getRelatedContents(String JavaDoc attributeName);
542
543     /**
544      * This method gets a List of related contents defined in an attribute as an xml-definition.
545      * This is an ugly method right now. Later we should have xmlDefinitions that are fully qualified so it can be
546      * used to access other systems than our own.
547      */

548     public abstract List JavaDoc getRelatedContents(String JavaDoc bindingName,
549             String JavaDoc attributeName);
550
551     /**
552      * This method gets a List of related contents defined in an attribute as an xml-definition.
553      * This is an ugly method right now. Later we should have xmlDefinitions that are fully qualified so it can be
554      * used to access other systems than our own.
555      */

556     public abstract List JavaDoc getRelatedContents(Integer JavaDoc contentId,
557             String JavaDoc attributeName);
558
559     /**
560      * This method gets a List of related siteNodes defined in an attribute as an xml-definition.
561      * This is an ugly method right now. Later we should have xmlDefinitions that are fully qualified so it can be
562      * used to access other systems than our own.
563      */

564     public abstract List JavaDoc getRelatedPages(String JavaDoc attributeName);
565
566     /**
567      * This method gets a List of related contents defined in an attribute as an xml-definition.
568      * This is an ugly method right now. Later we should have xmlDefinitions that are fully qualified so it can be
569      * used to access other systems than our own.
570      */

571     public abstract List JavaDoc getRelatedPages(String JavaDoc bindingName,
572             String JavaDoc attributeName);
573
574     /**
575      * This method gets a List of related contents defined in an attribute as an xml-definition.
576      * This is an ugly method right now. Later we should have xmlDefinitions that are fully qualified so it can be
577      * used to access other systems than our own.
578      */

579     public abstract List JavaDoc getRelatedPages(Integer JavaDoc contentId, String JavaDoc attributeName);
580
581     /**
582      * This method deliveres a String with the URL to the base path of the directory resulting from
583      * an unpacking of a uploaded zip-digitalAsset.
584      */

585     public abstract String JavaDoc getArchiveBaseUrl(String JavaDoc contentBindningName,
586             String JavaDoc assetKey);
587
588     /**
589      * This method deliveres a String with the URL to the base path of the directory resulting from
590      * an unpacking of a uploaded zip-digitalAsset.
591      */

592     public abstract String JavaDoc getArchiveBaseUrl(Integer JavaDoc contentId, String JavaDoc assetKey);
593
594     public abstract Vector JavaDoc getArchiveEntries(Integer JavaDoc contentId, String JavaDoc assetKey);
595
596     /**
597      * This method deliveres a String with the URL to the base path of the directory resulting from
598      * an unpacking of a uploaded zip-digitalAsset.
599      */

600     public abstract String JavaDoc getArchiveBaseUrl(String JavaDoc contentBindningName,
601             int index, String JavaDoc assetKey);
602
603     /**
604      * This method uses the content-attribute to generate a pdf-file.
605      * The content-attribute is parsed before it is sent to the renderer, and the
606      * resulting string must follow the XSL-FO specification.
607      *
608      * The method checks if a previous file exists that has the same attributes as the wanted one
609      * and if so - we don't generate it again.
610      *
611      */

612     public abstract String JavaDoc getContentAttributeAsPDFUrl(
613             String JavaDoc contentBindningName, String JavaDoc attributeName);
614
615     /**
616      * This method returns a list of elements/attributes based on the contentType sent in.
617      */

618     
619     public abstract List JavaDoc getContentAttributes(String JavaDoc schemaValue);
620
621     /**
622      * This method deliveres a String with the content-attribute asked for generated as a gif-file.
623      * That is - the text is printed as an image. You can specify a number of things to control the
624      * generation. Just experiment and the names are pretty much self explainatory.
625      * The method checks if a previous file exists that has the same attributes as the wanted one
626      * and if so - we don't generate it again.
627      *
628      * TODO: consider implement a more general getTextAsImageUrl so we dont need a zillion different variants
629      * for different ways to access the contentAttribute. (we need to calculate a unique string from
630      * the text and all the other stuff.)
631      *
632      */

633     public abstract String JavaDoc getContentAttributeAsImageUrl(
634             String JavaDoc contentBindningName, String JavaDoc attributeName, int canvasWidth,
635             int canvasHeight);
636
637     public abstract String JavaDoc getContentAttributeAsImageUrl(
638             String JavaDoc contentBindningName, String JavaDoc attributeName, int canvasWidth,
639             int canvasHeight, int textStartPosX, int textStartPosY,
640             int textWidth, int textHeight, String JavaDoc fontName, int fontStyle,
641             int fontSize, String JavaDoc foregroundColor, String JavaDoc backgroundColor);
642
643     public abstract String JavaDoc getContentAttributeAsImageUrl(
644             String JavaDoc contentBindningName, String JavaDoc attributeName, int canvasWidth,
645             int canvasHeight, int textStartPosX, int textStartPosY,
646             int textWidth, int textHeight, String JavaDoc fontName, int fontStyle,
647             int fontSize, String JavaDoc foregroundColor, String JavaDoc backgroundColor,
648             String JavaDoc backgroundImageUrl);
649
650     public abstract String JavaDoc getContentAttributeAsImageUrl(Integer JavaDoc contentId,
651             String JavaDoc attributeName, int canvasWidth, int canvasHeight,
652             int textStartPosX, int textStartPosY, int textWidth,
653             int textHeight, String JavaDoc fontName, int fontStyle, int fontSize,
654             String JavaDoc foregroundColor, String JavaDoc backgroundColor);
655
656     public abstract String JavaDoc getContentAttributeAsImageUrl(
657             String JavaDoc contentBindningName, String JavaDoc attributeName, int canvasWidth,
658             int canvasHeight, int textStartPosX, int textStartPosY,
659             int textWidth, int textHeight, String JavaDoc fontName, int fontStyle,
660             int fontSize, Color JavaDoc foregroundColor, Color JavaDoc backgroundColor);
661
662     public abstract String JavaDoc getContentAttributeAsImageUrl(
663             String JavaDoc contentBindningName, String JavaDoc attributeName, int canvasWidth,
664             int canvasHeight, int textStartPosX, int textStartPosY,
665             int textWidth, int textHeight, String JavaDoc fontName, int fontStyle,
666             int fontSize, Color JavaDoc foregroundColor, Color JavaDoc backgroundColor,
667             String JavaDoc backgroundImageUrl);
668
669     public abstract String JavaDoc getContentAttributeAsImageUrl(Integer JavaDoc contentId,
670             String JavaDoc attributeName, int canvasWidth, int canvasHeight,
671             int textStartPosX, int textStartPosY, int textWidth,
672             int textHeight, String JavaDoc fontName, int fontStyle, int fontSize,
673             Color JavaDoc foregroundColor, Color JavaDoc backgroundColor);
674
675     public abstract String JavaDoc getContentAttributeAsImageUrl(Integer JavaDoc contentId,
676             String JavaDoc attributeName, int canvasWidth, int canvasHeight,
677             int textStartPosX, int textStartPosY, int textWidth,
678             int textHeight, String JavaDoc fontName, int fontStyle, int fontSize,
679             Color JavaDoc foregroundColor, Color JavaDoc backgroundColor,
680             String JavaDoc backgroundImageUrl);
681
682     /**
683      * This method deliveres a String with the content-attribute asked for generated as a png-file.
684      * That is - the text is printed as an image. You can specify a number of things to control the
685      * generation. Just experiment and the names are pretty much self explainatory.
686      * The method checks if a previous file exists that has the same attributes as the wanted one
687      * and if so - we don't generate it again.
688      */

689     public abstract String JavaDoc getStringAsImageUrl(String JavaDoc text, int canvasWidth,
690             int canvasHeight, int textStartPosX, int textStartPosY,
691             int textWidth, int textHeight, String JavaDoc fontName, int fontStyle,
692             int fontSize, String JavaDoc foregroundColor, String JavaDoc backgroundColor);
693
694     public abstract String JavaDoc getStringAsImageUrl(String JavaDoc text, int canvasWidth,
695             int canvasHeight, int textStartPosX, int textStartPosY,
696             int textWidth, int textHeight, String JavaDoc fontName, int fontStyle,
697             int fontSize, Color JavaDoc foregroundColor, Color JavaDoc backgroundColor);
698
699     /**
700      * This method returns the base url for the digital assets.
701      */

702     public abstract String JavaDoc getDigitalAssetBaseUrl() throws Exception JavaDoc;
703
704     /**
705      * This method returns the Id the digital assets.
706      */

707     
708     public Integer JavaDoc getDigitalAssetId(Integer JavaDoc contentId, String JavaDoc assetKey) throws Exception JavaDoc;
709
710     /**
711      * This method returns the Id the digital assets.
712      */

713     
714     public Integer JavaDoc getDigitalAssetId(Integer JavaDoc contentId, Integer JavaDoc languageId, String JavaDoc assetKey) throws Exception JavaDoc;
715
716     /**
717      * This method returns the parent repositoryId if any for the given repository.
718      */

719     
720     public Integer JavaDoc getParentRepositoryId(Integer JavaDoc repositoryId);
721
722     /**
723      * This method returns the parent repositoryId if any for the given repository.
724      */

725     
726     public Integer JavaDoc getParentRepositoryId();
727
728     /**
729      * This method returns the root node for the current repository.
730      */

731     
732     public SiteNodeVO getRepositoryRootSiteNode() throws Exception JavaDoc;
733
734     /**
735      * This method returns the root node for the current repository.
736      */

737     
738     public SiteNodeVO getRepositoryRootSiteNode(Integer JavaDoc repositoryId) throws Exception JavaDoc;
739
740     /**
741      * This method returns the base url for the digital assets.
742      */

743     public abstract String JavaDoc getRepositoryBaseUrl() throws Exception JavaDoc;
744
745     /**
746      * This method deliveres a String with the URL to the page asked for.
747      * As the siteNode can have multiple bindings the method requires a bindingName
748      * which refers to the AvailableServiceBinding.name-attribute.
749      */

750     public abstract String JavaDoc getPageUrl(String JavaDoc structureBindningName);
751
752     /**
753      * This method just gets a new URL but with the given contentId in it.
754      */

755     public abstract String JavaDoc getPageUrl(WebPage webpage, Integer JavaDoc contentId);
756
757     /**
758      * This method deliveres a String with the URL to the page asked for.
759      * As the siteNode can have multiple bindings the method requires a bindingName
760      * which refers to the AvailableServiceBinding.name-attribute.
761      */

762     public abstract String JavaDoc getPageBaseUrl(String JavaDoc structureBindningName);
763
764     /**
765      * This method calls an page and stores it as an digitalAsset - that way one can avoid having to
766      * serve javascript-files and css-files through InfoGlue. Not suitable for use if you have very dynamic
767      * css:es or scripts which includes logic depending on user info etc.. mostly usable if you have a static css
768      * or controls it on the pageCache parameters.
769      */

770
771     public String JavaDoc getPageAsDigitalAssetUrl(Integer JavaDoc siteNodeId, Integer JavaDoc languageId, Integer JavaDoc contentId, String JavaDoc fileSuffix);
772
773     /**
774      * Getter for the siteNodeId on a specific bound page
775      */

776     public abstract Integer JavaDoc getSiteNodeId(String JavaDoc structureBindningName);
777
778     /**
779      * This method fetches the given siteNode
780      */

781     public abstract SiteNodeVO getSiteNode(Integer JavaDoc siteNodeId);
782
783     /**
784      * This method fetches the given siteNode
785      */

786     public abstract SiteNodeVO getSiteNode();
787
788     /**
789      * Getter for bound contentId for a binding
790      */

791     public abstract Integer JavaDoc getContentId(String JavaDoc contentBindningName);
792
793     /**
794      * This method gets the meta information of the current sitenode.
795      */

796     
797     public Integer JavaDoc getMetaInformationContentId();
798     
799     /**
800      * This method gets the meta information of a particular sitenode.
801      */

802     
803     public Integer JavaDoc getMetaInformationContentId(Integer JavaDoc siteNodeId);
804
805     /**
806      * This method gets the children of a content.
807      */

808     public abstract Collection JavaDoc getChildContents(Integer JavaDoc contentId,
809             boolean includeFolders);
810
811     /**
812      * Getter for bound contentId for a binding on a special siteNode
813      */

814     public abstract Integer JavaDoc getContentId(Integer JavaDoc siteNodeId,
815             String JavaDoc contentBindningName);
816
817     /**
818      * This method deliveres a String with the URL to the page asked for.
819      * As the siteNode can have multiple bindings the method requires a bindingName
820      * which refers to the AvailableServiceBinding.name-attribute. This method also allows the user
821      * to specify that the content is important. This method is mostly used for master/detail-pages.
822      */

823     public abstract String JavaDoc getPageUrl(String JavaDoc structureBindningName,
824             Integer JavaDoc contentId);
825
826     /**
827      * This method deliveres a String with the URL to the page asked for.
828      * As the siteNode can have multiple bindings the method requires a bindingName and also allows the user to specify a
829      * special siteNode in an ordered collection.
830      * which refers to the AvailableServiceBinding.name-attribute.
831      */

832     public abstract String JavaDoc getPageUrlOnPosition(String JavaDoc structureBindningName,
833             int position);
834
835     /**
836      * This method deliveres a String with the URL to the page asked for.
837      * As the siteNode can have multiple bindings the method requires a bindingName and also allows the user to specify a
838      * special siteNode in an ordered collection.
839      * which refers to the AvailableServiceBinding.name-attribute. This method also allows the user
840      * to specify that the content is important. This method is mostly used for master/detail-pages.
841      */

842     public abstract String JavaDoc getPageUrl(String JavaDoc structureBindningName,
843             int position, Integer JavaDoc contentId);
844
845     /**
846      * This method deliveres a new url pointing to the same address as now but in the language
847      * corresponding to the code sent in.
848      */

849     public abstract String JavaDoc getCurrentPageUrl();
850
851     /**
852      * This method returns the exact full url from the original request - not modified
853      * @return
854      */

855     
856     public String JavaDoc getOriginalFullURL();
857
858     /**
859      * This method deliveres a new url pointing to the same address as now but with new parameters.
860      */

861     public abstract String JavaDoc getPageUrl(Integer JavaDoc siteNodeId, Integer JavaDoc languageId,
862             Integer JavaDoc contentId);
863
864     /**
865      * This method constructs a string representing the path to the page with respect to where in the
866      * structure the page is. It also takes the page title into consideration.
867      */

868     public abstract String JavaDoc getCurrentPagePath();
869
870     /**
871      * This method returns the parent siteNode to the given siteNode.
872      */

873     public abstract SiteNodeVO getParentSiteNode(Integer JavaDoc siteNodeId);
874
875     /**
876      * This method deliveres a new url pointing to the same address as now but in the language
877      * corresponding to the code sent in.
878      */

879     public abstract String JavaDoc getPageUrlAfterLanguageChange(String JavaDoc languageCode);
880
881     /**
882      * This method deliveres a String with the Navigation title the page the user are on has.
883      * The navigation-title is fetched from the meta-info-content bound to the site node.
884      */

885     public abstract String JavaDoc getPageTitle();
886
887     /**
888      * This method deliveres a String with the Navigation title the page asked for has.
889      * As the siteNode can have multiple bindings the method requires a bindingName
890      * which refers to the AvailableServiceBinding.name-attribute. The navigation-title is fetched
891      * from the meta-info-content bound to the site node.
892      */

893     public abstract String JavaDoc getPageNavTitle(String JavaDoc structureBindningName);
894
895     /**
896      * This method deliveres a String with the Navigation title the page asked for has.
897      * The navigation-title is fetched from the meta-info-content bound to the site node.
898      */

899     public abstract String JavaDoc getPageNavTitle(Integer JavaDoc siteNodeId);
900
901     /**
902      * This method deliveres a String with the Navigation title the page asked for has.
903      * As the siteNode can have multiple bindings the method requires a bindingName and a collection index.
904      * The navigation-title is fetched from the meta-info-content bound to the site node.
905      */

906     public abstract String JavaDoc getPageNavTitle(String JavaDoc structureBindningName,
907             int index);
908
909     /**
910      * This method returns true if the if the page in question (ie sitenode) has page-caching disabled.
911      * This is essential to turn off when you have a dynamic page like an external application or searchresult.
912      */

913     public abstract boolean getIsPageCacheDisabled();
914
915     /**
916      * This method returns the contenttype this page should return. This is important when sending assets or css:contents.
917      */

918     public abstract String JavaDoc getPageContentType();
919
920     /**
921      * This method returns true if the page in question (ie sitenode) has it's protected property enabled.
922      * This is essential when checking if we should authenticate users before allowing them access.
923      */

924     public abstract boolean getIsPageProtected();
925
926     /**
927      * This method returns true if the page in question (ie sitenode) has page-caching disabled.
928      * This is essential to turn off when you have a dynamic page like an external application or searchresult.
929      */

930     public abstract boolean getIsEditOnSightDisabled();
931
932     /**
933      * This method returns true if the user is in component editor mode.
934      */

935     public boolean getIsInPageComponentMode();
936
937     /**
938      * This method returns a list of all languages available on the current site/repository.
939      */

940     public abstract List JavaDoc getAvailableLanguages();
941
942     /**
943      * This method returns a list of all languages available on the current sitenode. The logic is that
944      * we check which languages are found in the meta-content in the current mode.
945      * @deprecated - use getPageLanguages() instead
946      */

947     public abstract List JavaDoc getNodeAvailableLanguages();
948
949     /**
950      * This method returns a list of all languages available on the current sitenode. The logic is that
951      * we check which languages are found in the meta-content in the current mode.
952      * @deprecated - use getPageLanguages(Integer siteNodeId) instead
953      */

954     public abstract List JavaDoc getNodeAvailableLanguages(Integer JavaDoc siteNodeId);
955
956     /**
957      * This method returns a list of all languages available on the current sitenode. This method will return all languages enabled for this repository minus
958      * any disabled languages for the siteNode.
959      */

960     public List JavaDoc getPageLanguages();
961
962     /**
963      * This method returns a list of all languages available on the current sitenode. This method will return all languages enabled for this repository minus
964      * any disabled languages for the siteNode.
965      */

966     public List JavaDoc getPageLanguages(Integer JavaDoc siteNodeId);
967
968     /**
969      * The method returns a list of WebPage-objects that is the children of the current
970      * siteNode. The method is great for navigation-purposes on a structured site.
971      */

972     public abstract List JavaDoc getChildPages();
973
974     /**
975      * The method returns a list of WebPage-objects that is the children of the given
976      * siteNode. The method is great for navigation-purposes on a structured site.
977      */

978     public abstract List JavaDoc getChildPages(String JavaDoc structureBindingName);
979
980     /**
981      * The method returns a list of WebPage-objects that is the children of the given
982      * siteNode. The method is great for navigation-purposes on a structured site.
983      */

984     public abstract List JavaDoc getChildPages(Integer JavaDoc siteNodeId, boolean escapeHTML, boolean hideUnauthorizedPages);
985
986     /**
987      * The method returns a list of WebPage-objects that is the children of the given
988      * siteNode. The method is great for navigation-purposes on a structured site.
989      */

990     public abstract List JavaDoc getChildPages(Integer JavaDoc siteNodeId);
991
992     
993     public abstract List JavaDoc getBoundPages(String JavaDoc structureBindningName);
994
995     /**
996      * This methods get a list of bound pages with the structureBindningName sent in which resides on the siteNodeId sent in.
997      */

998     public abstract List JavaDoc getBoundPages(Integer JavaDoc siteNodeId, String JavaDoc structureBindningName);
999
1000    /**
1001     * The method returns a list of WebPage-objects that is the bound sitenodes of named binding.
1002     * The method is great for navigation-purposes on any site.
1003     * We also filter out all pages that don't have a localized version of the page meta-content.
1004     */

1005    public abstract List JavaDoc getLocalizedBoundPages(String JavaDoc structureBindningName);
1006
1007    /**
1008     * The method returns a single ContentVO-objects that is the bound content of named binding.
1009     * It's used for getting one content.
1010     */

1011    public abstract ContentVO getBoundContent(String JavaDoc structureBindningName);
1012
1013    /**
1014     * The method returns a list of ContentVO-objects that is the bound content of named binding.
1015     * The method is great for collection-pages on any site.
1016     */

1017    public abstract List JavaDoc getBoundContents(String JavaDoc structureBindningName);
1018
1019    /**
1020     * The method returns a list of ContentVO-objects that is children to the bound content of named binding.
1021     * The method is great for collection-pages on any site where you want to bind to a folder containing all contents to list.
1022     * You can also state if the method should recurse into subfolders and how the contents should be sorted.
1023     * The recursion only deals with three levels at the moment for performance-reasons.
1024     */

1025    public abstract List JavaDoc getBoundFolderContents(String JavaDoc structureBindningName,
1026            boolean searchRecursive, String JavaDoc sortAttribute, String JavaDoc sortOrder);
1027
1028    /**
1029     * The method returns a list of ContentVO-objects that is children to the bound content of named binding on the siteNode sent in.
1030     * The method is great for collection-pages on any site where you want to bind to a folder containing all contents to list.
1031     * You can also state if the method should recurse into subfolders and how the contents should be sorted.
1032     * The recursion only deals with three levels at the moment for performance-reasons.
1033     */

1034    public abstract List JavaDoc getBoundFolderContents(Integer JavaDoc siteNodeId,
1035            String JavaDoc structureBindningName, boolean searchRecursive,
1036            String JavaDoc sortAttribute, String JavaDoc sortOrder);
1037
1038    /**
1039     * The method returns a list of ContentVO-objects that is children to the bound content sent in.
1040     * The method is great for collection-pages on any site where you want to bind to a folder containing all contents to list.
1041     * You can also state if the method should recurse into subfolders and how the contents should be sorted.
1042     * The recursion only deals with three levels at the moment for performance-reasons.
1043     */

1044    public abstract List JavaDoc getChildContents(Integer JavaDoc contentId,
1045            boolean searchRecursive, String JavaDoc sortAttribute, String JavaDoc sortOrder);
1046
1047    /**
1048     * The method returns a list of ContentVO-objects that is children to the bound content sent in.
1049     * The method is great for collection-pages on any site where you want to bind to a folder containing all contents to list.
1050     * You can also state if the method should recurse into subfolders and how the contents should be sorted.
1051     * The recursion only deals with three levels at the moment for performance-reasons.
1052     */

1053    
1054    public List JavaDoc getChildContents(Integer JavaDoc contentId, boolean searchRecursive, String JavaDoc sortAttribute, String JavaDoc sortOrder, boolean includeFolders);
1055
1056    /**
1057     * Getter for the most recent contentVersion on a content
1058     */

1059    
1060    public ContentVersionVO getContentVersion(Integer JavaDoc contentId);
1061    
1062    /**
1063     * Getter for the most recent contentVersion on a content
1064     */

1065    
1066    public ContentVersionVO getContentVersion(Integer JavaDoc contentId, Integer JavaDoc languageId, boolean useLanguageFallback);
1067    
1068    /**
1069     * Finds a list of ContentVersionVOs that are related to the provided category under the given attribute name.
1070     * @param categoryId The id of the Category
1071     * @param attributeName The ContentTypeDefinition attribute name of the Category relationship.
1072     * @return A list of relevant CategoryVersionVOs
1073     */

1074    public abstract List JavaDoc getContentVersionsByCategory(Integer JavaDoc categoryId, String JavaDoc attributeName);
1075
1076    /**
1077     * This method searches for all contents matching
1078     */

1079    
1080    public List JavaDoc getMatchingContents(String JavaDoc contentTypeDefinitionNamesString, String JavaDoc categoryConditionString, boolean useLanguageFallback);
1081
1082    /**
1083     * This method returns which mode the delivery-engine is running in.
1084     * The mode is important to be able to show working, preview and published data separate.
1085     */

1086    
1087    public Integer JavaDoc getOperatingMode();
1088    
1089    /**
1090     * The method returns the ContentTypeVO-objects of the given contentId.
1091     */

1092    
1093    public abstract ContentTypeDefinitionVO getContentTypeDefinitionVO(Integer JavaDoc contentId);
1094
1095    /**
1096     * The method returns the ContentTypeVO-object with the given name.
1097     */

1098    
1099    public abstract ContentTypeDefinitionVO getContentTypeDefinitionVO(String JavaDoc name);
1100
1101    /**
1102     * This method deliveres a list of strings which represents all assetKeys defined for a contentTypeDefinition.
1103     */

1104     
1105    public Collection JavaDoc getContentTypeDefinitionAssetKeys(String JavaDoc schemaValue);
1106
1107    /**
1108     * The method returns a list of WebPage-objects that is the bound sitenodes of named binding.
1109     * The method is great for navigation-purposes on any site. Improve later so the list is cached
1110     * once for every instance. Otherwise we fetch the whole list again and its not necessairy as
1111     * this controller only concerns one request.
1112     */

1113    public abstract WebPage getBoundPage(String JavaDoc structureBindningName,
1114            int position);
1115
1116    /**
1117     * This method allows a user to get any string rendered as a template.
1118     */

1119    public abstract String JavaDoc renderString(String JavaDoc template);
1120
1121    /**
1122     * This method allows a user to get any string rendered as a template.
1123     */

1124    public abstract String JavaDoc renderString(String JavaDoc template, boolean useSubContext);
1125
1126    /**
1127     * This method allows the current template to include another template which is also rendered
1128     * in the current context as if it were a part. The method assumes that the result can be cached.
1129     * Use the other include method if you wish to be able to control if the result is cached or not.
1130     */

1131    public abstract String JavaDoc include(String JavaDoc contentBindningName,
1132            String JavaDoc attributeName);
1133
1134    public abstract String JavaDoc include(String JavaDoc contentBindningName,
1135            String JavaDoc attributeName, boolean cacheInclude);
1136
1137    /**
1138     * This method allows the current template to include another template which is also rendered
1139     * in the current context as if it were a part.
1140     * Use this method if you wish to be able to control if the result is cached or not.
1141     */

1142    public abstract String JavaDoc include(String JavaDoc contentBindningName,
1143            String JavaDoc attributeName, boolean cacheInclude, String JavaDoc cName,
1144            Object JavaDoc cObject);
1145
1146    /**
1147     * This method fetches a given URL contents. This means that we can include a external url's contents
1148     * in our application.
1149     */

1150    public abstract String JavaDoc getUrlContent(String JavaDoc url);
1151
1152    /**
1153     * This method fetches a given URL contents. This means that we can include a external url's contents
1154     * in our application. This second method is used to not send extra params through.
1155     */

1156    public abstract String JavaDoc getUrlContent(String JavaDoc url, boolean includeRequest);
1157
1158    /**
1159     * This method fetches a given URL contents. This means that we can include a external url's contents
1160     * in our application.
1161     */

1162    public abstract String JavaDoc getUrlContent(String JavaDoc url, String JavaDoc encoding);
1163
1164    /**
1165     * This method fetches a given URL contents. This means that we can include a external url's contents
1166     * in our application. This second method is used to not send extra params through.
1167     */

1168    public abstract String JavaDoc getUrlContent(String JavaDoc url, boolean includeRequest,
1169            String JavaDoc encoding);
1170
1171    public abstract Object JavaDoc getObjectWithName(String JavaDoc classname);
1172
1173    /**
1174     * This method lets a user substitute a string located in the page by a regular expression with another
1175     * string. Very useful in certain situations.
1176     */

1177    public abstract String JavaDoc replace(String JavaDoc originalString,
1178            String JavaDoc expressionToReplace, String JavaDoc newString);
1179
1180    /**
1181     * This method lets a user substitute a string located in the page by a regular expression with another
1182     * string. This method also lets the user specify a subpart of the string to be able to be more
1183     * specific. Very useful in certain situations.
1184     */

1185    public abstract String JavaDoc replace(String JavaDoc originalString, String JavaDoc substring,
1186            String JavaDoc stringToReplace, String JavaDoc newString);
1187
1188    /**
1189     * This method helps us find out if the current site node is the same as the one sent in.
1190     */

1191    public boolean getIsCurrentSiteNode(Integer JavaDoc siteNodeId);
1192
1193    /**
1194     * This method helps us find out if the current site node is the same or a child to the sent in one.
1195     * So if the current page is a child(in the entire hierarchy below) below the siteNode sent in the
1196     * method returns true. Useful for navigational purposes.
1197     */

1198    public abstract boolean getIsParentToCurrent(Integer JavaDoc siteNodeId);
1199
1200    /**
1201     * This method return true if a localized version with the current language exist
1202     */

1203    public abstract boolean getHasLocalizedVersion(Integer JavaDoc contentId);
1204
1205    /**
1206     * This method return true if the user logged in has access to the siteNode sent in.
1207     */

1208    public abstract boolean getHasUserPageAccess(Integer JavaDoc siteNodeId);
1209
1210    /**
1211     * This method return true if the user logged in has access to the siteNode sent in.
1212     */

1213    public abstract boolean getHasUserPageAccess(Integer JavaDoc siteNodeId, String JavaDoc interceptionPointName);
1214
1215    /**
1216     * This method return true if the user logged in has access to the siteNode sent in.
1217     */

1218    public abstract boolean getHasUserPageWriteAccess(Integer JavaDoc siteNodeId);
1219
1220    /**
1221     * This method returns a list of form elements/attributes based on the schema sent in.
1222     * These consitutes the entire form and a template can then be used to render it in the appropriate technique.
1223     */

1224    public abstract List JavaDoc getFormAttributes(String JavaDoc contentBindningName,
1225            String JavaDoc attributeName);
1226
1227    /**
1228     * This method returns a list of form elements/attributes based on the schema sent in.
1229     * These consitutes the entire form and a template can then be used to render it in the appropriate technique.
1230     */

1231    public abstract List JavaDoc getFormAttributes(Integer JavaDoc contentId,
1232            String JavaDoc attributeName);
1233
1234    /**
1235     * This method supplies a method to get the locale of the language currently in use.
1236     */

1237    public LanguageVO getLanguage(Integer JavaDoc languageId);
1238    
1239    /**
1240     * This method supplies a method to get the locale of the language currently in use.
1241     */

1242    public LanguageVO getLanguage(String JavaDoc languageCode);
1243
1244    /**
1245     * This method supplies a method to get the locale of the language sent in.
1246     */

1247    public abstract Locale JavaDoc getLanguageCode(Integer JavaDoc languageId) throws SystemException;
1248
1249    /**
1250     * This method supplies a method to get the locale of the language currently in use.
1251     */

1252    public abstract Locale JavaDoc getLocale() throws SystemException;
1253
1254    /**
1255     * This method sets a cookie.
1256     *
1257     * @param cookieName
1258     * @param value
1259     * @param domain
1260     * @param path
1261     * @param maxAge
1262     */

1263
1264    public void setCookie(String JavaDoc cookieName, String JavaDoc value, String JavaDoc domain, String JavaDoc path, Integer JavaDoc maxAge);
1265    
1266    /**
1267     * This method gets a cookie.
1268     *
1269     * @param cookieName
1270     */

1271
1272    public String JavaDoc getCookie(String JavaDoc cookieName);
1273
1274    
1275    public DeliveryContext getDeliveryContext();
1276
1277    public void setDeliveryContext(DeliveryContext deliveryContext);
1278    
1279    /**
1280     * This method should be much more sophisticated later and include a check to see if there is a
1281     * digital asset uploaded which is more specialized and can be used to act as serverside logic to the template.
1282     */

1283    public abstract TemplateController getTemplateController(
1284            Integer JavaDoc siteNodeId, Integer JavaDoc languageId, Integer JavaDoc contentId, InfoGluePrincipal infoGluePrincipal, DeliveryContext deliveryContext)
1285            throws SystemException, Exception JavaDoc;
1286
1287    public abstract TemplateController getTemplateController(
1288            Integer JavaDoc siteNodeId, Integer JavaDoc languageId, Integer JavaDoc contentId,
1289            HttpServletRequest JavaDoc request, InfoGluePrincipal infoGluePrincipal, DeliveryContext deliveryContext) throws SystemException, Exception JavaDoc;
1290
1291    public abstract String JavaDoc decoratePage(String JavaDoc page);
1292
1293    /**
1294     * This method adds the neccessairy html to a output for it to be editable.
1295     */

1296
1297    public String JavaDoc getEditOnSightTag(Integer JavaDoc contentId, Integer JavaDoc languageId, String JavaDoc attributeName, String JavaDoc html, boolean showInPublishedMode);
1298
1299    /**
1300     * This method returns the neccessairy html to assign by klicking on a link.
1301     * @param propertyName
1302     * @param html
1303     * @param showInPublishedMode
1304     * @return
1305     */

1306    public String JavaDoc getAssignPropertyBindingTag(String JavaDoc propertyName, boolean createNew, String JavaDoc html, boolean showInPublishedMode);
1307
1308    
1309    public boolean getThreatFoldersAsContents();
1310    
1311    public void setThreatFoldersAsContents(boolean threatFoldersAsContents);
1312    
1313    /**
1314     * Renders a text from values configured in a content, iterates over the
1315     * contenttype defenition names and look for font properties.
1316     * @param contentId a content id containing attributes to match preferences
1317     * of the textrenderer. ie fontsize, fontname.
1318     * @param text the text to render
1319     * @param renderAttributes render attributes in a map to override the
1320     * content settings
1321     * @return the asseturl or empty string if something is wrong
1322     * @author Per Jonsson per.jonsson@it-huset.se
1323     */

1324    public String JavaDoc getRenderedTextUrl( Integer JavaDoc contentId, String JavaDoc text, Map JavaDoc renderAttributes );
1325
1326    /**
1327     * Renders a text from configuration stored in the propertyfile or in the
1328     * map.
1329     * @param text the text to render
1330     * @param renderAttributes render attributes in a map to override the
1331     * default or propertyfile settings
1332     * @return the asseturl or empty string if something is wrong
1333     * @author Per Jonsson - per.jonsson@it-huset.se
1334     */

1335    public String JavaDoc getRenderedTextUrl( String JavaDoc text, Map JavaDoc renderAttributes );
1336    
1337    /**
1338     * A method to check if the current pagenode is decorated with EditOnSight
1339     * or not. Checks if it's the BasicTemplateController or the
1340     * EditOnSiteBasicTemplateController which is used as a render.
1341     *
1342     * @return true if the pagenode is rendered with EditOnSight decoration.
1343     */

1344    public boolean getIsDecorated();
1345
1346}
Popular Tags