com.atlassian.jira.web.action.util.navigator
Enum IssueNavigatorType

java.lang.Object
  extended by java.lang.Enum<IssueNavigatorType>
      extended by com.atlassian.jira.web.action.util.navigator.IssueNavigatorType
All Implemented Interfaces:
Serializable, Comparable<IssueNavigatorType>

public enum IssueNavigatorType
extends Enum<IssueNavigatorType>

Represents the tab's on the issue navigator whose status needs to be saved into the session.

Since:
v4.0

Enum Constant Summary
ADVANCED
           
SIMPLE
           
 
Method Summary
static void clearCookie(javax.servlet.http.HttpServletRequest request)
          Remove any tab session state from the session.
static IssueNavigatorType getFromCookie(javax.servlet.http.HttpServletRequest request)
          Return the tab currently stored in the session.
 String getModeName()
           
static IssueNavigatorType getTypeFromString(String name)
          Return the navigator tab for the specified string.
static void setInCookie(javax.servlet.http.HttpServletResponse response, IssueNavigatorType type)
          Store the passed tab in the passed session.
static IssueNavigatorType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static IssueNavigatorType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SIMPLE

public static final IssueNavigatorType SIMPLE

ADVANCED

public static final IssueNavigatorType ADVANCED
Method Detail

values

public static IssueNavigatorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (IssueNavigatorType c : IssueNavigatorType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static IssueNavigatorType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getModeName

public String getModeName()

getFromCookie

public static IssueNavigatorType getFromCookie(javax.servlet.http.HttpServletRequest request)
Return the tab currently stored in the session. Null will be returned to indicate that there was no tab in the session.

Parameters:
request - the request the tab cookie is stored in.
Returns:
the tab in the session, or no tab if there was none.
Throws:
IllegalArgumentException - if the passed session is null.

setInCookie

public static void setInCookie(javax.servlet.http.HttpServletResponse response,
                               IssueNavigatorType type)
Store the passed tab in the passed session.

Parameters:
response - the response to store cookie tab in. May not be null.
type - the tab to store in the cookie.
Throws:
IllegalArgumentException - if either session or tab is null.

clearCookie

public static void clearCookie(javax.servlet.http.HttpServletRequest request)
Remove any tab session state from the session.

Parameters:
request - the request to remove tab state cookie from.
Throws:
IllegalArgumentException - if the session is null.

getTypeFromString

public static IssueNavigatorType getTypeFromString(String name)
Return the navigator tab for the specified string. The case of the string is ignored when this method is used.

Parameters:
name - the name of the tab to return.
Returns:
the tab whose name is the passed string. It will return null if there was no matching tab.
Throws:
IllegalArgumentException - if the name is null.


Copyright © 2002-2010 Atlassian. All Rights Reserved.