com.pcbsys.nirvana.client.nStorePermission Class Reference

Class that provides ability for setting specific Channel/Queue security settings. More...

Public Member Functions

boolean canGetLastEventId ()
 Checks whether the specified user has permission to access last event id. More...
 
boolean canManage ()
 Checks whether the specified user has permission to add and remove other permissions. More...
 
boolean canPop ()
 Checks whether the specified user has permission to pop from a Queue. More...
 
boolean canPurge ()
 Checks whether the specified user can purge events from the Queue/Channel. More...
 
boolean canRead ()
 Checks whether the specified user has permission to read from a destination. More...
 
boolean canUseNamedSubscription ()
 Checks whether the specified user has permission to to use named subscription. More...
 
boolean canWrite ()
 Checks whether the specified user has permission to write to a destination. More...
 
String getHost ()
 Returns the host name for which the permission entry has been created. More...
 
String getName ()
 Returns the name of the group or the user for this permission entry. More...
 
long getPermissions ()
 Returns the permissions to be applied on a Channel/Queue as long. More...
 
String getSubject ()
 Returns the complete subject in the format user. More...
 
boolean hasFullPrivileges ()
 Checks whether the specified user has full privileges for the Queue/Channel. More...
 
boolean isGroup ()
 Checks whether the current instance containing information about the permissions to be set on a Queue/Channel has been created for a group or for a single user. More...
 

Static Public Member Functions

static nStorePermission createForGroup (String groupName, long permissionMask) throws com.pcbsys.nirvana.base.nIllegalArgumentException
 Creates a new nStorePermission object for the group with the provided name and the given permission mask. More...
 
static nStorePermission createForUser (String user, String host, long permissionMask) throws com.pcbsys.nirvana.base.nIllegalArgumentException
 Creates a new nStorePermission object for teh supplied user and the given permission mask. More...
 
static nStorePermission createForUser (String subject, long permissionMask) throws com.pcbsys.nirvana.base.nIllegalArgumentException
 Creates a new nStorePermission object for teh supplied user and the given permission mask. More...
 

Detailed Description

Class that provides ability for setting specific Channel/Queue security settings.

Member Function Documentation

boolean com.pcbsys.nirvana.client.nStorePermission.canGetLastEventId ( )

Checks whether the specified user has permission to access last event id.

This is applicable only for Channels.

Returns
true if the user can access last event id, false otherwise
Since
9.12
boolean com.pcbsys.nirvana.client.nStorePermission.canManage ( )

Checks whether the specified user has permission to add and remove other permissions.

Returns
true if the user has manage permissions, false otherwise
Since
9.12
boolean com.pcbsys.nirvana.client.nStorePermission.canPop ( )

Checks whether the specified user has permission to pop from a Queue.

This is applicable only for Queues.

Returns
true if the user can pop events, false otherwise
Since
9.12
boolean com.pcbsys.nirvana.client.nStorePermission.canPurge ( )

Checks whether the specified user can purge events from the Queue/Channel.

Returns
true if the user has purge permission, false otherwise
Since
9.12
boolean com.pcbsys.nirvana.client.nStorePermission.canRead ( )

Checks whether the specified user has permission to read from a destination.

Read permission is equivalent to subscribe for a Channel and peek for a Queue respectively.

Returns
true if the user has permission to read, false otherwise
Since
9.12
boolean com.pcbsys.nirvana.client.nStorePermission.canUseNamedSubscription ( )

Checks whether the specified user has permission to to use named subscription.

This is applicable only for Channels.

Returns
true if the user is authorized to use named subscriptions, false otherwise
Since
9.12
boolean com.pcbsys.nirvana.client.nStorePermission.canWrite ( )

Checks whether the specified user has permission to write to a destination.

Write permission is equivalent to publish for a Channel and push for a Queue respectively.

Returns
true if the user has permission to write, false otherwise
Since
9.12
static nStorePermission com.pcbsys.nirvana.client.nStorePermission.createForGroup ( String  groupName,
long  permissionMask 
) throws com.pcbsys.nirvana.base.nIllegalArgumentException
static

Creates a new nStorePermission object for the group with the provided name and the given permission mask.

Parameters
groupNamename of the group
permissionMaskpermission mask to be applied to the Channel/Queue
Returns
new nStorePermission instance
Exceptions
com.pcbsys.nirvana.base.nIllegalArgumentExceptionif an invalid or empty group name is passed
Since
9.12
static nStorePermission com.pcbsys.nirvana.client.nStorePermission.createForUser ( String  user,
String  host,
long  permissionMask 
) throws com.pcbsys.nirvana.base.nIllegalArgumentException
static

Creates a new nStorePermission object for teh supplied user and the given permission mask.

Parameters
username of the user
hostname of the host
permissionMaskpermission mask to be applied to the Channel/Queue
Returns
new nStorePermission instance
Exceptions
com.pcbsys.nirvana.base.nIllegalArgumentExceptionif an invalid or empty user or host is passed
Since
9.12
static nStorePermission com.pcbsys.nirvana.client.nStorePermission.createForUser ( String  subject,
long  permissionMask 
) throws com.pcbsys.nirvana.base.nIllegalArgumentException
static

Creates a new nStorePermission object for teh supplied user and the given permission mask.

Parameters
subjectString in the form user
permissionMaskpermission mask to be applied to the Channel/Queue
Returns
new nStorePermission instance
Exceptions
com.pcbsys.nirvana.base.nIllegalArgumentExceptionif an invalid subject is passed
Since
9.12
String com.pcbsys.nirvana.client.nStorePermission.getHost ( )

Returns the host name for which the permission entry has been created.

In case a group permission is created null is returned.

Returns
the name of the host
Since
9.12
String com.pcbsys.nirvana.client.nStorePermission.getName ( )

Returns the name of the group or the user for this permission entry.

Returns
group or user name
Since
9.12
long com.pcbsys.nirvana.client.nStorePermission.getPermissions ( )

Returns the permissions to be applied on a Channel/Queue as long.

Returns
permission mask to be set on a Channel/Queue
Since
9.12
String com.pcbsys.nirvana.client.nStorePermission.getSubject ( )

Returns the complete subject in the format user.

In case a group permission is created, the name of the group is returned.

Returns
String representation of the subject
Since
9.12
boolean com.pcbsys.nirvana.client.nStorePermission.hasFullPrivileges ( )

Checks whether the specified user has full privileges for the Queue/Channel.

Returns
true if the user has full privileges set, false otherwise
Since
9.12
boolean com.pcbsys.nirvana.client.nStorePermission.isGroup ( )

Checks whether the current instance containing information about the permissions to be set on a Queue/Channel has been created for a group or for a single user.

Returns
true if the permission entry has been created for a group, false otherwise
Since
9.12