|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.gee.spectacle.gee.NavigationRules
public class NavigationRules
NavigationRules control the elements of a NavigationSpecification.
It can enforce e.g. the minimum (maximum) depth at which MetaNavigationStep
may occur, allow (deny) sequences of labels.
As an application programmer, you should not use this class directly, unless
you know what you are doing.
| Field Summary | |
|---|---|
static int |
MAX_DEPTH
The absolute maximum number of meta-steps in the navigation. |
| Constructor Summary | |
|---|---|
NavigationRules()
Required for Jazzz (and until now the only constructor). |
|
| Method Summary | |
|---|---|
protected static Set |
_removeAll(Set first,
Set second)
This method saves memory by reusing the same set as much as possible. |
protected Set |
_sharedSetOf(Set s)
This method saves memory by reusing the same set as much as possible. |
protected static Set |
_unionOf(Set first,
Set second)
This method saves memory by reusing the same set as much as possible. |
void |
allow(String label,
Set labels)
This is a more friendly interface to NavigationSpecification's allowContentSteps. |
void |
apply(JitNavigationSpecification spec,
Collection pastSteps,
Collection futureSteps)
Apply the current restrictions to a NavigationSpecification, given the collection of MetaNavigationSteps taken and the collection of MetaNavigationSteps still available. |
void |
deny(String label,
Set labels)
This is a more friendly interface to NavigationSpecification's denyContentSteps. |
void |
enforceDepth(Object id,
int lower,
int upper)
Make sure that a meta step, identified by the id, occurs in a certain depth range only. |
void |
enforceMaximumDepth(Object id,
int upper)
|
void |
enforceMinimumDepth(Object id,
int lower)
|
void |
enforceSequence(Object firstId,
Object secondId)
Make sure that a meta step, identified by secondId, does not occur before a meta step, identified by firstId. |
int |
getMaxDepth()
Get the maximum depth of the navigation (in Meta steps only). |
void |
mergeWith(NavigationRules other)
Add the restrictions of other to this rules. |
void |
mutuallyExclusive(Object firstId,
Object secondId)
Make sure that two meta steps never occur in combination. |
void |
removeSequence(Object firstId,
Object secondId)
Make sure that a meta step, identified by the secondId, does not occur after a meta step, identified by firstId. |
void |
setMaxDepth(int maxDepth)
Set the maximum depth of the navigation (in Meta steps only). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_DEPTH
| Constructor Detail |
|---|
public NavigationRules()
| Method Detail |
|---|
public void setMaxDepth(int maxDepth)
maxDepth - the maximum depth of the navigation (in Meta steps only)MAX_DEPTHpublic int getMaxDepth()
public void enforceDepth(Object id,
int lower,
int upper)
id - the (internal) name of the meta steplower - the minimum depth (inclusive)upper - the maximum depth (inclusive)
public void enforceMinimumDepth(Object id,
int lower)
enforceDepth(java.lang.Object, int, int)
public void enforceMaximumDepth(Object id,
int upper)
enforceDepth(java.lang.Object, int, int)
public void removeSequence(Object firstId,
Object secondId)
firstId - the (internal) name of the first meta stepsecondId - the (internal) name of the second meta step
public void mutuallyExclusive(Object firstId,
Object secondId)
firstId - the (internal) name of the first meta stepsecondId - the (internal) name of the second meta step
public void enforceSequence(Object firstId,
Object secondId)
firstId - the (internal) name of the first meta stepsecondId - the (internal) name of the second meta step
public void allow(String label,
Set labels)
label - the label for which the restrictions applylabels - the only labels allowed to follow the label -or- when currently labels are denied
to follow label, these labels are again allowed
public void deny(String label,
Set labels)
label - the label for which the restrictions applylabels - the only labels denied to follow the label -or- when currently labels are allowed
to follow label, these labels are again denied
public void apply(JitNavigationSpecification spec,
Collection pastSteps,
Collection futureSteps)
spec - the unrestricted NavigationSpecificationpastSteps - the MetaNavigationSteps takenfutureSteps - the MetaNavigationSteps still availablepublic void mergeWith(NavigationRules other)
other - the NavigationRules object to merge with (unchanged)
protected static Set _unionOf(Set first,
Set second)
protected static Set _removeAll(Set first,
Set second)
protected Set _sharedSetOf(Set s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||