KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > content > ContentTreeVisitorInterface


1 package org.jahia.content;
2
3 import java.util.ArrayList JavaDoc;
4
5 import org.jahia.exceptions.JahiaException;
6 import org.jahia.services.usermanager.JahiaUser;
7 import org.jahia.services.version.EntryLoadRequest;
8
9 /**
10  * <p>Title: Define the interface for Content Tree Visitor.</p>
11  * <p>Description: Define the interface for Content Tree Visitor.</p>
12  * <p>Copyright: Copyright (c) 2002</p>
13  * <p>Company: </p>
14  * @author Khue Nguyen
15  * @version 1.0
16  */

17
18 public interface ContentTreeVisitorInterface {
19
20     /**
21      * Returns the internal user used to check rights access
22      * @return
23      */

24     public abstract JahiaUser getUser();
25
26     /**
27      * Set the internal user used to check rights access
28      * @param user
29      */

30     public abstract void setUser(JahiaUser user);
31
32     /**
33      * Returns the internal EntryLoadRequest used to retrieve's Content Object Childs.
34      * @return
35      */

36     public abstract EntryLoadRequest getEntryLoadRequest();
37
38     /**
39      * Set the EntryLoadRequest used to retrieve's Content Object Childs.
40      * @param loadRequest
41      */

42     public abstract void setEntryLoadRequest(EntryLoadRequest loadRequest);
43
44     /**
45      * Returns the internal OperationMode used to retrieve Content Object Childs.
46      * @return
47      */

48     public abstract String JavaDoc getOperationMode();
49
50     /**
51      * Set the internal OperationMode used to retrieve's Content Object Childs.
52      * @param operationMode
53      */

54     public abstract void setOperationMode(String JavaDoc operationMode);
55
56     /**
57      * Return the internal ContentTree used to traverse the Content Tree
58      *
59      * @return
60      */

61     public abstract ContentTree getContentTree();
62
63     /**
64      * Returns the descending page level from the root page.
65      * @return
66      */

67     public abstract int getDescendingPageLevel();
68
69     /**
70      * Set the descending page level.
71      */

72     public void setDescendingPageLevel(int level);
73
74     /**
75      * Returns true if the ContentTree should iterate on childs
76      *
77      * @return
78      */

79     public abstract boolean withChildsContent();
80
81     /**
82      * Returns a ContentTreeStatus implementation for a given ContentObject
83      *
84      * @param contentObject
85      * @param currentPageLevel
86      * @return
87      * @throws JahiaException
88      */

89     public abstract ContentTreeStatusInterface getContentTreeStatus(ContentObject contentObject,
90             int currentPageLevel)
91     throws JahiaException;
92
93     /**
94      * Returns an array list of childs for a given ContentObject
95      *
96      * @param contentObject
97      * @param currentPageLevel
98      * @return
99      */

100     public abstract ArrayList JavaDoc getChilds(ContentObject contentObject,
101                                         int currentPageLevel)
102     throws JahiaException;
103
104     /**
105      * Called before processing the current content object's childs
106      *
107      * @param contentObject
108      * @param currentPageLevel
109      * @throws JahiaException
110      */

111     public abstract void processContentObjectBeforeChilds(
112             ContentObject contentObject, int currentPageLevel)
113     throws JahiaException;
114
115     /**
116      * Called after processing the current object's childs when traversing the tree
117      *
118      * @param contentObject
119      * @param currentPageLevel
120      * @throws JahiaException
121      */

122     public abstract void processContentObjectAfterChilds(
123             ContentObject contentObject, int currentPageLevel)
124     throws JahiaException;
125
126     /**
127      * Called after the childs has been processed and the ContentTreeStatus has been
128      * set with continueAfterChilds = false. usually, we should simply do nothing with
129      * the contentObject, as requested by one of this child.
130      *
131      * @param contentObject
132      * @param currentPageLevel
133      * @throws JahiaException
134      */

135     public abstract void stopProcessContentObjectAfterChilds(
136         ContentObject contentObject, int currentPageLevel)
137         throws JahiaException;
138
139
140     /**
141      * Process the Last Content page Field on which, we reached the page level limit when
142      * descending in subtree.
143      *
144      * @param contentObject the last content page field on which we reach the page level limit.
145      * @param currentPageLevel
146      * @throws JahiaException
147      */

148     public abstract void processLastContentPageField(
149             ContentObject contentObject, int currentPageLevel)
150     throws JahiaException;
151
152 }
153
Popular Tags