KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > homepages > JahiaHomepagesService


1 //
2
// ____.
3
// __/\ ______| |__/\. _______
4
// __ .____| | \ | +----+ \
5
// _______| /--| | | - \ _ | : - \_________
6
// \\______: :---| : : | : | \________>
7
// |__\---\_____________:______: :____|____:_____\
8
// /_____|
9
//
10
// . . . i n j a h i a w e t r u s t . . .
11
//
12
//
13
// JahiaHomepagesService
14
//
15
// NK 17.12.2001
16
//
17
package org.jahia.services.homepages;
18
19 import java.util.Enumeration JavaDoc;
20 import java.util.Hashtable JavaDoc;
21 import java.util.Vector JavaDoc;
22
23 import org.jahia.data.JahiaDOMObject;
24 import org.jahia.exceptions.JahiaException;
25 import org.jahia.services.JahiaService;
26 import org.jahia.services.sites.JahiaSite;
27
28 /**
29  * Homepage services
30  *
31  * @author Khue ng
32  */

33 public abstract class JahiaHomepagesService extends JahiaService
34 {
35
36     //--------------------------------------------------------------------------
37
/**
38      * return the list of all home page
39      *
40      * @return Enumeration an enumeration of JahiaHomepage bean
41      */

42     public abstract Enumeration JavaDoc getHomepages() throws JahiaException;
43         
44
45     //--------------------------------------------------------------------------
46
/**
47      * return the list of all home pages of a site.
48      *
49      * @return Enumeration an enumeration of JahiaHomepage bean
50      */

51     public abstract Enumeration JavaDoc getHomepages(JahiaSite site)
52     throws JahiaException;
53     
54
55     //--------------------------------------------------------------------------
56
/**
57      * return a Homepage bean looking at it id
58      *
59      * @param int the JahiaHomepage id
60      * @return JahiaHomepage the JahiaHomepage bean
61      */

62     public abstract JahiaHomepage getHomepage( int id )
63     throws JahiaException;
64
65
66     //--------------------------------------------------------------------------
67
/**
68      * Create a new Homepage that is not saved in storage yet.
69      *
70      * @param String the home page name
71      * @param String the home page descr
72      * @param String the site key
73      * @param int type the home page type
74      * @param hashtable the props
75      * @param int aclID
76      *
77      * @return Jahiahomepage the created homepage bean
78      */

79     public abstract JahiaHomepage createHomepage( String JavaDoc name,
80                                                     String JavaDoc descr,
81                                                     String JavaDoc siteKey,
82                                                     int type,
83                                                     Hashtable JavaDoc props,
84                                                     int aclID
85                                                     ) throws JahiaException ;
86     
87
88     //--------------------------------------------------------------------------
89
/**
90      * delete a Homepage from storage and cache
91      *
92      * @param int the home page id
93      */

94     public abstract void deleteHomepage( int id )
95     throws JahiaException ;
96         
97
98     //--------------------------------------------------------------------------
99
/**
100      * Save a Homepage. Create it if its id is <=0 and create an ACL if it is <=0.
101      * The parent ACL is can be the site's acl.
102      *
103      * @param JahiaHomepage the homepage bean object
104      * @param int the parent ACL ID
105      */

106     public abstract void saveHomepage( JahiaHomepage hp, int parentAclID )
107     throws JahiaException ;
108
109
110     //--------------------------------------------------------------------------
111
/**
112      * returns a DOM representation of all home pages of a site
113      *
114      * @param String siteKey
115      */

116     public abstract JahiaDOMObject getHomepageDefsAsDOM( String JavaDoc siteKey )
117     throws JahiaException ;
118         
119     //--------------------------------------------------------------------------
120
/**
121      * returns a DOM representation of all home pages props of a site
122      *
123      * @param String siteKey
124      */

125     public abstract JahiaDOMObject getHomepageDefPropsAsDOM( String JavaDoc siteKey )
126     throws JahiaException ;
127
128     //--------------------------------------------------------------------------
129
/**
130      * Returns a vector of all home page's Acl ID of this site
131      * Need this for site extraction
132      *
133      * @param String siteKey
134      */

135     public abstract Vector JavaDoc getAclIDs( String JavaDoc siteKey )
136     throws JahiaException;
137
138
139
140 }
141
142
Popular Tags