    001package 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
    024import org.apache.turbine.modules.Action;
    025import org.apache.turbine.modules.ActionLoader;
    026import org.apache.turbine.modules.Loader;
    027
    028/**
    029 * An action factory that attempts to load a java class from
    030 * the module packages defined in the TurbineResource.properties.
    031 *
    032 * @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
    033 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
    034 * @version $Id: JavaActionFactory.java 1199089 2011-11-08 03:14:28Z tv $
    035 */
    036public class JavaActionFactory
    037    extends JavaBaseFactory<Action>
    038{
    039    /**
    040     * Get an Assembler.
    041     *
    042     * @param name name of the requested Assembler
    043     * @return an Assembler
    044     */
    045    public Action getAssembler(String name)
    046    {
    047        return getAssembler(Action.PREFIX, name);
    048    }
    049
    050    /**
    051     * Get the loader for this type of assembler
    052     *
    053     * @return a Loader
    054     */
    055    public Loader<Action> getLoader()
    056    {
    057        return ActionLoader.getInstance();
    058    }
    059
    060    /**
    061     * Get the class of this assembler
    062     *
    063     * @return a class
    064     */
    065    public Class<Action> getManagedClass()
    066    {
    067        return Action.class;
    068    }
    069}