/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.portal.layout.renderer.aspect.impl; import java.util.Iterator; import org.apache.avalon.framework.logger.AbstractLogEnabled; import org.apache.avalon.framework.parameters.ParameterException; import org.apache.avalon.framework.parameters.Parameters; import org.apache.avalon.framework.service.ServiceException; import org.apache.avalon.framework.service.ServiceManager; import org.apache.avalon.framework.service.Serviceable; import org.apache.avalon.framework.thread.ThreadSafe; import org.apache.cocoon.portal.PortalService; import org.apache.cocoon.portal.layout.Layout; import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect; import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; /** * Base class for renderer aspects. * * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a> * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a> * * @version CVS $Id$ */ public abstract class AbstractAspect extends AbstractLogEnabled implements Serviceable, ThreadSafe, RendererAspect { protected ServiceManager manager; /* (non-Javadoc) * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager) */ public void service(ServiceManager manager) throws ServiceException { this.manager = manager; } /* (non-Javadoc) * @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) */ public void toSAX( RendererAspectContext context, Layout layout, PortalService service, ContentHandler handler) throws SAXException { // empty implementation } /** * Return the aspects required for this renderer * @return An iterator for the aspect descriptions or null. */ public Iterator getAspectDescriptions(Object preparedConf) { return null; } /* (non-Javadoc) * @see org.apache.cocoon.portal.layout.renderer.aspect.RendererAspect#prepareConfiguration(org.apache.avalon.framework.parameters.Parameters) */ public Object prepareConfiguration(Parameters configuration) throws ParameterException { return configuration; } public boolean isRequired() { return false; } }