    001    package org.apache.turbine.services.assemblerbroker.util.java;
    002
    003
    004    /*
    005     * Licensed to the Apache Software Foundation (ASF) under one
    006     * or more contributor license agreements.  See the NOTICE file
    007     * distributed with this work for additional information
    008     * regarding copyright ownership.  The ASF licenses this file
    009     * to you under the Apache License, Version 2.0 (the
    010     * "License"); you may not use this file except in compliance
    011     * with the License.  You may obtain a copy of the License at
    012     *
    013     *   http://www.apache.org/licenses/LICENSE-2.0
    014     *
    015     * Unless required by applicable law or agreed to in writing,
    016     * software distributed under the License is distributed on an
    017     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    018     * KIND, either express or implied.  See the License for the
    019     * specific language governing permissions and limitations
    020     * under the License.
    021     */
    022
    023
    024    import org.apache.turbine.modules.Action;
    025    import org.apache.turbine.modules.ActionLoader;
    026    import org.apache.turbine.modules.Assembler;
    027    import org.apache.turbine.modules.Loader;
    028
    029    /**
    030     * An action factory that attempts to load a java class from
    031     * the module packages defined in the TurbineResource.properties.
    032     *
    033     * @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
    034     * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
    035     * @version $Id: JavaActionFactory.java 743072 2009-02-10 19:40:09Z tv $
    036     */
    037    public class JavaActionFactory
    038        extends JavaBaseFactory
    039    {
    040        /**
    041         * Get an Assembler.
    042         *
    043         * @param name name of the requested Assembler
    044         * @return an Assembler
    045         */
    046        public Assembler getAssembler(String name)
    047        {
    048            return getAssembler(Action.PREFIX, name);
    049        }
    050
    051        /**
    052         * Get the loader for this type of assembler
    053         *
    054         * @return a Loader
    055         */
    056        public Loader getLoader()
    057        {
    058            return ActionLoader.getInstance();
    059        }
    060    }