com.pcbsys.nirvana.nAdminAPI.nACLEntry Class Reference

Contains the mapping between a subject User and the priviliges they can perform on a secured object such as a Realm, Channel or Queue. More...

Inheritance diagram for com.pcbsys.nirvana.nAdminAPI.nACLEntry:
com.pcbsys.nirvana.nAdminAPI.nChannelACLEntry com.pcbsys.nirvana.nAdminAPI.nInterfaceViaEntry com.pcbsys.nirvana.nAdminAPI.nRealmACLEntry com.pcbsys.nirvana.nAdminAPI.nServiceACLEntry

Public Member Functions

boolean canList ()
 Can this subject list the contents of an ACL. More...
 
boolean canModify ()
 Can this subject modify acl entries in a secure object. More...
 
nACLEntry clone ()
 Returns a clone of the nChannelACLEntry. More...
 
boolean equals (long aLong)
 Required as part of the SortedObject interface. More...
 
String getHost ()
 Returns the host portion of the subject. More...
 
String getName ()
 Returns the name of the ACLEntry. More...
 
String getSubject ()
 This method returns the completed subject User. More...
 
boolean hasFullPrivileges ()
 Does this csubject have full privileges for the secure object. More...
 
boolean isMatch (Object item)
 Used to compares this Object with another to determine sorting position. More...
 
boolean lessThan (long aLong)
 Required as part of the SortedObject interface. More...
 
boolean lessThan (Object item)
 Used to compares this Object with another to determine sorting position. More...
 
 nACLEntry (String name, String host) throws nAdminIllegalArgumentException
 Creates a new nACLEntry with the subject being name. More...
 
 nACLEntry (String subject) throws nAdminIllegalArgumentException
 Creates a new nACLEntry with the string argument of the form name. More...
 
void setFullPrivileges (boolean val)
 Sets the subject to have full privileges for this secure object allowing the subject complete control over the secure object WARNING: Use with great caution. More...
 
void setList (boolean val)
 Changes the current setting for this user to allow/disallow ACL listing WARNING: Should be used in conjuction with ModifyACL. More...
 
void setModify (boolean val)
 Changes the current setting for this subject to allow/disallow modifing ACL. More...
 

Detailed Description

Contains the mapping between a subject User and the priviliges they can perform on a secured object such as a Realm, Channel or Queue.

On construction of these objects the name string can be set to "*" meaning All users and the host cal also be set to "*". For example, all users from a host called test.com can be configured such as *

Constructor & Destructor Documentation

com.pcbsys.nirvana.nAdminAPI.nACLEntry.nACLEntry ( String  name,
String  host 
) throws nAdminIllegalArgumentException

Creates a new nACLEntry with the subject being name.

There are no default permissions set so this subject can perform NO actions on the secured objects

Parameters
nameUsername/Token for the subject
hostthe host they can connect from
Exceptions
nAdminIllegalArgumentExceptionif an invalid or null argument is passed
com.pcbsys.nirvana.nAdminAPI.nACLEntry.nACLEntry ( String  subject) throws nAdminIllegalArgumentException

Creates a new nACLEntry with the string argument of the form name.

There are no default permissions set so this subject can perform NO actions on the secured objects

Parameters
subjectof the form user
Exceptions
nAdminIllegalArgumentExceptionif an invalid or null argument is passed

Member Function Documentation

boolean com.pcbsys.nirvana.nAdminAPI.nACLEntry.canList ( )

Can this subject list the contents of an ACL.

Returns
a boolean indicating the current permission status for this user
boolean com.pcbsys.nirvana.nAdminAPI.nACLEntry.canModify ( )

Can this subject modify acl entries in a secure object.

Returns
a boolean indicating the current permission status for this user
nACLEntry com.pcbsys.nirvana.nAdminAPI.nACLEntry.clone ( )

Returns a clone of the nChannelACLEntry.

Returns
a clone of the current object
boolean com.pcbsys.nirvana.nAdminAPI.nACLEntry.equals ( long  aLong)

Required as part of the SortedObject interface.

For internal use only

String com.pcbsys.nirvana.nAdminAPI.nACLEntry.getHost ( )

Returns the host portion of the subject.

Returns
The hostname
String com.pcbsys.nirvana.nAdminAPI.nACLEntry.getName ( )

Returns the name of the ACLEntry.

Returns
String name
String com.pcbsys.nirvana.nAdminAPI.nACLEntry.getSubject ( )

This method returns the completed subject User.

Returns
String representation of the subject
boolean com.pcbsys.nirvana.nAdminAPI.nACLEntry.hasFullPrivileges ( )

Does this csubject have full privileges for the secure object.

This privlege enables the subject to perform ANY action against this secure object if set to true.

Returns
a boolean indicating the current permission status for this user
boolean com.pcbsys.nirvana.nAdminAPI.nACLEntry.isMatch ( Object  item)

Used to compares this Object with another to determine sorting position.

For internal use only

Parameters
itemObject to compare
Returns
True if this object is equal to the passed in object
boolean com.pcbsys.nirvana.nAdminAPI.nACLEntry.lessThan ( long  aLong)

Required as part of the SortedObject interface.

For internal use only

boolean com.pcbsys.nirvana.nAdminAPI.nACLEntry.lessThan ( Object  item)

Used to compares this Object with another to determine sorting position.

Parameters
itemObject to compare
Returns
True if this object is less then the passed in object
void com.pcbsys.nirvana.nAdminAPI.nACLEntry.setFullPrivileges ( boolean  val)

Sets the subject to have full privileges for this secure object allowing the subject complete control over the secure object WARNING: Use with great caution.

Should only set what is required rather than this entry. By default the realm server will automatically set this for the default administrator

Parameters
valtrue for full, false otherwise
void com.pcbsys.nirvana.nAdminAPI.nACLEntry.setList ( boolean  val)

Changes the current setting for this user to allow/disallow ACL listing WARNING: Should be used in conjuction with ModifyACL.

Parameters
valboolean specifying the permission status
void com.pcbsys.nirvana.nAdminAPI.nACLEntry.setModify ( boolean  val)

Changes the current setting for this subject to allow/disallow modifing ACL.

WARNING: Should not be given to normal subjects but only to subjects which need to administor the Secure Object.

Parameters
valboolean specifying the permission status