KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jahia > data > containers > ContainerFilterInterface


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
//
14
//
15
//
16

17 package org.jahia.data.containers;
18
19
20 import java.util.BitSet JavaDoc;
21
22 import org.jahia.exceptions.JahiaException;
23
24 public interface ContainerFilterInterface {
25
26
27     //--------------------------------------------------------------------------
28
/**
29      * Perform filtering.
30      * The expected result is a bit set of matching container ids.
31      *
32      * @param int ctnListID, the container list id
33      * @return BitSet bits, the expected result as a bit set of matching ctn ids,each bit position set to true correspond to matching ctn ids.
34      */

35     public abstract BitSet JavaDoc doFilter(int ctnListID)
36     throws JahiaException;
37
38     //--------------------------------------------------------------------------
39
/**
40      * Return the select statement, build with the clauses for all container list of the site.
41      *
42      * @param int ctnListID, the container list id
43      * @return String , the sql statement. Null on error
44      */

45     public abstract String JavaDoc getSelect(int ctnListID);
46
47     //--------------------------------------------------------------------------
48
/**
49      * Set reference to a containerFilters
50      *
51      * @return
52      * @throws JahiaException
53      */

54     public abstract void setContainerFilters(ContainerFilters containerFilters);
55
56     //--------------------------------------------------------------------------
57
/**
58      * Perform filtering on a given site or all sites
59      *
60      * The expected result is a bit set of matching container ids.
61      *
62      * If siteId = -1 , returns results from all sites
63      *
64      * If the containerDefinitionName is null, return result from all containers
65      * no regards to it definition !
66      *
67      * @param siteId
68      * @param containerDefinitionName
69      * @param listId , optionally, a listID can be passed to returns all containers of this containerlist.
70      * @return BitSet bits, the expected result as a bit set of matching ctn ids,each bit position set to true correspond to matching ctn ids.
71      * @throws JahiaException
72      */

73     public abstract BitSet JavaDoc doFilterBySite(int siteId, String JavaDoc containerDefinitionName, int listId)
74     throws JahiaException;
75
76     //--------------------------------------------------------------------------
77
/**
78      * Return the select statement, build with the clauses for a given site.
79      * If siteId = -1 -> build query for all sites
80      *
81      * If the containerDefinitionName is null, return result from all containers
82      * no regards to it definition !
83      *
84      * @param siteId
85      * @param containerDefinitionName
86      * @return
87      */

88     public abstract String JavaDoc getSelectBySiteID(int siteId,
89             String JavaDoc containerDefinitionName);
90
91
92 }
93
Popular Tags