com.pcbsys.nirvana.nAdminAPI.nACL Class Reference

represents a list of nACLEntry classes used by the Nirvana Realm server to control access to secured objects such as Realms, Channels and Queues. More...

Inherits Observable.

Public Member Functions

synchronized void add (nACLEntry entry) throws nBaseAdminException, nDuplicateACLEntryException, nAdminIllegalArgumentException
 Adds a new nACLEntry into the list. More...
 
boolean contains (String subject) throws nAdminIllegalArgumentException
 Returns whether an nACLEntry exists the nACL which matches this subject. More...
 
nACLEntry find (String subject) throws nACLEntryNotFoundException, nAdminIllegalArgumentException
 Finds an nACLEntry within the list which matches this subject. More...
 
nACLEntry find (nACLEntry entry) throws nACLEntryNotFoundException, nAdminIllegalArgumentException
 Finds an nACLEntry which matches the passed in nACLEntry. More...
 
nACLEntry get (int index) throws nAdminIllegalArgumentException
 Returns the nACLEntry specified by the index parameter is useful to examine/walk the list. More...
 
Enumeration getCopyEntries (boolean copy)
 Returns a deep copy Enumeration of nACLEntry objects which make up the list. More...
 
Enumeration getEntries ()
 Returns an Enumeration of nACLEntry objects which make up the list. More...
 
synchronized void remove (String subject) throws nACLEntryNotFoundException, nAdminIllegalArgumentException
 Removes the nACLEntry which matches the subject specified by the string passed in. More...
 
synchronized void remove (nACLEntry entry) throws nACLEntryNotFoundException, nAdminIllegalArgumentException
 Removes the nACLEntry which matches the subject specified the nACLEntry object. More...
 
synchronized void removeAll ()
 Removes ALL of the nACLEntry objects from the list. More...
 
synchronized void replace (nACLEntry entry) throws nACLEntryNotFoundException, nAdminIllegalArgumentException
 Replaces the existing nACLEntry priviliges with the passed nACLEntry. More...
 
int size ()
 Returns the number of entries within the list. More...
 

Detailed Description

represents a list of nACLEntry classes used by the Nirvana Realm server to control access to secured objects such as Realms, Channels and Queues.

See Also
nACLEntry

Member Function Documentation

synchronized void com.pcbsys.nirvana.nAdminAPI.nACL.add ( nACLEntry  entry) throws nBaseAdminException, nDuplicateACLEntryException, nAdminIllegalArgumentException

Adds a new nACLEntry into the list.

Parameters
entryThe new nACLEntry to add to the list
Exceptions
nDuplicateACLEntryExceptionIf the entry already exists in the list
nAdminIllegalArgumentExceptionif the entry is null
nBaseAdminExceptionUnable to perform the requested operation, check the message for further information
boolean com.pcbsys.nirvana.nAdminAPI.nACL.contains ( String  subject) throws nAdminIllegalArgumentException

Returns whether an nACLEntry exists the nACL which matches this subject.

Parameters
subjectString representation of the subject (user)
Returns
whether a matching acl entry exists
Exceptions
nAdminIllegalArgumentExceptionthrown if acl entry is null
nACLEntry com.pcbsys.nirvana.nAdminAPI.nACL.find ( String  subject) throws nACLEntryNotFoundException, nAdminIllegalArgumentException

Finds an nACLEntry within the list which matches this subject.

If it could not find a match it will throw nACLEntryNotFoundException

Parameters
subjectString representation of the subject (user)
Returns
the nACLEntry which matched
Exceptions
nACLEntryNotFoundExceptionthrown if acl entry is not found
nAdminIllegalArgumentExceptionthrown if acl entry is null
nACLEntry com.pcbsys.nirvana.nAdminAPI.nACL.find ( nACLEntry  entry) throws nACLEntryNotFoundException, nAdminIllegalArgumentException

Finds an nACLEntry which matches the passed in nACLEntry.

The comparision is done on the subject only and not the permissions since the subject must be unique in the list. If it could not find a match it will throw nACLEntryNotFoundException

Parameters
entryA nACLEntry to locate within the list
Returns
the nACLEntry which matches
Exceptions
nACLEntryNotFoundExceptionthrown if acl entry is not found
nAdminIllegalArgumentExceptionthrown if acl entry is null
nACLEntry com.pcbsys.nirvana.nAdminAPI.nACL.get ( int  index) throws nAdminIllegalArgumentException

Returns the nACLEntry specified by the index parameter is useful to examine/walk the list.

Parameters
indexthe index position of the nACLEntry to be retrieved
Exceptions
nAdminIllegalArgumentExceptionthrown if the index specified is out of range or less than 0.
Returns
the nACLEntry object at the specified index
Enumeration com.pcbsys.nirvana.nAdminAPI.nACL.getCopyEntries ( boolean  copy)

Returns a deep copy Enumeration of nACLEntry objects which make up the list.

This is useful to examine/walk and modifying the list. It is different from getEntries() in that the return Enumeration is a deep copy of the underlying list and can be used to modify the AclList.

Returns
Enumeration of nACLEntry
Enumeration com.pcbsys.nirvana.nAdminAPI.nACL.getEntries ( )

Returns an Enumeration of nACLEntry objects which make up the list.

This is useful to examine/walk the list.

Returns
Enumeration of nACLEntry
synchronized void com.pcbsys.nirvana.nAdminAPI.nACL.remove ( String  subject) throws nACLEntryNotFoundException, nAdminIllegalArgumentException

Removes the nACLEntry which matches the subject specified by the string passed in.

Currently no wild card removals are supported so only a direct match will result in the removal of the nACLEntry

Parameters
subjectString representation of the subject (user)
Exceptions
nACLEntryNotFoundExceptionthrown if acl entry is not found
nAdminIllegalArgumentExceptionthrown if acl entry is null
synchronized void com.pcbsys.nirvana.nAdminAPI.nACL.remove ( nACLEntry  entry) throws nACLEntryNotFoundException, nAdminIllegalArgumentException

Removes the nACLEntry which matches the subject specified the nACLEntry object.

Parameters
entryThe nACLEntry to be removed from the list
Exceptions
nACLEntryNotFoundExceptionthrown if acl entry is not found
nAdminIllegalArgumentExceptionthrown if acl entry is null
synchronized void com.pcbsys.nirvana.nAdminAPI.nACL.removeAll ( )

Removes ALL of the nACLEntry objects from the list.

WARNING: if you commit an empty nACL you will effectivily block ALL access to the secure object. There is no way to override this so be careful when calling this function that you do actually add nACLEntry objects to this to at least allow the administrator back in

synchronized void com.pcbsys.nirvana.nAdminAPI.nACL.replace ( nACLEntry  entry) throws nACLEntryNotFoundException, nAdminIllegalArgumentException

Replaces the existing nACLEntry priviliges with the passed nACLEntry.

Useful for changing permissions for a subject within a list

Parameters
entryThe nACLEntry containing the updated priviliges
Exceptions
nACLEntryNotFoundExceptionOnly if the entry could not be found
nAdminIllegalArgumentExceptionif the entry is null
int com.pcbsys.nirvana.nAdminAPI.nACL.size ( )

Returns the number of entries within the list.

Returns
int size of this list