Resolves checkstyle errors for naked-objects null-object object-mother object-pool observer queue-load-leveling (#1082)
* Reduces checkstyle errors in naked-objects * Reduces checkstyle errors in null-object * Reduces checkstyle errors in object-mother * Reduces checkstyle errors in object-pool * Reduces checkstyle errors in observer * Reduces checkstyle errors in queue-load-leveling
This commit is contained in:
committed by
Ilkka Seppälä
parent
1e76d91929
commit
6ef840f3cf
@ -31,7 +31,8 @@ import org.apache.isis.applib.annotation.NatureOfService;
|
||||
import org.apache.isis.applib.annotation.SemanticsOf;
|
||||
|
||||
/**
|
||||
* HomePage Domain Service
|
||||
* HomePage Domain Service.
|
||||
*
|
||||
* @see HomePageViewModel linked view to HomePage
|
||||
*/
|
||||
@DomainService(nature = NatureOfService.VIEW_CONTRIBUTIONS_ONLY)
|
||||
|
@ -23,16 +23,14 @@
|
||||
|
||||
package domainapp.dom.app.homepage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.isis.applib.annotation.ViewModel;
|
||||
|
||||
import domainapp.dom.modules.simple.SimpleObject;
|
||||
import domainapp.dom.modules.simple.SimpleObjects;
|
||||
import java.util.List;
|
||||
import org.apache.isis.applib.annotation.ViewModel;
|
||||
|
||||
/**
|
||||
* Model linked to the HomePage
|
||||
* The underlying layout is specified by json
|
||||
* Model linked to the HomePage The underlying layout is specified by json.
|
||||
*
|
||||
* @see HomePageService - Service Linked to the HomePage
|
||||
*/
|
||||
@ViewModel
|
||||
|
@ -15,29 +15,29 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 12,
|
||||
"collections": {
|
||||
"objects": {
|
||||
"collectionLayout": {
|
||||
"render": "EAGERLY"
|
||||
}
|
||||
}
|
||||
}
|
||||
"columns": [
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 12,
|
||||
"collections": {
|
||||
"objects": {
|
||||
"collectionLayout": {
|
||||
"render": "EAGERLY"
|
||||
}
|
||||
}
|
||||
],
|
||||
"actions": {}
|
||||
}
|
||||
}
|
||||
],
|
||||
"actions": {}
|
||||
}
|
@ -26,7 +26,6 @@ package domainapp.dom.modules.simple;
|
||||
import javax.jdo.JDOHelper;
|
||||
import javax.jdo.annotations.IdentityType;
|
||||
import javax.jdo.annotations.VersionStrategy;
|
||||
|
||||
import org.apache.isis.applib.DomainObjectContainer;
|
||||
import org.apache.isis.applib.Identifier;
|
||||
import org.apache.isis.applib.annotation.Action;
|
||||
@ -43,7 +42,7 @@ import org.apache.isis.applib.services.i18n.TranslatableString;
|
||||
import org.apache.isis.applib.util.ObjectContracts;
|
||||
|
||||
/**
|
||||
* Definition of a Simple Object
|
||||
* Definition of a Simple Object.
|
||||
*/
|
||||
@javax.jdo.annotations.PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "simple",
|
||||
table = "SimpleObject")
|
||||
@ -87,11 +86,11 @@ public class SimpleObject implements Comparable<SimpleObject> {
|
||||
// region > updateName (action)
|
||||
|
||||
/**
|
||||
* Event used to update the Name in the Domain
|
||||
* Event used to update the Name in the Domain.
|
||||
*/
|
||||
public static class UpdateNameDomainEvent extends ActionDomainEvent<SimpleObject> {
|
||||
public UpdateNameDomainEvent(final SimpleObject source, final Identifier identifier,
|
||||
final Object... arguments) {
|
||||
final Object... arguments) {
|
||||
super(source, identifier, arguments);
|
||||
}
|
||||
}
|
||||
|
@ -15,42 +15,42 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"span": 6,
|
||||
"memberGroups": {
|
||||
"General": {
|
||||
"members": {
|
||||
"name": {
|
||||
"actions": {
|
||||
"updateName": {
|
||||
"actionLayout": {
|
||||
"position": "BOTTOM"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"versionSequence": {
|
||||
"propertyLayout": {
|
||||
"name": "version"
|
||||
}
|
||||
}
|
||||
}
|
||||
"columns": [
|
||||
{
|
||||
"span": 6,
|
||||
"memberGroups": {
|
||||
"General": {
|
||||
"members": {
|
||||
"name": {
|
||||
"actions": {
|
||||
"updateName": {
|
||||
"actionLayout": {
|
||||
"position": "BOTTOM"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"versionSequence": {
|
||||
"propertyLayout": {
|
||||
"name": "version"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 6,
|
||||
"collections": {}
|
||||
}
|
||||
}
|
||||
],
|
||||
"actions": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 0,
|
||||
"memberGroups": {}
|
||||
},
|
||||
{
|
||||
"span": 6,
|
||||
"collections": {}
|
||||
}
|
||||
],
|
||||
"actions": {}
|
||||
}
|
@ -24,7 +24,6 @@
|
||||
package domainapp.dom.modules.simple;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.isis.applib.DomainObjectContainer;
|
||||
import org.apache.isis.applib.Identifier;
|
||||
import org.apache.isis.applib.annotation.Action;
|
||||
@ -40,7 +39,7 @@ import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
|
||||
import org.apache.isis.applib.services.i18n.TranslatableString;
|
||||
|
||||
/**
|
||||
* Domain Service for Simple Objects
|
||||
* Domain Service for Simple Objects.
|
||||
*/
|
||||
@DomainService(repositoryFor = SimpleObject.class)
|
||||
@DomainServiceLayout(menuOrder = "10")
|
||||
@ -82,18 +81,18 @@ public class SimpleObjects {
|
||||
// endregion
|
||||
|
||||
/**
|
||||
* Create Domain Event on SimpleObjects
|
||||
* Create Domain Event on SimpleObjects.
|
||||
*/
|
||||
// region > create (action)
|
||||
public static class CreateDomainEvent extends ActionDomainEvent<SimpleObjects> {
|
||||
public CreateDomainEvent(final SimpleObjects source, final Identifier identifier,
|
||||
final Object... arguments) {
|
||||
final Object... arguments) {
|
||||
super(source, identifier, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create simple object
|
||||
* Create simple object.
|
||||
*/
|
||||
@Action(domainEvent = CreateDomainEvent.class)
|
||||
@MemberOrder(sequence = "3")
|
||||
|
@ -23,14 +23,13 @@
|
||||
|
||||
package domainapp.fixture;
|
||||
|
||||
import domainapp.fixture.scenarios.RecreateSimpleObjects;
|
||||
import org.apache.isis.applib.annotation.DomainService;
|
||||
import org.apache.isis.applib.annotation.NatureOfService;
|
||||
import org.apache.isis.applib.fixturescripts.FixtureScripts;
|
||||
import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecification;
|
||||
import org.apache.isis.applib.services.fixturespec.FixtureScriptsSpecificationProvider;
|
||||
|
||||
import domainapp.fixture.scenarios.RecreateSimpleObjects;
|
||||
|
||||
/**
|
||||
* Specifies where to find fixtures, and other settings.
|
||||
*/
|
||||
|
@ -23,13 +23,12 @@
|
||||
|
||||
package domainapp.fixture.modules.simple;
|
||||
|
||||
import org.apache.isis.applib.fixturescripts.FixtureScript;
|
||||
|
||||
import domainapp.dom.modules.simple.SimpleObject;
|
||||
import domainapp.dom.modules.simple.SimpleObjects;
|
||||
import org.apache.isis.applib.fixturescripts.FixtureScript;
|
||||
|
||||
/**
|
||||
* Fixture to create a simple object
|
||||
* Fixture to create a simple object.
|
||||
*/
|
||||
public class SimpleObjectCreate extends FixtureScript {
|
||||
|
||||
@ -46,7 +45,7 @@ public class SimpleObjectCreate extends FixtureScript {
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* Name of the object (required)
|
||||
* Name of the object (required).
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
|
@ -27,7 +27,7 @@ import org.apache.isis.applib.fixturescripts.FixtureScript;
|
||||
import org.apache.isis.applib.services.jdosupport.IsisJdoSupport;
|
||||
|
||||
/**
|
||||
* TearDown/Cleanup for SimpleObjects
|
||||
* TearDown/Cleanup for SimpleObjects.
|
||||
*/
|
||||
public class SimpleObjectsTearDown extends FixtureScript {
|
||||
|
||||
|
@ -27,19 +27,18 @@ import com.google.common.collect.Lists;
|
||||
import domainapp.dom.modules.simple.SimpleObject;
|
||||
import domainapp.fixture.modules.simple.SimpleObjectCreate;
|
||||
import domainapp.fixture.modules.simple.SimpleObjectsTearDown;
|
||||
import org.apache.isis.applib.fixturescripts.FixtureScript;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import org.apache.isis.applib.fixturescripts.FixtureScript;
|
||||
|
||||
|
||||
/**
|
||||
* Create a bunch of simple Objects
|
||||
* Create a bunch of simple Objects.
|
||||
*/
|
||||
public class RecreateSimpleObjects extends FixtureScript {
|
||||
|
||||
public final List<String> names = Collections.unmodifiableList(List.of("Foo", "Bar", "Baz",
|
||||
"Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo"));
|
||||
"Frodo", "Froyo", "Fizz", "Bip", "Bop", "Bang", "Boo"));
|
||||
|
||||
// region > number (optional input)
|
||||
private Integer number;
|
||||
|
@ -23,13 +23,6 @@
|
||||
|
||||
package domainapp.webapp;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.io.Resources;
|
||||
import com.google.inject.AbstractModule;
|
||||
@ -37,30 +30,31 @@ import com.google.inject.Module;
|
||||
import com.google.inject.name.Names;
|
||||
import com.google.inject.util.Modules;
|
||||
import com.google.inject.util.Providers;
|
||||
|
||||
import de.agilecoders.wicket.core.Bootstrap;
|
||||
import de.agilecoders.wicket.core.settings.IBootstrapSettings;
|
||||
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchTheme;
|
||||
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchThemeProvider;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
|
||||
import org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis;
|
||||
import org.apache.wicket.Session;
|
||||
import org.apache.wicket.request.IRequestParameters;
|
||||
import org.apache.wicket.request.Request;
|
||||
import org.apache.wicket.request.Response;
|
||||
import org.apache.wicket.request.http.WebRequest;
|
||||
|
||||
import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
|
||||
import org.apache.isis.viewer.wicket.viewer.integration.wicket.AuthenticatedWebSessionForIsis;
|
||||
|
||||
import de.agilecoders.wicket.core.Bootstrap;
|
||||
import de.agilecoders.wicket.core.settings.IBootstrapSettings;
|
||||
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchTheme;
|
||||
import de.agilecoders.wicket.themes.markup.html.bootswatch.BootswatchThemeProvider;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
/**
|
||||
* As specified in <tt>web.xml</tt>.
|
||||
*
|
||||
* <p>
|
||||
* See:
|
||||
*
|
||||
*
|
||||
* <p>See:
|
||||
*
|
||||
* <pre>
|
||||
* <filter>
|
||||
* <filter-name>wicket</filter-name>
|
||||
@ -71,7 +65,6 @@ import org.slf4j.LoggerFactory;
|
||||
* </init-param>
|
||||
* </filter>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
public class SimpleApplication extends IsisWicketApplication {
|
||||
|
||||
@ -80,11 +73,10 @@ public class SimpleApplication extends IsisWicketApplication {
|
||||
|
||||
/**
|
||||
* uncomment for a (slightly hacky) way of allowing logins using query args, eg:
|
||||
*
|
||||
*
|
||||
* <tt>{@code ?user=sven&pass=pass}</tt>
|
||||
*
|
||||
* <p>
|
||||
* for demos only, obvious.
|
||||
*
|
||||
* <p>for demos only, obvious.
|
||||
*/
|
||||
private static final boolean DEMO_MODE_USING_CREDENTIALS_AS_QUERYARGS = false;
|
||||
|
||||
|
Reference in New Issue
Block a user