1
// Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.MonoRail
.Framework
23 public interface IExecutableAction
26 /// Gets a value indicating whether no filter should run before execute the action.
29 /// <c>true</c> if they should be skipped; otherwise, <c>false</c>.
31 bool ShouldSkipAllFilters { get; }
36 /// <param name="filterType">Type of the filter.</param>
37 /// <returns></returns>
38 bool ShouldSkipFilter(Type filterType
);
41 /// Gets the layout override.
43 /// <value>The layout override.</value>
44 string[] LayoutOverride { get; }
47 /// Gets the http method that the action requires before being executed.
49 /// <value>The accessible through verb.</value>
50 Verb AccessibleThroughVerb { get; }
53 /// Indicates that no rescues whatsoever should be applied to this action.
55 /// <returns></returns>
56 bool ShouldSkipRescues { get; }
59 /// Gets a rescue descriptor for the exception type.
61 /// <param name="exceptionType">Type of the exception.</param>
62 /// <returns></returns>
63 RescueDescriptor
GetRescueFor(Type exceptionType
);
66 /// Gets the i18n related resource descriptors.
68 /// <value>The resources.</value>
69 ResourceDescriptor
[] Resources { get; }
72 /// Gets the cache policy configurer.
74 /// <value>The cache policy configurer.</value>
75 ICachePolicyConfigurer CachePolicyConfigurer { get; }
78 /// Gets the return binder descriptor.
80 /// <value>The return binder descriptor.</value>
81 ReturnBinderDescriptor ReturnBinderDescriptor { get; }
84 /// Executes the action this instance represents.
86 /// <param name="engineContext">The engine context.</param>
87 /// <param name="controller">The controller.</param>
88 /// <param name="context">The context.</param>
89 object Execute(IEngineContext engineContext
, IController controller
, IControllerContext context
);