Bees v0.5.0 API

bees.core.resource
Class IPAddressPermission

java.lang.Object
  |
  +--bees.core.security.Permission
        |
        +--bees.core.resource.IPAddressPermission
All Implemented Interfaces:
java.lang.Cloneable, edu.utah.janosvm.sys.CrossTeamCloneable, PermissionTypes

public class IPAddressPermission
extends Permission

An IPAddressPermission is used to encode an IPAddress as a permission object.


Fields inherited from class bees.core.security.Permission
APPEND, EXECUTE, READ, WRITE
 
Fields inherited from interface bees.core.security.PermissionTypes
PERMISSION_BASIC, PERMISSION_CLASSES, PERMISSION_COUNT, PERMISSION_ENUMERATION, PERMISSION_FILE, PERMISSION_FLOAT, PERMISSION_INTEGER, PERMISSION_IP_ADDRESS, PERMISSION_MAX, PERMISSION_MAX_FLOAT, PERMISSION_MAX_INTEGER, PERMISSION_MIN, PERMISSION_MIN_FLOAT, PERMISSION_MIN_INTEGER, PERMISSION_NULL, PERMISSION_RANGE
 
Constructor Summary
IPAddressPermission()
          Construct an empty IPAddressPermission.
IPAddressPermission(java.lang.String name, int value)
          Construct an IPAddressPermission with the given values.
IPAddressPermission(java.lang.String name, int value, int mask)
          Construct an IPAddressPermission with the given values.
IPAddressPermission(java.lang.String name, java.lang.String value)
          Construct an IPAddressPermission with the given values.
IPAddressPermission(java.lang.String name, java.lang.String actions, int value, int mask)
          Construct an IPAddressPermission with the given values.
IPAddressPermission(java.lang.String name, java.lang.String actions, java.lang.String value)
          Construct an IPAddressPermission with the given values.
 
Method Summary
 int getMask()
           
 java.lang.String getStringValue()
           
 int getTypeID()
           
 int getValue()
           
 boolean implies(Permission what)
          Test whether this permission implies the given permission.
 void marshal(XdrByteArray xba)
          Marshal this object into the given byte array.
 int marshalledLength()
           
 java.lang.String toString()
           
 void unmarshal(XdrByteArray xba)
          Unmarshal this object from the given byte array.
 
Methods inherited from class bees.core.security.Permission
bound, clone, equals, getAction, getActionMask, getName, grant, instantiate, instantiate, nameImplies, orActionMask, revoke, toBytes, updateHash
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IPAddressPermission

public IPAddressPermission(java.lang.String name,
                           java.lang.String actions,
                           int value,
                           int mask)
Construct an IPAddressPermission with the given values.
Parameters:
name - The permission name.
actions - The actions granted by this permission.
value - A partial IPv4 address encoded as an integer.
mask - The mask of bits that specify the valid part of the IPv4 address.

IPAddressPermission

public IPAddressPermission(java.lang.String name,
                           int value,
                           int mask)
Construct an IPAddressPermission with the given values.
Parameters:
name - The permission name.
value - A partial IPv4 address encoded as an integer.
mask - The mask of bits that specify the valid part of the IPv4 address.

IPAddressPermission

public IPAddressPermission(java.lang.String name,
                           int value)
Construct an IPAddressPermission with the given values.
Parameters:
name - The permission name.
value - The IPv4 address encoded as an integer.

IPAddressPermission

public IPAddressPermission(java.lang.String name,
                           java.lang.String actions,
                           java.lang.String value)
                    throws edu.utah.janos.nodeos.AddressFormatException
Construct an IPAddressPermission with the given values.
Parameters:
name - The permission name.
actions - The actions granted by this permission.
value - An IPv4 address and optional mask encoded as a string. If the address covers a range of addresses then the string should have a forward slash followed by the number of valid higher order bits appended.
Throws:
edu.utah.janos.nodeos.AddressFormatException - If there is a problem parsing the "value" string.

IPAddressPermission

public IPAddressPermission(java.lang.String name,
                           java.lang.String value)
                    throws edu.utah.janos.nodeos.AddressFormatException
Construct an IPAddressPermission with the given values.
Parameters:
name - The permission name.
value - An IPv4 address and optional mask encoded as a string. If the address covers a range of addresses then the string should have a forward slash followed by the number of valid higher order bits appended.
Throws:
edu.utah.janos.nodeos.AddressFormatException - If there is a problem parsing the "value" string.

IPAddressPermission

public IPAddressPermission()
Construct an empty IPAddressPermission.
Method Detail

getValue

public int getValue()
Returns:
The IPv4 address as an integer.

getMask

public int getMask()
Returns:
The mask of bits that specify the valid part of the IPv4 address.

getStringValue

public java.lang.String getStringValue()
Returns:
The IPv4 address as a string.

getTypeID

public int getTypeID()
Overrides:
getTypeID in class Permission
See Also:
Permission.getTypeID()

implies

public boolean implies(Permission what)
Description copied from class: Permission
Test whether this permission implies the given permission. For example, read/write implies the read permission. Names are case-insensitive.
Overrides:
implies in class Permission
See Also:
Permission.implies(Permission)

marshalledLength

public int marshalledLength()
Overrides:
marshalledLength in class Permission
See Also:
Permission.marshalledLength()

marshal

public void marshal(XdrByteArray xba)
Description copied from class: Permission
Marshal this object into the given byte array.
Overrides:
marshal in class Permission
See Also:
Permission.marshal(XdrByteArray)

unmarshal

public void unmarshal(XdrByteArray xba)
Description copied from class: Permission
Unmarshal this object from the given byte array.
Overrides:
unmarshal in class Permission
See Also:
Permission.unmarshal(XdrByteArray)

toString

public java.lang.String toString()
Overrides:
toString in class Permission
See Also:
Object.toString()

Bees v0.5.0 API

This documentation is Copyright (C) 2002 The University of Utah. All Rights Reserved. See the individual source files for distribution terms.
Documentation, software, and mailing lists for Bees v0.5.0 can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/