KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > policyframework > Policy


1 package com.sslexplorer.policyframework;
2
3 import java.io.Serializable JavaDoc;
4
5
6 public interface Policy extends Resource, Serializable JavaDoc {
7
8     // Policy types
9

10     public final static int TYPE_NORMAL = 1;
11     public final static int TYPE_INVISIBLE = 2;
12     
13     // Principal types (currently informational only - used in policy / principal relationship)
14

15     public final static int PRINCIPAL_USER = 0;
16     public final static int PRINCIPAL_GROUP = 1;
17
18     /**
19      * Get the type of policy object. Can be one of
20      * {@link Policy#TYPE_INVISIBLE} or {@link Policy#TYPE_NORMAL}.
21      */

22     public int getType();
23
24     /**
25      * Set the type of policy object. Can be one of
26      * {@link Policy#TYPE_INVISIBLE} or {@link Policy#TYPE_NORMAL}.
27      *
28      * @param type type
29      */

30     public void setType(int type);
31
32     /**
33      * Set the human readable name of this policy
34      *
35      * @param name name
36      */

37     public void setResourceName(String JavaDoc name);
38
39     /**
40      * Set the description for this policy
41      *
42      * @param description description
43      */

44     public void setResourceDescription(String JavaDoc description);
45     
46     /**
47      * Compare this policy to another. Polcies are equal if their
48      * polciy IDs are the same.
49      *
50      * @param o policy to compare against
51      */

52     public boolean equals(Object JavaDoc o);
53     
54     /**
55      * The roles attached to the policy
56      * @return int
57      */

58     public int getAttachedGroups();
59
60     /**
61      * The users attached to the policy
62      * @return int
63      */

64     public int getAttachedUsers();
65
66 }
67
Popular Tags