KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > portal > layout > renderer > aspect > impl > AbstractAspect


1 /*
2  * Copyright 1999-2002,2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.portal.layout.renderer.aspect.impl;
17
18 import java.util.Iterator JavaDoc;
19
20 import org.apache.avalon.framework.logger.AbstractLogEnabled;
21 import org.apache.avalon.framework.parameters.ParameterException;
22 import org.apache.avalon.framework.parameters.Parameters;
23 import org.apache.avalon.framework.service.ServiceException;
24 import org.apache.avalon.framework.service.ServiceManager;
25 import org.apache.avalon.framework.service.Serviceable;
26 import org.apache.avalon.framework.thread.ThreadSafe;
27 import org.apache.cocoon.portal.PortalService;
28 import org.apache.cocoon.portal.layout.Layout;
29 import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect;
30 import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext;
31 import org.xml.sax.ContentHandler JavaDoc;
32 import org.xml.sax.SAXException JavaDoc;
33
34 /**
35  * Base class for renderer aspects.
36  *
37  * @author <a HREF="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
38  * @author <a HREF="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
39  *
40  * @version CVS $Id: AbstractAspect.java 330865 2005-11-04 18:54:05Z rgoers $
41  */

42 public abstract class AbstractAspect
43     extends AbstractLogEnabled
44     implements Serviceable, ThreadSafe, RendererAspect {
45
46     protected ServiceManager manager;
47
48     /* (non-Javadoc)
49      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
50      */

51     public void service(ServiceManager manager) throws ServiceException {
52         this.manager = manager;
53     }
54
55     /* (non-Javadoc)
56      * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#toSAX(org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext, org.apache.cocoon.portal.layout.Layout, org.apache.cocoon.portal.PortalService, org.xml.sax.ContentHandler)
57      */

58     public void toSAX(
59         RendererAspectContext context,
60         Layout layout,
61         PortalService service,
62         ContentHandler JavaDoc handler)
63         throws SAXException JavaDoc {
64         // empty implementation
65
}
66
67     /**
68      * Return the aspects required for this renderer
69      * @return An iterator for the aspect descriptions or null.
70      */

71     public Iterator JavaDoc getAspectDescriptions(Object JavaDoc preparedConf) {
72         return null;
73     }
74
75     /* (non-Javadoc)
76      * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#prepareConfiguration(org.apache.avalon.framework.parameters.Parameters)
77      */

78     public Object JavaDoc prepareConfiguration(Parameters configuration)
79     throws ParameterException {
80         return configuration;
81     }
82
83     public boolean isRequired() {
84         return false;
85     }
86
87 }
88
Popular Tags