cgl.narada.service.security.kmc
Class TopicRights

java.lang.Object
  extended by cgl.narada.service.security.kmc.TopicRights
All Implemented Interfaces:
Serializable

public class TopicRights
extends Object
implements Serializable

An Object representing the rights, an entity has (subscribe OR publish OR both rights)
Created on Sep 8, 2005

See Also:
Serialized Form

Field Summary
static int PUBLISH_RIGHT
           
static int SUBSCRIBE_RIGHT
           
 
Constructor Summary
TopicRights(int currentRights)
          Create a Topic Rights object.
 
Method Summary
 boolean hasPublishRight()
          Check if the entity has publish rights to this topic
 boolean hasSubscribeRight()
          Check if the entity has subscribe rights to this topic
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PUBLISH_RIGHT

public static final int PUBLISH_RIGHT
See Also:
Constant Field Values

SUBSCRIBE_RIGHT

public static final int SUBSCRIBE_RIGHT
See Also:
Constant Field Values
Constructor Detail

TopicRights

public TopicRights(int currentRights)
Create a Topic Rights object. Once set, they cannot be modified.
NOTE: Valid values are 0, 1, 2, 3 ONLY if any other value is specified then rights are nullified (Set to 0) !

Parameters:
currentRights -
Method Detail

toString

public String toString()
Overrides:
toString in class Object

hasPublishRight

public boolean hasPublishRight()
Check if the entity has publish rights to this topic

Returns:
TRUE if the entity has publish rights, FALSE otherwise

hasSubscribeRight

public boolean hasSubscribeRight()
Check if the entity has subscribe rights to this topic

Returns:
TRUE if the entity has subscribe rights, FALSE otherwise


For comments and suggestions please send e-mail to The NaradaBrokering Project