Package org.apache.struts.config

Examples of org.apache.struts.config.ControllerConfig


    /**
     * Tell whether the given module is a long-lived page flow.
     */
    public static boolean isLongLived( ModuleConfig moduleConfig )
    {
        ControllerConfig cc = moduleConfig.getControllerConfig();

        if ( cc instanceof PageFlowControllerConfig )
        {
            return ( ( PageFlowControllerConfig ) cc ).isLongLivedPageFlow();
        }
View Full Code Here


    /**
     * Tell whether the given module is a nested page flow.
     */
    public static boolean isNestable( ModuleConfig moduleConfig )
    {
        ControllerConfig cc = moduleConfig.getControllerConfig();
        return cc instanceof PageFlowControllerConfig && ( ( PageFlowControllerConfig ) cc ).isNestedPageFlow();
    }
View Full Code Here

        }
    }

    public static boolean isSharedFlowModule( ModuleConfig mc )
    {
        ControllerConfig cc = mc.getControllerConfig();
        return cc instanceof PageFlowControllerConfig && ( ( PageFlowControllerConfig ) cc ).isSharedFlow();
    }
View Full Code Here

    public boolean isPreviousActionInfoDisabled()
    {
        if ( alwaysTrackPreviousAction() ) return false;
       
        ModuleConfig mc = getModuleConfig();
        ControllerConfig cc = mc.getControllerConfig();      
        return cc instanceof PageFlowControllerConfig && ( ( PageFlowControllerConfig ) cc ).isReturnToActionDisabled();
    }
View Full Code Here

    public boolean isPreviousPageInfoDisabled()
    {
        if ( alwaysTrackPreviousPage() ) return false;
       
        ModuleConfig mc = getModuleConfig();
        ControllerConfig cc = mc.getControllerConfig();      
        return cc instanceof PageFlowControllerConfig && ( ( PageFlowControllerConfig ) cc ).isReturnToPageDisabled();
    }
View Full Code Here

     * @return <code>true</code> if the given Struts module has no user-specified default message bundle.
     */
    protected static boolean isMissingUserDefaultMessages(ModuleConfig mc)
    {
        if (mc != null) {
            ControllerConfig cc = mc.getControllerConfig();

            if (cc instanceof PageFlowControllerConfig) {
                return ((PageFlowControllerConfig) cc).isMissingDefaultMessages();
            }
        }
View Full Code Here

    /**
     * The controller configuration object for this module.
     */
    public ControllerConfig getControllerConfig() {
        if (this.controllerConfig == null) {
            this.controllerConfig = new ControllerConfig();
        }
        return (this.controllerConfig);
    }
View Full Code Here

     * @deprecated Will be removed in a release after Struts 1.1.
     */
    private void defaultControllerConfig(ModuleConfig config) {

        String value = null;
        ControllerConfig cc = config.getControllerConfig();
       
        value = getServletConfig().getInitParameter("bufferSize");
        if (value != null) {
            cc.setBufferSize(Integer.parseInt(value));
        }
       
        value = getServletConfig().getInitParameter("content");
        if (value != null) {
            cc.setContentType(value);
        }
       
        value = getServletConfig().getInitParameter("locale");       
        // must check for null here
        if (value != null) {
            if ("true".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value)) {
                cc.setLocale(true);
            } else {
                cc.setLocale(false);
            }
        }
       
        value = getServletConfig().getInitParameter("maxFileSize");
        if (value != null) {
            cc.setMaxFileSize(value);
        }
       
        value = getServletConfig().getInitParameter("nocache");
        if (value != null) {
            if ("true".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value)) {
                cc.setNocache(true);
            } else {
                cc.setNocache(false);
            }
        }
       
        value = getServletConfig().getInitParameter("multipartClass");
        if (value != null) {
            cc.setMultipartClass(value);
        }
       
        value = getServletConfig().getInitParameter("tempDir");
        if (value != null) {
            cc.setTempDir(value);
        }

    }
View Full Code Here

     * @return <code>true</code> if the given Struts module has no user-specified default message bundle.
     */
    protected static boolean isMissingUserDefaultMessages(ModuleConfig mc)
    {
        if (mc != null) {
            ControllerConfig cc = mc.getControllerConfig();

            if (cc instanceof PageFlowControllerConfig) {
                return ((PageFlowControllerConfig) cc).isMissingDefaultMessages();
            }
        }
View Full Code Here

        return mc != null ? getFlowControllerClassName( mc ) : null;
    }
   
    public static String getFlowControllerClassName( ModuleConfig mc )
    {
        ControllerConfig cc = mc.getControllerConfig();
        return cc instanceof PageFlowControllerConfig ? ( ( PageFlowControllerConfig ) cc ).getControllerClass() : null;
    }
View Full Code Here

TOP

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

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.