Project JXTA

net.jxta.impl.access
Class AccessList

java.lang.Object
  extended by net.jxta.impl.access.AccessList

public class AccessList
extends Object

PeerView ACL is described as follows


Nested Class Summary
static class AccessList.Entry
          Entries class
 
Field Summary
protected  Map accessMap
           
(package private)  String description
           
(package private)  boolean grantAll
           
 
Constructor Summary
AccessList()
          Default Constructor
AccessList(Element root)
          Construct from a StructuredDocument
AccessList(InputStream stream)
          Intialize access list from an InputStream
AccessList(Map map)
          Constructor for the HealthMessage object
 
Method Summary
 void add(AccessList.Entry entry)
           
 Map getAccessMap()
          gets the entries list
static String getAdvertisementType()
          All messages have a type (in xml this is !doctype) which identifies the message
 String getDescrption()
          gets the description
 Document getDocument(MimeMediaType asMimeType)
          
 boolean getGrantAll()
          gets the description
 void init(File fromFile)
          Intialize access list from a file
protected  void initialize(TextElement doc)
          Process an individual element from the document.
 boolean isAllowed(ID id)
           
 void refresh(File file)
           
 void refresh(InputStream stream)
           
 void remove(AccessList.Entry entry)
           
 void setDescrption(String description)
          sets description
 void setEntries(Map map)
          sets the entries list
 void setGrantAll(boolean grantAll)
          gets the description
 String toString()
          returns the document string representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

accessMap

protected Map accessMap

description

String description

grantAll

boolean grantAll
Constructor Detail

AccessList

public AccessList()
Default Constructor


AccessList

public AccessList(InputStream stream)
           throws IOException
Intialize access list from an InputStream

Throws:
IOException

AccessList

public AccessList(Map map)
Constructor for the HealthMessage object

Parameters:
srcID -
entries -

AccessList

public AccessList(Element root)
Construct from a StructuredDocument

Parameters:
root - root element
Method Detail

init

public void init(File fromFile)
          throws IOException
Intialize access list from a file

Parameters:
fromFile - file to init from
Throws:
IOException - if an io error occurs

refresh

public void refresh(File file)

refresh

public void refresh(InputStream stream)
             throws IOException
Throws:
IOException

getDescrption

public String getDescrption()
gets the description

Returns:
the document description

getGrantAll

public boolean getGrantAll()
gets the description

Returns:
the document description

setGrantAll

public void setGrantAll(boolean grantAll)
gets the description


setDescrption

public void setDescrption(String description)
sets description

Parameters:
description - The new description

setEntries

public void setEntries(Map map)
sets the entries list

Parameters:
list - The new entries value

add

public void add(AccessList.Entry entry)

remove

public void remove(AccessList.Entry entry)

isAllowed

public boolean isAllowed(ID id)

getAccessMap

public Map getAccessMap()
gets the entries list

Returns:
The entries value

getDocument

public Document getDocument(MimeMediaType asMimeType)

Parameters:
asMimeType - mime type encoding
Returns:
The document value

initialize

protected void initialize(TextElement doc)
Process an individual element from the document.

Parameters:
doc -

toString

public String toString()
returns the document string representation of this object

Overrides:
toString in class Object
Returns:
String representation of the of this message type

getAdvertisementType

public static String getAdvertisementType()
All messages have a type (in xml this is !doctype) which identifies the message

Returns:
String "jxta:XACL"

JXTA J2SE