Class AccessList
package: src.net.jxta.impl.access
public class AccessList
PeerView ACL is described as follows

Inner Class Summary
public class
   Entries class
 
Field Summary
protected Map
private final static String
private final static String
String
private final static String
public boolean
   Entry name
 
public ID
   Entry ID entry id
 
public String
   Entry name
 
private final static String
boolean
private final static String
private final static String
private final static transient Logger
   Log4J Logger
 
private final static String
private final static String
Constructor Summary
public
   Default Constructor
 
public
AccessList(Element root)
   Construct from a StructuredDocument
 
public
AccessList(InputStream stream)
   Intialize access list from an InputStream
 
public
AccessList(Map map)
   Constructor for the HealthMessage object
 
public
Entry(ID id, String name, boolean access)
   Creates a Entry with id and name
 
Method Summary
public void
public boolean
equals(Object obj)
public int
public String
public Map
   gets the entries list
 
public static String
   All messages have a type (in xml this is !doctype) which identifies the message
 
public String
   gets the description
 
public Document
getDocument(MimeMediaType asMimeType)
   {@inheritDoc}
 
public boolean
   gets the description
 
public void
init(File fromFile)
   Intialize access list from a file
 
private void
init(InputStream stream)
protected void
initialize(TextElement doc)
   Process an individual element from the document.
 
public boolean
isAllowed(ID id)
public void
refresh(File file)
public void
refresh(InputStream stream)
private void
   sets the entries list
 
public void
public void
setDescrption(String description)
   sets description
 
public void
setEntries(Map map)
   sets the entries list
 
public void
setGrantAll(boolean grantAll)
   gets the description
 
public String
   returns the document string representation of this object
 
Field Detail
accessMap
protected Map accessMap = new HashMap()

accessTag
private final static String accessTag = "access"

deny
private final static String deny = "deny"

description
String description = null

descriptionTag
private final static String descriptionTag = "description"

grant
private final static String grant = "grant"

grantAll
boolean grantAll = false

grantAllTag
private final static String grantAllTag = "grantAll"

idTag
private final static String idTag = "ID"

LOG
private final static transient Logger LOG = Logger.getLogger(AccessList.class.getName())
Log4J Logger
transient

nameTag
private final static String nameTag = "name"

peerTag
private final static String peerTag = "peer"
Constructor Detail
AccessList
public AccessList()
Default Constructor

AccessList
public AccessList(Element root)
Construct from a StructuredDocument
Parameters:
root root element

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

AccessList
public AccessList(Map map)
Constructor for the HealthMessage object
Parameters:
srcID
entries
Method Detail
add
public void add(AccessList.Entry entry)

getAccessMap
public Map getAccessMap()
gets the entries list
Return:
The entries value
returns:
List The List containing Entries

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

getDescrption
public String getDescrption()
gets the description
Return:
the document description

getDocument
public Document getDocument(MimeMediaType asMimeType)
{@inheritDoc}
Parameters:
asMimeType mime type encoding
Return:
The document value

getGrantAll
public boolean getGrantAll()
gets the description
Return:
the document description

init
private void init(InputStream stream)
Throws:
IOException

init
public void init(File fromFile)
Intialize access list from a file
Throws:
IOException
Parameters:
fromFile file to init from
throws:
IOException if an io error occurs

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

isAllowed
public boolean isAllowed(ID id)

refresh
public void refresh(InputStream stream)
Throws:
IOException

refresh
private void refresh(AccessList acl)
sets the entries list
Parameters:
list The new entries value

refresh
public void refresh(File file)

remove
public void remove(AccessList.Entry entry)

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

setGrantAll
public void setGrantAll(boolean grantAll)
gets the description
Return:
the document description

toString
public String toString()
returns the document string representation of this object
Return:
String representation of the of this message type