incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1049995 [3/5] - in /incubator/isis/trunk/applib/src: main/java/org/apache/isis/applib/ main/java/org/apache/isis/applib/adapters/ main/java/org/apache/isis/applib/annotation/ main/java/org/apache/isis/applib/clock/ main/java/org/apache/isi...
Date Thu, 16 Dec 2010 14:55:56 GMT
Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionAddToEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionAddToEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionAddToEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionAddToEvent.java Thu Dec 16 14:55:52 2010
@@ -17,39 +17,38 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether a particular object to be added to a collection is valid or not.
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the object is invalid;
- * otherwise the object is valid.
- * 
- * @see CollectionRemoveFromEvent
- */
-public class CollectionAddToEvent extends ValidityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    private final Object proposed;
-
-    public CollectionAddToEvent(final Object source, final Identifier collectionIdentifier, final Object proposed) {
-        super(source, collectionIdentifier);
-        this.proposed = proposed;
-    }
-
-    /**
-     * The object that is being added.
-     * 
-     * @return
-     */
-    public Object getProposed() {
-        return proposed;
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether a particular object to be added to a collection is valid or not.
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the object is invalid; otherwise the object
+ * is valid.
+ * 
+ * @see CollectionRemoveFromEvent
+ */
+public class CollectionAddToEvent extends ValidityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    private final Object proposed;
+
+    public CollectionAddToEvent(final Object source, final Identifier collectionIdentifier, final Object proposed) {
+        super(source, collectionIdentifier);
+        this.proposed = proposed;
+    }
+
+    /**
+     * The object that is being added.
+     * 
+     * @return
+     */
+    @Override
+    public Object getProposed() {
+        return proposed;
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionMethodEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionMethodEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionMethodEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionMethodEvent.java Thu Dec 16 14:55:52 2010
@@ -17,82 +17,75 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents an interaction with a collection object itself.
- * 
- */
-public class CollectionMethodEvent extends AccessEvent {
-
-    private static final long serialVersionUID = 1L;
-    private final Object domainObject;
-    private final String methodName;
-    private final Object[] args;
-    private final Object returnValue;
-
-    public CollectionMethodEvent(
-            final Object source,
-            final Identifier collectionIdentifier,
-            final Object domainObject,
-            final String methodName,
-            final Object[] args,
-            final Object returnValue) {
-        super(source, collectionIdentifier);
-        this.domainObject = domainObject;
-        this.methodName = methodName;
-        this.args = args;
-        this.returnValue = returnValue;
-    }
-
-    /**
-     * The collection object (an instance of a <tt>List</tt> or a <tt>Set</tt> etc) that is the originator
-     * of this event.
-     * 
-     * <p>
-     * The owning domain object is available using {@link #getDomainObject()}.
-     * 
-     * @see #getDomainObject()
-     */
-    @Override
-    public Object getSource() {
-        return super.getSource();
-    }
-
-    /**
-     * The owner of the collection (an instance of <tt>Customer/tt> or <tt>Order</tt>, say).
-     *
-     * @see #getSource()
-     */
-    public Object getDomainObject() {
-        return domainObject;
-    }
-
-    /**
-     * The name of the method invoked on this collection, for example <tt>isEmpty</tt>.
-     * 
-     * @return
-     */
-    public String getMethodName() {
-        return methodName;
-    }
-
-    /**
-     * The arguments with which the collection's {@link #getMethodName() method} was invoked.
-     */
-    public Object[] getArgs() {
-        return args;
-    }
-
-    /**
-     * The return value from the {@link #getMethodName() method} invocation.
-     */
-    public Object getReturnValue() {
-        return returnValue;
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents an interaction with a collection object itself.
+ * 
+ */
+public class CollectionMethodEvent extends AccessEvent {
+
+    private static final long serialVersionUID = 1L;
+    private final Object domainObject;
+    private final String methodName;
+    private final Object[] args;
+    private final Object returnValue;
+
+    public CollectionMethodEvent(final Object source, final Identifier collectionIdentifier, final Object domainObject,
+        final String methodName, final Object[] args, final Object returnValue) {
+        super(source, collectionIdentifier);
+        this.domainObject = domainObject;
+        this.methodName = methodName;
+        this.args = args;
+        this.returnValue = returnValue;
+    }
+
+    /**
+     * The collection object (an instance of a <tt>List</tt> or a <tt>Set</tt> etc) that is the originator of this
+     * event.
+     * 
+     * <p>
+     * The owning domain object is available using {@link #getDomainObject()}.
+     * 
+     * @see #getDomainObject()
+     */
+    @Override
+    public Object getSource() {
+        return super.getSource();
+    }
+
+    /**
+     * The owner of the collection (an instance of <tt>Customer/tt> or <tt>Order</tt>, say).
+     * 
+     * @see #getSource()
+     */
+    public Object getDomainObject() {
+        return domainObject;
+    }
+
+    /**
+     * The name of the method invoked on this collection, for example <tt>isEmpty</tt>.
+     * 
+     * @return
+     */
+    public String getMethodName() {
+        return methodName;
+    }
+
+    /**
+     * The arguments with which the collection's {@link #getMethodName() method} was invoked.
+     */
+    public Object[] getArgs() {
+        return args;
+    }
+
+    /**
+     * The return value from the {@link #getMethodName() method} invocation.
+     */
+    public Object getReturnValue() {
+        return returnValue;
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionRemoveFromEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionRemoveFromEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionRemoveFromEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionRemoveFromEvent.java Thu Dec 16 14:55:52 2010
@@ -17,34 +17,33 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether a particular object to be removed from a collection is valid or not.
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the object is invalid;
- * otherwise the object is valid.
- * 
- * @see CollectionAddToEvent
- */
-public class CollectionRemoveFromEvent extends ValidityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    private final Object proposed;
-
-    public CollectionRemoveFromEvent(final Object source, final Identifier collectionIdentifier, final Object proposed) {
-        super(source, collectionIdentifier);
-        this.proposed = proposed;
-    }
-
-    public Object getProposed() {
-        return proposed;
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether a particular object to be removed from a collection is valid or not.
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the object is invalid; otherwise the object
+ * is valid.
+ * 
+ * @see CollectionAddToEvent
+ */
+public class CollectionRemoveFromEvent extends ValidityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    private final Object proposed;
+
+    public CollectionRemoveFromEvent(final Object source, final Identifier collectionIdentifier, final Object proposed) {
+        super(source, collectionIdentifier);
+        this.proposed = proposed;
+    }
+
+    @Override
+    public Object getProposed() {
+        return proposed;
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionUsabilityEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionUsabilityEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionUsabilityEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionUsabilityEvent.java Thu Dec 16 14:55:52 2010
@@ -17,25 +17,23 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether a collection is usable or has been disabled.
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the collection is disabled;
- * otherwise collection is enabled.
- */
-public class CollectionUsabilityEvent extends UsabilityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public CollectionUsabilityEvent(final Object source, final Identifier identifier) {
-        super(source, identifier);
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether a collection is usable or has been disabled.
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the collection is disabled; otherwise
+ * collection is enabled.
+ */
+public class CollectionUsabilityEvent extends UsabilityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public CollectionUsabilityEvent(final Object source, final Identifier identifier) {
+        super(source, identifier);
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionVisibilityEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionVisibilityEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionVisibilityEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/CollectionVisibilityEvent.java Thu Dec 16 14:55:52 2010
@@ -17,25 +17,23 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether a collection is visible or has been hidden.
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the collection is invisible;
- * otherwise collection is visible.
- */
-public class CollectionVisibilityEvent extends VisibilityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public CollectionVisibilityEvent(final Object source, final Identifier identifier) {
-        super(source, identifier);
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether a collection is visible or has been hidden.
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the collection is invisible; otherwise
+ * collection is visible.
+ */
+public class CollectionVisibilityEvent extends VisibilityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public CollectionVisibilityEvent(final Object source, final Identifier identifier) {
+        super(source, identifier);
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/InteractionEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/InteractionEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/InteractionEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/InteractionEvent.java Thu Dec 16 14:55:52 2010
@@ -17,156 +17,150 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import java.util.EventObject;
-
-import org.apache.isis.applib.Identifier;
-import org.apache.isis.applib.util.NameUtils;
-
-
-/**
- * Represents an interaction with a domain object or a particular feature (property, collection, action) of a
- * domain object.
- * 
- * <p>
- * Many of the interactions are checks for {@link VisibilityEvent visibility},
- * {@link UsabilityEvent usability} and {@link ValidityEvent validity}.
- */
-public abstract class InteractionEvent extends EventObject {
-
-    private static final long serialVersionUID = 1L;
-
-    private final Identifier identifier;
-    private String reason;
-    private Class<?> advisorClass;
-
-    public InteractionEvent(final Object source, final Identifier identifier) {
-        super(source);
-        this.identifier = identifier;
-    }
-
-
-    /**
-     * The domain object (pojo) against which the interaction occurred.
-     */
-    @Override
-    public Object getSource() {
-        return super.getSource();
-    }
-
-    /**
-     * The {@link Identifier} of the feature of the object being interacted with.
-     * 
-     * <p>
-     * Will be consistent with the subclass of {@link InteractionEvent}. So for example a
-     * {@link PropertyModifyEvent} will have an {@link Identifier} that identifies the property being
-     * modified.
-     * 
-     * @return
-     */
-    public Identifier getIdentifier() {
-        return identifier;
-    }
-
-    /**
-     * Convenience method that returns the {@link Identifier#getClassName() class name} of the
-     * {@link #getIdentifier() identifier}.
-     * 
-     * @see #getIdentifier
-     */
-    public String getClassName() {
-        return identifier.getClassName();
-    }
-
-    /**
-     * As per {@link #getClassName()}, but {@link NameUtils#naturalName(String) naturalized}.
-     */
-    public String getClassNaturalName() {
-        return NameUtils.naturalName(getClassName());
-    }
-
-    /**
-     * Convenience method that returns the {@link Identifier#getMemberName() member name} of the
-     * {@link #getIdentifier() identifier}.
-     * 
-     * @see #getIdentifier
-     */
-    public String getMemberName() {
-        return identifier.getMemberName();
-    }
-
-    /**
-     * As per {@link #getMemberName()}, but naturalized.
-     */
-    public String getMemberNaturalName() {
-        return NameUtils.naturalName(getMemberName());
-    }
-
-    /**
-     * Convenience method that returns the {@link Identifier#getClassName() class name} of the
-     * {@link #getIdentifier() identifier}.
-     */
-    public String[] getMemberParameterNames() {
-        return identifier.getMemberParameterNames();
-    }
-
-    /**
-     * As per {@link #getMemberParameterName()}, but naturalized.
-     */
-    public String[] getMemberParameterNaturalNames() {
-        return NameUtils.naturalNames(getMemberParameterNames());
-    }
-
-    /**
-     * The reason, if any, that this interaction may have been vetoed or otherwise disallowed.
-     * 
-     * <p>
-     * Intended to be {@link #setReason(String) set} as a result of consulting one of the facets.
-     * 
-     * @return
-     */
-    public String getReason() {
-        return reason;
-    }
-
-    /**
-     * The class of the (first) advisor, if any, that provided the {@link #getReason() reason} that this
-     * interaction is {@link #isVeto() vetoed}.
-     * 
-     * @return
-     */
-    public Class<?> getAdvisorClass() {
-        return advisorClass;
-    }
-
-    /**
-     * Specify the {@link #getReason() reason} that this interaction has been vetoed and the
-     * {@link #getAdvisorClass() class of the advisor} that did the veto.
-     */
-    public void advised(final String reason, final Class<?> advisorClass) {
-        this.reason = reason;
-        this.advisorClass = advisorClass;
-    }
-
-    /**
-     * Whether this interaction has been vetoed (meaning that {@link #getReason()} and
-     * {@link #getAdvisorClass()} will both be non-<tt>null</tt> and the {@link #getReason() reason}
-     * non-empty.)
-     * 
-     * <p>
-     * The interpretation of this depends on the subclass:
-     * <ul>
-     * <li>for {@link VisibilityEvent}, a veto means that the feature (property, collection, action) is
-     * hidden</li>
-     * <li>for {@link UsabilityEvent}, a veto means that the feature is disabled</li>
-     * <li>for {@link ValidityEvent}, a veto means that the proposed modification (property value, object
-     * added/removed, action argument) is invalid</li>
-     * </ul>
-     */
-    public boolean isVeto() {
-        return getReason() != null && getReason().length() > 0;
-    }
-
-}
+import java.util.EventObject;
+
+import org.apache.isis.applib.Identifier;
+import org.apache.isis.applib.util.NameUtils;
+
+/**
+ * Represents an interaction with a domain object or a particular feature (property, collection, action) of a domain
+ * object.
+ * 
+ * <p>
+ * Many of the interactions are checks for {@link VisibilityEvent visibility}, {@link UsabilityEvent usability} and
+ * {@link ValidityEvent validity}.
+ */
+public abstract class InteractionEvent extends EventObject {
+
+    private static final long serialVersionUID = 1L;
+
+    private final Identifier identifier;
+    private String reason;
+    private Class<?> advisorClass;
+
+    public InteractionEvent(final Object source, final Identifier identifier) {
+        super(source);
+        this.identifier = identifier;
+    }
+
+    /**
+     * The domain object (pojo) against which the interaction occurred.
+     */
+    @Override
+    public Object getSource() {
+        return super.getSource();
+    }
+
+    /**
+     * The {@link Identifier} of the feature of the object being interacted with.
+     * 
+     * <p>
+     * Will be consistent with the subclass of {@link InteractionEvent}. So for example a {@link PropertyModifyEvent}
+     * will have an {@link Identifier} that identifies the property being modified.
+     * 
+     * @return
+     */
+    public Identifier getIdentifier() {
+        return identifier;
+    }
+
+    /**
+     * Convenience method that returns the {@link Identifier#getClassName() class name} of the {@link #getIdentifier()
+     * identifier}.
+     * 
+     * @see #getIdentifier
+     */
+    public String getClassName() {
+        return identifier.getClassName();
+    }
+
+    /**
+     * As per {@link #getClassName()}, but {@link NameUtils#naturalName(String) naturalized}.
+     */
+    public String getClassNaturalName() {
+        return NameUtils.naturalName(getClassName());
+    }
+
+    /**
+     * Convenience method that returns the {@link Identifier#getMemberName() member name} of the
+     * {@link #getIdentifier() identifier}.
+     * 
+     * @see #getIdentifier
+     */
+    public String getMemberName() {
+        return identifier.getMemberName();
+    }
+
+    /**
+     * As per {@link #getMemberName()}, but naturalized.
+     */
+    public String getMemberNaturalName() {
+        return NameUtils.naturalName(getMemberName());
+    }
+
+    /**
+     * Convenience method that returns the {@link Identifier#getClassName() class name} of the {@link #getIdentifier()
+     * identifier}.
+     */
+    public String[] getMemberParameterNames() {
+        return identifier.getMemberParameterNames();
+    }
+
+    /**
+     * As per {@link #getMemberParameterName()}, but naturalized.
+     */
+    public String[] getMemberParameterNaturalNames() {
+        return NameUtils.naturalNames(getMemberParameterNames());
+    }
+
+    /**
+     * The reason, if any, that this interaction may have been vetoed or otherwise disallowed.
+     * 
+     * <p>
+     * Intended to be {@link #setReason(String) set} as a result of consulting one of the facets.
+     * 
+     * @return
+     */
+    public String getReason() {
+        return reason;
+    }
+
+    /**
+     * The class of the (first) advisor, if any, that provided the {@link #getReason() reason} that this interaction is
+     * {@link #isVeto() vetoed}.
+     * 
+     * @return
+     */
+    public Class<?> getAdvisorClass() {
+        return advisorClass;
+    }
+
+    /**
+     * Specify the {@link #getReason() reason} that this interaction has been vetoed and the {@link #getAdvisorClass()
+     * class of the advisor} that did the veto.
+     */
+    public void advised(final String reason, final Class<?> advisorClass) {
+        this.reason = reason;
+        this.advisorClass = advisorClass;
+    }
+
+    /**
+     * Whether this interaction has been vetoed (meaning that {@link #getReason()} and {@link #getAdvisorClass()} will
+     * both be non-<tt>null</tt> and the {@link #getReason() reason} non-empty.)
+     * 
+     * <p>
+     * The interpretation of this depends on the subclass:
+     * <ul>
+     * <li>for {@link VisibilityEvent}, a veto means that the feature (property, collection, action) is hidden</li>
+     * <li>for {@link UsabilityEvent}, a veto means that the feature is disabled</li>
+     * <li>for {@link ValidityEvent}, a veto means that the proposed modification (property value, object added/removed,
+     * action argument) is invalid</li>
+     * </ul>
+     */
+    public boolean isVeto() {
+        return getReason() != null && getReason().length() > 0;
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ObjectTitleEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ObjectTitleEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ObjectTitleEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ObjectTitleEvent.java Thu Dec 16 14:55:52 2010
@@ -17,31 +17,29 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents an access (reading) of an object's title.
- * 
- * <p>
- * The {@link #getReason()} will always be <tt>null</tt>; access is always allowed.
- */
-public class ObjectTitleEvent extends AccessEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    private final String title;
-
-    public ObjectTitleEvent(final Object source, final Identifier classIdentifier, final String title) {
-        super(source, classIdentifier);
-        this.title = title;
-    }
-
-    public String getTitle() {
-        return title;
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents an access (reading) of an object's title.
+ * 
+ * <p>
+ * The {@link #getReason()} will always be <tt>null</tt>; access is always allowed.
+ */
+public class ObjectTitleEvent extends AccessEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    private final String title;
+
+    public ObjectTitleEvent(final Object source, final Identifier classIdentifier, final String title) {
+        super(source, classIdentifier);
+        this.title = title;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ObjectValidityEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ObjectValidityEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ObjectValidityEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ObjectValidityEvent.java Thu Dec 16 14:55:52 2010
@@ -17,30 +17,28 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether the current values of the properties/collections of an object are valid
- * (for example, prior to saving that object).
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the object is invalid,
- * otherwise ok.
- */
-public class ObjectValidityEvent extends ValidityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public ObjectValidityEvent(final Object source, final Identifier classIdentifier) {
-        super(source, classIdentifier);
-    }
-
-	public Object getProposed() {
-		return getSource();
-	}
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether the current values of the properties/collections of an object are valid (for
+ * example, prior to saving that object).
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the object is invalid, otherwise ok.
+ */
+public class ObjectValidityEvent extends ValidityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public ObjectValidityEvent(final Object source, final Identifier classIdentifier) {
+        super(source, classIdentifier);
+    }
+
+    @Override
+    public Object getProposed() {
+        return getSource();
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ParseValueEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ParseValueEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ParseValueEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ParseValueEvent.java Thu Dec 16 14:55:52 2010
@@ -17,46 +17,44 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether the proposed values of the value type is valid.
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the proposed value is invalid,
- * otherwise the new value is acceptable.
- */
-public class ParseValueEvent extends ValidityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-	private static Object coalesce(final Object source, final String proposed) {
-		return source != null?source:proposed;
-	}
-
-	private final String proposed;
-
-    public ParseValueEvent(final Object source, final Identifier classIdentifier, final String proposed) {
-        super(coalesce(source, proposed), classIdentifier);
-        this.proposed = proposed;
-    }
-
-
-    /**
-     * Will be the source provided in the {@link #ParseValueEvent(Object, Identifier, String) constructor}
-     * if not null, otherwise will fallback to the proposed value.
-     */
-    @Override
-    public Object getSource() {
-    	return super.getSource();
-    }
-
-	public String getProposed() {
-		return proposed;
-	}
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether the proposed values of the value type is valid.
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the proposed value is invalid, otherwise
+ * the new value is acceptable.
+ */
+public class ParseValueEvent extends ValidityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    private static Object coalesce(final Object source, final String proposed) {
+        return source != null ? source : proposed;
+    }
+
+    private final String proposed;
+
+    public ParseValueEvent(final Object source, final Identifier classIdentifier, final String proposed) {
+        super(coalesce(source, proposed), classIdentifier);
+        this.proposed = proposed;
+    }
+
+    /**
+     * Will be the source provided in the {@link #ParseValueEvent(Object, Identifier, String) constructor} if not null,
+     * otherwise will fallback to the proposed value.
+     */
+    @Override
+    public Object getSource() {
+        return super.getSource();
+    }
+
+    @Override
+    public String getProposed() {
+        return proposed;
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyAccessEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyAccessEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyAccessEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyAccessEvent.java Thu Dec 16 14:55:52 2010
@@ -17,32 +17,30 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents an access (reading) of a property.
- * 
- * <p>
- * Analogous to {@link PropertyModifyEvent}, however the {@link #getReason()} will always be <tt>null</tt>.
- * (If access is not allowed then a {@link PropertyVisibilityEvent} would have been fired).
- */
-public class PropertyAccessEvent extends AccessEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public PropertyAccessEvent(final Object source, final Identifier propertyIdentifier, final Object value) {
-        super(source, propertyIdentifier);
-        this.value = value;
-    }
-
-    private final Object value;
-
-    public Object getValue() {
-        return value;
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents an access (reading) of a property.
+ * 
+ * <p>
+ * Analogous to {@link PropertyModifyEvent}, however the {@link #getReason()} will always be <tt>null</tt>. (If access
+ * is not allowed then a {@link PropertyVisibilityEvent} would have been fired).
+ */
+public class PropertyAccessEvent extends AccessEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public PropertyAccessEvent(final Object source, final Identifier propertyIdentifier, final Object value) {
+        super(source, propertyIdentifier);
+        this.value = value;
+    }
+
+    private final Object value;
+
+    public Object getValue() {
+        return value;
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyModifyEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyModifyEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyModifyEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyModifyEvent.java Thu Dec 16 14:55:52 2010
@@ -17,37 +17,36 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether a particular value for a property is valid or not.
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the value is invalid; otherwise
- * the value is valid.
- */
-public class PropertyModifyEvent extends ValidityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    private final Object proposed;
-
-    public PropertyModifyEvent(final Object source, final Identifier propertyIdentifier, final Object proposed) {
-        super(source, propertyIdentifier);
-        this.proposed = proposed;
-    }
-
-    /**
-     * If <tt>null</tt>, then the property was cleared.
-     * 
-     * @return
-     */
-    public Object getProposed() {
-        return proposed;
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether a particular value for a property is valid or not.
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the value is invalid; otherwise the value
+ * is valid.
+ */
+public class PropertyModifyEvent extends ValidityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    private final Object proposed;
+
+    public PropertyModifyEvent(final Object source, final Identifier propertyIdentifier, final Object proposed) {
+        super(source, propertyIdentifier);
+        this.proposed = proposed;
+    }
+
+    /**
+     * If <tt>null</tt>, then the property was cleared.
+     * 
+     * @return
+     */
+    @Override
+    public Object getProposed() {
+        return proposed;
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyUsabilityEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyUsabilityEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyUsabilityEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyUsabilityEvent.java Thu Dec 16 14:55:52 2010
@@ -17,25 +17,23 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether a property is usable or has been disabled.
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the property is disabled;
- * otherwise property is enabled.
- */
-public class PropertyUsabilityEvent extends UsabilityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public PropertyUsabilityEvent(final Object source, final Identifier propertyIdentifier) {
-        super(source, propertyIdentifier);
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether a property is usable or has been disabled.
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the property is disabled; otherwise
+ * property is enabled.
+ */
+public class PropertyUsabilityEvent extends UsabilityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public PropertyUsabilityEvent(final Object source, final Identifier propertyIdentifier) {
+        super(source, propertyIdentifier);
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyVisibilityEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyVisibilityEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyVisibilityEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/PropertyVisibilityEvent.java Thu Dec 16 14:55:52 2010
@@ -17,25 +17,23 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check as to whether a property is visible or has been hidden.
- * 
- * <p>
- * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the property is invisible;
- * otherwise property is visible.
- */
-public class PropertyVisibilityEvent extends VisibilityEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public PropertyVisibilityEvent(final Object source, final Identifier propertyIdentifier) {
-        super(source, propertyIdentifier);
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check as to whether a property is visible or has been hidden.
+ * 
+ * <p>
+ * If {@link #getReason()} is not <tt>null</tt> then provides the reason why the property is invisible; otherwise
+ * property is visible.
+ */
+public class PropertyVisibilityEvent extends VisibilityEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public PropertyVisibilityEvent(final Object source, final Identifier propertyIdentifier) {
+        super(source, propertyIdentifier);
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ProposedHolderEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ProposedHolderEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ProposedHolderEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ProposedHolderEvent.java Thu Dec 16 14:55:52 2010
@@ -17,17 +17,16 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-/**
- * Makes it easier to process different events that hold a single proposed argument (such as
- * {@link CollectionAddToEvent} and {@link PropertyModifyEvent}).
- */
-public interface ProposedHolderEvent {
-
-    Object getProposed();
-
-    String getMemberNaturalName();
-
-}
+/**
+ * Makes it easier to process different events that hold a single proposed argument (such as
+ * {@link CollectionAddToEvent} and {@link PropertyModifyEvent}).
+ */
+public interface ProposedHolderEvent {
+
+    Object getProposed();
+
+    String getMemberNaturalName();
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/UsabilityEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/UsabilityEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/UsabilityEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/UsabilityEvent.java Thu Dec 16 14:55:52 2010
@@ -17,28 +17,26 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check to determine whether a member of an object is usable or has been disabled.
- * 
- * <p>
- * If {@link #getReason()} is <tt>null</tt>, then is usable; otherwise is disabled.
- * 
- * @see AccessEvent
- * @see VisibilityEvent
- * @see ValidityEvent
- */
-public abstract class UsabilityEvent extends InteractionEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public UsabilityEvent(final Object source, final Identifier identifier) {
-        super(source, identifier);
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check to determine whether a member of an object is usable or has been disabled.
+ * 
+ * <p>
+ * If {@link #getReason()} is <tt>null</tt>, then is usable; otherwise is disabled.
+ * 
+ * @see AccessEvent
+ * @see VisibilityEvent
+ * @see ValidityEvent
+ */
+public abstract class UsabilityEvent extends InteractionEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public UsabilityEvent(final Object source, final Identifier identifier) {
+        super(source, identifier);
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ValidityEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ValidityEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ValidityEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/ValidityEvent.java Thu Dec 16 14:55:52 2010
@@ -17,42 +17,40 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check to determine whether a proposed change is valid.
- * 
- * <p>
- * Multiple subclasses, including:
- * <ul>
- * <li>modifying a property</li>
- * <li>adding to/removing from a collection</li>
- * <li>checking a single argument for an action invocation</li>
- * <li>checking all arguments for an action invocation</li>
- * <li>checking all properties for an object before saving</li>
- * </ul>
- * 
- * <p>
- * If {@link #getReason()} is <tt>null</tt>, then is usable; otherwise is disabled.
- * 
- * @see AccessEvent
- * @see VisibilityEvent
- * @see UsabilityEvent
- */
-public abstract class ValidityEvent extends InteractionEvent implements ProposedHolderEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public ValidityEvent(final Object source, final Identifier identifier) {
-        super(source, identifier);
-    }
-
-    @Override
-    public Object getSource() {
-    	return super.getSource();
-    }
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check to determine whether a proposed change is valid.
+ * 
+ * <p>
+ * Multiple subclasses, including:
+ * <ul>
+ * <li>modifying a property</li>
+ * <li>adding to/removing from a collection</li>
+ * <li>checking a single argument for an action invocation</li>
+ * <li>checking all arguments for an action invocation</li>
+ * <li>checking all properties for an object before saving</li>
+ * </ul>
+ * 
+ * <p>
+ * If {@link #getReason()} is <tt>null</tt>, then is usable; otherwise is disabled.
+ * 
+ * @see AccessEvent
+ * @see VisibilityEvent
+ * @see UsabilityEvent
+ */
+public abstract class ValidityEvent extends InteractionEvent implements ProposedHolderEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public ValidityEvent(final Object source, final Identifier identifier) {
+        super(source, identifier);
+    }
+
+    @Override
+    public Object getSource() {
+        return super.getSource();
+    }
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/VisibilityEvent.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/VisibilityEvent.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/VisibilityEvent.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/VisibilityEvent.java Thu Dec 16 14:55:52 2010
@@ -17,28 +17,26 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.events;
 
-package org.apache.isis.applib.events;
-
-import org.apache.isis.applib.Identifier;
-
-
-/**
- * Represents a check to determine whether a member of an object is visible or has been hidden.
- * 
- * <p>
- * If {@link #getReason()} is <tt>null</tt>, then is usable; otherwise is invisible.
- * 
- * @see AccessEvent
- * @see UsabilityEvent
- * @see ValidityEvent
- */
-public abstract class VisibilityEvent extends InteractionEvent {
-
-    private static final long serialVersionUID = 1L;
-
-    public VisibilityEvent(final Object source, final Identifier identifier) {
-        super(source, identifier);
-    }
-
-}
+import org.apache.isis.applib.Identifier;
+
+/**
+ * Represents a check to determine whether a member of an object is visible or has been hidden.
+ * 
+ * <p>
+ * If {@link #getReason()} is <tt>null</tt>, then is usable; otherwise is invisible.
+ * 
+ * @see AccessEvent
+ * @see UsabilityEvent
+ * @see ValidityEvent
+ */
+public abstract class VisibilityEvent extends InteractionEvent {
+
+    private static final long serialVersionUID = 1L;
+
+    public VisibilityEvent(final Object source, final Identifier identifier) {
+        super(source, identifier);
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/package-info.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/package-info.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/package-info.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/events/package-info.java Thu Dec 16 14:55:52 2010
@@ -17,15 +17,14 @@
  *  under the License.
  */
 
-
-/**
- * Interaction events, corresponding to gestures in the user interface.
- * 
- * <p>
- * The applib does not provide any means of listening to these events directly, and typically
- * domain objects would not be interested in them either.  However, they can be subscribed to
- * using the wrapper progmodel (which effectively provides a drop-in replacement for the
- * {@link org.apache.isis.applib.DomainObjectContainer} that implements the <tt>WrapperFactory</tt>
- * interface).  
- */
+/**
+ * Interaction events, corresponding to gestures in the user interface.
+ * 
+ * <p>
+ * The applib does not provide any means of listening to these events directly, and typically
+ * domain objects would not be interested in them either.  However, they can be subscribed to
+ * using the wrapper progmodel (which effectively provides a drop-in replacement for the
+ * {@link org.apache.isis.applib.DomainObjectContainer} that implements the <tt>WrapperFactory</tt>
+ * interface).  
+ */
 package org.apache.isis.applib.events;
\ No newline at end of file

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/AbstractFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/AbstractFixture.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/AbstractFixture.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/AbstractFixture.java Thu Dec 16 14:55:52 2010
@@ -17,134 +17,144 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.fixtures;
 
-package org.apache.isis.applib.fixtures;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
 import org.apache.isis.applib.fixtures.switchuser.SwitchUserService;
 import org.apache.isis.applib.fixtures.switchuser.SwitchUserServiceAware;
-
-
-/**
- * Convenience class for creating fixtures.
- * 
- * <p>
- * Most subclasses will simply override {@link #install()} to setup objects.  In addition though
- * fixtures may also:
- * <ul>
- * <li>change the date/time within the course of fixture installation, using {@link #setDate(int, int, int)} and
- *     {@link #setTime(int, int)}.
- * <li>change the current user using {@link #switchUser(String, String...)}.
- * <li>create composite fixtures using {@link #addFixture(Object)}.
- * <li>search for existing objects using {@link #firstMatch(Class, org.apache.isis.applib.Filter)} or
- * {@link #uniqueMatch(Class, org.apache.isis.applib.Filter)} (and various overloads thereof).
- * </ul>
- * 
- * <p>
- * To automatically logon for the demo/test, use {@link LogonFixture}. 
- */
-public abstract class AbstractFixture extends BaseFixture implements CompositeFixture, SwitchUserServiceAware {
-	
-    private final List<Object> fixtures = new ArrayList<Object>();
 
-    /////////////////////////////////////////////////////////////////
+/**
+ * Convenience class for creating fixtures.
+ * 
+ * <p>
+ * Most subclasses will simply override {@link #install()} to setup objects. In addition though fixtures may also:
+ * <ul>
+ * <li>change the date/time within the course of fixture installation, using {@link #setDate(int, int, int)} and
+ * {@link #setTime(int, int)}.
+ * <li>change the current user using {@link #switchUser(String, String...)}.
+ * <li>create composite fixtures using {@link #addFixture(Object)}.
+ * <li>search for existing objects using {@link #firstMatch(Class, org.apache.isis.applib.Filter)} or
+ * {@link #uniqueMatch(Class, org.apache.isis.applib.Filter)} (and various overloads thereof).
+ * </ul>
+ * 
+ * <p>
+ * To automatically logon for the demo/test, use {@link LogonFixture}.
+ */
+public abstract class AbstractFixture extends BaseFixture implements CompositeFixture, SwitchUserServiceAware {
+
+    private final List<Object> fixtures = new ArrayList<Object>();
+
+    // ///////////////////////////////////////////////////////////////
     // Constructor
-    /////////////////////////////////////////////////////////////////
-
-	/**
-	 * Assumed to be {@link FixtureType#DOMAIN_OBJECTS data} fixture.
-	 */
-    public AbstractFixture() {
-    	this(FixtureType.DOMAIN_OBJECTS);
-    }
-
-    public AbstractFixture(final FixtureType fixtureType) {
-    	super(fixtureType);
-    }
-
-    /////////////////////////////////////////////////////////////////
+    // ///////////////////////////////////////////////////////////////
+
+    /**
+     * Assumed to be {@link FixtureType#DOMAIN_OBJECTS data} fixture.
+     */
+    public AbstractFixture() {
+        this(FixtureType.DOMAIN_OBJECTS);
+    }
+
+    public AbstractFixture(final FixtureType fixtureType) {
+        super(fixtureType);
+    }
+
+    // ///////////////////////////////////////////////////////////////
     // install() hook (for non-composites)
-    /////////////////////////////////////////////////////////////////
-
-    /**
-     * Most subclasses will override this method, but composite fixtures
-     * should instead call {@link #addFixture(Object)} in their constructor.
-     */
+    // ///////////////////////////////////////////////////////////////
+
+    /**
+     * Most subclasses will override this method, but composite fixtures should instead call {@link #addFixture(Object)}
+     * in their constructor.
+     */
     @Override
-    public void install() {}
+    public void install() {
+    }
 
-    /////////////////////////////////////////////////////////////////
+    // ///////////////////////////////////////////////////////////////
     // CompositeFixture impl
-    /////////////////////////////////////////////////////////////////
-
-    /**
-     * Allows the fixture to act as a composite (call within constructor).
-     */
-    protected void addFixture(final Object fixture) {
-        fixtures.add(fixture);
-    }
-
-    /**
-     * Returns an array of any fixtures that have been {@link #addFixture(Object) added}.
-     */
+    // ///////////////////////////////////////////////////////////////
+
+    /**
+     * Allows the fixture to act as a composite (call within constructor).
+     */
+    protected void addFixture(final Object fixture) {
+        fixtures.add(fixture);
+    }
+
+    /**
+     * Returns an array of any fixtures that have been {@link #addFixture(Object) added}.
+     */
     @Override
-    public List<Object> getFixtures() {
-        return Collections.unmodifiableList(fixtures);
-    }
-
+    public List<Object> getFixtures() {
+        return Collections.unmodifiableList(fixtures);
+    }
 
-    /////////////////////////////////////////////////////////////////
+    // ///////////////////////////////////////////////////////////////
     // Date and time
-    /////////////////////////////////////////////////////////////////
-    
-    /**
-     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize() initialized}.
-     */
-    public void earlierDate(final int years, final int months, final int days) {
-    	if (shouldIgnoreCallBecauseNoClockSetup("earlierDate()")) return;
-        clock.addDate(-years, -months, -days);
-    }
-
-    /**
-     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize() initialized}.
-     */
-	public void earlierTime(final int hours, final int minutes) {
-    	if (shouldIgnoreCallBecauseNoClockSetup("earlierTime()")) return;
-        clock.addTime(-hours, -minutes);
-    }
-
-    /**
-     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize() initialized}.
-     */
-    public void laterDate(final int years, final int months, final int days) {
-    	if (shouldIgnoreCallBecauseNoClockSetup("laterDate()")) return;
-        clock.addDate(years, months, days);
-    }
-
-    /**
-     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize() initialized}.
-     */
-    public void laterTime(final int hours, final int minutes) {
-    	if (shouldIgnoreCallBecauseNoClockSetup("laterTime()")) return;
-        clock.addTime(hours, minutes);
-    }
-
-    // {{ User
-    protected void switchUser(final String username, final String... roles) {
-        switchUserService.switchUser(username, roles);
-    }
-    // }}
-
-
-    // {{ Injected: SwitchUserService
-	private SwitchUserService switchUserService;
+    // ///////////////////////////////////////////////////////////////
+
+    /**
+     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize()
+     * initialized}.
+     */
+    public void earlierDate(final int years, final int months, final int days) {
+        if (shouldIgnoreCallBecauseNoClockSetup("earlierDate()")) {
+            return;
+        }
+        clock.addDate(-years, -months, -days);
+    }
+
+    /**
+     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize()
+     * initialized}.
+     */
+    public void earlierTime(final int hours, final int minutes) {
+        if (shouldIgnoreCallBecauseNoClockSetup("earlierTime()")) {
+            return;
+        }
+        clock.addTime(-hours, -minutes);
+    }
+
+    /**
+     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize()
+     * initialized}.
+     */
+    public void laterDate(final int years, final int months, final int days) {
+        if (shouldIgnoreCallBecauseNoClockSetup("laterDate()")) {
+            return;
+        }
+        clock.addDate(years, months, days);
+    }
+
+    /**
+     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize()
+     * initialized}.
+     */
+    public void laterTime(final int hours, final int minutes) {
+        if (shouldIgnoreCallBecauseNoClockSetup("laterTime()")) {
+            return;
+        }
+        clock.addTime(hours, minutes);
+    }
+
+    // {{ User
+    protected void switchUser(final String username, final String... roles) {
+        switchUserService.switchUser(username, roles);
+    }
+
+    // }}
+
+    // {{ Injected: SwitchUserService
+    private SwitchUserService switchUserService;
+
     @Override
-    public void setService(final SwitchUserService fixtureService) {
-        this.switchUserService = fixtureService;
-    }
-    // }}
-
-}
+    public void setService(final SwitchUserService fixtureService) {
+        this.switchUserService = fixtureService;
+    }
+    // }}
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/BaseFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/BaseFixture.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/BaseFixture.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/BaseFixture.java Thu Dec 16 14:55:52 2010
@@ -3,26 +3,26 @@ package org.apache.isis.applib.fixtures;
 import org.apache.isis.applib.AbstractContainedObject;
 import org.apache.isis.applib.clock.Clock;
 
-abstract class BaseFixture extends AbstractContainedObject implements InstallableFixture  {
+abstract class BaseFixture extends AbstractContainedObject implements InstallableFixture {
 
     private final FixtureType fixtureType;
     FixtureClock clock = null;
 
-    public BaseFixture(FixtureType fixtureType) {
+    public BaseFixture(final FixtureType fixtureType) {
         this.fixtureType = fixtureType;
         try {
             clock = FixtureClock.initialize();
-        } catch(IllegalStateException ex) {
+        } catch (final IllegalStateException ex) {
             clock = null;
             System.err.println(ex.getMessage());
             System.err.println("calls to change date or time will be ignored");
         }
     }
 
-    ///////////////////////////////////////////////////
+    // /////////////////////////////////////////////////
     // FixtureType
-    ///////////////////////////////////////////////////
-    
+    // /////////////////////////////////////////////////
+
     /**
      * As specified in constructor.
      */
@@ -31,28 +31,32 @@ abstract class BaseFixture extends Abstr
         return fixtureType;
     }
 
-
-    ///////////////////////////////////////////////////
+    // /////////////////////////////////////////////////
     // FixtureClock
-    ///////////////////////////////////////////////////
+    // /////////////////////////////////////////////////
 
     /**
-     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize() initialized}.
+     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize()
+     * initialized}.
      */
     public void setDate(final int year, final int month, final int day) {
-        if (shouldIgnoreCallBecauseNoClockSetup("setDate()")) return;
+        if (shouldIgnoreCallBecauseNoClockSetup("setDate()")) {
+            return;
+        }
         clock.setDate(year, month, day);
     }
 
     /**
-     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize() initialized}.
+     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize()
+     * initialized}.
      */
     public void setTime(final int hour, final int minute) {
-        if (shouldIgnoreCallBecauseNoClockSetup("setTime()")) return;
+        if (shouldIgnoreCallBecauseNoClockSetup("setTime()")) {
+            return;
+        }
         clock.setTime(hour, minute);
     }
 
-
     /**
      * The {@link Clock} singleton, downcast to {@link FixtureClock}.
      * 
@@ -64,19 +68,22 @@ abstract class BaseFixture extends Abstr
     }
 
     /**
-     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize() initialized}.
+     * Will print warning message and do nothing if {@link FixtureClock} could not be {@link FixtureClock#initialize()
+     * initialized}.
      */
     public void resetClock() {
-    	if (shouldIgnoreCallBecauseNoClockSetup("resetClock()")) return;
+        if (shouldIgnoreCallBecauseNoClockSetup("resetClock()")) {
+            return;
+        }
         clock.reset();
     }
 
-    boolean shouldIgnoreCallBecauseNoClockSetup(String methodName) {
-    	if (clock == null) {
-    		System.err.println("clock not set, call to " + methodName + " ignored");
-    		return true;
-    	}
-    	return false;
+    boolean shouldIgnoreCallBecauseNoClockSetup(final String methodName) {
+        if (clock == null) {
+            System.err.println("clock not set, call to " + methodName + " ignored");
+            return true;
+        }
+        return false;
     }
     // }}
 

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/CompositeFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/CompositeFixture.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/CompositeFixture.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/CompositeFixture.java Thu Dec 16 14:55:52 2010
@@ -17,12 +17,11 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.fixtures;
 
-package org.apache.isis.applib.fixtures;
-
-import java.util.List;
-
-public interface CompositeFixture {
-
-	public List<Object> getFixtures();
-}
+import java.util.List;
+
+public interface CompositeFixture {
+
+    public List<Object> getFixtures();
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/DateFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/DateFixture.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/DateFixture.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/DateFixture.java Thu Dec 16 14:55:52 2010
@@ -17,69 +17,70 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.fixtures;
+
+/**
+ * Sole purpose is to set the date/time while object fixtures are being installed.
+ * 
+ * <p>
+ * An alternative is to change the date using {@link AbstractFixture#setDate(int, int, int)} and
+ * {@link AbstractFixture#setTime(int, int)}.
+ * 
+ * <p>
+ * Note that the last date set <i>will</i> remain in force for the application itself. To revert to the current time,
+ * have a fixture at the end call {@link #resetClock()}.
+ * 
+ * @see SwitchUserFixture
+ */
+public class DateFixture extends BaseFixture {
 
-package org.apache.isis.applib.fixtures;
-
-/**
- * Sole purpose is to set the date/time while object fixtures are being installed.
- * 
- * <p>
- * An alternative is to change the date using {@link AbstractFixture#setDate(int, int, int)} and
- * {@link AbstractFixture#setTime(int, int)}.
- * 
- * <p>
- * Note that the last date set <i>will</i> remain in force for the application itself.  To revert to the
- * current time, have a fixture at the end call {@link #resetClock()}.
- * 
- * @see SwitchUserFixture
- */
-public class DateFixture extends BaseFixture {
-
     public DateFixture(final int year, final int month, final int day, final int hour, final int minutes) {
-        super(FixtureType.OTHER);
-        this.year = year;
-        this.month = month;
-        this.day = day;
-        this.hour = hour;
-        this.minute = minutes;
-    }
-
-    public DateFixture(final int year, final int month, final int day) {
-        this(year, month, day, 0, 0);
-    }
-
-
-    private final int year;
-
-    public int getYear() {
-        return year;
-    }
-    private final int month;
-
-    public int getMonth() {
-        return month;
-    }
-    private final int day;
-
-    public int getDay() {
-        return day;
-    }
-    private final int hour;
-
-    public int getHour() {
-        return hour;
-    }
-    private final int minute;
-
-    public int getMinute() {
-        return minute;
-    }
+        super(FixtureType.OTHER);
+        this.year = year;
+        this.month = month;
+        this.day = day;
+        this.hour = hour;
+        this.minute = minutes;
+    }
+
+    public DateFixture(final int year, final int month, final int day) {
+        this(year, month, day, 0, 0);
+    }
+
+    private final int year;
+
+    public int getYear() {
+        return year;
+    }
+
+    private final int month;
+
+    public int getMonth() {
+        return month;
+    }
+
+    private final int day;
+
+    public int getDay() {
+        return day;
+    }
+
+    private final int hour;
+
+    public int getHour() {
+        return hour;
+    }
+
+    private final int minute;
+
+    public int getMinute() {
+        return minute;
+    }
 
-    
     @Override
-    public void install() {
-        setDate(year, month, day);
-        setTime(hour, minute);
+    public void install() {
+        setDate(year, month, day);
+        setTime(hour, minute);
     }
 
-}
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/FixtureClock.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/FixtureClock.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/FixtureClock.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/FixtureClock.java Thu Dec 16 14:55:52 2010
@@ -17,7 +17,6 @@
  *  under the License.
  */
 
-
 package org.apache.isis.applib.fixtures;
 
 import java.util.Calendar;
@@ -25,7 +24,6 @@ import java.util.TimeZone;
 
 import org.apache.isis.applib.clock.Clock;
 
-
 /**
  * This clock, for use by fixtures, can be set to specific time.
  * 
@@ -33,13 +31,13 @@ import org.apache.isis.applib.clock.Cloc
  * If not set it will provide the time provided by the system clock.
  * 
  * <p>
- * Note that - by design - it does not provide any mechanism to advance the time (eg automatic ticking of the
- * clock). That is, the time returned is always explicitly under the control of the programmer (it can be
- * moved forward or back as required).
+ * Note that - by design - it does not provide any mechanism to advance the time (eg automatic ticking of the clock).
+ * That is, the time returned is always explicitly under the control of the programmer (it can be moved forward or back
+ * as required).
  */
 public class FixtureClock extends Clock {
     private static final TimeZone UTC_TIME_ZONE;
-    
+
     static {
         TimeZone tempTimeZone = TimeZone.getTimeZone("Etc/UTC");
         if (tempTimeZone == null) {
@@ -48,58 +46,53 @@ public class FixtureClock extends Clock 
         UTC_TIME_ZONE = tempTimeZone;
     }
 
-    
     /**
-     * Configures the system to use a FixtureClock rather than the in-built system clock.  
-     * Can be called multiple times.
+     * Configures the system to use a FixtureClock rather than the in-built system clock. Can be called multiple times.
      * 
      * <p>
      * Must call before any other call to {@link Clock#getInstance()}.
      * 
-     * @throws IllegalStateException if Clock singleton already initialized with some other implementation.
+     * @throws IllegalStateException
+     *             if Clock singleton already initialized with some other implementation.
      */
     public synchronized static FixtureClock initialize() {
-    	if (!isInitialized() || 
-    		!(getInstance() instanceof FixtureClock)) { 
-    		// installs the FixtureClock as the Clock singleton via the Clock's constructor
-    		// if was initialized, then will replace.
-    		// (if non-replaceable, then superclass will throw exception for us.
-    		new FixtureClock(); 
-    	}
+        if (!isInitialized() || !(getInstance() instanceof FixtureClock)) {
+            // installs the FixtureClock as the Clock singleton via the Clock's constructor
+            // if was initialized, then will replace.
+            // (if non-replaceable, then superclass will throw exception for us.
+            new FixtureClock();
+        }
         return (FixtureClock) getInstance();
     }
 
     /**
      * Makes {@link Clock#remove()} visible.
      */
-    public static boolean remove()  {
-    	return Clock.remove();
+    public static boolean remove() {
+        return Clock.remove();
     }
 
-
-    
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
     // Constructor
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
 
     // if non-null, then indicates that the time has been explicitly set.
     // Otherwise returns the system time.
     private Calendar calendar = null;
 
+    private FixtureClock() {
+    }
 
-    private FixtureClock() {}
-
-
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
     // hook
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
 
     /**
      * Access via {@link Clock#getTime()}.
      * 
      * <p>
-     * Will just return the system time until {@link #setDate(int, int, int)} or
-     * {@link #setTime(int, int)} (or one of the overloads) has been called.
+     * Will just return the system time until {@link #setDate(int, int, int)} or {@link #setTime(int, int)} (or one of
+     * the overloads) has been called.
      */
     @Override
     protected long time() {
@@ -109,18 +102,16 @@ public class FixtureClock extends Clock 
         return calendar.getTime().getTime();
     }
 
-    
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
     // setting/adjusting time
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
 
     /**
      * Sets the clock to epoch, that is midnight, 1 Jan 1970 UTC.
      * 
      * <p>
-     * This is typically called before either {@link #setDate(int, int, int)} 
-     * (so that time is set to midnight) and/or {@link #setTime(int, int)}
-     * (so that date is set to a well known value).
+     * This is typically called before either {@link #setDate(int, int, int)} (so that time is set to midnight) and/or
+     * {@link #setTime(int, int)} (so that date is set to a well known value).
      */
     public void clear() {
         setupCalendarIfRequired();
@@ -128,8 +119,8 @@ public class FixtureClock extends Clock 
     }
 
     /**
-     * Sets the hours and minutes as specified, and sets the seconds and
-     * milliseconds to zero, but the date portion is left unchanged.
+     * Sets the hours and minutes as specified, and sets the seconds and milliseconds to zero, but the date portion is
+     * left unchanged.
      * 
      * @see #setDate(int, int, int)
      * @see #addTime(int, int)
@@ -159,8 +150,7 @@ public class FixtureClock extends Clock 
      * Adjusts the time by the specified number of hours and minutes.
      * 
      * <p>
-     * Typically called after {@link #setTime(int, int)}, to move the clock
-     * forward or perhaps back.
+     * Typically called after {@link #setTime(int, int)}, to move the clock forward or perhaps back.
      * 
      * @see #addDate(int, int, int)
      */
@@ -174,8 +164,7 @@ public class FixtureClock extends Clock 
      * Adjusts the time by the specified number of years, months or days.
      * 
      * <p>
-     * Typically called after {@link #setDate(int, int, int)}, to move the clock
-     * forward or perhaps back.
+     * Typically called after {@link #setDate(int, int, int)}, to move the clock forward or perhaps back.
      * 
      * @see #addTime(int, int)
      */
@@ -188,15 +177,15 @@ public class FixtureClock extends Clock 
 
     private void setupCalendarIfRequired() {
         if (calendar != null) {
-        	return;
+            return;
         }
         calendar = Calendar.getInstance();
         calendar.setTimeZone(UTC_TIME_ZONE);
     }
 
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
     // reset
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
 
     /**
      * Go back to just returning the system's time.
@@ -205,13 +194,12 @@ public class FixtureClock extends Clock 
         calendar = null;
     }
 
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
     // toString
-    ////////////////////////////////////////////////////
+    // //////////////////////////////////////////////////
 
     @Override
     public String toString() {
-    	return (calendar==null?"System":"Explicitly set") + 
-    			": " + Clock.getTimeAsCalendar().getTime().toString();
+        return (calendar == null ? "System" : "Explicitly set") + ": " + Clock.getTimeAsCalendar().getTime().toString();
     }
 }

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/FixtureType.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/FixtureType.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/FixtureType.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/FixtureType.java Thu Dec 16 14:55:52 2010
@@ -17,46 +17,44 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.fixtures;
 
-package org.apache.isis.applib.fixtures;
-
-/**
- * Enumerates the different types of {@link InstallableFixture fixture}s supported.
- * 
- * @see InstallableFixture#getType()
- */
-public enum FixtureType {
-	/**
-	 * A fixture that installs data (either reference data or operational data)
-	 * into an object store.
-	 * 
-	 * <p>
-	 * Some object stores are in-memory only, in which case these will always want
-	 * fixtures of this type to be installed.  However, for object stores that
-	 * persist the data (such as XML or to an RDBMS), these typically do <i>not</i>
-	 * want data fixtures run (except possibly for the very first time booted to
-	 * initially seed them). 
-	 */
-	DOMAIN_OBJECTS,
-	/**
-	 * Analogous to {@link FixtureType#DATA}, but for fixtures (in particular, the
-	 * {@link PerspectiveFixture}) that are used to setup {@link Profile}s and their
-	 * {@link Perspective}s.
-	 * 
-	 * @see UserProfileService
-	 */
-	USER_PROFILES,
-	/**
-	 * A fixture that neither installs data into the object store nor perspectives
-	 * into the {@link UserProfileService}.
-	 * 
-	 * <p>
-	 * Fixtures of this type are always installed.  Typical examples are:
-	 * <ul>
-	 * <li> composite fixtures that just aggregate other fixtures
-	 * <li> fixtures that set up the date/time (see {@link DateFixture})
-	 * <li> fixtures that specify the user to logon as (see {@link LogonFixture}).
-	 * </ul>
-	 */
-	OTHER;
+import org.apache.isis.applib.fixtures.userprofile.UserProfileService;
+import org.apache.isis.applib.profiles.Perspective;
+import org.apache.isis.applib.profiles.Profile;
+
+/**
+ * Enumerates the different types of {@link InstallableFixture fixture}s supported.
+ * 
+ * @see InstallableFixture#getType()
+ */
+public enum FixtureType {
+    /**
+     * A fixture that installs data (either reference data or operational data) into an object store.
+     * 
+     * <p>
+     * Some object stores are in-memory only, in which case these will always want fixtures of this type to be
+     * installed. However, for object stores that persist the data (such as XML or to an RDBMS), these typically do
+     * <i>not</i> want data fixtures run (except possibly for the very first time booted to initially seed them).
+     */
+    DOMAIN_OBJECTS,
+    /**
+     * Analogous to {@link FixtureType#DATA}, but for fixtures (in particular, the {@link PerspectiveFixture}) that are
+     * used to setup {@link Profile}s and their {@link Perspective}s.
+     * 
+     * @see UserProfileService
+     */
+    USER_PROFILES,
+    /**
+     * A fixture that neither installs data into the object store nor perspectives into the {@link UserProfileService}.
+     * 
+     * <p>
+     * Fixtures of this type are always installed. Typical examples are:
+     * <ul>
+     * <li>composite fixtures that just aggregate other fixtures
+     * <li>fixtures that set up the date/time (see {@link DateFixture})
+     * <li>fixtures that specify the user to logon as (see {@link LogonFixture}).
+     * </ul>
+     */
+    OTHER;
 }
\ No newline at end of file

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/InstallableFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/InstallableFixture.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/InstallableFixture.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/InstallableFixture.java Thu Dec 16 14:55:52 2010
@@ -17,16 +17,15 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.fixtures;
 
-package org.apache.isis.applib.fixtures;
-
-public interface InstallableFixture {
-
-	/**
-	 * Determines whether the fixture will be {@link #install() install}ed, dependent
-	 * on the state of the object (data) store and the user profile store.
-	 */
-	FixtureType getType();
-	
-	public void install();
-}
+public interface InstallableFixture {
+
+    /**
+     * Determines whether the fixture will be {@link #install() install}ed, dependent on the state of the object (data)
+     * store and the user profile store.
+     */
+    FixtureType getType();
+
+    public void install();
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/LogonFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/LogonFixture.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/LogonFixture.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/LogonFixture.java Thu Dec 16 14:55:52 2010
@@ -17,66 +17,61 @@
  *  under the License.
  */
 
+package org.apache.isis.applib.fixtures;
 
-package org.apache.isis.applib.fixtures;
-
 import java.util.List;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
-
-
-/**
- * Indicates that the demo or test should be run as the specified user, with
- * the specified roles.
- * 
- * <p>
- * Note: this fixture does not in itself do anything (its {@link #install()} is a
- * no-op).  However, if present in the fixture list then is &quot;noticed&quot; by the framework,
- * and is used to automatically logon when the framework is booted (providing running in
- * prototype or exploration, not in production).
- * 
- * <p>
- * To change the user during the installation of fixtures, either use {@link SwitchUserFixture}.
- * 
- * @see SwitchUserFixture
- */
-public class LogonFixture implements InstallableFixture {
-
-
-    private final String username;
-    private final List<String> roles;
-    
-    public LogonFixture(final String username, final String... roles) {
-        this(username, Lists.newArrayList(roles));
-    }
-
-    public LogonFixture(final String username, final List<String> roles) {
-        this.username = username;
-        this.roles = ImmutableList.copyOf(roles);
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public List<String> getRoles() {
-        return roles;
-    }
-
+
+/**
+ * Indicates that the demo or test should be run as the specified user, with the specified roles.
+ * 
+ * <p>
+ * Note: this fixture does not in itself do anything (its {@link #install()} is a no-op). However, if present in the
+ * fixture list then is &quot;noticed&quot; by the framework, and is used to automatically logon when the framework is
+ * booted (providing running in prototype or exploration, not in production).
+ * 
+ * <p>
+ * To change the user during the installation of fixtures, either use {@link SwitchUserFixture}.
+ * 
+ * @see SwitchUserFixture
+ */
+public class LogonFixture implements InstallableFixture {
+
+    private final String username;
+    private final List<String> roles;
+
+    public LogonFixture(final String username, final String... roles) {
+        this(username, Lists.newArrayList(roles));
+    }
+
+    public LogonFixture(final String username, final List<String> roles) {
+        this.username = username;
+        this.roles = ImmutableList.copyOf(roles);
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public List<String> getRoles() {
+        return roles;
+    }
+
+    @Override
+    public final void install() {
+        // does nothing; see comments above.
+    }
+
     @Override
-    public final void install() {
-        // does nothing; see comments above.
-    }
-
-	@Override
-    public FixtureType getType() {
-		return FixtureType.OTHER;
-	}
-
-	@Override
-    public String toString() {
-    	return "LogonFixture [user: " + getUsername() + ", roles: " + getRoles() + "]";
-    }
-
-}
+    public FixtureType getType() {
+        return FixtureType.OTHER;
+    }
+
+    @Override
+    public String toString() {
+        return "LogonFixture [user: " + getUsername() + ", roles: " + getRoles() + "]";
+    }
+
+}

Modified: incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/SwitchUserFixture.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/SwitchUserFixture.java?rev=1049995&r1=1049994&r2=1049995&view=diff
==============================================================================
--- incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/SwitchUserFixture.java (original)
+++ incubator/isis/trunk/applib/src/main/java/org/apache/isis/applib/fixtures/SwitchUserFixture.java Thu Dec 16 14:55:52 2010
@@ -17,39 +17,37 @@
  *  under the License.
  */
 
-
-package org.apache.isis.applib.fixtures;
+package org.apache.isis.applib.fixtures;
 
 import java.util.List;
 
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+
 import org.apache.isis.applib.fixtures.switchuser.SwitchUserService;
 import org.apache.isis.applib.fixtures.switchuser.SwitchUserServiceAware;
 
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-/**
- * Sole purpose is to switch the current user while object fixtures are being installed.
- * 
- * <p>
- * An alternative is to switch user using the {@link AbstractFixture#switchUser(String, String...) switchUser} method.
- * 
- * <p>
- * Note that (unlike the otherwise similar {@link DateFixture}) the last user switched to is
- * <i>not</i> used as the logon fixture.  If you want to automatically logon as some user,
- * use the {@link LogonFixture}.
- * 
- * @see DateFixture
- * @see LogonFixture
- */
-public class SwitchUserFixture extends BaseFixture implements SwitchUserServiceAware {
+/**
+ * Sole purpose is to switch the current user while object fixtures are being installed.
+ * 
+ * <p>
+ * An alternative is to switch user using the {@link AbstractFixture#switchUser(String, String...) switchUser} method.
+ * 
+ * <p>
+ * Note that (unlike the otherwise similar {@link DateFixture}) the last user switched to is <i>not</i> used as the
+ * logon fixture. If you want to automatically logon as some user, use the {@link LogonFixture}.
+ * 
+ * @see DateFixture
+ * @see LogonFixture
+ */
+public class SwitchUserFixture extends BaseFixture implements SwitchUserServiceAware {
 
     private final String username;
     private final List<String> roles;
     private SwitchUserService switchUserService;
-
+
     public SwitchUserFixture(final String username, final String... roles) {
-    	this(username, Lists.newArrayList(roles));
+        this(username, Lists.newArrayList(roles));
     }
 
     public SwitchUserFixture(final String username, final List<String> roles) {
@@ -61,19 +59,19 @@ public class SwitchUserFixture extends B
     public String getUsername() {
         return username;
     }
-    
+
     public List<String> getRoles() {
         return roles;
-    }
-
-    @Override
+    }
+
+    @Override
     public void install() {
-        switchUserService.switchUser(username, roles.toArray(new String[]{}));
+        switchUserService.switchUser(username, roles.toArray(new String[] {}));
     }
 
     @Override
-    public void setService(SwitchUserService switchUserService) {
+    public void setService(final SwitchUserService switchUserService) {
         this.switchUserService = switchUserService;
     }
-
-}
+
+}



Mime
View raw message