com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry Class Reference

Extends the nACLEntry class to supply Channel/Queue specific security settings. More...

#include <nChannelACLEntry.h>

Inheritance diagram for com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry:
com::pcbsys::nirvana::nAdminAPI::nACLEntry

Public Member Functions

virtual bool canGetLastEID ()
 Can this subject get the last event id from the Channel. More...
 
virtual bool canPop ()
 Can this subject POP events from a Queue. More...
 
virtual bool canPurge ()
 Can this subject remove events from the Channel/Queue using the purge methods. More...
 
virtual bool canRead ()
 Can the subject read from the Queue/Channel. More...
 
virtual bool canUseNamedSubscription ()
 Can this subject use a named subscription on the Channel. More...
 
virtual bool canWrite ()
 Can this subject write to the Queue/Channel. More...
 
virtual int getType ()
 Returns the type of the ACL this entry represents. More...
 
 nChannelACLEntry (const std::string &subject)
 Creates a new nChannelACLEntry for the name supplied. More...
 
 nChannelACLEntry (const std::string &subject, nACLEntry *pCopy)
 Creates a new nChannelACLEntry for the name supplied. More...
 
 nChannelACLEntry (nSecurityGroup *grp)
 Creates a new nChannelACLEntry for the name supplied. More...
 
 nChannelACLEntry (nSecurityGroup *grp, BitArray *pBs)
 Creates a new nChannelACLEntry for the name supplied. More...
 
 nChannelACLEntry (const std::string &name, const std::string &host)
 Creates a new nChannelACLEntry for the name@host supplied. More...
 
 nChannelACLEntry (const std::string &subject, BitArray *pBitset)
 Creates a new nChannelACLEntry for the name@host supplied. More...
 
virtual void setGetLastEID (bool val)
 Allow/Disallow this subject from getting the last EID from the Channel. More...
 
virtual void setPop (bool val)
 Allow/Disallow this subject from popping events from a queue. More...
 
virtual void setPurge (bool val)
 Allow/Disallow this subject from purging events from the queue/channel. More...
 
virtual void setRead (bool val)
 Allow/Disallow this subject from reading from the Channel/Queue. More...
 
virtual void setUseNamedSubscription (bool val)
 Allow/Disallow this subject from creating a named subscription to a Channel. More...
 
virtual void setWrite (bool val)
 Allow/Disallow this subject from writing to the Channel/Queue. More...
 
- Public Member Functions inherited from com::pcbsys::nirvana::nAdminAPI::nACLEntry
virtual bool canList ()
 Can this subject list the contents of an ACL. More...
 
virtual bool canModify ()
 Can this subject modify acl entries in a secure object. More...
 
void copyBitArray (BitArray *pArray)
 Replace the bit array representing the ACL with *pArray. More...
 
BitArray * getBitSet ()
 Creates a new nACLEntry with the subject being name@host. More...
 
virtual const std::string & getHost ()
 Returns the host's name as a string. More...
 
virtual const std::string & getName ()
 Returns the name of the ACLEntry. More...
 
std::string getSubject ()
 This method returns the completed subject User@Host. More...
 
virtual bool hasFullPrivileges ()
 Does this subject have full privileges for the secure object. More...
 
virtual bool lessThan (nACLEntry *pItem)
 Used to compares this Object with another to determine sorting position. More...
 
virtual bool lessThan (longlong aLong)
 Required as part of the SortedObject interface. More...
 
 nACLEntry (const std::string &name, const std::string &host)
 Creates a new nACLEntry with the subject being name@host. More...
 
 nACLEntry (const std::string &subject, BitArray *pBitset=NULL)
 Creates a new nACLEntry with the subject being name@host. More...
 
virtual void setFullPrivileges (bool val)
 Sets the subject to have full privileges for this secure object allowing the subject complete control over the secure object. More...
 
virtual void setList (bool val)
 Changes the current setting for this user to allow/disallow ACL listing. More...
 
virtual void setModify (bool val)
 Changes the current setting for this subject to allow/disallow modifying ACL. More...
 

Detailed Description

Extends the nACLEntry class to supply Channel/Queue specific security settings.

See Also
nACLEntry

Constructor & Destructor Documentation

com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::nChannelACLEntry ( const std::string &  subject)

Creates a new nChannelACLEntry for the name supplied.

By default this subject has NO privileges and they must be set.

See Also
nACLEntry
Parameters
subjectof the form user
Exceptions
nAdminIllegalArgumentExceptionif an invalid or null argument is passed
com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::nChannelACLEntry ( const std::string &  subject,
nACLEntry pCopy 
)

