org.deltava.beans.system
Class RegistrationBlock

java.lang.Object
  extended by org.deltava.beans.DatabaseBean
      extended by org.deltava.beans.system.RegistrationBlock
All Implemented Interfaces:
Serializable, Comparable<Object>, ViewEntry, Cacheable

public class RegistrationBlock
extends DatabaseBean
implements ViewEntry

A bean used to block user names and IP addresses from registering.

Since:
1.0
Version:
2.5
Author:
Luke
See Also:
Serialized Form

Constructor Summary
RegistrationBlock(String fName, String lName)
          Initializes the bean.
 
Method Summary
 boolean getActive()
          Returns whether the block is active.
 long getAddress()
          Returns the IP address or network to block.
 String getComments()
          Returns user comments about this Registration block.
 String getFirstName()
          Returns the first name.
 boolean getHasUserFeedback()
          Returns whether the user should be informed that the registration attempt has been blocked.
 String getHostName()
          Returns the remote host name.
 String getLastName()
          Returns the last name.
 long getNetMask()
          Returns the IP address netmask.
 String getRowClassName()
          Returns the CSS table row class used when displaying in an HTML table.
 void setActive(boolean isActive)
          Marks this registration block as active/inactive.
 void setAddress(long addr)
          Updates the IP address.
 void setComments(String comments)
          Updates user comments about this Registration block entry.
 void setHasUserFeedback(boolean hasFeedback)
          Marks whether the user should receive feedback if a registration attempt was rejected.
 void setHostName(String hostName)
          Updates the blocked host name.
 void setName(String fName, String lName)
          Updates the name.
 void setNetMask(long mask)
          Updates the IP address and network mask.
 
Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrationBlock

public RegistrationBlock(String fName,
                         String lName)
Initializes the bean.

Parameters:
fName - the first name
lName - the last name
See Also:
setName(String, String), getFirstName(), getLastName()
Method Detail

getActive

public boolean getActive()
Returns whether the block is active.

Returns:
TRUE if the block is active, otherwise FALSE
See Also:
setActive(boolean)

getHasUserFeedback

public boolean getHasUserFeedback()
Returns whether the user should be informed that the registration attempt has been blocked. This can be used to avoid providing feedback to spambots.

Returns:
TRUE if feedback should be provided, otherwise FALSE
See Also:
setHasUserFeedback(boolean)

getFirstName

public String getFirstName()
Returns the first name.

Returns:
the first name, or null if none
See Also:
RegistrationBlock(String, String)

getLastName

public String getLastName()
Returns the last name.

Returns:
the last name, or null if none
See Also:
RegistrationBlock(String, String)

getHostName

public String getHostName()
Returns the remote host name.

Returns:
the host name
See Also:
setHostName(String)

getComments

public String getComments()
Returns user comments about this Registration block.

Returns:
the comments
See Also:
setComments(String)

getAddress

public long getAddress()
Returns the IP address or network to block.

Returns:
the network address
See Also:
setAddress(long), getNetMask()

getNetMask

public long getNetMask()
Returns the IP address netmask.

Returns:
the netmask
See Also:
setNetMask(long), getAddress()

setActive

public void setActive(boolean isActive)
Marks this registration block as active/inactive.

Parameters:
isActive - TRUE if the rule is active, otherwise FALSE
See Also:
getActive()

setHasUserFeedback

public void setHasUserFeedback(boolean hasFeedback)
Marks whether the user should receive feedback if a registration attempt was rejected.

Parameters:
hasFeedback - TRUE whether feedback should be given on rejection, otherwise FALSE
See Also:
getHasUserFeedback()

setName

public void setName(String fName,
                    String lName)
Updates the name.

Parameters:
fName - the first name
lName - the last name

setHostName

public void setHostName(String hostName)
Updates the blocked host name.

Parameters:
hostName - the host name
See Also:
getHostName()

setComments

public void setComments(String comments)
Updates user comments about this Registration block entry.

Parameters:
comments - the comments
See Also:
getComments()

setAddress

public void setAddress(long addr)
Updates the IP address.

Parameters:
addr - the IPv4 address
See Also:
getAddress(), setNetMask(long)

setNetMask

public void setNetMask(long mask)
Updates the IP address and network mask.

Parameters:
mask - the network mask
See Also:
getNetMask(), setAddress(long)

getRowClassName

public String getRowClassName()
Returns the CSS table row class used when displaying in an HTML table.

Specified by:
getRowClassName in interface ViewEntry
Returns:
the CSS class name


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.