= MenuBarsService
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Responsible for returning a xref:refguide:applib:index/services/menu/MenuBarsService.adoc[MenuBarsService] instance, a data structure representing the arrangement of domain service actions across multiple menu bars, menus and sections.

This is used by the Wicket viewer to build up the menu. It is also served as the "menuBars" resource by the Restful Objects viewer.

== API

[source,java]
.MenuBarsService.java
----
interface MenuBarsService {
  MenuBars menuBars()     // <.>
  MenuBars menuBars(Type type)     // <.>
  MenuBarsMarshallerService<? extends MenuBars> marshaller()
  MenuBarsService forTesting()
}
----

<.> xref:#menuBars_[menuBars()]
+
--
Returns _#menuBars()_ with a type of _Type#DEFAULT_ .
--
<.> xref:#menuBars_Type[menuBars(Type)]
+
--
Returns the menu bars with the requested _Type_ .
--

== Members

[#menuBars_]
=== menuBars()

Returns _#menuBars()_ with a type of _Type#DEFAULT_ .

[#menuBars_Type]
=== menuBars(Type)

Returns the menu bars with the requested _Type_ .

include::hooks/MenuBarsService_010-implementation.adoc[]

include::hooks/MenuBarsService_020-examples-and-usage.adoc[]
