dip.net.message
Class PressConfiguration

java.lang.Object
  extended bydip.net.message.PressConfiguration
All Implemented Interfaces:
java.lang.Cloneable

public class PressConfiguration
extends java.lang.Object
implements java.lang.Cloneable

Press Configuration

This object holds the general press options. This object does not and is not meant to hold any PressChannel-specific data (i.e., network info, etc.).


Field Summary
static int OBSERVER_ANY
          Observers: same restrictions as players
static int OBSERVER_NONE
          Observers: No press (except to master) is allowed
static int OBSERVER_WHITE
          Observers: Only White press from observers is allowed
static int TYPE_GRAY
          Press that is always anonymous
static int TYPE_NONE
          Disallow press of any type, except to the Master
static int TYPE_WHITE
          Press that is never anonymous.
static int TYPE_WHITE_AND_GRAY
          Press that may be anonymous or not.
 
Constructor Summary
PressConfiguration()
          Create a PressConfiguration object.
 
Method Summary
 boolean canSend(PressMessage message, Phase currentPhase)
          Determines, based on settings, if a message can be sent.
 java.lang.Object clone()
          Clones the object.
 boolean getBroadcast()
          Get the forced broadcast flag.
 MID getMaster()
          Get the Master (null if none)
 java.lang.String getMasterName()
          Get master nick/name.
 int getObserverPressType()
          Get the type of press allowed between observers
 java.lang.String getOBserverPTDesc()
          Get observer press type description (including if broadcast).
 java.lang.String getObserverPTName()
          Get observer press type (including if broadcast).
 int getPlayerPressType()
          Get the type of press allowed between players
 java.lang.String getPlayerPTDesc()
          Get player press type description (including if broadcast).
 java.lang.String getPlayerPTName()
          Get player press type (including if broadcast).
 Phase.PhaseType[] getProhibitedPhases()
          Get which phases (if any) during which Press is prohibited
 Phase.SeasonType[] getProhibitedSeasons()
          Get which seasons (if any) during which Press is prohibited
 java.lang.String getProhibitedTimes()
          Get list of times when press is not allowed, as verbose list.
 Phase.YearType[] getProhibitedYearTypes()
          Get which years (if any) during which Press is prohibited
 void setBroadcast(boolean value)
          Set force-broadcast flag; if broadcast, Press must be sent to all players (except master); recipients cannot be chosen.
 void setMaster(MID mid)
          Set the Master (null if none)
 void setObserverPressType(int type)
          Set the type of press allowed between observers
 void setPlayerPressType(int type)
          Set the type of press allowed between players
 void setProhibitedPhases(Phase.PhaseType[] types)
          Set which phases (if any) during which Press is prohibited
 void setProhibitedSeasons(Phase.SeasonType[] types)
          Set which seasons (if any) during which Press is prohibited
 void setProhibitedYearTypes(Phase.YearType[] types)
          Set which years (if any) during which Press is prohibited
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NONE

public static final int TYPE_NONE
Disallow press of any type, except to the Master

See Also:
Constant Field Values

TYPE_WHITE

public static final int TYPE_WHITE
Press that is never anonymous.

See Also:
Constant Field Values

TYPE_GRAY

public static final int TYPE_GRAY
Press that is always anonymous

See Also:
Constant Field Values

TYPE_WHITE_AND_GRAY

public static final int TYPE_WHITE_AND_GRAY
Press that may be anonymous or not.

See Also:
Constant Field Values

OBSERVER_ANY

public static final int OBSERVER_ANY
Observers: same restrictions as players

See Also:
Constant Field Values

OBSERVER_WHITE

public static final int OBSERVER_WHITE
Observers: Only White press from observers is allowed

See Also:
Constant Field Values

OBSERVER_NONE

public static final int OBSERVER_NONE
Observers: No press (except to master) is allowed

See Also:
Constant Field Values
Constructor Detail

PressConfiguration

public PressConfiguration()
Create a PressConfiguration object.

Method Detail

setMaster

public void setMaster(MID mid)
Set the Master (null if none)


getMaster

public MID getMaster()
Get the Master (null if none)


setPlayerPressType

public void setPlayerPressType(int type)
Set the type of press allowed between players


getPlayerPressType

public int getPlayerPressType()
Get the type of press allowed between players


setBroadcast

public void setBroadcast(boolean value)
Set force-broadcast flag; if broadcast, Press must be sent to all players (except master); recipients cannot be chosen.


getBroadcast

public boolean getBroadcast()
Get the forced broadcast flag.


setObserverPressType

public void setObserverPressType(int type)
Set the type of press allowed between observers


getObserverPressType

public int getObserverPressType()
Get the type of press allowed between observers


getProhibitedSeasons

public Phase.SeasonType[] getProhibitedSeasons()
Get which seasons (if any) during which Press is prohibited


setProhibitedSeasons

public void setProhibitedSeasons(Phase.SeasonType[] types)
Set which seasons (if any) during which Press is prohibited


getProhibitedYearTypes

public Phase.YearType[] getProhibitedYearTypes()
Get which years (if any) during which Press is prohibited


setProhibitedYearTypes

public void setProhibitedYearTypes(Phase.YearType[] types)
Set which years (if any) during which Press is prohibited


getProhibitedPhases

public Phase.PhaseType[] getProhibitedPhases()
Get which phases (if any) during which Press is prohibited


setProhibitedPhases

public void setProhibitedPhases(Phase.PhaseType[] types)
Set which phases (if any) during which Press is prohibited


getPlayerPTName

public java.lang.String getPlayerPTName()
Get player press type (including if broadcast). This is localized.


getPlayerPTDesc

public java.lang.String getPlayerPTDesc()
Get player press type description (including if broadcast). This is localized.


getObserverPTName

public java.lang.String getObserverPTName()
Get observer press type (including if broadcast). This is localized.


getOBserverPTDesc

public java.lang.String getOBserverPTDesc()
Get observer press type description (including if broadcast). This is localized.


getMasterName

public java.lang.String getMasterName()
Get master nick/name. This is localized, and handles null Master setting.


getProhibitedTimes

public java.lang.String getProhibitedTimes()
Get list of times when press is not allowed, as verbose list. This is localized.


canSend

public boolean canSend(PressMessage message,
                       Phase currentPhase)
Determines, based on settings, if a message can be sent. Note that if the message or currentPhase parameter is null, it is ignored. (This allows checking of Phase settings, for example, before a message is composed).


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clones the object.

Throws:
java.lang.CloneNotSupportedException


Copyright 2002-2004 Zachary DelProposto / jDip Development Team. All Rights Reserved.