KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > services > version > JahiaVersionService


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 package org.jahia.services.version;
14
15 import java.util.Vector JavaDoc;
16
17 import org.jahia.exceptions.JahiaException;
18 import org.jahia.params.ParamBean;
19 import org.jahia.services.JahiaService;
20 import org.jahia.services.usermanager.JahiaUser;
21
22
23 /**
24  * Defines some methods related to versinoning and content staging
25  *
26  * @author <a HREF="mailto:djilli@jahia.com">David Jilli</a>
27  */

28 public abstract class JahiaVersionService extends JahiaService
29 {
30
31     /**
32      * Is staging enabled for this site?
33      * @param siteID, the site identifier
34      */

35     public abstract boolean isStagingEnabled (int siteID);
36
37     /**
38      * Is versioning enabled for this site?
39      * @param siteID, the site identifier
40      */

41     public abstract boolean isVersioningEnabled (int siteID);
42
43     /**
44      * @return the current versionID, which is the number of secondes since 1970
45      */

46     public abstract int getCurrentVersionID();
47
48     /**
49      * @return the SaveVersion for a specified site
50      */

51     public abstract JahiaSaveVersion getSiteSaveVersion(int siteID);
52
53     /**
54      * This method should be called if we have a vector of "Versionable"s that
55      * represent every version that the DB contains, and a ParamBean that
56      * contains the version we would like to load
57      * SHARED language has the highest priority!
58      * @param entryStateables a Vector of object implementing the EntryStateable interface
59      * @param jParams the ParamBean that contains the version we want to load
60      * @param ignoreLanguage, if true, resolve entry state without checking specific language
61      * @return an element, or null if field doesn't exist in this version!
62      */

63     public abstract EntryStateable resolveEntry( Vector JavaDoc entryStateables, EntryLoadRequest loadRequest , boolean ignoreLanguage);
64
65     /**
66      * This method should be called if we have a vector of "EntryState-able"s that
67      * represent every entry that the DB contains, and a ParamBean that
68      * contains the entry request we would like to load
69      * @param entryStateables a Vector of object implementing the EntryStateable interface
70      * @param loadRequest the EntryLoadRequest that contains information about
71      * the entry we want to load, specifically the version, the workflow state
72      * and the list of locales
73      * @return an element of the vector (or null if none found)
74      */

75     public abstract EntryStateable resolveEntry( Vector JavaDoc entryStateables, EntryLoadRequest loadRequest );
76
77    /**
78     * Validate all the staged content from a page to which the user has WRITE+ADMIN access to
79     */

80     public abstract void activateStagedPage ( int pageID, JahiaUser user, ParamBean jParams, StateModificationContext stateModifContext )
81     throws JahiaException;
82
83 }
84
Popular Tags