Package grails.core

Interface GrailsControllerClass

    • Field Detail

      • INDEX_ACTION

        static final java.lang.String INDEX_ACTION
        The name of the index action.
        See Also:
        Constant Field Values
      • BEFORE_INTERCEPTOR

        static final java.lang.String BEFORE_INTERCEPTOR
        The name of the before interceptor property.
        See Also:
        Constant Field Values
      • AFTER_INTERCEPTOR

        static final java.lang.String AFTER_INTERCEPTOR
        The name of the after interceptor property.
        See Also:
        Constant Field Values
      • CONTROLLER

        static final java.lang.String CONTROLLER
        The general name to use when referring to controller artefacts.
        See Also:
        Constant Field Values
      • ACTION

        static final java.lang.String ACTION
        The general name to use when referring to action artefacts.
        See Also:
        Constant Field Values
      • VIEW

        static final java.lang.String VIEW
        The general name to use when referring to action view.
        See Also:
        Constant Field Values
      • NAMESPACE_PROPERTY

        static final java.lang.String NAMESPACE_PROPERTY
        The name of the namespace property
        See Also:
        Constant Field Values
    • Method Detail

      • getActions

        java.util.Set<java.lang.String> getActions()
        Returns:
        The action names
      • getNamespace

        java.lang.String getNamespace()
        Returns:
        the namespace of this controller, null if none was specified
      • getScope

        java.lang.String getScope()
        Returns:
        The scope of the controller, defaults to singleton
      • isSingleton

        boolean isSingleton()
        Returns:
        Whether the scope is singleton
      • getDefaultAction

        java.lang.String getDefaultAction()
        Returns the default action for this Controller.
        Returns:
        The default action
      • initialize

        void initialize()
        Initialize the controller class
      • mapsToURI

        boolean mapsToURI​(java.lang.String uri)
        Tests if a controller maps to a given URI.
        Returns:
        true if controller maps to URI
      • invoke

        java.lang.Object invoke​(java.lang.Object controller,
                                java.lang.String action)
                         throws java.lang.Throwable
        Invokes a controller action on the given controller instance
        Parameters:
        controller - The controller instance
        action - The action
        Returns:
        The result of the action
        Throws:
        java.lang.Throwable - Thrown when an error occurs invoking the action
      • registerUrlConverter

        void registerUrlConverter​(UrlConverter urlConverter)
        Register a new UrlConverter with the controller
        Parameters:
        urlConverter - The UrlConverter to register
      • actionUriToViewName

        java.lang.String actionUriToViewName​(java.lang.String actionUri)