Creates a new nChannelACLEntry for the name supplied.

By default this subject has NO privileges and they must be set.

See Also
nACLEntry
Parameters
subjectof the form user
copyAn nACLEntry to copy the current permissions from
Exceptions
nAdminIllegalArgumentExceptionif an invalid or null argument is passed
com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::nChannelACLEntry ( nSecurityGroup grp)

Creates a new nChannelACLEntry for the name supplied.

By default this subject has NO privileges and they must be set.

See Also
nACLEntry
Parameters
grpgroup name
Exceptions
nAdminIllegalArgumentExceptionif an invalid or null argument is passed
com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::nChannelACLEntry ( nSecurityGroup grp,
BitArray *  pBs 
)

Creates a new nChannelACLEntry for the name supplied.

By default this subject has NO privileges and they must be set.

See Also
nACLEntry
Parameters
grpgroup name
Exceptions
nAdminIllegalArgumentExceptionif an invalid or null argument is passed
com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::nChannelACLEntry ( const std::string &  name,
const std::string &  host 
)

Creates a new nChannelACLEntry for the name@host supplied.

By default this subject has NO privileges and they must be set.

See Also
nACLEntry
Parameters
nameName for the subject
hostHost name for the subject
Exceptions
nAdminIllegalArgumentExceptionif an invalid or null argument is passed
com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::nChannelACLEntry ( const std::string &  subject,
BitArray *  pBitset 
)

Creates a new nChannelACLEntry for the name@host supplied.

By default this subject has NO privileges and they must be set.

See Also
nACLEntry
Parameters
subjectName for the subject
*pBitsetthe bitset denoting the permissions for this nACLEntry
Exceptions
nAdminIllegalArgumentExceptionif an invalid or null argument is passed

Member Function Documentation

virtual bool com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::canGetLastEID ( )
virtual

Can this subject get the last event id from the Channel.

The Queue does not support this function

Returns
The current subject permission status as a boolean
virtual bool com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::canPop ( )
virtual

Can this subject POP events from a Queue.

Since a POP is an atomic read/write operation since it removes the event from the queue. However a user can pop events but might not be permitted to write events to the queue.

Returns
The current subject permission status as a boolean
virtual bool com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::canPurge ( )
virtual

Can this subject remove events from the Channel/Queue using the purge methods.

Returns
The current subject permission status as a boolean
virtual bool com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::canRead ( )
virtual

Can the subject read from the Queue/Channel.

If true the subject can pop/peek a queue and subscribe to a channel

Returns
The current subject permission status as a boolean
virtual bool com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::canUseNamedSubscription ( )
virtual

Can this subject use a named subscription on the Channel.

When using a named subscription, the state of the last Event received by the subscription is kept by the Server.

If the Connection is dropped and restarted with the same name, the server will automatically start the subscription from where the last event received, without the user needing to supply an Event ID to start from.

Returns
The current subject permission status as a boolean
virtual bool com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::canWrite ( )
virtual

Can this subject write to the Queue/Channel.

If the secure object is a Channel it means the subject can publish to it, if it is a Queue the subject can push on to the queue.

Returns
The current subject permission status as a boolean
virtual int com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::getType ( )
virtual

Returns the type of the ACL this entry represents.

In this case the ACL entry represents a channel ACL entry.

Returns
the type of this ACL entry.
virtual void com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::setGetLastEID ( bool  val)
virtual

Allow/Disallow this subject from getting the last EID from the Channel.

Parameters
vala Boolean flag indicating the subject's permission status
virtual void com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::setPop ( bool  val)
virtual

Allow/Disallow this subject from popping events from a queue.

Parameters
vala Boolean flag indicating the subject's permission status
virtual void com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::setPurge ( bool  val)
virtual

Allow/Disallow this subject from purging events from the queue/channel.

Parameters
vala Boolean flag indicating the subject's permission status
virtual void com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::setRead ( bool  val)
virtual

Allow/Disallow this subject from reading from the Channel/Queue.

Parameters
vala bool flag indicating the subject's permission status
virtual void com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::setUseNamedSubscription ( bool  val)
virtual

Allow/Disallow this subject from creating a named subscription to a Channel.

Parameters
vala Boolean flag indicating the subject's permission status
virtual void com::pcbsys::nirvana::nAdminAPI::nChannelACLEntry::setWrite ( bool  val)
virtual

Allow/Disallow this subject from writing to the Channel/Queue.

Parameters
vala Boolean flag indicating the subject's permission status