= NatureOfService _(enum)_
: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.

The different sorts of domain services recognized by Causeway, as specified in _DomainService#nature()_

== API

[source,java]
.NatureOfService.java
----
enum NatureOfService {
  VIEW     // <.>
  REST     // <.>
  boolean isView()     // <.>
  boolean isRestOnly()     // <.>
}
----

<.> xref:#VIEW[VIEW]
+
--
The service's actions appear in the REST API and in 'viewers', eg. in the menu bar.
--
<.> xref:#REST[REST]
+
--
The service's actions should only be visible in the REST API exposed by the Restful Objects viewer.
--
<.> xref:#isView_[isView()]
+
--
Whether a service contributes its actions to viewers and to the REST API.
--
<.> xref:#isRestOnly_[isRestOnly()]
+
--
Whether a service contributes its actions exclusively to the REST API.
--

== Members

[#VIEW]
=== VIEW

The service's actions appear in the REST API and in 'viewers', eg. in the menu bar.

[#REST]
=== REST

The service's actions should only be visible in the REST API exposed by the Restful Objects viewer.

[#isView_]
=== isView()

Whether a service contributes its actions to viewers and to the REST API.

[#isRestOnly_]
=== isRestOnly()

Whether a service contributes its actions exclusively to the REST API.
