KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > core > security > Model


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.core.security;
10
11 import java.util.Iterator JavaDoc;
12 import java.util.Map JavaDoc;
13
14 /**
15  * A query interface on a hierarchical set of items. This interface is provided
16  * by the portlet.
17  *
18  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
19  * @version $Revision: 1.3 $
20  */

21 public interface Model
22 {
23    /**
24     * Return the specified item or null if it does not exist.
25     *
26     * @param path the item path
27     * @return the item
28     */

29    Item getItem(String JavaDoc[] path);
30    
31    /**
32     * Return the children items for the given path or null if the item does not exist.
33     *
34     * @param path the item path
35     * @return an iterator over the items
36     */

37    Iterator JavaDoc getChildren(String JavaDoc[] path);
38
39    /**
40     * Returns a map of permission descriptions.
41     *
42     * @return the permission descriptions map
43     */

44    Map JavaDoc getPermissionDescriptions();
45    
46    /**
47     * Return true if the source permission implies the target permission.
48     *
49     * @param sourcePermission
50     * @param targetPermission
51     * @return true is source implies target
52     * @throws IllegalArgumentException if sourcePermission or targetPermission is null
53     */

54    boolean implies(String JavaDoc sourcePermission, String JavaDoc targetPermission) throws IllegalArgumentException JavaDoc;
55    
56    /**
57     * Return the default scheme.
58     *
59     * @return the default scheme
60     */

61    Scheme getDefaultScheme();
62 }
63
Popular Tags