Removed AvoidStarImport Rule

Added JavaDocType Rule
This commit is contained in:
Mudit Porwal
2017-03-22 01:16:01 +08:00
parent 175e9f58c1
commit 09585c3874
105 changed files with 577 additions and 284 deletions

View File

@@ -4,9 +4,9 @@
* 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
@@ -21,6 +21,10 @@ import org.apache.isis.applib.annotation.HomePage;
import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.SemanticsOf;
/**
* HomePage Domain Service
* @see HomePageViewModel linked view to HomePage
*/
@DomainService(nature = NatureOfService.VIEW_CONTRIBUTIONS_ONLY)
public class HomePageService {

View File

@@ -4,9 +4,9 @@
* 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
@@ -21,6 +21,11 @@ import org.apache.isis.applib.annotation.ViewModel;
import domainapp.dom.modules.simple.SimpleObject;
import domainapp.dom.modules.simple.SimpleObjects;
/**
* Model linked to the HomePage
* The underlying layout is specified by json
* @see HomePageService - Service Linked to the HomePage
*/
@ViewModel
public class HomePageViewModel {

View File

@@ -4,9 +4,9 @@
* 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
@@ -33,6 +33,9 @@ import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
import org.apache.isis.applib.services.i18n.TranslatableString;
import org.apache.isis.applib.util.ObjectContracts;
/**
* Definition of a Simple Object
*/
@javax.jdo.annotations.PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "simple",
table = "SimpleObject")
@javax.jdo.annotations.DatastoreIdentity(
@@ -53,7 +56,7 @@ public class SimpleObject implements Comparable<SimpleObject> {
// region > name (property)
private String name;
// region > identificatiom
public TranslatableString title() {
return TranslatableString.tr("Object: {name}", "name", getName());
@@ -74,6 +77,9 @@ public class SimpleObject implements Comparable<SimpleObject> {
// region > updateName (action)
/**
* 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) {

View File

@@ -4,9 +4,9 @@
* 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
@@ -30,6 +30,9 @@ import org.apache.isis.applib.query.QueryDefault;
import org.apache.isis.applib.services.eventbus.ActionDomainEvent;
import org.apache.isis.applib.services.i18n.TranslatableString;
/**
* Domain Service for Simple Objects
*/
@DomainService(repositoryFor = SimpleObject.class)
@DomainServiceLayout(menuOrder = "10")
public class SimpleObjects {
@@ -69,6 +72,9 @@ public class SimpleObjects {
// endregion
/**
* Create Domain Event on SimpleObjects
*/
// region > create (action)
public static class CreateDomainEvent extends ActionDomainEvent<SimpleObjects> {
public CreateDomainEvent(final SimpleObjects source, final Identifier identifier,

View File

@@ -14,11 +14,14 @@
*/
package domainapp.dom.modules.simple;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Before;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Test for SimpleObject
*/
public class SimpleObjectTest {
SimpleObject simpleObject;
@@ -28,6 +31,9 @@ public class SimpleObjectTest {
simpleObject = new SimpleObject();
}
/**
* Test for Names for SimpleObjects
*/
public static class Name extends SimpleObjectTest {
@Test

View File

@@ -14,10 +14,13 @@
*/
package domainapp.dom.modules.simple;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
import com.google.common.collect.Lists;
import java.util.List;
import org.apache.isis.applib.DomainObjectContainer;
import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
import org.jmock.Expectations;
import org.jmock.Sequence;
import org.jmock.auto.Mock;
@@ -25,12 +28,9 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.apache.isis.applib.DomainObjectContainer;
import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Test for SimpleObjects
*/
public class SimpleObjectsTest {
@Rule
@@ -47,6 +47,9 @@ public class SimpleObjectsTest {
simpleObjects.container = mockContainer;
}
/**
* Test Creation of Simple Objects
*/
public static class Create extends SimpleObjectsTest {
@Test
@@ -77,6 +80,9 @@ public class SimpleObjectsTest {
}
/**
* Test Listing of Simple Objects
*/
public static class ListAll extends SimpleObjectsTest {
@Test