org.starhope.appius.sys.admin
Class SecurityCapability

java.lang.Object
  extended by org.starhope.appius.sql.SQLPeerDatum
      extended by org.starhope.appius.sql.SQLPeerEnum
          extended by org.starhope.appius.sys.admin.SecurityCapability
All Implemented Interfaces:
Serializable, Comparable<Object>

public class SecurityCapability
extends SQLPeerEnum

WRITEME: Document this type.

Predefined, universal, Appius-standard capabilities are specially enumerated here via SecurityCapability.CAP_* constants. The actual integral values of the predefined types are in the range 0x42525000 .. 0x425250ff, with the range of all types beginning 0x42000000 & 0xff000000 being reserved for Appius core development. It's recommended that implementors number their own capabilities additions to this system with low integers beginning with “1”.

 CREATE TABLE securityCapabilities (
    ID INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(32) NOT NULL UNIQUE KEY
 ) ENGINE=InnoDB;
 

Author:
brpocock@star-hope.org
See Also:
Serialized Form

Field Summary
static Integer CAP_ALTER_ROOM
          Can alter room properties (titles or world and weather memberships)
static Integer CAP_ALTER_WEATHER
          Can alter global weather patterns
static Integer CAP_CHARACTER_COMMANDS
          Special commands for actors being special characters
static Integer CAP_KICK_PLAYER
          User can kick a player offline
static Integer CAP_MIGRATE
          Can order migration to another Zone
static Integer CAP_NPC
          Capability to manage or alter NPC:s
static Integer CAP_RUN_JAVASCRIPT
          ability to run arbitrary JavaScript contents
static Integer CAP_SET_ROOM_VAR
          Can set room variables
static Integer CAP_SPAWN_ROOM
          Capability of creating a new room
static Integer CAP_SPAWN_ZONE
          Can spawn a new Zone
static Integer CAP_SYSADM_COMMANDS
          Systems administration commands
static Integer CAP_SYSOP_COMMANDS
          General operator commands (including the ability to execute any command by speaking a magic word beginning with “#”)
static Integer CAP_UNCENSORED
          users with this capability aren't censored by the system
static Integer CAP_UNIVERSAL
          Universal / God / Root / Master privileges
static Integer CAP_UNKICKABLE
          User can't be kicked offline
private static long serialVersionUID
          WRITEME: Document this brpocock@star-hope.org
 
Fields inherited from class org.starhope.appius.sql.SQLPeerEnum
enumeration, instance
 
Constructor Summary
SecurityCapability()
          default non-instance-specifc constructor
SecurityCapability(int id)
          constructor with instance ID
SecurityCapability(Integer id)
          constructor with instance ID as Integer for convenience of CAP_ members
 
Method Summary
 void flush()
           
protected  PreparedStatement getStatement(Connection connection)
          WRITEME: document this method (brpocock@star-hope.org, Aug 14, 2009)
protected  void set(ResultSet rs)
           
 
Methods inherited from class org.starhope.appius.sql.SQLPeerEnum
cache, doRealCacheResetStatic, equals, equals, get, Get, get, Get, getCacheUniqueID, getEnumeration, getID, getID, getString, getString, hashCode, invalidateCache, invalidateCaches, prepCache, resetCache, set, set, toJSON, toString
 
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum
changed, compareTo, findInCache, get, saveInCache, set
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CAP_UNIVERSAL

public static final Integer CAP_UNIVERSAL
Universal / God / Root / Master privileges


CAP_SPAWN_ROOM

public static final Integer CAP_SPAWN_ROOM
Capability of creating a new room


CAP_ALTER_ROOM

public static final Integer CAP_ALTER_ROOM
Can alter room properties (titles or world and weather memberships)


CAP_ALTER_WEATHER

public static final Integer CAP_ALTER_WEATHER
Can alter global weather patterns


CAP_SPAWN_ZONE

public static final Integer CAP_SPAWN_ZONE
Can spawn a new Zone


CAP_SET_ROOM_VAR

public static final Integer CAP_SET_ROOM_VAR
Can set room variables


CAP_MIGRATE

public static final Integer CAP_MIGRATE
Can order migration to another Zone


CAP_KICK_PLAYER

public static final Integer CAP_KICK_PLAYER
User can kick a player offline


CAP_UNKICKABLE

public static final Integer CAP_UNKICKABLE
User can't be kicked offline


CAP_RUN_JAVASCRIPT

public static final Integer CAP_RUN_JAVASCRIPT
ability to run arbitrary JavaScript contents


CAP_SYSOP_COMMANDS

public static final Integer CAP_SYSOP_COMMANDS
General operator commands (including the ability to execute any command by speaking a magic word beginning with “#”)


CAP_SYSADM_COMMANDS

public static final Integer CAP_SYSADM_COMMANDS
Systems administration commands


CAP_CHARACTER_COMMANDS

public static final Integer CAP_CHARACTER_COMMANDS
Special commands for actors being special characters


CAP_NPC

public static final Integer CAP_NPC
Capability to manage or alter NPC:s


serialVersionUID

private static final long serialVersionUID
WRITEME: Document this brpocock@star-hope.org

See Also:
Constant Field Values

CAP_UNCENSORED

public static final Integer CAP_UNCENSORED
users with this capability aren't censored by the system

Constructor Detail

SecurityCapability

public SecurityCapability()
default non-instance-specifc constructor


SecurityCapability

public SecurityCapability(int id)
constructor with instance ID

Parameters:
id - the instance ID

SecurityCapability

public SecurityCapability(Integer id)
constructor with instance ID as Integer for convenience of CAP_ members

Parameters:
id - the instance ID
Method Detail

flush

public void flush()
Specified by:
flush in class SQLPeerDatum
See Also:
SQLPeerDatum.flush()

getStatement

protected PreparedStatement getStatement(Connection connection)
                                  throws SQLException
Description copied from class: SQLPeerEnum
WRITEME: document this method (brpocock@star-hope.org, Aug 14, 2009)

Specified by:
getStatement in class SQLPeerEnum
Parameters:
connection - WRITEME
Returns:
WRITEME
Throws:
SQLException - if shit happens
See Also:
SQLPeerEnum.getStatement(java.sql.Connection)

set

protected void set(ResultSet rs)
            throws SQLException
Specified by:
set in class SQLPeerDatum
Parameters:
rs - The result of an SQL query, with the cursor already pointed at the row describing this specific instance of the object.
Throws:
SQLException - if the database fails somehow
See Also:
SQLPeerDatum.set(java.sql.ResultSet)