Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 92887 invoked from network); 13 Aug 2007 13:29:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Aug 2007 13:29:01 -0000 Received: (qmail 33070 invoked by uid 500); 13 Aug 2007 13:28:58 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 33028 invoked by uid 500); 13 Aug 2007 13:28:58 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 33017 invoked by uid 99); 13 Aug 2007 13:28:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2007 06:28:58 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dannyjrobinson@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Aug 2007 13:28:50 +0000 Received: by wx-out-0506.google.com with SMTP id s7so1157341wxc for ; Mon, 13 Aug 2007 06:28:29 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=tv4NsC5esNGbN9M2IqtjgkL7c6+OARjcrLOfJRsFNIBoByy8BKQG3gYeij/MSI0WlokHxnoGNaVgamBL9USWDBpVimQC/L0/rFecuDGYR7fTOmpvaMrvUV+0pK70Lg1R/avbUIoCsUda0NdqR9abIAldHqzoPYfa/hP9WFP1zx8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=PhIGjA9Wc878lJ0tZQ3trc/LbY5goNJwkaAej6yt9l12lBW0vArdySTmvWKLl+nIk9n7CTncBXj5JE4iJ8meZdBp9gsYNwMbjcKaR6wzTf1FErCE8JDlDIdALXR9IvEBnZTvhUNDL9bFV+OaNX7xSyE/hqgzvI3qdvb8uEGDosU= Received: by 10.70.51.17 with SMTP id y17mr9549783wxy.1187011708370; Mon, 13 Aug 2007 06:28:28 -0700 (PDT) Received: by 10.70.118.12 with HTTP; Mon, 13 Aug 2007 06:28:28 -0700 (PDT) Message-ID: <5bbf92e70708130628ld3807a9gafb9c4c1e1acbf25@mail.gmail.com> Date: Mon, 13 Aug 2007 09:28:28 -0400 From: "Danny Robinson" To: "MyFaces Development" Subject: Re: [TRINIDAD] ProcessMenuModel changes In-Reply-To: <254acf980708130620g45611a50i6b77362c34be6e4d@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_33760_5366360.1187011708328" References: <254acf980708101010v5132f336k95fa2844177706ef@mail.gmail.com> <254acf980708130620g45611a50i6b77362c34be6e4d@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_33760_5366360.1187011708328 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sorry Simon, I have little/no experience with this part of Trinidad so can't comment. I trust your judgement, so you have my vote if you need it ;-) On 8/13/07, Simon Lessard wrote: > > So I assume it would be +0 for everyone? > > On 8/10/07, Simon Lessard wrote: > > > > Hello everybody, > > > > Currently Trinidad includes a ProcessMenuModel class that contains > > undesirable methods. The complete method list (not including inherited ones) > > is: > > > > - public boolean isImmediate() > > - public boolean isReadOnly() > > - public boolean isVisited() > > - public void clearMaxPath() > > - public void setMaxPathKey(Object maxPathKey) > > - public Object getMaxPathKey() > > > > The methods involving maxPathKey are the ones annoying me the most. > > However, as it's part of the public API we have to keep backward > > compatibility as much as possible. Note also that isReadOnly should not > > named that way as readOnly support was removed from process classes in favor > > of disabled since a readOnly link did not make much sense. > > > > Anyway, I would rather have the following class structure and method > > signatures: > > > > public abstract class ProcessModel > > > > - public abstract boolean isDisabled(); > > - public abstract boolean isImmediate(); > > - public abstract boolean isVisited(); > > - public abstract boolean isNextStepAvailable(); /* Could be > > optional or maybe in a subclass, this would check if there's a step before > > the current one */ > > - public abstract boolean isPreviousStepAvailable(); /* As above > > */ > > - public abstract Object getNextStep(); /* As above */ > > - public abstract Object getPreviousStep(); /* As above */ > > > > public class MaxPathKeyProcessModel extends ProcessModel /* Or a better > > name */ > > > > - Implements all methods using the old ProcessMenuModel code. > > > > @Deprecated > > public class ProcessMenuModel extends MaxPathKeyProcessModel > > > > - Empty class except for isReadOnly() that should return > > super.isDisabled() > > > > > > The structure above would clean up the Model class that really shouldn't > > contain very implementation specific code like the max path key algorithm > > and would allow us to add new ProcessModel classes with more > > functionalities. For example I had one using a mode for step access right > > like: MAX_PLUS_NEXT, MAX, ANY, NEXT_ONLY, etc. > > > > The previous/next step methods could be useful for page templates since > > it would be possible to include the train in the header as well as a > > previous and next step buttons in the page footer in a generic way using the > > very same process model. Note that we might have to also include methods > > like isPreviousVisited(), isPreviousDisabled() and such to fully support > > that. > > > > Opinions, suggestions? > > > > > > Regards, > > > > ~ Simon > > > > > > > > > -- Chordiant Software Inc. www.chordiant.com ------=_Part_33760_5366360.1187011708328 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sorry Simon, I have little/no experience with this part of Trinidad so can't comment.  I trust your judgement, so you have my vote if you need it ;-)

On 8/13/07, Simon Lessard <simon.lessard.3@gmail.com> wrote:
So I assume it would be +0 for everyone?


On 8/10/07, Simon Lessard < simon.lessard.3@gmail.com> wrote:
Hello everybody,

Currently Trinidad includes a ProcessMenuModel class that contains undesirable methods. The complete method list (not including inherited ones) is:
  • public boolean isImmediate()
  • public boolean isReadOnly()
  • public boolean isVisited()
  • public void clearMaxPath()
  • public void setMaxPathKey(Object maxPathKey)
  • public Object getMaxPathKey()
The methods involving maxPathKey are the ones annoying me the most. However, as it's part of the public API we have to keep backward compatibility as much as possible. Note also that isReadOnly should not named that way as readOnly support was removed from process classes in favor of disabled since a readOnly link did not make much sense.

Anyway, I would rather have the following class structure and method signatures:

public abstract class ProcessModel
  • public abstract boolean isDisabled();
  • public abstract boolean isImmediate();
  • public abstract boolean isVisited();
  • public abstract boolean isNextStepAvailable(); /* Could be optional or maybe in a subclass, this would check if there's a step before the current one */
  • public abstract boolean isPreviousStepAvailable(); /* As above */
  • public abstract Object getNextStep(); /* As above */
  • public abstract Object getPreviousStep(); /* As above */
public class MaxPathKeyProcessModel extends ProcessModel /* Or a better name */
  • Implements all methods using the old ProcessMenuModel code.
@Deprecated
public class ProcessMenuModel extends MaxPathKeyProcessModel
  • Empty class except for isReadOnly() that should return super.isDisabled()

The structure above would clean up the Model class that really shouldn't contain very implementation specific code like the max path key algorithm and would allow us to add new ProcessModel classes with more functionalities. For example I had one using a mode for step access right like: MAX_PLUS_NEXT, MAX, ANY, NEXT_ONLY, etc.

The previous/next step methods could be useful for page templates since it would be possible to include the train in the header as well as a previous and next step buttons in the page footer in a generic way using the very same process model. Note that we might have to also include methods like isPreviousVisited(), isPreviousDisabled() and such to fully support that.

Opinions, suggestions?


Regards,

~ Simon







--
Chordiant Software Inc.
www.chordiant.com ------=_Part_33760_5366360.1187011708328--