All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ajanta.naming.NREntry

java.lang.Object
   |
   +----java.security.Identity
           |
           +----ajanta.util.AjantaIdentity
                   |
                   +----ajanta.naming.NREntry

public class NREntry
extends AjantaIdentity
implements Serializable

Constructor Index

 o NREntry(URN)
Name Registry Entry object keeps needed information for an entry.
 o NREntry(URN, PublicKey, PublicKey)
Name Registry Entry object keeps needed information for an entry Owner of the acl entry for this nrEntry is the name of the entry
 o NREntry(URN, URL)
Name Registry Entry object keeps needed information for an entry Owner of the acl entry for this nrEntry is the name of the entry
 o NREntry(URN, URL, PublicKey, PublicKey)
Name Registry Entry object keeps needed information for an entry Owner of the acl entry for this nrEntry is the name of the entry
 o NREntry(URN, URN)
Name Registry Entry object keeps needed information for an entry
 o NREntry(URN, URN, PublicKey, PublicKey)
Name Registry Entry object keeps needed information for an entry
 o NREntry(URN, URN, URL)
Name Registry Entry object keeps needed information for an entry
 o NREntry(URN, URN, URL, PublicKey, PublicKey)
Name Registry Entry object keeps needed information for an entry

Method Index

 o addAclOwner(URN, URN)
Adds an owner.
 o addCreateNamePermission(Principal, Principal)
Sets CREATE_NAME permission for the principle.
 o addCreateNamePermission(URN, URN)
Sets CREATE_NAME permission for the principle.
 o addLocation(URL)
Adds a location for the current entry, a urn can have one to many location mapping
 o addWritePermission(Principal, Principal)
Sets WRITE permission for the principle.
 o addWritePermission(URN, URN)
Sets WRITE permission for the principle.
 o checkCreateNamePermission(Principal)
Checks if the specified principal has create name permission
 o checkWritePermission(Principal)
Checks if the specified principal has write permission
 o getAcl()
returns the acl for this entry
 o getCreationDomain()
Returns the creation domain for this urn.
 o getEncryptKey()
returns the encryption key for this entry
 o getLastAccessTime()
returns the last access time for this entry
 o getLastModTime()
returns the last modification time for this entry
 o getURL()
returns the first location in the vector list of this urn
 o getURLs()
returs all the location for this urn
 o getURN()
returns the urn of this entry
 o getVerifyKey()
returns the signature varification key for this entry
 o isAclOwner(Principal)
Checks if the passed Principal is a owner
 o removeCreateNamePermission(URN, URN)
Reomoves CREATE_NAME permission for the principle.
 o removeWritePermission(URN, URN)
Reomoves WRITE permission for the principle.
 o toString()
String representation

Constructors

 o NREntry
 protected NREntry(URN owner,
                   URN name)
Name Registry Entry object keeps needed information for an entry

Parameters:
owner - - owner of the acl entry for this nrEntry
name - urn of this entry
 o NREntry
 protected NREntry(URN name)
Name Registry Entry object keeps needed information for an entry. Owner of the acl entry for this nrEntry is the name of the entry

Parameters:
name - urn of this entry
 o NREntry
 protected NREntry(URN owner,
                   URN name,
                   URL location)
Name Registry Entry object keeps needed information for an entry

Parameters:
owner - - owner of the acl entry for this nrEntry
name - urn of this entry
location - - location of this entity
 o NREntry
 protected NREntry(URN name,
                   URL location)
Name Registry Entry object keeps needed information for an entry Owner of the acl entry for this nrEntry is the name of the entry

Parameters:
name - urn of this entry
location - - location of this entity
 o NREntry
 protected NREntry(URN owner,
                   URN name,
                   URL location,
                   PublicKey encrypt,
                   PublicKey verify)
Name Registry Entry object keeps needed information for an entry

Parameters:
owner - - owner of the acl entry for this nrEntry
name - urn of this entry
location - - location of this entity
encrypt - - public key of encruption key pair
verify - - public key of verification key pair
 o NREntry
 protected NREntry(URN name,
                   URL location,
                   PublicKey encrypt,
                   PublicKey verify)
Name Registry Entry object keeps needed information for an entry Owner of the acl entry for this nrEntry is the name of the entry

Parameters:
name - urn of this entry
location - - location of this entity
encrypt - - public key of encruption key pair
verify - - public key of verification key pair
 o NREntry
 protected NREntry(URN owner,
                   URN name,
                   PublicKey e,
                   PublicKey v)
Name Registry Entry object keeps needed information for an entry

