KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas_ejb > deployment > rules > SessionRuleSet


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  *
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or 1any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20  * USA
21  *
22  * Initial developer: JOnAS team
23  * --------------------------------------------------------------------------
24  * $Id: SessionRuleSet.java,v 1.6 2004/12/08 14:05:09 benoitf Exp $
25  * --------------------------------------------------------------------------
26  */

27 package org.objectweb.jonas_ejb.deployment.rules;
28
29 import org.apache.commons.digester.Digester;
30
31 import org.objectweb.jonas_lib.deployment.rules.EnvironmentRuleSet;
32 import org.objectweb.jonas_lib.deployment.rules.JRuleSetBase;
33 import org.objectweb.jonas_lib.deployment.rules.SecurityRoleRefRuleSet;
34
35 /**
36  * This class defines the rules to analyze the element session
37  *
38  * @author JOnAS team
39  */

40
41 public class SessionRuleSet extends JRuleSetBase {
42
43     /**
44      * Construct an object with a specific prefix
45      * @param prefix prefix to use during the parsing
46      */

47     public SessionRuleSet(String JavaDoc prefix) {
48         super(prefix);
49    }
50      /**
51      * Add a set of rules to the digester object
52      * @param digester Digester instance
53      */

54
55     public void addRuleInstances(Digester digester) {
56         digester.addObjectCreate(prefix + "session",
57                                  "org.objectweb.jonas_ejb.deployment.xml.Session");
58         digester.addSetNext(prefix + "session",
59                             "addSession",
60                             "org.objectweb.jonas_ejb.deployment.xml.Session");
61         digester.addCallMethod(prefix + "session/description",
62                                "setDescription", 0);
63         digester.addCallMethod(prefix + "session/display-name",
64                                "setDisplayName", 0);
65         digester.addCallMethod(prefix + "session/small-icon",
66                                "setSmallIcon", 0);
67         digester.addCallMethod(prefix + "session/large-icon",
68                                "setLargeIcon", 0);
69         digester.addCallMethod(prefix + "session/ejb-name",
70                                "setEjbName", 0);
71         digester.addCallMethod(prefix + "session/home",
72                                "setHome", 0);
73         digester.addCallMethod(prefix + "session/remote",
74                                "setRemote", 0);
75         digester.addCallMethod(prefix + "session/local-home",
76                                "setLocalHome", 0);
77         digester.addCallMethod(prefix + "session/local",
78                                "setLocal", 0);
79         digester.addCallMethod(prefix + "session/service-endpoint",
80                 "setServiceEndpoint", 0);
81         digester.addCallMethod(prefix + "session/ejb-class",
82                                "setEjbClass", 0);
83         digester.addCallMethod(prefix + "session/session-type",
84                                "setSessionType", 0);
85         digester.addCallMethod(prefix + "session/transaction-type",
86                                "setTransactionType", 0);
87         digester.addRuleSet(new EnvironmentRuleSet(prefix + "session/"));
88         digester.addRuleSet(new SecurityRoleRefRuleSet(prefix + "session/"));
89         digester.addRuleSet(new SecurityIdentityRuleSet(prefix + "session/"));
90         digester.addRuleSet(new IorSecurityConfigRuleSet(prefix + "session/"));
91    }
92 }
93
Popular Tags