squid:S1213 - The members of an interface declaration or class should appear in a pre-defined order
This commit is contained in:
@ -24,14 +24,6 @@ import org.apache.isis.applib.annotation.SemanticsOf;
|
||||
@DomainService(nature = NatureOfService.VIEW_CONTRIBUTIONS_ONLY)
|
||||
public class HomePageService {
|
||||
|
||||
// region > homePage (action)
|
||||
|
||||
@Action(semantics = SemanticsOf.SAFE)
|
||||
@HomePage
|
||||
public HomePageViewModel homePage() {
|
||||
return container.injectServicesInto(new HomePageViewModel());
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region > injected services
|
||||
@ -40,4 +32,13 @@ public class HomePageService {
|
||||
DomainObjectContainer container;
|
||||
|
||||
// endregion
|
||||
|
||||
// region > homePage (action)
|
||||
|
||||
@Action(semantics = SemanticsOf.SAFE)
|
||||
@HomePage
|
||||
public HomePageViewModel homePage() {
|
||||
return container.injectServicesInto(new HomePageViewModel());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -24,6 +24,15 @@ import domainapp.dom.modules.simple.SimpleObjects;
|
||||
@ViewModel
|
||||
public class HomePageViewModel {
|
||||
|
||||
// endregion
|
||||
|
||||
// region > injected services
|
||||
|
||||
@javax.inject.Inject
|
||||
SimpleObjects simpleObjects;
|
||||
|
||||
// endregion
|
||||
|
||||
// region > title
|
||||
public String title() {
|
||||
return getObjects().size() + " objects";
|
||||
@ -37,12 +46,4 @@ public class HomePageViewModel {
|
||||
return simpleObjects.listAll();
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region > injected services
|
||||
|
||||
@javax.inject.Inject
|
||||
SimpleObjects simpleObjects;
|
||||
|
||||
// endregion
|
||||
}
|
||||
|
@ -48,17 +48,16 @@ import org.apache.isis.applib.util.ObjectContracts;
|
||||
@DomainObjectLayout(bookmarking = BookmarkPolicy.AS_ROOT, cssClassFa = "fa-flag")
|
||||
public class SimpleObject implements Comparable<SimpleObject> {
|
||||
|
||||
|
||||
// region > identificatiom
|
||||
public TranslatableString title() {
|
||||
return TranslatableString.tr("Object: {name}", "name", getName());
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region > name (property)
|
||||
|
||||
private String name;
|
||||
|
||||
// region > identificatiom
|
||||
public TranslatableString title() {
|
||||
return TranslatableString.tr("Object: {name}", "name", getName());
|
||||
}
|
||||
|
||||
@javax.jdo.annotations.Column(allowsNull = "false", length = 40)
|
||||
@Title(sequence = "1")
|
||||
|
@ -33,6 +33,14 @@ import org.apache.isis.applib.services.i18n.TranslatableString;
|
||||
@DomainService(repositoryFor = SimpleObject.class)
|
||||
@DomainServiceLayout(menuOrder = "10")
|
||||
public class SimpleObjects {
|
||||
// endregion
|
||||
|
||||
// region > injected services
|
||||
|
||||
@javax.inject.Inject
|
||||
DomainObjectContainer container;
|
||||
|
||||
// endregion
|
||||
|
||||
// region > title
|
||||
public TranslatableString title() {
|
||||
@ -81,12 +89,4 @@ public class SimpleObjects {
|
||||
return obj;
|
||||
}
|
||||
|
||||
// endregion
|
||||
|
||||
// region > injected services
|
||||
|
||||
@javax.inject.Inject
|
||||
DomainObjectContainer container;
|
||||
|
||||
// endregion
|
||||
}
|
||||
|
Reference in New Issue
Block a user