|
SalesPoint Framework v3.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--users.AbstractCapability
Convenience class implementing basic capability behavior.
For convenience you can derive all your capability classes from
AbstractCapability
, which will manage names and display names.
Constructor Summary | |
AbstractCapability(String sName)
Create a new capability with a given name. |
Method Summary | |
String |
getDisplayName()
Get the display name of this capability using the default locale. |
String |
getDisplayName(Locale l)
Get the display name of this capability according to a locale. |
String |
getName()
Get the capability's name. |
abstract Capability |
getToggled()
Get the capability that is the inverse to this one. |
abstract boolean |
isGranted()
Return the grant state of this capability. |
static void |
setDisplayNameResourceBundleName(String sBaseName)
Set the base name for the resouce bundle that contains the capabilities' display names. |
String |
toString()
Return a string representation of this capability. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public AbstractCapability(String sName)
sName
- the name of the capability.Method Detail |
public String getName()
public String getDisplayName()
This is identical to
getDisplayName (Locale.getDefault());
public String getDisplayName(Locale l)
setDisplayNameResourceBundleName(java.lang.String)
.l
- the locale according to which to get the display namepublic abstract boolean isGranted()
public abstract Capability getToggled()
public String toString()
The format of the returned string is:
display name <name>: grant state
public static final void setDisplayNameResourceBundleName(String sBaseName)
capabilities.display_names.capability_name
|
SalesPoint Framework v3.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |