roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Huber (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (ROL-1997) Switch WeblogEntry's pub status fields (DRAFT, PUBLISHED, PENDING, SCHEDULED) to an enum type
Date Tue, 17 Jun 2014 15:37:06 GMT

    [ https://issues.apache.org/jira/browse/ROL-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14033930#comment-14033930
] 

Greg Huber edited comment on ROL-1997 at 6/17/14 3:36 PM:
----------------------------------------------------------

public boolean isPublished() {
        return getStatus().equals(PUBLISHED);
}

If we have an enum here it would make life more difficult.....I find enums are only useful
for shuffling around parameter checks and alike, as they have no "real" value?
eg

{code:xml}
public static enum ViewTypes {
  EVENT, MANUFACTURER
}

method parameter >  Enum<ViewTypes> viewType

if (viewType != null && viewType.equals(ViewTypes.EVENT)) {
.. do something
}
{code}


was (Author: gregh99):
public boolean isPublished() {
        return getStatus().equals(PUBLISHED);
}

If we have an enum here it would make life more difficult.....I find enums are only useful
for shuffling around parameter checks and alike, as they have no "real" value?
eg

public static enum ViewTypes {
  EVENT, MANUFACTURER
}

method parameter >  Enum<ViewTypes> viewType

if (viewType != null && viewType.equals(ViewTypes.EVENT)) {
.. do something
}

> Switch WeblogEntry's pub status fields (DRAFT, PUBLISHED, PENDING, SCHEDULED) to an enum
type
> ---------------------------------------------------------------------------------------------
>
>                 Key: ROL-1997
>                 URL: https://issues.apache.org/jira/browse/ROL-1997
>             Project: Apache Roller
>          Issue Type: Task
>            Reporter: Glen Mazza
>            Assignee: Roller Unassigned
>            Priority: Minor
>
> ...and have that enum type used for the get/setStatus() in WeblogEntrySearchCriteria.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message