01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.jetspeed.util.descriptor;
18:
19: import org.apache.commons.digester.Rule;
20: import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
21: import org.xml.sax.Attributes;
22:
23: /**
24: * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
25: */
26: public class PortletApplicationRule extends Rule {
27: protected String appName;
28:
29: public PortletApplicationRule(String appName) {
30: this .appName = appName;
31: }
32:
33: /**
34: * <p>
35: * begin
36: * </p>
37: *
38: * @see org.apache.commons.digester.Rule#begin(java.lang.String, java.lang.String, org.xml.sax.Attributes)
39: * @param arg0
40: * @param arg1
41: * @param arg2
42: * @throws java.lang.Exception
43: */
44: public void begin(String arg0, String arg1, Attributes arg2)
45: throws Exception {
46: PortletApplicationDefinitionImpl app = new PortletApplicationDefinitionImpl();
47: app.setName(appName);
48: digester.push(app);
49: }
50:
51: /**
52: * <p>
53: * end
54: * </p>
55: *
56: * @see org.apache.commons.digester.Rule#end(java.lang.String, java.lang.String)
57: * @param arg0
58: * @param arg1
59: * @throws java.lang.Exception
60: */
61: public void end(String arg0, String arg1) throws Exception {
62: // digester.pop();
63: }
64: }
|