From portal-commits at lists.jboss.org Fri Jul 4 10:45:35 2008 Content-Type: multipart/mixed; boundary="===============6287334070473462530==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r11296 - modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/model. Date: Fri, 04 Jul 2008 10:45:35 -0400 Message-ID: --===============6287334070473462530== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: julien(a)jboss.com Date: 2008-07-04 10:45:35 -0400 (Fri, 04 Jul 2008) New Revision: 11296 Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/p= resentation/impl/model/ObjectVisit.java Log: refactor object visits for cleaner semantic Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/p= ortal/presentation/impl/model/ObjectVisit.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/= presentation/impl/model/ObjectVisit.java 2008-07-04 14:44:10 UTC (rev 11295) +++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/= presentation/impl/model/ObjectVisit.java 2008-07-04 14:45:35 UTC (rev 11296) @@ -28,7 +28,7 @@ * @author Julien Viet * @version $Revision: 630 $ */ -public class ObjectVisit +public abstract class ObjectVisit { = static ObjectVisit createEvict(UIObjectImpl object) @@ -51,9 +51,33 @@ return new Update(object, children); } = + /** . */ + private final UIObjectImpl object; + + private ObjectVisit(UIObjectImpl object) + { + if (object =3D=3D null) + { + throw new IllegalArgumentException(); + } + + // + this.object =3D object; + } + + public String getObjectId() + { + return object.getId(); + } + + public UIObjectImpl getObject() + { + return object; + } + public static class Skip extends ObjectVisit { - public Skip(UIObjectImpl object) + private Skip(UIObjectImpl object) { super(object); } @@ -65,7 +89,7 @@ /** . */ private final ChildrenVisit children; = - public Load(UIObjectImpl object, ChildrenVisit children) + private Load(UIObjectImpl object, ChildrenVisit children) { super(object); = @@ -85,7 +109,7 @@ /** . */ private final ChildrenVisit children; = - public Update(UIObjectImpl object, ChildrenVisit children) + private Update(UIObjectImpl object, ChildrenVisit children) { super(object); = @@ -101,33 +125,9 @@ = public static class Evict extends ObjectVisit { - public Evict(UIObjectImpl object) + private Evict(UIObjectImpl object) { super(object); } } - - /** . */ - private final UIObjectImpl object; - - public ObjectVisit(UIObjectImpl object) - { - if (object =3D=3D null) - { - throw new IllegalArgumentException(); - } - - // - this.object =3D object; - } - - public String getObjectId() - { - return object.getId(); - } - - public UIObjectImpl getObject() - { - return object; - } } --===============6287334070473462530==--