Parameters:
owner - - owner of the acl entry for this nrEntry
name - urn of this entry
e - - public key of encruption key pair
v - - public key of verification key pair
 o NREntry
 protected NREntry(URN name,
                   PublicKey e,
                   PublicKey v)
Name Registry Entry object keeps needed information for an entry Owner of the acl entry for this nrEntry is the name of the entry

Parameters:
name - - urn of this entry
e - - public key of encruption key pair
v - - public key of verification key pair

Methods

 o getURN
 public URN getURN()
returns the urn of this entry

Overrides:
getURN in class AjantaIdentity
 o addLocation
 public void addLocation(URL location)
Adds a location for the current entry, a urn can have one to many location mapping

Parameters:
location - - url to be added for this name
 o getURLs
 public Vector getURLs()
returs all the location for this urn

 o getURL
 public URL getURL()
returns the first location in the vector list of this urn

 o getCreationDomain
 public URN getCreationDomain()
Returns the creation domain for this urn. currently creation domain is encoded as the first substring of a urn

 o addAclOwner
 public boolean addAclOwner(URN owner,
                            URN prin) throws NotOwnerException
Adds an owner. Only owners can modify ACL contents. The caller principal must be an owner of the ACL in order to invoke this method. That is, only an owner can add another owner. The initial owner is configured at ACL construction time.

Parameters:
caller - - the principal invoking this method. It must be an owner of the ACL.
owner - - the owner that should be added to the list of owners.
Returns:
true if successful, false if owner is already an owner.
 o addCreateNamePermission
 public boolean addCreateNamePermission(URN owner,
                                        URN prin)
Sets CREATE_NAME permission for the principle. If the permission is already set do nothing, else set the permission

Parameters:
prin - - the principle who will get the WRITE permission
Returns:
false if owner is not owner of the acl else true.
 o addCreateNamePermission
 public boolean addCreateNamePermission(Principal owner,
                                        Principal prin)
Sets CREATE_NAME permission for the principle. If the permission is already set do nothing, else set the permission

Parameters:
prin - - the principle who will get the WRITE permission
Returns:
false if owner is not owner of the acl else true.
 o addWritePermission
 public boolean addWritePermission(URN owner,
                                   URN prin)
Sets WRITE permission for the principle. If the permission is already set do nothing, else set the permission

Parameters:
prin - - the principle who will get the CREATE_NAME permission
Returns:
false if owner is not owner of the acl else true.
 o addWritePermission
 public boolean addWritePermission(Principal owner,
                                   Principal prin)
Sets WRITE permission for the principle. If the permission is already set do nothing, else set the permission

Parameters:
prin - - the principle who will get the CREATE_NAME permission
Returns:
false if owner is not owner of the acl else true.
 o removeWritePermission
 public boolean removeWritePermission(URN owner,
                                      URN prin)
Reomoves WRITE permission for the principle. If the permission is already set return false, else set the permission

Parameters:
prin - - the principle from whom the WRITE permission will be removed
Returns:
false if owner is not owner of the acl else true.
 o removeCreateNamePermission
 public boolean removeCreateNamePermission(URN owner,
                                           URN prin)
Reomoves CREATE_NAME permission for the principle. If the permission is already set return false, else set the permission

Parameters:
prin - - the principle from whom the CREATE_NAME permission will be removed
Returns:
false if owner is not owner of the acl else true.
 o checkCreateNamePermission
 public boolean checkCreateNamePermission(Principal prin)
Checks if the specified principal has create name permission

Parameters:
prin - - the principal who's permission will be checked
Returns:
false if it does not have the CREATE_NAME permission, else true
 o checkWritePermission
 public boolean checkWritePermission(Principal prin)
Checks if the specified principal has write permission

Parameters:
prin - - the principal who's permission will be checked
Returns:
false if it does not have the WRITE permission, else true
 o isAclOwner
 public boolean isAclOwner(Principal owner)
Checks if the passed Principal is a owner

 o getLastAccessTime
 public long getLastAccessTime()
returns the last access time for this entry

 o getLastModTime
 public long getLastModTime()
returns the last modification time for this entry

 o getVerifyKey
 public PublicKey getVerifyKey()
returns the signature varification key for this entry

 o getEncryptKey
 public PublicKey getEncryptKey()
returns the encryption key for this entry

 o getAcl
 public Acl getAcl()
returns the acl for this entry

 o toString
 public String toString()
String representation

Overrides:
toString in class Identity

All Packages  Class Hierarchy  This Package  Previous  Next  Index