org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker Class Reference

We identify policies that apply to a given namespace (subtree of the name tree) by placing policy markers, as data, into that namespace. More...

Inheritance diagram for org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker:

org.ccnx.ccn.impl.encoding.GenericXMLEncodable org.ccnx.ccn.profiles.namespace.PolicyMarker org.ccnx.ccn.impl.encoding.XMLEncodable

List of all members.

Public Member Functions

 AccessControlPolicyMarker (ContentName profileName)
 AccessControlPolicyMarker (ContentName profileName, ArrayList< ParameterizedName > parameterizedNames, KeyValueSet parameters)
void addParameterizedName (ParameterizedName name)
ContentName profileName ()
ArrayList< ParameterizedName > parameterizedNames ()
KeyValueSet parameters ()
boolean emptyParameters ()
void decode (XMLDecoder decoder) throws ContentDecodingException
 Decode this object as the top-level item in a new XML document, reading it from a network buffer.
void encode (XMLEncoder encoder) throws ContentEncodingException
 Encode this object during an ongoing encoding pass; this is what subclasses generally need to know how to implement.
boolean validate ()
 Make sure all of the necessary fields are filled in prior to attempting to encode.
long getElementLabel ()
 Allow the encoder/decoder to retrieve the top-level element name programmatically.

Static Public Member Functions

static void create (ContentName name, SaveType saveType, CCNHandle handle) throws IOException
 Set up a part of the namespace to be under access control.
static AccessControlManager create (ContentName name, ContentName profileName, ArrayList< ParameterizedName > parameterizedNames, KeyValueSet parameters, SaveType saveType, CCNHandle handle) throws IOException, InvalidKeyException
 Set up a part of the namespace to be under access control.

Package Attributes

ProfileName _profileName
ArrayList< ParameterizedName > _parameterizedNames = new ArrayList<ParameterizedName>()
KeyValueSet _parameters

Classes

class  ProfileName
class  AccessControlPolicyMarkerObject


Detailed Description

We identify policies that apply to a given namespace (subtree of the name tree) by placing policy markers, as data, into that namespace.

(Questions of how to authenticate these markers is up to the policy and namespace; they are signed as regular CCNx data and authentication policies can be based on signer information.)

This class specifies a policy marker used to indicat that a given namespace is under access control, and to specify what access control scheme should be used to protect and retrieve data in that namespace (questions of whether organizing access control by namespace are left to future work). This object contains a small amount of data -- the access control profile used for the namespace (a string, used to index into a map of classes implementing that policy string), a set of ParameterizedName, defining mappings from strings to names within this namespace of interest to a given access control scheme (e.g. a prefix where access control groups might be defined, etc), and then a KeyValueSet of other, arbitrary parameters, for use by an access control scheme to store additional policy information that it requires.


Member Function Documentation

static void org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.create ( ContentName  name,
SaveType  saveType,
CCNHandle  handle 
) throws IOException [static]

Set up a part of the namespace to be under access control.

This method writes the root block to a repository. Type-specific initialization (e.g. writing ACLs) needs to be handled by the appropriate subclass.

Parameters:
name The top of the namespace to be under access control
Exceptions:
IOException 
ConfigurationException 

static AccessControlManager org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.create ( ContentName  name,
ContentName  profileName,
ArrayList< ParameterizedName >  parameterizedNames,
KeyValueSet  parameters,
SaveType  saveType,
CCNHandle  handle 
) throws IOException, InvalidKeyException [static]

Set up a part of the namespace to be under access control.

This method writes the root block to a repository. This needs to be generic, and can't know about particular access control types. It will make and initialize an access control manager of the appropriate type for this namespace, load it into the search path, and hand it back. Type-specific initialization must be done by the caller.

Parameters:
name The top of the namespace to be under access control
parameterizedNames 
parameters 
saveType 
handle 
Exceptions:
IOException 
ConfigurationException 

void org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.decode ( XMLDecoder  decoder  )  throws ContentDecodingException [virtual]

Decode this object as the top-level item in a new XML document, reading it from a network buffer.

Reads document start and end. Assumes default encoding.

Parameters:
buf input stream to read from
Exceptions:
ContentDecodingException if there is an error decoding the content Decode this object as the top-level item in a new XML document, reading it from a network buffer. Reads document start and end.
Parameters:
buf input stream to read from
codec the codec to use; must be recognized by XMLCodecFactory
Exceptions:
ContentDecodingException if there is an error decoding the content
See also:
XMLCodecFactory Decode this object during an ongoing decoding pass; this is what subclasses generally need to know how to implement. Reads just the object itself, higher-level processes have handled start and end document if need be. Allows object to be read using the same code whether it is a top-level element written alone, or nested inside another element.
Parameters:
decoder the decoder being used; encapsulates state including the codec being used as well as the input source and current offset

Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.

void org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.encode ( XMLEncoder  encoder  )  throws ContentEncodingException [virtual]

Encode this object during an ongoing encoding pass; this is what subclasses generally need to know how to implement.

Writes just the object itself, higher-level processes have handled start and end document if need be. Allows object to be written using the same code whether it is a top-level element written alone, or nested inside another element.

Parameters:
encoder the encoder being used; encapsulates state including the codec being used as well as the output destination and current offset

Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.

boolean org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.validate (  )  [virtual]

Make sure all of the necessary fields are filled in prior to attempting to encode.

All implementations of encode(XMLEncoder) should call this for their classes prior to encoding.

Returns:
true if object is valid and can be encoded, false if there is a problem; for example mandatory fields are uninitialized

Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.

long org.ccnx.ccn.profiles.security.access.AccessControlPolicyMarker.getElementLabel (  )  [virtual]

Allow the encoder/decoder to retrieve the top-level element name programmatically.

This allows subclasses to rename elements without changing their encoder/decoders.

Returns:
the element label to use, as a key in a loaded encoding dictionary

Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.


The documentation for this class was generated from the following file:

Generated on Thu Feb 16 00:45:04 2012 for Content-Centric Networking in Java by  doxygen 1.5.6