org.salespointframework.web.helper
Class NameCapability

java.lang.Object
  extended by org.salespointframework.core.users.AbstractCapability
      extended by org.salespointframework.web.helper.NameCapability
All Implemented Interfaces:
Capability

public class NameCapability
extends AbstractCapability

A default implementation of Capability using AbstractCapability just identifying a Capability by the given name.

Author:
Lars Kreisz, Uwe Schmidt

Constructor Summary
NameCapability(java.lang.String capabilityName)
           
 
Method Summary
 Capability getToggled()
          Get the capability that is the inverse to this one.
 boolean isGranted()
          Return the grant state of this capability.
 
Methods inherited from class org.salespointframework.core.users.AbstractCapability
getDisplayName, getDisplayName, getName, setDisplayNameResourceBundleName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameCapability

public NameCapability(java.lang.String capabilityName)
Parameters:
capabilityName - the name
Method Detail

getToggled

public Capability getToggled()
Description copied from class: AbstractCapability
Get the capability that is the inverse to this one. This method is abstract and you'll have to redefine it in subclasses.

Specified by:
getToggled in interface Capability
Specified by:
getToggled in class AbstractCapability
Returns:
null

isGranted

public boolean isGranted()
Description copied from class: AbstractCapability
Return the grant state of this capability. This method is abstract and you'll have to redefine it in subclasses.

Specified by:
isGranted in interface Capability
Specified by:
isGranted in class AbstractCapability
Returns:
true