|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.security.Configurable
org.mmbase.security.ActionRepository
public abstract class ActionRepository
The defined 'actions' are maintained by the Action repository. The security implementation can
decide how to persist actions and how to connect rights to it, and hence is responsible for
implementation this.
Every action is identified by two
strings: a namespace (which may be null) and it's name. Namespaces are likely to correspond with Components.
Action action = ActionRepository.getInstance().get("core", "viewsource");
Parameters params = action.createParameters();
// perhaps supply some parameters, not needed in this case (it may be null then too).
if (cloud.check(cloud.getUser(), action, parameters)) { // checks if current user may view the source
/// show the source..
...
} else {
return "not allowed to view the source";
}
Action| Field Summary | |
|---|---|
protected static ActionRepository |
bootstrap
|
| Fields inherited from class org.mmbase.security.Configurable |
|---|
configResource, configWatcher, manager |
| Constructor Summary | |
|---|---|
ActionRepository()
|
|
| Method Summary | |
|---|---|
abstract void |
add(Action a)
Adds the action to the repository using Action.getNameSpace() and Action.getName(). |
void |
fillFromXml(Element el,
String name)
|
abstract Map<String,Action> |
get(String nameSpace)
All actions of a certain namespace. |
Action |
get(String nameSpace,
String name)
Shortcut for get(String).Map.get(java.lang.Object). |
abstract Collection<Action> |
getActions()
All actions managed by this repository |
static ActionRepository |
getInstance()
Returns the ActionRepository associated with the current MMBase's MMBaseCop. |
| Methods inherited from class org.mmbase.security.Configurable |
|---|
load, load |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static ActionRepository bootstrap
| Constructor Detail |
|---|
public ActionRepository()
| Method Detail |
|---|
public static final ActionRepository getInstance()
MMBaseCop. Or if
that doesn't provide one, returns a MemoryActionRepository.
public void fillFromXml(Element el,
String name)
public abstract void add(Action a)
Action.getNameSpace() and Action.getName().
public abstract Map<String,Action> get(String nameSpace)
public final Action get(String nameSpace,
String name)
get(String).Map.get(java.lang.Object).
public abstract Collection<Action> getActions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||