Package org.apache.struts.config

Examples of org.apache.struts.config.ActionConfig


                    // Try the form class and all superclasses to get an overloaded action path.
                    //
                    for ( Class i = unwrappedForm.getClass(); i != null; i = i.getSuperclass() )
                    {
                        String formQualifiedActionPath = getFormQualifiedActionPath( i, mappingPath );
                        ActionConfig cf = pfActionMapping.getModuleConfig().findActionConfig( formQualifiedActionPath );
                           
                        if ( cf != null )
                        {
                            assert cf instanceof PageFlowActionMapping : cf.getClass().getName();
                               
                            if ( _log.isDebugEnabled() )
                            {
                                _log.debug( "Found form-specific mapping " + cf.getPath() +
                                           " -- choosing this one over current mapping " + mappingPath );
                            }
                               
                            pfActionMapping = ( PageFlowActionMapping ) cf;
                            mapping = pfActionMapping;
View Full Code Here


        ActionConfig[] actionConfigs = getModuleConfig().findActionConfigs();
        ArrayList actionNames = new ArrayList();
       
        for ( int i = 0; i < actionConfigs.length; i++ )
        {
            ActionConfig ac = actionConfigs[i];
            actionNames.add( ac.getPath().substring( 1 ) ); // every action path has a '/' in front of it
        }
       
        return ( String[] ) actionNames.toArray( new String[0] );
    }
View Full Code Here

    {
        ActionConfig[] actionConfigs = moduleConfig.findActionConfigs();

        for ( int i = 0; i < actionConfigs.length; i++ )
        {
            ActionConfig actionConfig = actionConfigs[i];

            if ( actionConfig instanceof PageFlowActionMapping )
            {
                PageFlowActionMapping mapping = ( PageFlowActionMapping ) actionConfig;
                String unqualifiedActionPath = ( ( PageFlowActionMapping ) actionConfig ).getUnqualifiedActionPath();
View Full Code Here

        }

        //
        // Look for a mapping for "unknown" paths
        //
        ActionConfig configs[] = moduleConfig.findActionConfigs();
        for ( int i = 0; i < configs.length; i++ )
        {
            if ( configs[i].getUnknown() )
            {
                mapping = ( ActionMapping ) configs[i];
View Full Code Here

            request.setAttribute(Globals.MAPPING_KEY, mapping);
            return (mapping);
        }

        // Locate the mapping for unknown paths (if any)
        ActionConfig configs[] = moduleConfig.findActionConfigs();
        for (int i = 0; i < configs.length; i++) {
            if (configs[i].getUnknown()) {
                mapping = (ActionMapping) configs[i];
                request.setAttribute(Globals.MAPPING_KEY, mapping);
                return (mapping);
View Full Code Here

            if (mConfig != null) {
                actionMappingMap = new HashMap();
                ActionConfig[] acfg = mConfig.findActionConfigs();
                for (int i = 0; i < acfg.length; i++) {
                    ActionConfig actionConfig = acfg[i];
                    if (actionConfig instanceof StrutsPermissionMapping) {

                        StrutsPermissionMapping amp = (StrutsPermissionMapping) actionConfig;
                        actionMappingMap.put(amp.getPath(), amp);
                        if (log.isDebugEnabled()) {
View Full Code Here

        ModuleConfig moduleConfig = factory.createModuleConfig(PACKAGE_NAME);
        assertNotNull(moduleConfig);
       
        assertEquals("/"+PACKAGE_NAME, moduleConfig.getPrefix());
       
        ActionConfig actionConfig = moduleConfig.findActionConfig("/action1");
        assertNotNull(actionConfig);
        assertEquals("/action1", actionConfig.getPath());
       
        ActionConfig[] actionConfigs = moduleConfig.findActionConfigs();
        assertNotNull(actionConfigs);
        assertEquals(2, actionConfigs.length);
       
View Full Code Here

     *
     * @param path Path of the action configuration to return
     */
    public ActionConfig findActionConfig(String path) {

        ActionConfig config = (ActionConfig) actionConfigs.get(path);
       
        // If a direct match cannot be found, try to match action configs
        // containing wildcard patterns
        if (config == null) {
            config = matcher.match(path);
View Full Code Here

     * Return the action configurations for this module.  If there are
     * none, a zero-length array is returned.
     */
    public ActionConfig[] findActionConfigs() {

        ActionConfig results[] = new ActionConfig[actionConfigList.size()];
        return ((ActionConfig[]) actionConfigList.toArray(results));

    }
View Full Code Here

            request.setAttribute(Globals.MAPPING_KEY, mapping);
            return (mapping);
        }

        // Locate the mapping for unknown paths (if any)
        ActionConfig configs[] = moduleConfig.findActionConfigs();
        for (int i = 0; i < configs.length; i++) {
            if (configs[i].getUnknown()) {
                mapping = (ActionMapping) configs[i];
                request.setAttribute(Globals.MAPPING_KEY, mapping);
                return (mapping);
View Full Code Here

TOP

Related Classes of org.apache.struts.config.ActionConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.