edu.nrao.sss.model.proposal
Enum ProposalType

java.lang.Object
  extended by java.lang.Enum<ProposalType>
      extended by edu.nrao.sss.model.proposal.ProposalType
All Implemented Interfaces:
Serializable, Comparable<ProposalType>

public enum ProposalType
extends Enum<ProposalType>

Placeholder for time when we integrate proposal work. An enumeration of proposal types.

Since:
2006-03-03
Version:
1.1

Enum Constant Summary
EXPLORATORY_TIME
          Represents a rapid response proposal for exploratory time.
KNOWN_TRANSIENT_PHENOMENA
          Represents a rapid response proposal for a know transient phenomenon.
LARGE_PROPOSAL_LARGE_PROJECT
          Represents a proposal for a larger project.
LARGE_PROPOSAL_SURVEY
          Represents a proposal for a large survey.
REGULAR_PROPOSAL
          Represents a regular proposal.
TARGET_OF_OPPORTUNITY
          Represents a rapid response proposal for a target of opportunity.
UNKNOWN
          Represents a proposal of unknown type.
 
Method Summary
static ProposalType fromString(String text)
          Returns the proposal type represented by text.
static ProposalType getDefault()
          Returns a default proposal type.
 String getEmailLookup()
          Returns the web.xml tag used to look up the list of people who should be sent email for each type of proposal.
 boolean isImmediateResponse()
          Returns true if the proposal needs to be put into the current proposal cycle as opposed to waiting until the next proposal deadline and going through the referring process.
 boolean isLargeProposal()
          Returns true if the proposal requires a large amount of viewing time and thus must go through a special referring process.
 boolean isRapidResponse()
          Returns true if the proposal is a rapid response proposal; false, otherwise.
 String toString()
           
static ProposalType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ProposalType[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

REGULAR_PROPOSAL

public static final ProposalType REGULAR_PROPOSAL
Represents a regular proposal.

The acceptable names of this element (for use with getInstanceFromName(String)) are REGULAR_PROPOSAL and Regular Proposal.


LARGE_PROPOSAL_SURVEY

public static final ProposalType LARGE_PROPOSAL_SURVEY
Represents a proposal for a large survey.

The acceptable names of this element (for use with getInstanceFromName(String)) are LARGE_PROPOSAL_SURVEY and Large Proposal - Survey.


LARGE_PROPOSAL_LARGE_PROJECT

public static final ProposalType LARGE_PROPOSAL_LARGE_PROJECT
Represents a proposal for a larger project.

The acceptable names of this element (for use with getInstanceFromName(String)) are LARGE_PROPOSAL_LARGE_PROJECT and Large Proposal - Large Project.


EXPLORATORY_TIME

public static final ProposalType EXPLORATORY_TIME
Represents a rapid response proposal for exploratory time.

The acceptable names of this element (for use with getInstanceFromName(String)) are EXPLORATORY_TIME and Rapid Response - Exploratory Time.


TARGET_OF_OPPORTUNITY

public static final ProposalType TARGET_OF_OPPORTUNITY
Represents a rapid response proposal for a target of opportunity.

The acceptable names of this element (for use with getInstanceFromName(String)) are TARGET_OF_OPPORTUNITY and Rapid Response - Target of Opportunity.


KNOWN_TRANSIENT_PHENOMENA

public static final ProposalType KNOWN_TRANSIENT_PHENOMENA
Represents a rapid response proposal for a know transient phenomenon.

The acceptable names of this element (for use with getInstanceFromName(String)) are KNOWN_TRANSIENT_PHENOMENA and Rapid Response - Known Transient Phenomena.


UNKNOWN

public static final ProposalType UNKNOWN
Represents a proposal of unknown type.

This element is used to implement the Null Object Pattern. In situations where a method might be tempted to return null, this element is returned instead.

Method Detail

values

public static ProposalType[] 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 (ProposalType c : ProposalType.values())
    System.out.println(c);

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

valueOf

public static ProposalType 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

toString

public String toString()
Overrides:
toString in class Enum<ProposalType>

isLargeProposal

public boolean isLargeProposal()
Returns true if the proposal requires a large amount of viewing time and thus must go through a special referring process. Science and technical justification file restrictions are relaxed for large proposals.

Returns:
true if the Proposal requires extra telescope time; false otherwise.

isRapidResponse

public boolean isRapidResponse()
Returns true if the proposal is a rapid response proposal; false, otherwise.

Returns:
true if the Proposal is rapid response; false otherwise.

isImmediateResponse

public boolean isImmediateResponse()
Returns true if the proposal needs to be put into the current proposal cycle as opposed to waiting until the next proposal deadline and going through the referring process.

Returns:
true if the Proposal should be scheduled for the current proposal cycle; false if the Proposal can wait until the next proposal deadline.

getEmailLookup

public String getEmailLookup()
Returns the web.xml tag used to look up the list of people who should be sent email for each type of proposal.

Returns:
a String representing the tag used in web.xml to lookup the list of people who should be sent email for each proposal type.

getDefault

public static ProposalType getDefault()
Returns a default proposal type.

Returns:
a default proposal type.

fromString

public static ProposalType fromString(String text)
Returns the proposal type represented by text.

For details about the transformation, see EnumerationUtility.enumFromString(Class, String).

Parameters:
text - a text representation of a proposal type.
Returns:
the proposal type represented by text.


Copyright © 2009. All Rights Reserved.