blob: ed8b5af6aded1f5235cf4ac89bfda0e026d897bd [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Roles, Mixins and Contributees :: Apache Isis</title>
<link rel="canonical" href="https://isis.apache.org/refguide/2.0.0-M3/applib-classes/roles-mixins-contributees.html">
<meta name="generator" content="Antora 2.2.0">
<link rel="stylesheet" href="../../../_/css/site.css">
<link rel="stylesheet" href="../../../_/css/site-custom.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800|Montserrat:300,400,700" rel="stylesheet">
<link rel="home" href="https://isis.apache.org" title="Apache Isis">
<link rel="next" href="utility.html" title="Utility Classes">
<link rel="prev" href="i18n.html" title="i18n support">
</head>
<body class="article">
<header class="header">
<nav class="navbar">
<div class="navbar-brand">
<a class="navbar-item" href="https://isis.apache.org">
<span class="icon">
<img src="../../../_/img/isis-logo-48x48.png"></img>
</span>
<span>Apache Isis</span>
</a>
<button class="navbar-burger" data-target="topbar-nav">
<span></span>
<span></span>
<span></span>
</button>
</div>
<div id="topbar-nav" class="navbar-menu">
<a class="navbar-end">
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Quick Start</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">Starter Apps</span>
<a class="navbar-item" href="../../../docs/latest/starters/helloworld.html">Hello World</a>
<a class="navbar-item" href="../../../docs/latest/starters/simpleapp.html">Simple App</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Demos &amp; Tutorials</span>
<a class="navbar-item" href="../../../docs/latest/demo/about.html">Demo App</a>
<a class="navbar-item" href="https://danhaywood.gitlab.io/isis-petclinic-tutorial-docs/petclinic/1.16.2/intro.html">Petclinic (tutorial)</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Resources</span>
<a class="navbar-item" href="../../../docs/latest/resources/cheatsheet.html">Cheatsheet</a>
<a class="navbar-item" href="../../../docs/latest/resources/icons.html">Icons</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Guides</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">Development</span>
<a class="navbar-item" href="../../../setupguide/latest/about.html">Setup Guide</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Core</span>
<a class="navbar-item" href="../../../userguide/latest/about.html">User Guide</a>
<a class="navbar-item" href="../../../refguide/latest/about.html">Reference Guide</a>
<a class="navbar-item" href="../../../testing/latest/about.html">Testing Guide</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Libraries</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">For Use in Apps</span>
<a class="navbar-item" href="../../../subdomains/latest/about.html">Subdomain Libraries</a>
<a class="navbar-item" href="../../../valuetypes/latest/about.html">Value Types</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Integrate between Apps</span>
<a class="navbar-item" href="../../../mappings/latest/about.html">Bounded Context Mapping Libraries</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Other</span>
<a class="navbar-item" href="../../../incubator/latest/about.html">Incubator</a>
<a class="navbar-item" href="../../../legacy/latest/about.html">Legacy</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Components</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">Viewers</span>
<a class="navbar-item" href="../../../vw/latest/about.html">Wicket UI</a>
<a class="navbar-item" href="../../../vro/latest/about.html">Restful Objects (REST)</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Security</span>
<a class="navbar-item" href="../../../security/latest/about.html">Security Guide</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Persistence</span>
<a class="navbar-item" href="../../../pjdo/latest/about.html">DataNucleus (JDO)</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Extensions</span>
<a class="navbar-item" href="../../../extensions/latest/about.html">Extensions Catalog</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">Support</a>
<div class="navbar-dropdown">
<span class="navbar-item navbar-heading">Contact</span>
<a class="navbar-item" href="../../../docs/latest/support/slack-channel.html">Slack</a>
<a class="navbar-item" href="../../../docs/latest/support/mailing-list.html">Mailing Lists</a>
<a class="navbar-item" href="https://issues.apache.org/jira/browse/ISIS">JIRA</a>
<a class="navbar-item" href="https://stackoverflow.com/questions/tagged/isis">Stack Overflow</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Releases</span>
<a class="navbar-item" href="../../../docs/latest/downloads/how-to.html">Downloads</a>
<a class="navbar-item" href="../../../relnotes/latest/about.html">Release Notes</a>
<a class="navbar-item" href="../../../docs/latest/archive/1-x.html">Archive (1.x)</a>
<hr class="navbar-divider"/>
<span class="navbar-item navbar-heading">Framework</span>
<a class="navbar-item" href="../../../conguide/latest/about.html">Contributors' Guide</a>
<a class="navbar-item" href="../../../comguide/latest/about.html">Committers' Guide</a>
<a class="navbar-item" href="../../../core/latest/about.html">Core Design</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="#">ASF</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="http://www.apache.org/">Apache Homepage</a>
<a class="navbar-item" href="https://www.apache.org/events/current-event">Events</a>
<a class="navbar-item" href="https://www.apache.org/licenses/">Licenses</a>
<a class="navbar-item" href="https://www.apache.org/security/">Security</a>
<a class="navbar-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a>
<a class="navbar-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a>
<hr class="navbar-divider"/>
<a class="navbar-item" href="https://whimsy.apache.org/board/minutes/Isis.html">PMC board minutes</a>
</div>
</div>
<a class="navbar-item" href="../../../docs/latest/about.html">
<span class="icon">
<img src="../../../_/img/home.png"></img>
</span>
</a>
</div>
</div>
</nav>
</header>
<div class="body ">
<div class="nav-container" data-component="refguide" data-version="2.0.0-M3">
<aside class="nav">
<div class="panels">
<div class="nav-panel-pagination">
<a class="page-previous" rel="prev" href="i18n.html" title="i18n support"><span></span></a>
<a class="page-next" rel="next"
href="utility.html" title="Utility Classes"><span></span></a>
<!--
page.parent doesn't seem to be set...
<a class="page-parent" rel="prev" href="about.html" title="i18n support"><span></span></a>
-->
</div>
<div class="nav-panel-menu is-active" data-panel="menu">
<nav class="nav-menu">
<h3 class="title"><a href="../about.html">Reference Guide</a></h3>
<ul class="nav-list">
<li class="nav-item" data-depth="0">
<ul class="nav-list">
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="../applib-ant/about.html">Annotations</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Action.html">Action</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/ActionLayout.html">ActionLayout</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Collection.html">Collection</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/CollectionLayout.html">CollectionLayout</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Column.html">Column</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Digits.html">Digits</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Discriminator.html">Discriminator</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/DomainObject.html">DomainObject</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/DomainObjectLayout.html">DomainObjectLayout</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/DomainService.html">DomainService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/DomainServiceLayout.html">DomainServiceLayout</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Facets.html">Facets</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/HomePage.html">HomePage</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/MemberOrder.html">MemberOrder</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Mixin.html">Mixin</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/NotPersistent.html">NotPersistent.</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Nullable.html">Nullable</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/MinLength.html">MinLength</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Parameter.html">Parameter</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/ParameterLayout.html">ParameterLayout</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Pattern.html">Pattern</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/PersistenceCapable.html">PersistenceCapable</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/PrimaryKey.html">PrimaryKey</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Programmatic.html">Programmatic</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Property.html">Property</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/PropertyLayout.html">PropertyLayout</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/IsisSessionScope.html">RequestScoped</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/Title.html">Title</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/ViewModel.html">ViewModel</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-ant/XmlRootElement.html">XmlRootElement</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="../applib-methods/about.html">Methods</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-methods/prefixes.html">Supporting Method Prefixes</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-methods/reserved.html">Reserved Methods</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-methods/lifecycle.html">Lifecycle Methods</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="about.html">Classes</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="events.html">Events</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="ViewModel.html"><code>ViewModel</code></a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="value-types.html">Value Types</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="spec.html">Specification pattern</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="i18n.html">i18n support</a>
</li>
<li class="nav-item is-current-page" data-depth="2">
<a class="nav-link" href="roles-mixins-contributees.html">Roles, Mixins and Contributees</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="utility.html">Utility Classes</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="layout.html">Layout</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="../applib-svc/about.html">Domain Services</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/AcceptHeaderService.html">AcceptHeaderService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ApplicationFeatureRepository.html">ApplicationFeatureRepository</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/AuditerService.html">AuditerService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/BookmarkService.html">BookmarkService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/BookmarkUiService.html">BookmarkUiService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ClockService.html">ClockService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/CommandContext.html">CommandContext</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/CommandDtoProcessorService.html">CommandDtoProcessorService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/CommandExecutorService.html">CommandExecutorService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/CommandService.html">CommandService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ConfigurationMenu.html">ConfigurationMenu</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ConfigurationViewService.html">ConfigurationViewService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ContentMappingService.html">ContentMappingService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/DeepLinkService.html">DeepLinkService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/EmailNotificationService.html">EmailNotificationService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/EmailService.html">EmailService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ErrorReportingService.html">ErrorReportingService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/EventBusService.html">EventBusService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ExceptionRecognizerService.html">ExceptionRecognizerService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/FactoryService.html">FactoryService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/GridLoaderService.html">GridLoaderService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/GridService.html">GridService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/GridSystemService.html">GridSystemService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/HealthCheckService.html">HealthCheckService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/HintStore.html">HintStore</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/HomePageResolverService.html">HomePageResolverService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/InteractionContext.html">InteractionContext</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/JaxbService.html">JaxbService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/LayoutService.html">LayoutService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/LayoutServiceMenu.html">LayoutServiceMenu</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/LocaleProvider.html">LocaleProvider</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/MenuBarsLoaderService.html">MenuBarsLoaderService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/MenuBarsService.html">MenuBarsService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/MessageService.html">MessageService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/MetaModelService.html">MetamodelService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/MetaModelServiceMenu.html">MetamodelServiceMenu</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/MetricsService.html">MetricsService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/PublisherService.html">PublisherService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/QueryResultsCache.html">QueryResultsCache</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/RepositoryService.html">RepositoryService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/RoutingService.html">RoutingService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/Scratchpad.html">Scratchpad</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ServiceInjector.html">ServiceInjector</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/ServiceRegistry.html">ServiceRegistry</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/SessionLoggingService.html">SessionLoggingService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/SudoService.html">SudoService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/SwaggerService.html">SwaggerService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/TableColumnOrderService.html">TableColumnOrderService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/TitleService.html">TitleService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/TranslationService.html">TranslationService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/TranslationsResolver.html">TranslationsResolver</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/TransactionService.html">TransactionService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/UrlEncodingService.html">UrlEncodingService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/UserProfileService.html">UserProfileService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/UserRegistrationService.html">UserRegistrationService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/UserService.html">UserService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/WrapperFactory.html">WrapperFactory</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/XmlService.html">XmlService</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../applib-svc/XmlSnapshotService.html">XmlSnapshotService</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="../config/about.html">Configuration</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.applib.html">Applib</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.core.meta-model.html">Core MetaModel</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.core.meta-model.introspector.html">Core MetaModel Introspection</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.core.meta-model.validator.html">MetaModel Validator</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.core.runtime.html">Core Runtime Services configurations</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.core.runtime-services.html">Core Runtime Services configurations</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.security.shiro.html">Shiro Security Implementation</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.persistence.jdo-datanucleus.html">JDO DataNucleus</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.persistence.jdo-datanucleus.impl.html">DataNucleus Configuration</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.viewer.restfulobjects.html">Restful Objects Viewer</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.viewer.wicket.html">Wicket Viewer</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.extensions.html">Extensions</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.value-types.html">Value types</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.testing.html">Testing</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/isis.legacy.html">Legacy</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/resteasy.html">RestEasy Configuration</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../config/sections/Other.html">Other</a>
</li>
</ul>
</li>
<li class="nav-item" data-depth="1">
<button class="nav-item-toggle"></button>
<a class="nav-link" href="../schema/about.html">Schema</a>
<ul class="nav-list">
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../schema/mml.html">MetaModel</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../schema/cmd.html">Command</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../schema/ixn.html">Interaction</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../schema/chg.html">Changes</a>
</li>
<li class="nav-item" data-depth="2">
<a class="nav-link" href="../schema/common.html">Common</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</div>
<div class="nav-panel-explore" data-panel="explore">
<div class="context">
<span class="title">Reference Guide</span>
<span class="version">2.0.0-M3</span>
</div>
<ul class="components">
<li class="component">
<span class="title"> </span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../docs/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">BC Mappings Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../mappings/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Committers' Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../comguide/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Contributors' Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../conguide/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Design Docs</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../core/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Extensions Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../extensions/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Incubator Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../incubator/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">JDO/DataNucleus</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../pjdo/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Legacy Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../legacy/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component is-current">
<span class="title">Reference Guide</span>
<ul class="versions">
<li class="version is-current is-latest">
<a href="../about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Release Notes</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../relnotes/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Restful Objects Viewer</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../vro/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Security Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../security/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Setup Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../setupguide/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Subdomains Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../subdomains/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Testing Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../testing/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">User Guide</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../userguide/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Value Types Catalog</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../valuetypes/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
<li class="component">
<span class="title">Wicket Viewer</span>
<ul class="versions">
<li class="version is-latest">
<a href="../../../vw/2.0.0-M3/about.html">2.0.0-M3</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</aside>
</div>
<main role="main">
<div class="toolbar" role="navigation">
<button class="nav-toggle"></button>
<a href="../../../docs/2.0.0-M3/about.html" class="home-link"></a>
<nav class="breadcrumbs" aria-label="breadcrumbs">
<ul>
<li><a href="../about.html">Reference Guide</a></li>
<li><a href="about.html">Classes</a></li>
<li><a href="roles-mixins-contributees.html">Roles, Mixins and Contributees</a></li>
</ul>
</nav>
<div class="edit-this-page"><a href="https://github.com/apache/isis/edit/2.0.0-M3/api/applib/src/main/adoc/modules/applib-classes/pages/roles-mixins-contributees.adoc">Edit</a></div>
</div>
<article class="doc">
<a name="section-top"></a>
<h1 class="page">Roles, Mixins and Contributees</h1>
<div class="sect1">
<h2 id="roles"><a class="anchor" href="#roles"></a>Roles</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The interfaces listed in this chapter are role interfaces; they define a contract for the framework to interact with those domain objects that implement these interfaces.</p>
</div>
<div class="sect2">
<h3 id="HoldsUpdatedAt"><a class="anchor" href="#HoldsUpdatedAt"></a><code>HoldsUpdatedAt</code></h3>
<div class="paragraph">
<p>The <code>HoldsUpdatedAt</code> role interface allows the (framework-provided) <code>TimestampService</code> to update each object with the current timestamp whenever it is modified in a transaction.</p>
</div>
<div class="paragraph">
<p>The interface is defined as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public interface HoldsUpdatedAt {
void setUpdatedAt(java.sql.Timestamp updatedAt);
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>The current time is obtained from the <a href="../applib-svc/ClockService.html" class="page"><code>ClockService</code></a>.</p>
</div>
<div class="paragraph">
<p>Entities that implement this interface often also implement <a href="about.html#HoldsUpdatedBy" class="page"><code>HoldsUpdatedBy</code></a> role interface; as a convenience the <a href="about.html#Timestampable" class="page"><code>Timestampable</code></a> interface combines the two roles.</p>
</div>
<div class="sect3">
<h4 id="alternative-approaches"><a class="anchor" href="#alternative-approaches"></a>Alternative approaches</h4>
<div class="paragraph">
<p>An alternative way to maintain a timestamp is to use JDO&#8217;s <code>@Version</code> annotation.
With this approach, it is the JDO/DataNucleus that maintains the version, rather than the framework&#8217;s <code>TimestampService</code>.</p>
</div>
<div class="paragraph">
<p>For example:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@javax.jdo.annotations.Version(
strategy=VersionStrategy.DATE_TIME,
column="version")
public class Customer {
...
public java.sql.Timestamp getVersionSequence() {
return (java.sql.Timestamp) JDOHelper.getVersion(this);
}
}</code></pre>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="HoldsUpdatedBy"><a class="anchor" href="#HoldsUpdatedBy"></a><code>HoldsUpdatedBy</code></h3>
<div class="paragraph">
<p>The <code>HoldsUpdatedBy</code> role interface &#8230;&#8203;</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public interface HoldsUpdatedBy {
void setUpdatedBy(String updatedBy);
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Entities that implement this interface often also implement <a href="about.html#HoldsUpdatedAt" class="page"><code>HoldsUpdatedAt</code></a> role interface; as a convenience the <a href="about.html#Timestampable" class="page"><code>Timestampable</code></a> interface combines the two roles.</p>
</div>
</div>
<div class="sect2">
<h3 id="Timestampable"><a class="anchor" href="#Timestampable"></a><code>Timestampable</code></h3>
<div class="paragraph">
<p>The <code>Timestampable</code> role interface is a convenience that combines the <a href="about.html#HoldsUpdatedAt" class="page"><code>HoldsUpdatedAt</code></a> and <a href="about.html#HoldsUpdatedBy" class="page"><code>HoldsUpdatedBy</code></a> interfaces.
It is defined as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public interface Timestampable
extends HoldsUpdatedAt, HoldsUpdatedBy {
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>The interface no additional methods of its own.</p>
</div>
<div class="sect3">
<h4 id="alternatives"><a class="anchor" href="#alternatives"></a>Alternatives</h4>
<div class="paragraph">
<p>An alternative way to maintain a timestamp is to use JDO&#8217;s <code>@Version</code> annotation.
With this approach, it is the JDO/DataNucleus that maintains the version, rather than the framework&#8217;s <code>TimestampService</code>.
See <a href="about.html#HoldsUpdatedBy" class="page"><code>HoldsUpdatedBy</code></a> for further details.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="mixins"><a class="anchor" href="#mixins"></a>Mixins</h2>
<div class="sectionbody">
<div class="paragraph">
<p>This section defines a number of role interfaces that definea contract for some framework-defined mixins.</p>
</div>
<div class="admonitionblock tip">
<table>
<tr>
<td class="icon">
<i class="fa icon-tip" title="Tip"></i>
</td>
<td class="content">
<div class="paragraph">
<p>See the <a href="../../../userguide/2.0.0-M3/fun/overview.html#mixins" class="page">fundamentals user guide</a> for a discussion of mixins.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="sect2">
<h3 id="Object"><a class="anchor" href="#Object"></a><code>Object</code></h3>
<div class="paragraph">
<p>The framework provides a single mixin that contributes to simply <code>java.lang.Object</code>.
It provides the ability to download the layout XML for any domain object (in practical terms: entities and view models).</p>
</div>
<div class="paragraph">
<p>These mixin actions are all associated with the "Metadata" fieldset.
A number of other <a href="about.html#Persistable" class="page">mixins</a> also contribute properties or actions to the "Metadata" fieldset.</p>
</div>
<div class="sect3">
<h4 id="clearHints"><a class="anchor" href="#clearHints"></a><code>clearHints()</code></h4>
<div class="paragraph">
<p>When a domain object is rendered the end-user can select different tabs, and for collections can sort the columns,
navigate to second pages, or select different views of collections.
If the user revisits that object, the <a href="../../../vw/2.0.0-M3/about.html" class="page">Wicket viewer</a> will remember these hints and render the domain object in the same state.
These rendering hints are also included if the user copies the URL using the anchor link (to right hand of the object&#8217;s title).</p>
</div>
<div class="paragraph">
<p>The <code>Object_clearHints</code> mixin provides the ability for the end-user to discard these hints so that the object is
rendered in its initial state:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public void clearHints() {
...
}</code></pre>
</div>
</div>
<div class="sect4">
<h5 id="related-services"><a class="anchor" href="#related-services"></a>Related Services</h5>
<div class="paragraph">
<p>This mixin uses the <a href="../applib-svc/HintStore.html" class="page"><code>HintStore</code></a> service to store and retrieve UI hints for each rendered object, per user.</p>
</div>
</div>
</div>
<div class="sect3">
<h4 id="downloadlayoutxml"><a class="anchor" href="#downloadlayoutxml"></a><code>downloadLayoutXml()</code></h4>
<div class="paragraph">
<p>The <code>Object_downloadLayoutXml</code> mixin provides an action to download the <a href="../../../userguide/2.0.0-M3/fun/ui.html#object-layout" class="page">layout XML</a> for the current domain object.
It has the following signature:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public Object downloadLayoutXml(
@ParameterLayout(named = "File name")
final String fileName,
final LayoutService.Style style) { <i class="conum" data-value="1"></i><b>(1)</b>
...
}</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>either current, complete, normalized or minimal.</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>See the documentation on <a href="../../../userguide/2.0.0-M3/fun/ui.html#object-layout" class="page">layout XML</a> and also
the <a href="../applib-svc/LayoutService.html" class="page"><code>LayoutService</code></a> for more information on these styles</p>
</div>
<div class="sect4">
<h5 id="related-services-2"><a class="anchor" href="#related-services-2"></a>Related Services</h5>
<div class="paragraph">
<p>This mixin calls <a href="../applib-svc/LayoutService.html" class="page"><code>LayoutService</code></a> to obtain the layout XML.</p>
</div>
</div>
</div>
<div class="sect3">
<h4 id="rebuildMetamodel"><a class="anchor" href="#rebuildMetamodel"></a><code>rebuildMetamodel()</code></h4>
<div class="paragraph">
<p>The <code>Object_rebuildMetamodel</code> mixin provides the ability to discard the current internal metamodel data (an instance of <code>ObjectSpecification</code>) for the domain class of the rendered object, and recreate from code and other sources (most notably, layout XML data).
It has the following signature:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public void rebuildMetamodel() {
...
}</code></pre>
</div>
</div>
<div class="sect4">
<h5 id="related-services-3"><a class="anchor" href="#related-services-3"></a>Related Services</h5>
<div class="paragraph">
<p>This mixin calls <a href="#refguide:applib-svc:MetamodelService.adoc" class="page unresolved"><code>MetaModelService</code></a> and the <a href="../applib-svc/GridService.html" class="page"><code>GridService</code></a> to invalidate their caches.</p>
</div>
</div>
</div>
<div class="sect3">
<h4 id="openrestapi"><a class="anchor" href="#openrestapi"></a><code>openRestApi()</code></h4>
<div class="paragraph">
<p>The <code>Object_openRestApi</code> mixin provides an action to navigate to the URL of the <a href="../../../vro/2.0.0-M3/about.html" class="page">Restful Objects resource</a> corresponding to the domain object.
It has the following signature:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public URL openRestApi() { /* ... */ }</code></pre>
</div>
</div>
<div class="sect4">
<h5 id="related-services-4"><a class="anchor" href="#related-services-4"></a>Related Services</h5>
<div class="paragraph">
<p>This mixin calls <a href="../applib-svc/BookmarkService.html" class="page"><code>BookmarkService</code></a> to build the URL.</p>
</div>
</div>
</div>
</div>
<div class="sect2">
<h3 id="Dto"><a class="anchor" href="#Dto"></a><code>Dto</code></h3>
<div class="paragraph">
<p>The <code>Dto</code> role interface is intended to be implemented by JAXB-annotated view models, that is, annotated using
<a href="../applib-ant/XmlRootElement.html" class="page"><code>@XmlRootElement</code></a>.
It enables the ability to download the XML and XSD schema of those objects using two <a href="../../../userguide/2.0.0-M3/fun/overview.html#mixins" class="page">mixins</a>, <code>Dto_downloadXml</code> and <code>Dto_downloadXsd</code>.</p>
</div>
<div class="paragraph">
<p>The interface is just a marker interface (with no members), and is defined as:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public interface Dto { }</code></pre>
</div>
</div>
<div class="paragraph">
<p>The <code>Dto_downloadXml</code> mixin defines the following action:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@Mixin(method="act")
public class Dto_downloadXml {
public Dto_downloadXml(final Dto dto) { <i class="conum" data-value="1"></i><b>(1)</b>
// ...
}
public Object act(final String fileName) { <i class="conum" data-value="2"></i><b>(2)</b>
// ...
}
// ...
}</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>provided as an action to any class that (trivially) implements the <code>Dto</code> interface</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>The action&#8217;s name is derived from the class name.</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>This will return the XML text wrapped up in a <a href="about.html#Clob" class="page"><code>Clob</code></a>.</p>
</div>
<div class="paragraph">
<p>The <code>Dto_downloadXsd</code> mixin is similar:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@Mixin(method="act")
public class Dto_downloadXsd {
public Dto_downloadXsd(final Dto dto) { /* ... */ } <i class="conum" data-value="1"></i><b>(1)</b>
public Object act(final String fileName, final IsisSchemes isisSchemas) { /* ... */ } <i class="conum" data-value="2"></i><b>(2)</b>
}</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>provided as an action to any class that (trivially) implements the <code>Dto</code> interface</td>
</tr>
<tr>
<td><i class="conum" data-value="2"></i><b>2</b></td>
<td>The action&#8217;s name be derived from the class name.</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>If the domain object&#8217;s JAXB annotations reference only a single XSD schema then this will return that XML text as a <a href="about.html#Clob" class="page"><code>Clob</code></a> of that XSD.
If there are multiple XSD schemas referenced then the action will return a zip of those schemas, wrapped up in a <a href="about.html#Blob" class="page"><code>Blob</code></a>.
The <code>IsisSchemas</code> parameter to the action can be used to optionally ignore the common <a href="../schema/about.html" class="page">Apache Isis schemas</a> (useful if there is only one other XSD schema referenced by the DTO).</p>
</div>
<div class="sect3">
<h4 id="related-services-5"><a class="anchor" href="#related-services-5"></a>Related Services</h4>
<div class="paragraph">
<p>The <code>Dto_downloadXml</code> and <code>Dto_downloadXsd</code> delegate to the <a href="../applib-svc/JaxbService.html" class="page"><code>JaxbService</code></a> to actually generate the XML/XSD.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="Persistable"><a class="anchor" href="#Persistable"></a><code>Persistable</code></h3>
<div class="paragraph">
<p>All domain entities automatically implement the DataNucleus <code>Persistable</code> role interface as a result of the enhancer process (the fully qualified class name is <code>org.datanucleus.enhancement.Persistable</code>).
So as a developer you do not need to write any code to obtain the mixins that contribute to this interface.</p>
</div>
<div class="paragraph">
<p>These mixin properties/actions are all associated with the "Metadata" fieldset.
A number of other <a href="about.html#Object" class="page">mixins</a> also contribute properties or actions to the "Metadata" fieldset.</p>
</div>
<div class="sect3">
<h4 id="downloadJdoMetadata"><a class="anchor" href="#downloadJdoMetadata"></a><code>downloadJdoMetadata()</code></h4>
<div class="paragraph">
<p>The <code>Persistable_downloadJdoMetadata</code> mixin provides an action which allows the JDO <a href="http://www.datanucleus.org/products/datanucleus/jdo/metadata_xml.html">class metadata</a> to be downloaded as XML.
It has the following signature:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public Clob downloadJdoMetadata( <i class="conum" data-value="1"></i><b>(1)</b>
@ParameterLayout(named = ".jdo file name")
final String fileName) {
// ...
}
// ...
}</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>returns the XML text wrapped up in a <a href="about.html#Clob" class="page"><code>Clob</code></a>.</td>
</tr>
</table>
</div>
<div class="sect4">
<h5 id="related-services-6"><a class="anchor" href="#related-services-6"></a>Related Services</h5>
<div class="paragraph">
<p>The mixin delegates to the <a href="../../../pjdo/2.0.0-M3/services/IsisJdoSupport.html" class="page"><code>IsisJdoSupport</code></a> service to obtain a reference to the JDO <code>PersistenceManagerFactory</code>.</p>
</div>
</div>
</div>
<div class="sect3">
<h4 id="datanucleusXxx"><a class="anchor" href="#datanucleusXxx"></a><code>datanucleusXxx</code></h4>
<div class="paragraph">
<p>The framework provides a number of mixins that expose the datanucleus Id and version of a persistable domain entity.
Several implementations are provided to support different datatypes:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><code>Persistable_datanucleusIdLong</code> will expose the entity&#8217;s id, assuming that the id is or can be cast to <code>java.lang.Long</code>.
Otherwise the property will be hidden.</p>
</li>
<li>
<p><code>Persistable_datanucleusVersionTimestamp</code> will expose the entity&#8217;s version, assuming that the version is or can be cast to <code>java.sql.Timestamp</code>.
Otherwise the property will be hidden.</p>
</li>
<li>
<p><code>Persistable_datanucleusVersionLong</code> will expose the entity&#8217;s version, assuming that the version is or can be cast to <code>java.lang.Long</code>.
Otherwise the property will be hidden.</p>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="contributee"><a class="anchor" href="#contributee"></a>Contributee</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The interfaces listed in this chapter act as contributees; they allow domain services to contribute actions/properties/collections to any domain objects that implement these interfaces.</p>
</div>
<div class="sect2">
<h3 id="HasUniqueId"><a class="anchor" href="#HasUniqueId"></a><code>HasUniqueId</code></h3>
<div class="paragraph">
<p>The <code>HasUniqueId</code> interface is a mix-in for any domain objects that reference a transaction id, such as auditing entries or commands, or for <a href="../applib-svc/InteractionContext.html" class="page"><code>Interaction</code></a>s persisted as published events.</p>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>This identifier actually is for the request/interaction in which the object was created, so is actually now mis-named.</p>
</div>
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>The interface is defined is:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public interface HasUniqueId {
public UUID getTransactionId(); <i class="conum" data-value="1"></i><b>(1)</b>
public void setTransactionId(final UUID transactionId);
}</code></pre>
</div>
</div>
<div class="colist arabic">
<table>
<tr>
<td><i class="conum" data-value="1"></i><b>1</b></td>
<td>unique identifier (a GUID) of this request/interaction.</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Some of the extension/mapping modules that have domain entity/ies that implement this interface are:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="../../../security/2.0.0-M3/audit-trail/about.html" class="page">Auditer</a> module: <code>AuditEntry</code> entity</p>
</li>
<li>
<p><a href="../../../extensions/2.0.0-M3/command-log/about.html" class="page">Command Log</a> module: <code>CommandJdo</code> entity</p>
</li>
<li>
<p><a href="../../../mappings/2.0.0-M3/outbox-publisher/about.html" class="page">Outbox Publisher</a> module: <code>OutboxEvent</code> entity</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="RepresentsInteractionMemberExecution"><a class="anchor" href="#RepresentsInteractionMemberExecution"></a><code>RepresentsInteractionMemberExecution</code></h3>
<div class="paragraph">
<p>The <code>RepresentsInteractionMemberExecution</code> interface is a sub-interface of <code>HasUniqueId</code> that also includes a sequence property:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public interface RepresentsInteractionMemberExecution extends HasUniqueId {
int getSequence();
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Here the (inherited) <code>getTransactionId()</code> is intended to be interpreted as an interaction (cf <a href="#refguide:schema:ixn"><code>InteractionDto</code></a>) that has at least one member execution (cf <a href="../schema/about.html#ixn/memberExecutionDto.adoc" class="page"><code>memberExecutionDto</code></a>).</p>
</div>
<div class="paragraph">
<p>If the interaction (almost certainly an action) calls other actions by way of <a href="../applib-svc/WrapperFactory.html" class="page"><code>WrapperFactory</code></a>), then there may be several member executions, each with a unique sequence number, within the same transaction Id.</p>
</div>
<div class="paragraph">
<p>The purpose of this interface is to allow mixins to be defined, though the framework itself defines none.</p>
</div>
<div class="paragraph">
<p>Currently the only implementation of this interface is that for <code>PublishedObjects</code> applib interface as defined by the <a href="../applib-svc/PublisherService.html" class="page"><code>PublisherService</code></a>.</p>
</div>
</div>
<div class="sect2">
<h3 id="HasUserName"><a class="anchor" href="#HasUserName"></a><code>HasUsername</code></h3>
<div class="paragraph">
<p>The <code>HasUsername</code> interface is a mix-in for domain objects to be associated with a username.
Other services and modules can then contribute actions/collections to render such additional information relating to the activities of the user.</p>
</div>
<div class="paragraph">
<p>The interface is defined is:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public interface HasUsername {
public String getUsername();
}</code></pre>
</div>
</div>
<div class="paragraph">
<p>Some of the extension/mapping modules that have domain entity/ies that implement this interface are:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><a href="../../../security/2.0.0-M3/about.html" class="page">SecMan extension</a>: <code>ApplicationUser</code> entity</p>
</li>
<li>
<p><a href="../../../security/2.0.0-M3/audit-trail/about.html" class="page">Auditer</a> module: <code>AuditEntry</code> entity</p>
</li>
<li>
<p><a href="../../../extensions/2.0.0-M3/command-log/about.html" class="page">Command Log</a> module: <code>CommandJdo</code> entity</p>
</li>
<li>
<p><a href="../../../mappings/2.0.0-M3/outbox-publisher/about.html" class="page">Outbox Publisher</a> module: <code>OutboxEvent</code> entity</p>
</li>
<li>
<p><a href="../../../security/2.0.0-M3/session-log/about.html" class="page">Session Log</a> module: <code>SessionLogEntry</code> entity</p>
</li>
<li>
<p><a href="../../../subdomains/2.0.0-M3/settings/about.html" class="page">Settings</a> module: <code>UserSettingJdo</code> entity</p>
</li>
</ul>
</div>
</div>
</div>
</div>
</article>
<aside class="article-aside toc" role="navigation">
<p class="toc-title">On this page</p>
<div id="article-toc"></div>
</aside>
</main>
</div>
<footer class="footer">
<div class="content">
<div class="copyright">
<p>
Copyright © 2010~2020 The Apache Software Foundation, licensed under the Apache License, v2.0.
<br/>
Apache, the Apache feather logo, Apache Isis, and the Apache Isis project logo are all trademarks of The Apache Software Foundation.
</p>
</div>
<div class="revision">
<p>Revision: SNAPSHOT</p>
</div>
</div>
</footer>
<script src="../../../_/js/site.js"></script>
<script async src="../../../_/js/vendor/highlight.js"></script>
<script src="../../../_/js/vendor/jquery-3.4.1.min.js"></script>
<script src="../../../_/js/vendor/jquery-ui-1.12.1.custom.widget-only.min.js"></script>
<script src="../../../_/js/vendor/jquery.tocify.min.js"></script>
<script>
$(function() {
$("#article-toc").tocify( {
showEffect: "slideDown",
hashGenerator: "pretty",
hideEffect: "slideUp",
selectors: "h2, h3",
scrollTo: 120,
smoothScroll: true,
theme: "jqueryui",
highlightOnScroll: true
} );
});
</script>
</body>
</html>