1 /* 2 * @(#)IIssueState.java 3 * 4 * Copyright (C) 2002-2003 Matt Albrecht 5 * groboclown@users.sourceforge.net 6 * http://groboutils.sourceforge.net 7 * 8 * Part of the GroboUtils package at: 9 * http://groboutils.sourceforge.net 10 * 11 * Permission is hereby granted, free of charge, to any person obtaining a 12 * copy of this software and associated documentation files (the "Software"), 13 * to deal in the Software without restriction, including without limitation 14 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 15 * and/or sell copies of the Software, and to permit persons to whom the 16 * Software is furnished to do so, subject to the following conditions: 17 * 18 * The above copyright notice and this permission notice shall be included in 19 * all copies or substantial portions of the Software. 20 * 21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 24 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 27 * DEALINGS IN THE SOFTWARE. 28 */ 29 package net.sourceforge.groboutils.pmti.v1; 30 31 32 33 /** 34 * Describes the state of an Issue. Issue states may have additional 35 * information associated with them, and as such uses the Attribute methodology 36 * in the same way an Issue does. All implementations of <tt>IIssueState</tt> 37 * must be immutable, unless they are also instances of 38 * <tt>IEditableIssueState</tt>. 39 * 40 * @author Matt Albrecht <a HREF="mailto:groboclown@users.sourceforge.net">groboclown@users.sourceforge.net</a> 41 * @version $Date: 2003/02/10 22:51:54 $ 42 * @since July 7, 2002 43 */ 44 public interface IIssueState 45 { 46 /** 47 * Returns the short name of the state. 48 * 49 * @return the short readable name of the state. 50 */ 51 public String getName(); 52 53 54 /** 55 * Retrieves a long, human-readable, description of the state. 56 * 57 * @return the state's description. 58 */ 59 public String getDescription(); 60 61 62 /** 63 * A broad category for the state - it means that the issue has not been 64 * resolved yet, and the code is still open for changes based on this 65 * issue. 66 * <P> 67 * <tt>isOpen()</tt> must always return the opposite of 68 * <tt>isClosed()</tt>; that is, the following code: 69 * <PRE> 70 * isOpen() == !isClosed() 71 * </PRE> 72 * <i>must always</i> evaluate to <tt>true</tt>. 73 */ 74 public boolean isOpen(); 75 76 77 /** 78 * A broad category for the state - it means that the issue has been 79 * resolved, and the code is no longer open for changes based on this 80 * issue. 81 * <P> 82 * <tt>isClosed()</tt> must always return the opposite of 83 * <tt>isOpen()</tt>; that is, the following code: 84 * <PRE> 85 * isOpen() == !isClosed() 86 * </PRE> 87 * <i>must always</i> evaluate to <tt>true</tt>. 88 */ 89 public boolean isClosed(); 90 91 92 /** 93 * Returns a list of all attributes associated with this state. All 94 * states of a particular type should have the same set of issues. If 95 * the problem tracker does not have attributes associated with an issue 96 * state, then this must still return a non-<tt>null</tt>, but the set 97 * will be empty. 98 * 99 * @return the set of tracker-specific and issue type-specific attributes 100 * and values associated with this issue. Can never return 101 * <tt>null</tt>. 102 */ 103 public IAttributeSet getAttributes(); 104 } 105 106