Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 8700 invoked from network); 10 Aug 2007 17:10:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Aug 2007 17:10:58 -0000 Received: (qmail 48963 invoked by uid 500); 10 Aug 2007 17:10:56 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 48524 invoked by uid 500); 10 Aug 2007 17:10:55 -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 48513 invoked by uid 99); 10 Aug 2007 17:10:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Aug 2007 10:10:55 -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 simon.lessard.3@gmail.com designates 64.233.162.237 as permitted sender) Received: from [64.233.162.237] (HELO nz-out-0506.google.com) (64.233.162.237) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Aug 2007 17:10:51 +0000 Received: by nz-out-0506.google.com with SMTP id r28so375569nza for ; Fri, 10 Aug 2007 10:10:28 -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:mime-version:content-type; b=XZcWgRpqsSvteKoLkMCiwgFAxmGUd+/EPjsI0kpTmZtiGWS/acyT0gtblMuwW8/7JePBiVUKJlq6IV1AQ53vgX+6fXL1iNYkA7WbZQZOpFnLOwvDUp2BOLmqdMo3pMVJT+csDDrWhFBuSNpcWWDfXNUh/MeA/OXJ5hDhckysEHE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=GxyYoAije7YxIoEc5B0He7N95vB8MQYI3gfxWuARlFQZBgN4bJIDJDdXrXK5nzNH86MJofhsoPa1Hi20g+6eida9dfUZyIesLQI44gaCGcfkdqRgqniOeC1vSO6M632mxdL2E4TvMKnLqOD5mxUWigNmzhSgJa1IEwBcCTprgrA= Received: by 10.114.178.1 with SMTP id a1mr2755615waf.1186765828213; Fri, 10 Aug 2007 10:10:28 -0700 (PDT) Received: by 10.114.151.14 with HTTP; Fri, 10 Aug 2007 10:10:28 -0700 (PDT) Message-ID: <254acf980708101010v5132f336k95fa2844177706ef@mail.gmail.com> Date: Fri, 10 Aug 2007 13:10:28 -0400 From: "Simon Lessard" To: MyFaces-Devs Subject: [TRINIDAD] ProcessMenuModel changes MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_164647_31618410.1186765828186" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_164647_31618410.1186765828186 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 ------=_Part_164647_31618410.1186765828186 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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



------=_Part_164647_31618410.1186765828186--