|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.api.core.context.alias.PropertyAliasMapping
@NotThreadSafe public final class PropertyAliasMapping
The mapping of alias names of property reports to their physical names. The physical names are those file names that are stored in the META-INF
folder or on the server in the case of HTML reports. The alias names are alternative, unique naming schemes that refer to the same files.
Constructor Summary | |
---|---|
PropertyAliasMapping() Default constructor. |
Method Summary | |
---|---|
void |
add(String alias, String target) Adds a new alias to the given physical resource. |
String |
get(String alias) Returns the target the alias points to. |
boolean |
has(String alias) Checks if the given alias is registered. |
boolean |
isEmpty() Checks whether any aliases are registered. |
void |
traverse(AliasTraverser traverser) Traverses the registered aliases. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyAliasMapping()
Method Detail |
---|
public void add(String alias, String target) throws de.smartics.util.lang.BlankArgumentException, DuplicateAliasException
alias
- the new alias.
target
- the resource the alias refers to.
de.smartics.util.lang.BlankArgumentException
- if either
alias
or
target
is blank.
DuplicateAliasException
- if there is already an alias registered that points to a different physical resource.
public boolean has(String alias) throws de.smartics.util.lang.BlankArgumentException
alias
- the alias to check.
true
if the alias is known to the system,
false
otherwise.
de.smartics.util.lang.BlankArgumentException
- if
alias
is blank.
public String get(String alias) throws de.smartics.util.lang.BlankArgumentException, UnknownAliasException
alias
- the alias whose physical resource is requested.
de.smartics.util.lang.BlankArgumentException
- if
alias
is blank.
UnknownAliasException
- if the alias is not known.
public void traverse(AliasTraverser traverser) throws NullPointerException
traverser
- the traverser to use.
NullPointerException
- if
traverser
is
null
.
public boolean isEmpty()
false
if at least one alias is registered,
true
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |